Changes in / [c821e8a:cce0450]


Ignore:
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • bitlbee.c

    rc821e8a rcce0450  
    5454        ;
    5555
    56         i = getaddrinfo( global.conf->iface_in, global.conf->port, &hints, &addrinfo_bind );
     56        i = getaddrinfo( global.conf->iface, global.conf->port, &hints, &addrinfo_bind );
    5757        if( i )
    5858        {
    5959                log_message( LOGLVL_ERROR, "Couldn't parse address `%s': %s",
    60                                            global.conf->iface_in, gai_strerror(i) );
     60                                           global.conf->iface, gai_strerror(i) );
    6161                return -1;
    6262        }
  • bitlbee.conf

    rc821e8a rcce0450  
    1010##
    1111##  Inetd -- Run from inetd (default)
    12 ##  Daemon -- Run as a stand-alone daemon, serving all users from one process.
    13 ##    This saves memory if there are more users, the downside is that when one
    14 ##    user hits a crash-bug, all other users will also lose their connection.
     12##  Daemon -- Run as a stand-alone daemon -- EXPERIMENTAL! BitlBee is not yet
     13##    stable enough to serve lots of users from one process. Because of this
     14##    and other reasons, the use of daemon-mode is *STRONGLY* discouraged,
     15##    don't even *think* of reporting bugs when you use this.
    1516##  ForkDaemon -- Run as a stand-alone daemon, but keep all clients in separate
    1617##    child processes. This should be pretty safe and reliable to use instead
     
    3334# DaemonInterface = 0.0.0.0
    3435# DaemonPort = 6667
    35 
    36 ## ClientInterface:
    37 ##
    38 ## If for any reason, you want BitlBee to use a specific address/interface
    39 ## for outgoing traffic (IM connections, HTTP(S), etc.), set it here.
    40 ##
    41 # ClientInterface = 0.0.0.0
    4236
    4337## AuthMode
  • conf.c

    rc821e8a rcce0450  
    4545        conf = g_new0( conf_t, 1 );
    4646       
    47         conf->iface_in = NULL;
    48         conf->iface_out = NULL;
     47        conf->iface = NULL;
    4948        conf->port = g_strdup( "6667" );
    5049        conf->nofork = 0;
     
    8483                if( opt == 'i' )
    8584                {
    86                         conf->iface_in = g_strdup( optarg );
     85                        conf->iface = g_strdup( optarg );
    8786                }
    8887                else if( opt == 'p' )
     
    133132                                "\n"
    134133                                "  -I  Classic/InetD mode. (Default)\n"
    135                                 "  -D  Daemon mode. (one process serves all)\n"
     134                                "  -D  Daemon mode. (Still EXPERIMENTAL!)\n"
    136135                                "  -F  Forking daemon. (one process per client)\n"
    137136                                "  -u  Run daemon as specified user.\n"
     
    204203                        else if( g_strcasecmp( ini->key, "daemoninterface" ) == 0 )
    205204                        {
    206                                 g_free( conf->iface_in );
    207                                 conf->iface_in = g_strdup( ini->value );
     205                                g_free( conf->iface );
     206                                conf->iface = g_strdup( ini->value );
    208207                        }
    209208                        else if( g_strcasecmp( ini->key, "daemonport" ) == 0 )
     
    211210                                g_free( conf->port );
    212211                                conf->port = g_strdup( ini->value );
    213                         }
    214                         else if( g_strcasecmp( ini->key, "clientinterface" ) == 0 )
    215                         {
    216                                 g_free( conf->iface_out );
    217                                 conf->iface_out = g_strdup( ini->value );
    218212                        }
    219213                        else if( g_strcasecmp( ini->key, "authmode" ) == 0 )
  • conf.h

    rc821e8a rcce0450  
    3232typedef struct conf
    3333{
    34         char *iface_in, *iface_out;
     34        char *iface;
    3535        char *port;
    3636        int nofork;
  • debian/changelog

    rc821e8a rcce0450  
    11bitlbee (1.2-4) unstable; urgency=low
    22
     3  * Not a real release, just a placeholder for the changelog.
    34  * Fixed init script to use the BITLBEE_OPTS variable, not an undefined
    4     DAEMON_OPT. (Closes: #474583)
     5    DAEMON_OPT.
    56  * Added dependency information to the init script. (Closes: #472567)
    6   * Added bitlbee-dev package. Patch from RISKO Gergely <risko@debian.org>
    7     with some small modifications. (Closes: #473480)
    8 
    9  -- Wilmer van der Gaast <wilmer@gaast.net>  Wed, 07 May 2008 22:40:40 -0700
     7
     8 -- Wilmer van der Gaast <wilmer@gaast.net>  Sat, 29 Mar 2008 21:10:33 +0000
    109
    1110bitlbee (1.2-3) unstable; urgency=low
  • debian/control

    rc821e8a rcce0450  
    1212 This program can be used as an IRC server which forwards everything you
    1313 say to people on other chat networks: Jabber, ICQ, AIM, MSN and Yahoo.
    14 
    15 Package: bitlbee-dev
    16 Architecture: all
    17 Depends: bitlbee (= ${binary:Version})
    18 Description: An IRC to other chat networks gateway
    19  This program can be used as an IRC server which forwards everything you
    20  say to people on other chat networks: Jabber, ICQ, AIM, MSN and Yahoo.
    21  .
    22  This package holds development stuff for compiling plug-ins.
  • debian/rules

    rc821e8a rcce0450  
    1313build-arch: build-arch-stamp
    1414build-arch-stamp:
    15         [ -d debian ]
     15        if [ ! -d debian ]; then exit 1; fi
    1616        ./configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --events=libevent
    1717        $(MAKE)
     
    2020
    2121clean:
    22         [ "`whoami`" = "root" -a -d debian ]
    23         rm -rf build-arch-stamp debian/bitlbee debian/*.substvars debian/files debian/bitlbee-dev
     22        if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi
     23        rm -rf build-arch-stamp debian/bitlbee debian/*.substvars debian/files
    2424        -$(MAKE) distclean
    2525#       -$(MAKE) -C doc/ clean
     
    2727
    2828install-arch: build-arch
    29         [ "`whoami`" = "root" -a -d debian ]
     29        if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi
    3030        mkdir -p debian/bitlbee/DEBIAN/
    3131        $(MAKE) install install-etc DESTDIR=`pwd`/debian/bitlbee
     
    3535        cp doc/user-guide/user-guide.html debian/bitlbee/usr/share/doc/bitlbee/
    3636
    37 install-indep: install-arch
    38         [ "`whoami`" = "root" -a -d debian ]
    39         mkdir -p debian/bitlbee-dev/DEBIAN/
    40         $(MAKE) install-dev DESTDIR=`pwd`/debian/bitlbee-dev
    41 
    42         mkdir -p debian/bitlbee-dev/usr/share/doc/bitlbee-dev/
    43 
    4437binary-arch: build-arch install-arch
    45         [ "`whoami`" = "root" -a -d debian ]
     38        if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi
    4639
    4740        chmod 755 debian/post* debian/pre* debian/config debian/bitlbee.init
     
    5952                        doc/bitlbee/examples/* man/man8/bitlbee.8 man/man5/bitlbee.conf.5
    6053       
    61         chown -R root:root debian/bitlbee/
     54        chown -R root.root debian/bitlbee/
    6255        find debian/bitlbee/usr/share/ -type d -exec chmod 755 {} \;
    6356        find debian/bitlbee/usr/share/ -type f -exec chmod 644 {} \;
     
    8477        dpkg --build debian/bitlbee ..
    8578
    86 binary-indep: install-indep
    87         [ "`whoami`" = "root" -a -d debian ]
     79debug-build:
     80        BITLBEE_VERSION=\"`date +%Y%m%d`-`hostname`-debug\" debian/rules clean binary DEBUG=1
    8881
    89         chown -R root.root debian/bitlbee-dev/
    90         find debian/bitlbee-dev/usr/share/ -type d -exec chmod 755 {} \;
    91         find debian/bitlbee-dev/usr/share/ -type f -exec chmod 644 {} \;
     82binary: binary-arch
     83build: build-arch
     84install: install-arch
    9285
    93         cp debian/changelog debian/bitlbee-dev/usr/share/doc/bitlbee-dev/changelog.Debian
    94         gzip -9 debian/bitlbee-dev/usr/share/doc/bitlbee-dev/changelog.Debian
    95         cp debian/copyright debian/bitlbee-dev/usr/share/doc/bitlbee-dev/copyright
    96 
    97         cd debian/bitlbee-dev; \
    98                 find usr -type f -exec md5sum {} \; > DEBIAN/md5sums
    99 
    100         dpkg-gencontrol -ldebian/changelog -isp -pbitlbee-dev -Pdebian/bitlbee-dev
    101 
    102         dpkg --build debian/bitlbee-dev ..
    103 
    104 binary: binary-arch binary-indep
    105 build: build-arch
    106 install: install-arch install-indep
    107 
    108 .PHONY: build-arch build clean binary-arch binary install-arch install binary-indep install-indep
     86.PHONY: build-arch build clean binary-arch binary install-arch install
  • doc/README

    rc821e8a rcce0450  
    5656a package from your distro would've been a better idea. :-P)
    5757
    58 Note that the BitlBee code is getting stable enough for daemon mode to be
    59 useful. Some public servers use it, and it saves a lot of memory by serving
    60 tens of users from a single process. One crash affects all users, but these
    61 are becoming quite rare.
    62 
    6358
    6459DEPENDENCIES
     
    10398versions of make, we'd love to hear it, but it seems this just isn't
    10499possible.
     100
     101
     102RUNNING ON SERVERS WITH MANY USERS
     103==================================
     104
     105BitlBee is not yet bug-free. Sometimes a bug causes the program to get into
     106an infinite loop. Something you really don't want on a public server,
     107especially when that machine is also used for other (mission-critical) things.
     108For now we can't do much about it. We haven't seen that happen for a long
     109time already on our own machines, but some people still manage to get
     110themselves in nasty situations we haven't seen before.
     111
     112For now the best we can offer against this problem is bitlbeed, which allows
     113you to setrlimit() the child processes to use no more than a specified
     114number of CPU seconds. Not the best solution (not really a solution anyway),
     115but certainly trashing one busy daemon process is better than trashing your
     116whole machine.
     117
     118We don't believe adding a limit for bitlbee to /etc/security/limits.conf will
     119work, because that file is only read by PAM (ie just for real login users,
     120not daemons).
     121
     122See utils/bitlbeed.c for more information about the program.
     123
     124Just a little note: Now that we reach version 1.0, this shouldn't be that
     125much of an issue anymore. However, on a public server, especially if you
     126also use it for other things, it can't hurt to protect yourself against
     127possible problems.
    105128
    106129
  • doc/bitlbee.8

    rc821e8a rcce0450  
    4444
    4545\fBbitlbee\fP should be called by
    46 .BR inetd (8),
    47 or you can run it as a stand-alone daemon.
     46.BR inetd (8).
     47(Or \fBbitlbeed\fP,
     48if you can't run and/or configure \fBinetd\fP.) There is an experimental
     49daemon mode too, in which BitlBee will serve all clients in one process
     50(and does not require inetd), but this mode is still experimental.
     51There are still some bugs left in BitlBee, and if they cause a crash,
     52that would terminate the BitlBee connection for all clients.
    4853.PP
    4954.SH OPTIONS
     
    5762Run in daemon mode. In this mode, BitlBee forks to the background and
    5863waits for new connections. All clients will be served from one process.
     64This is still experimental. See the note above for more information.
    5965.IP "-F"
    6066Run in ForkDaemon mode. This is similar to ordinary daemon mode, but every
    61 client gets its own process. Easier to set up than inetd mode, and without
     67client gets its own process. Easier to set up than inetd mode, but without
    6268the possible stability issues.
    6369.IP "-i \fIaddress\fP"
  • lib/proxy.c

    rc821e8a rcce0450  
    114114{
    115115        struct sockaddr_in *sin;
    116         struct sockaddr_in me;
    117116        int fd = -1;
    118117
     
    128127
    129128        sock_make_nonblocking(fd);
    130        
    131         if( global.conf->iface_out )
    132         {
    133                 me.sin_family = AF_INET;
    134                 me.sin_port = 0;
    135                 me.sin_addr.s_addr = inet_addr( global.conf->iface_out );
    136                
    137                 if( bind( fd, (struct sockaddr *) &me, sizeof( me ) ) != 0 )
    138                         event_debug( "bind( %d, \"%s\" ) failure\n", fd, global.conf->iface_out );
    139         }
    140129       
    141130        event_debug("proxy_connect_none( \"%s\", %d ) = %d\n", host, port, fd);
  • protocols/msn/ns.c

    rc821e8a rcce0450  
    178178                       
    179179                        debug( "Connecting to a new switchboard with key %s", cmd[5] );
    180 
    181                         if( ( sb = msn_sb_create( ic, server, port, cmd[5], MSN_SB_NEW ) ) == NULL )
    182                         {
    183                                 /* Although this isn't strictly fatal for the NS connection, it's
    184                                    definitely something serious (we ran out of file descriptors?). */
    185                                 imcb_error( ic, "Could not create new switchboard" );
    186                                 imc_logout( ic, TRUE );
    187                                 return( 0 );
    188                         }
     180                        sb = msn_sb_create( ic, server, port, cmd[5], MSN_SB_NEW );
    189181                       
    190182                        if( md->msgq )
     
    476468                debug( "Got a call from %s (session %d). Key = %s", cmd[5], session, cmd[4] );
    477469               
    478                 if( ( sb = msn_sb_create( ic, server, port, cmd[4], session ) ) == NULL )
    479                 {
    480                         /* Although this isn't strictly fatal for the NS connection, it's
    481                            definitely something serious (we ran out of file descriptors?). */
    482                         imcb_error( ic, "Could not create new switchboard" );
    483                         imc_logout( ic, TRUE );
    484                         return( 0 );
    485                 }
    486                 else
    487                 {
    488                         sb->who = g_strdup( cmd[5] );
    489                 }
     470                sb = msn_sb_create( ic, server, port, cmd[4], session );
     471                sb->who = g_strdup( cmd[5] );
    490472        }
    491473        else if( strcmp( cmd[0], "ADD" ) == 0 )
  • root_commands.c

    rc821e8a rcce0450  
    422422                else
    423423                        acc_handle = g_strdup( cmd[2] );
    424                
    425                 if( !acc_handle )
    426                 {
    427                         irc_usermsg( irc, "Not enough parameters given (need %d)", 3 );
    428                         return;
    429                 }
    430424               
    431425                if( ( tmp = strchr( acc_handle, '/' ) ) )
Note: See TracChangeset for help on using the changeset viewer.