--- rsync-2.6.0/clientserver.c 2003-09-11 05:59:57.000000000 +0200 +++ rsync-2.6.0/clientserver.c 2004-04-09 18:17:04.000000000 +0200 @@ -587,10 +587,10 @@ if (is_a_socket(STDIN_FILENO)) { int i; - /* we are running via inetd - close off stdout and - * stderr so that library functions (and getopt) don't - * try to use them. Redirect them to /dev/null */ - for (i=1;i<3;i++) { + /* we are running via inetd - close off stdout + * so that library functions (and getopt) don't + * try to use it. Redirect it to /dev/null */ + for (i=1;i<2;i++) { close(i); open("/dev/null", O_RDWR); } --- rsync-2.6.0/log.c 2003-12-15 09:06:30.000000000 +0100 +++ rsync-2.6.0/log.c 2004-04-09 18:14:36.000000000 +0200 @@ -187,12 +187,16 @@ void log_open(void) { - if (logfname && !logfile) { - extern int orig_umask; - int old_umask = umask(022 | orig_umask); - logfile = fopen(logfname, "a"); - umask(old_umask); - } + if (logfname && !logfile) { + if (strcmp(logfname, "stderr") == 0) { + logfile = stderr; + } else { + extern int orig_umask; + int old_umask = umask(022 | orig_umask); + logfile = fopen(logfname, "a"); + umask(old_umask); + } + } } void log_close(void) --- rsync-2.6.0/rsyncd.conf.5 2004-01-01 19:59:49.000000000 +0100 +++ rsync-2.6.0/rsyncd.conf.5 2004-04-09 19:12:02.000000000 +0200 @@ -95,7 +95,7 @@ The "log file" option tells the rsync daemon to log messages to that file rather than using syslog\&. This is particularly useful on systems (such as AIX) where syslog() doesn\&'t work for -chrooted programs\&. +chrooted programs\&. Use "stderr" for logging to standard error\&. .IP .IP "\fBpid file\fP" The "pid file" option tells the rsync daemon to write --- rsync-2.6.0/rsyncd.conf.yo 2004-01-01 19:59:49.000000000 +0100 +++ rsync-2.6.0/rsyncd.conf.yo 2004-04-09 19:11:22.000000000 +0200 @@ -90,7 +90,7 @@ dit(bf(log file)) The "log file" option tells the rsync daemon to log messages to that file rather than using syslog. This is particularly useful on systems (such as AIX) where syslog() doesn't work for -chrooted programs. +chrooted programs. Use "stderr" for logging to standard error. dit(bf(pid file)) The "pid file" option tells the rsync daemon to write its process id to that file.