aboutsummaryrefslogtreecommitdiff
path: root/sysklogd
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-01-12 21:01:05 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-01-12 21:01:05 +0000
commit4df8135cf6f4c4055a6eeb56eab6fd794c348a72 (patch)
treea08aa512d34f8a8e3aca4588c6866e390aabe48a /sysklogd
parent5d68724d5b89fbf2856fdfbf36b85ac36a8f4464 (diff)
downloadbusybox-w32-4df8135cf6f4c4055a6eeb56eab6fd794c348a72.tar.gz
busybox-w32-4df8135cf6f4c4055a6eeb56eab6fd794c348a72.tar.bz2
busybox-w32-4df8135cf6f4c4055a6eeb56eab6fd794c348a72.zip
undo RESERVE_CONFIG_BUFFER change. aldot, small on-stack char[N] objects
are perfectly okay, don't convert them to RESERVE_CONFIG_BUFFERs.
Diffstat (limited to 'sysklogd')
-rw-r--r--sysklogd/logger.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/sysklogd/logger.c b/sysklogd/logger.c
index c5e17c2e5..8aaf522d0 100644
--- a/sysklogd/logger.c
+++ b/sysklogd/logger.c
@@ -83,26 +83,24 @@ static int pencode(char *s)
83 83
84int logger_main(int argc, char **argv) 84int logger_main(int argc, char **argv)
85{ 85{
86 char *opt_p, *opt_t; 86 char *str_p, *str_t;
87 int i = 0; 87 int i = 0;
88 RESERVE_CONFIG_BUFFER(name, 80); 88 char name[80];
89 89
90 /* Fill out the name string early (may be overwritten later) */ 90 /* Fill out the name string early (may be overwritten later) */
91 bb_getpwuid(name, geteuid(), sizeof(name)); 91 bb_getpwuid(name, geteuid(), sizeof(name));
92 str_t = name;
92 93
93 /* Parse any options */ 94 /* Parse any options */
94 getopt32(argc, argv, "p:st:", &opt_p, &opt_t); 95 getopt32(argc, argv, "p:st:", &str_p, &str_t);
95 96
96 if (option_mask32 & 0x2) /* -s */ 97 if (option_mask32 & 0x2) /* -s */
97 i |= LOG_PERROR; 98 i |= LOG_PERROR;
98 if (option_mask32 & 0x4) /* -t */ 99 //if (option_mask32 & 0x4) /* -t */
99 safe_strncpy(name, opt_t, sizeof(name)); 100 openlog(str_t, i, 0);
100 openlog(name, i, 0);
101 if (ENABLE_FEATURE_CLEAN_UP)
102 RELEASE_CONFIG_BUFFER(name);
103 i = LOG_USER | LOG_NOTICE; 101 i = LOG_USER | LOG_NOTICE;
104 if (option_mask32 & 0x1) /* -p */ 102 if (option_mask32 & 0x1) /* -p */
105 i = pencode(opt_p); 103 i = pencode(str_p);
106 104
107 argc -= optind; 105 argc -= optind;
108 argv += optind; 106 argv += optind;