Changes in / [c821e8a:cce0450]
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
bitlbee.c
rc821e8a rcce0450 54 54 ; 55 55 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 ); 57 57 if( i ) 58 58 { 59 59 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) ); 61 61 return -1; 62 62 } -
bitlbee.conf
rc821e8a rcce0450 10 10 ## 11 11 ## 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. 15 16 ## ForkDaemon -- Run as a stand-alone daemon, but keep all clients in separate 16 17 ## child processes. This should be pretty safe and reliable to use instead … … 33 34 # DaemonInterface = 0.0.0.0 34 35 # DaemonPort = 6667 35 36 ## ClientInterface:37 ##38 ## If for any reason, you want BitlBee to use a specific address/interface39 ## for outgoing traffic (IM connections, HTTP(S), etc.), set it here.40 ##41 # ClientInterface = 0.0.0.042 36 43 37 ## AuthMode -
conf.c
rc821e8a rcce0450 45 45 conf = g_new0( conf_t, 1 ); 46 46 47 conf->iface_in = NULL; 48 conf->iface_out = NULL; 47 conf->iface = NULL; 49 48 conf->port = g_strdup( "6667" ); 50 49 conf->nofork = 0; … … 84 83 if( opt == 'i' ) 85 84 { 86 conf->iface _in= g_strdup( optarg );85 conf->iface = g_strdup( optarg ); 87 86 } 88 87 else if( opt == 'p' ) … … 133 132 "\n" 134 133 " -I Classic/InetD mode. (Default)\n" 135 " -D Daemon mode. ( one process serves all)\n"134 " -D Daemon mode. (Still EXPERIMENTAL!)\n" 136 135 " -F Forking daemon. (one process per client)\n" 137 136 " -u Run daemon as specified user.\n" … … 204 203 else if( g_strcasecmp( ini->key, "daemoninterface" ) == 0 ) 205 204 { 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 ); 208 207 } 209 208 else if( g_strcasecmp( ini->key, "daemonport" ) == 0 ) … … 211 210 g_free( conf->port ); 212 211 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 );218 212 } 219 213 else if( g_strcasecmp( ini->key, "authmode" ) == 0 ) -
conf.h
rc821e8a rcce0450 32 32 typedef struct conf 33 33 { 34 char *iface _in, *iface_out;34 char *iface; 35 35 char *port; 36 36 int nofork; -
debian/changelog
rc821e8a rcce0450 1 1 bitlbee (1.2-4) unstable; urgency=low 2 2 3 * Not a real release, just a placeholder for the changelog. 3 4 * Fixed init script to use the BITLBEE_OPTS variable, not an undefined 4 DAEMON_OPT. (Closes: #474583)5 DAEMON_OPT. 5 6 * 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 10 9 11 10 bitlbee (1.2-3) unstable; urgency=low -
debian/control
rc821e8a rcce0450 12 12 This program can be used as an IRC server which forwards everything you 13 13 say to people on other chat networks: Jabber, ICQ, AIM, MSN and Yahoo. 14 15 Package: bitlbee-dev16 Architecture: all17 Depends: bitlbee (= ${binary:Version})18 Description: An IRC to other chat networks gateway19 This program can be used as an IRC server which forwards everything you20 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 13 13 build-arch: build-arch-stamp 14 14 build-arch-stamp: 15 [ -d debian ]15 if [ ! -d debian ]; then exit 1; fi 16 16 ./configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --events=libevent 17 17 $(MAKE) … … 20 20 21 21 clean: 22 [ "`whoami`" = "root" -a -d debian ]23 rm -rf build-arch-stamp debian/bitlbee debian/*.substvars debian/files debian/bitlbee-dev22 if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi 23 rm -rf build-arch-stamp debian/bitlbee debian/*.substvars debian/files 24 24 -$(MAKE) distclean 25 25 # -$(MAKE) -C doc/ clean … … 27 27 28 28 install-arch: build-arch 29 [ "`whoami`" = "root" -a -d debian ]29 if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi 30 30 mkdir -p debian/bitlbee/DEBIAN/ 31 31 $(MAKE) install install-etc DESTDIR=`pwd`/debian/bitlbee … … 35 35 cp doc/user-guide/user-guide.html debian/bitlbee/usr/share/doc/bitlbee/ 36 36 37 install-indep: install-arch38 [ "`whoami`" = "root" -a -d debian ]39 mkdir -p debian/bitlbee-dev/DEBIAN/40 $(MAKE) install-dev DESTDIR=`pwd`/debian/bitlbee-dev41 42 mkdir -p debian/bitlbee-dev/usr/share/doc/bitlbee-dev/43 44 37 binary-arch: build-arch install-arch 45 [ "`whoami`" = "root" -a -d debian ]38 if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi 46 39 47 40 chmod 755 debian/post* debian/pre* debian/config debian/bitlbee.init … … 59 52 doc/bitlbee/examples/* man/man8/bitlbee.8 man/man5/bitlbee.conf.5 60 53 61 chown -R root :root debian/bitlbee/54 chown -R root.root debian/bitlbee/ 62 55 find debian/bitlbee/usr/share/ -type d -exec chmod 755 {} \; 63 56 find debian/bitlbee/usr/share/ -type f -exec chmod 644 {} \; … … 84 77 dpkg --build debian/bitlbee .. 85 78 86 binary-indep: install-indep 87 [ "`whoami`" = "root" -a -d debian ]79 debug-build: 80 BITLBEE_VERSION=\"`date +%Y%m%d`-`hostname`-debug\" debian/rules clean binary DEBUG=1 88 81 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 {} \; 82 binary: binary-arch 83 build: build-arch 84 install: install-arch 92 85 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 56 56 a package from your distro would've been a better idea. :-P) 57 57 58 Note that the BitlBee code is getting stable enough for daemon mode to be59 useful. Some public servers use it, and it saves a lot of memory by serving60 tens of users from a single process. One crash affects all users, but these61 are becoming quite rare.62 63 58 64 59 DEPENDENCIES … … 103 98 versions of make, we'd love to hear it, but it seems this just isn't 104 99 possible. 100 101 102 RUNNING ON SERVERS WITH MANY USERS 103 ================================== 104 105 BitlBee is not yet bug-free. Sometimes a bug causes the program to get into 106 an infinite loop. Something you really don't want on a public server, 107 especially when that machine is also used for other (mission-critical) things. 108 For now we can't do much about it. We haven't seen that happen for a long 109 time already on our own machines, but some people still manage to get 110 themselves in nasty situations we haven't seen before. 111 112 For now the best we can offer against this problem is bitlbeed, which allows 113 you to setrlimit() the child processes to use no more than a specified 114 number of CPU seconds. Not the best solution (not really a solution anyway), 115 but certainly trashing one busy daemon process is better than trashing your 116 whole machine. 117 118 We don't believe adding a limit for bitlbee to /etc/security/limits.conf will 119 work, because that file is only read by PAM (ie just for real login users, 120 not daemons). 121 122 See utils/bitlbeed.c for more information about the program. 123 124 Just a little note: Now that we reach version 1.0, this shouldn't be that 125 much of an issue anymore. However, on a public server, especially if you 126 also use it for other things, it can't hurt to protect yourself against 127 possible problems. 105 128 106 129 -
doc/bitlbee.8
rc821e8a rcce0450 44 44 45 45 \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, 48 if you can't run and/or configure \fBinetd\fP.) There is an experimental 49 daemon mode too, in which BitlBee will serve all clients in one process 50 (and does not require inetd), but this mode is still experimental. 51 There are still some bugs left in BitlBee, and if they cause a crash, 52 that would terminate the BitlBee connection for all clients. 48 53 .PP 49 54 .SH OPTIONS … … 57 62 Run in daemon mode. In this mode, BitlBee forks to the background and 58 63 waits for new connections. All clients will be served from one process. 64 This is still experimental. See the note above for more information. 59 65 .IP "-F" 60 66 Run 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, andwithout67 client gets its own process. Easier to set up than inetd mode, but without 62 68 the possible stability issues. 63 69 .IP "-i \fIaddress\fP" -
lib/proxy.c
rc821e8a rcce0450 114 114 { 115 115 struct sockaddr_in *sin; 116 struct sockaddr_in me;117 116 int fd = -1; 118 117 … … 128 127 129 128 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 }140 129 141 130 event_debug("proxy_connect_none( \"%s\", %d ) = %d\n", host, port, fd); -
protocols/msn/ns.c
rc821e8a rcce0450 178 178 179 179 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 ); 189 181 190 182 if( md->msgq ) … … 476 468 debug( "Got a call from %s (session %d). Key = %s", cmd[5], session, cmd[4] ); 477 469 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] ); 490 472 } 491 473 else if( strcmp( cmd[0], "ADD" ) == 0 ) -
root_commands.c
rc821e8a rcce0450 422 422 else 423 423 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 }430 424 431 425 if( ( tmp = strchr( acc_handle, '/' ) ) )
Note: See TracChangeset
for help on using the changeset viewer.