summaryrefslogtreecommitdiff
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 6258113..759981c 100644
--- a/sysklogd/logger.c
+++ b/sysklogd/logger.c
@@ -72,22 +72,21 @@ int logger_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int logger_main(int argc, char **argv)
{
char *str_p, *str_t;
+ int opt;
int i = 0;
- char name[80];
/* Fill out the name string early (may be overwritten later) */
- bb_getpwuid(name, sizeof(name), geteuid());
- str_t = name;
+ str_t = uid2uname_utoa(geteuid());
/* Parse any options */
- getopt32(argv, "p:st:", &str_p, &str_t);
+ opt = getopt32(argv, "p:st:", &str_p, &str_t);
- if (option_mask32 & 0x2) /* -s */
+ if (opt & 0x2) /* -s */
i |= LOG_PERROR;
- //if (option_mask32 & 0x4) /* -t */
+ //if (opt & 0x4) /* -t */
openlog(str_t, i, 0);
i = LOG_USER | LOG_NOTICE;
- if (option_mask32 & 0x1) /* -p */
+ if (opt & 0x1) /* -p */
i = pencode(str_p);
argc -= optind;