Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 47365 | Differences between
and this patch

Collapse All | Expand All

(-)rsync-2.6.0/clientserver.c (-4 / +4 lines)
Lines 587-596 Link Here
587
	if (is_a_socket(STDIN_FILENO)) {
587
	if (is_a_socket(STDIN_FILENO)) {
588
		int i;
588
		int i;
589
589
590
		/* we are running via inetd - close off stdout and
590
		/* we are running via inetd - close off stdout
591
		 * stderr so that library functions (and getopt) don't
591
		 * so that library functions (and getopt) don't
592
		 * try to use them. Redirect them to /dev/null */
592
		 * try to use it. Redirect it to /dev/null */
593
		for (i=1;i<3;i++) {
593
		for (i=1;i<2;i++) {
594
			close(i);
594
			close(i);
595
			open("/dev/null", O_RDWR);
595
			open("/dev/null", O_RDWR);
596
		}
596
		}
(-)rsync-2.6.0/log.c (-6 / +10 lines)
Lines 187-198 Link Here
187
187
188
void log_open(void)
188
void log_open(void)
189
{
189
{
190
	if (logfname && !logfile) {
190
    if (logfname && !logfile) {
191
		extern int orig_umask;
191
        if (strcmp(logfname, "stderr") == 0) {
192
		int old_umask = umask(022 | orig_umask);
192
            logfile = stderr;
193
		logfile = fopen(logfname, "a");
193
        } else {
194
		umask(old_umask);
194
            extern int orig_umask;
195
	}
195
            int old_umask = umask(022 | orig_umask);
196
            logfile = fopen(logfname, "a");
197
            umask(old_umask);
198
        }
199
    }
196
}
200
}
197
201
198
void log_close(void)
202
void log_close(void)
(-)rsync-2.6.0/rsyncd.conf.5 (-1 / +1 lines)
Lines 95-101 Link Here
95
The "log file" option tells the rsync daemon to log
95
The "log file" option tells the rsync daemon to log
96
messages to that file rather than using syslog\&. This is particularly
96
messages to that file rather than using syslog\&. This is particularly
97
useful on systems (such as AIX) where syslog() doesn\&'t work for
97
useful on systems (such as AIX) where syslog() doesn\&'t work for
98
chrooted programs\&.
98
chrooted programs\&. Use "stderr" for logging to standard error\&.
99
.IP 
99
.IP 
100
.IP "\fBpid file\fP" 
100
.IP "\fBpid file\fP" 
101
The "pid file" option tells the rsync daemon to write
101
The "pid file" option tells the rsync daemon to write
(-)rsync-2.6.0/rsyncd.conf.yo (-1 / +1 lines)
Lines 90-96 Link Here
90
dit(bf(log file)) The "log file" option tells the rsync daemon to log
90
dit(bf(log file)) The "log file" option tells the rsync daemon to log
91
messages to that file rather than using syslog. This is particularly
91
messages to that file rather than using syslog. This is particularly
92
useful on systems (such as AIX) where syslog() doesn't work for
92
useful on systems (such as AIX) where syslog() doesn't work for
93
chrooted programs.
93
chrooted programs. Use "stderr" for logging to standard error.
94
94
95
dit(bf(pid file)) The "pid file" option tells the rsync daemon to write
95
dit(bf(pid file)) The "pid file" option tells the rsync daemon to write
96
its process id to that file.
96
its process id to that file.

Return to bug 47365