aboutsummaryrefslogtreecommitdiff
path: root/sysklogd/logger.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysklogd/logger.c')
-rw-r--r--sysklogd/logger.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sysklogd/logger.c b/sysklogd/logger.c
index 625811356..759981c75 100644
--- a/sysklogd/logger.c
+++ b/sysklogd/logger.c
@@ -72,22 +72,21 @@ int logger_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
72int logger_main(int argc, char **argv) 72int logger_main(int argc, char **argv)
73{ 73{
74 char *str_p, *str_t; 74 char *str_p, *str_t;
75 int opt;
75 int i = 0; 76 int i = 0;
76 char name[80];
77 77
78 /* Fill out the name string early (may be overwritten later) */ 78 /* Fill out the name string early (may be overwritten later) */
79 bb_getpwuid(name, sizeof(name), geteuid()); 79 str_t = uid2uname_utoa(geteuid());
80 str_t = name;
81 80
82 /* Parse any options */ 81 /* Parse any options */
83 getopt32(argv, "p:st:", &str_p, &str_t); 82 opt = getopt32(argv, "p:st:", &str_p, &str_t);
84 83
85 if (option_mask32 & 0x2) /* -s */ 84 if (opt & 0x2) /* -s */
86 i |= LOG_PERROR; 85 i |= LOG_PERROR;
87 //if (option_mask32 & 0x4) /* -t */ 86 //if (opt & 0x4) /* -t */
88 openlog(str_t, i, 0); 87 openlog(str_t, i, 0);
89 i = LOG_USER | LOG_NOTICE; 88 i = LOG_USER | LOG_NOTICE;
90 if (option_mask32 & 0x1) /* -p */ 89 if (opt & 0x1) /* -p */
91 i = pencode(str_p); 90 i = pencode(str_p);
92 91
93 argc -= optind; 92 argc -= optind;