Changeset c821e8a
- Timestamp:
- 2008-06-02T12:58:57Z (16 years ago)
- Branches:
- master
- Children:
- 3355a82
- Parents:
- cce0450 (diff), de8e584 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
bitlbee.c
rcce0450 rc821e8a 54 54 ; 55 55 56 i = getaddrinfo( global.conf->iface , global.conf->port, &hints, &addrinfo_bind );56 i = getaddrinfo( global.conf->iface_in, 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 , gai_strerror(i) );60 global.conf->iface_in, gai_strerror(i) ); 61 61 return -1; 62 62 } -
bitlbee.conf
rcce0450 rc821e8a 10 10 ## 11 11 ## Inetd -- Run from inetd (default) 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. 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. 16 15 ## ForkDaemon -- Run as a stand-alone daemon, but keep all clients in separate 17 16 ## child processes. This should be pretty safe and reliable to use instead … … 34 33 # DaemonInterface = 0.0.0.0 35 34 # 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 36 42 37 43 ## AuthMode -
conf.c
rcce0450 rc821e8a 45 45 conf = g_new0( conf_t, 1 ); 46 46 47 conf->iface = NULL; 47 conf->iface_in = NULL; 48 conf->iface_out = NULL; 48 49 conf->port = g_strdup( "6667" ); 49 50 conf->nofork = 0; … … 83 84 if( opt == 'i' ) 84 85 { 85 conf->iface = g_strdup( optarg );86 conf->iface_in = g_strdup( optarg ); 86 87 } 87 88 else if( opt == 'p' ) … … 132 133 "\n" 133 134 " -I Classic/InetD mode. (Default)\n" 134 " -D Daemon mode. ( Still EXPERIMENTAL!)\n"135 " -D Daemon mode. (one process serves all)\n" 135 136 " -F Forking daemon. (one process per client)\n" 136 137 " -u Run daemon as specified user.\n" … … 203 204 else if( g_strcasecmp( ini->key, "daemoninterface" ) == 0 ) 204 205 { 205 g_free( conf->iface );206 conf->iface = g_strdup( ini->value );206 g_free( conf->iface_in ); 207 conf->iface_in = g_strdup( ini->value ); 207 208 } 208 209 else if( g_strcasecmp( ini->key, "daemonport" ) == 0 ) … … 210 211 g_free( conf->port ); 211 212 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 ); 212 218 } 213 219 else if( g_strcasecmp( ini->key, "authmode" ) == 0 ) -
conf.h
rcce0450 rc821e8a 32 32 typedef struct conf 33 33 { 34 char *iface ;34 char *iface_in, *iface_out; 35 35 char *port; 36 36 int nofork; -
debian/changelog
rcce0450 rc821e8a 1 1 bitlbee (1.2-4) unstable; urgency=low 2 2 3 * Not a real release, just a placeholder for the changelog.4 3 * Fixed init script to use the BITLBEE_OPTS variable, not an undefined 5 DAEMON_OPT. 4 DAEMON_OPT. (Closes: #474583) 6 5 * Added dependency information to the init script. (Closes: #472567) 7 8 -- Wilmer van der Gaast <wilmer@gaast.net> Sat, 29 Mar 2008 21:10:33 +0000 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 9 10 10 11 bitlbee (1.2-3) unstable; urgency=low -
debian/control
rcce0450 rc821e8a 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-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
rcce0450 rc821e8a 13 13 build-arch: build-arch-stamp 14 14 build-arch-stamp: 15 if [ ! -d debian ]; then exit 1; fi15 [ -d debian ] 16 16 ./configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --events=libevent 17 17 $(MAKE) … … 20 20 21 21 clean: 22 if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi23 rm -rf build-arch-stamp debian/bitlbee debian/*.substvars debian/files 22 [ "`whoami`" = "root" -a -d debian ] 23 rm -rf build-arch-stamp debian/bitlbee debian/*.substvars debian/files debian/bitlbee-dev 24 24 -$(MAKE) distclean 25 25 # -$(MAKE) -C doc/ clean … … 27 27 28 28 install-arch: build-arch 29 if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi29 [ "`whoami`" = "root" -a -d debian ] 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-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 37 44 binary-arch: build-arch install-arch 38 if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi45 [ "`whoami`" = "root" -a -d debian ] 39 46 40 47 chmod 755 debian/post* debian/pre* debian/config debian/bitlbee.init … … 52 59 doc/bitlbee/examples/* man/man8/bitlbee.8 man/man5/bitlbee.conf.5 53 60 54 chown -R root .root debian/bitlbee/61 chown -R root:root debian/bitlbee/ 55 62 find debian/bitlbee/usr/share/ -type d -exec chmod 755 {} \; 56 63 find debian/bitlbee/usr/share/ -type f -exec chmod 644 {} \; … … 77 84 dpkg --build debian/bitlbee .. 78 85 79 debug-build: 80 BITLBEE_VERSION=\"`date +%Y%m%d`-`hostname`-debug\" debian/rules clean binary DEBUG=186 binary-indep: install-indep 87 [ "`whoami`" = "root" -a -d debian ] 81 88 82 binary: binary-arch 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 {} \; 92 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 83 105 build: build-arch 84 install: install-arch 106 install: install-arch install-indep 85 107 86 .PHONY: build-arch build clean binary-arch binary install-arch install 108 .PHONY: build-arch build clean binary-arch binary install-arch install binary-indep install-indep -
doc/README
rcce0450 rc821e8a 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 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 58 63 59 64 DEPENDENCIES … … 98 103 versions of make, we'd love to hear it, but it seems this just isn't 99 104 possible. 100 101 102 RUNNING ON SERVERS WITH MANY USERS103 ==================================104 105 BitlBee is not yet bug-free. Sometimes a bug causes the program to get into106 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 long109 time already on our own machines, but some people still manage to get110 themselves in nasty situations we haven't seen before.111 112 For now the best we can offer against this problem is bitlbeed, which allows113 you to setrlimit() the child processes to use no more than a specified114 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 your116 whole machine.117 118 We don't believe adding a limit for bitlbee to /etc/security/limits.conf will119 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 that125 much of an issue anymore. However, on a public server, especially if you126 also use it for other things, it can't hurt to protect yourself against127 possible problems.128 105 129 106 -
doc/bitlbee.8
rcce0450 rc821e8a 44 44 45 45 \fBbitlbee\fP should be called by 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. 46 .BR inetd (8), 47 or you can run it as a stand-alone daemon. 53 48 .PP 54 49 .SH OPTIONS … … 62 57 Run in daemon mode. In this mode, BitlBee forks to the background and 63 58 waits for new connections. All clients will be served from one process. 64 This is still experimental. See the note above for more information.65 59 .IP "-F" 66 60 Run in ForkDaemon mode. This is similar to ordinary daemon mode, but every 67 client gets its own process. Easier to set up than inetd mode, butwithout61 client gets its own process. Easier to set up than inetd mode, and without 68 62 the possible stability issues. 69 63 .IP "-i \fIaddress\fP" -
lib/proxy.c
rcce0450 rc821e8a 114 114 { 115 115 struct sockaddr_in *sin; 116 struct sockaddr_in me; 116 117 int fd = -1; 117 118 … … 127 128 128 129 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 } 129 140 130 141 event_debug("proxy_connect_none( \"%s\", %d ) = %d\n", host, port, fd); -
protocols/msn/ns.c
rcce0450 rc821e8a 178 178 179 179 debug( "Connecting to a new switchboard with key %s", cmd[5] ); 180 sb = msn_sb_create( ic, server, port, cmd[5], MSN_SB_NEW ); 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 } 181 189 182 190 if( md->msgq ) … … 468 476 debug( "Got a call from %s (session %d). Key = %s", cmd[5], session, cmd[4] ); 469 477 470 sb = msn_sb_create( ic, server, port, cmd[4], session ); 471 sb->who = g_strdup( cmd[5] ); 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 } 472 490 } 473 491 else if( strcmp( cmd[0], "ADD" ) == 0 ) -
root_commands.c
rcce0450 rc821e8a 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 } 424 430 425 431 if( ( tmp = strchr( acc_handle, '/' ) ) )
Note: See TracChangeset
for help on using the changeset viewer.