diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-03-11 18:07:44 +0300 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-03-11 18:07:44 +0300 |
commit | 4221e90ae468acc4b6c43faa36aee5160d2738c6 (patch) | |
tree | f9a100c67f7aff66cd948d6e85fa8bca6ac684ff /networking | |
parent | a19e64933c600b7f05232ad80bb5db85c115e42d (diff) |
ftpd: stop unconditional logging to syslog. This was the only applet
which was doing it. Added option -S to enable it when desired.
function old new delta
packed_usage 25647 25666 +19
ftpd_main 1826 1825 -1
Diffstat (limited to 'networking')
-rw-r--r-- | networking/ftpd.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/networking/ftpd.c b/networking/ftpd.c index 29589d185..3faa3ed7d 100644 --- a/networking/ftpd.c +++ b/networking/ftpd.c @@ -80,7 +80,8 @@ enum { OPT_l = (1 << 0), OPT_1 = (1 << 1), OPT_v = (1 << 2), - OPT_w = (1 << 3), + OPT_S = (1 << 3), + OPT_w = (1 << 4), #define mk_const4(a,b,c,d) (((a * 0x100 + b) * 0x100 + c) * 0x100 + d) #define mk_const3(a,b,c) ((a * 0x100 + b) * 0x100 + c) @@ -806,7 +807,7 @@ int ftpd_main(int argc, char **argv) { smallint opts; - opts = getopt32(argv, "l1v" USE_FEATURE_FTP_WRITE("w")); + opts = getopt32(argv, "l1vS" USE_FEATURE_FTP_WRITE("w")); if (opts & (OPT_l|OPT_1)) { /* Our secret backdoor to ls */ @@ -828,11 +829,13 @@ int ftpd_main(int argc, char **argv) * failure */ } - /* LOG_NDELAY is needed since we may chroot later */ - openlog(applet_name, LOG_PID | LOG_NDELAY, LOG_DAEMON); - logmode |= LOGMODE_SYSLOG; if (!(opts & OPT_v)) - logmode = LOGMODE_SYSLOG; + logmode = LOGMODE_NONE; + if (opts & OPT_S) { + /* LOG_NDELAY is needed since we may chroot later */ + openlog(applet_name, LOG_PID | LOG_NDELAY, LOG_DAEMON); + logmode |= LOGMODE_SYSLOG; + } G.proc_self_fd = xopen("/proc/self", O_RDONLY | O_DIRECTORY); |