diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2005-09-20 21:06:17 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2005-09-20 21:06:17 +0000 |
commit | d5bd137a247145afabfbc3a3c376ad8787381d8f (patch) | |
tree | e55887632741516332495c4fe7cf4169e71984c3 | |
parent | f912ebb7405bcb6cbcdf952bdf2fc2310d93cb3a (diff) | |
download | busybox-w32-d5bd137a247145afabfbc3a3c376ad8787381d8f.tar.gz busybox-w32-d5bd137a247145afabfbc3a3c376ad8787381d8f.tar.bz2 busybox-w32-d5bd137a247145afabfbc3a3c376ad8787381d8f.zip |
- rename libbb's password helpers as suggested in libbb.h
my_getpwnam -> bb_xgetpwnam /* dies on error */
my_getgrnam -> bb_xgetgrnam /* dies on error */
my_getgrgid -> bb_getgrgid
my_getpwuid -> bb_getpwuid
my_getug -> bb_getug
-rw-r--r-- | archival/rpm.c | 4 | ||||
-rw-r--r-- | archival/tar.c | 4 | ||||
-rw-r--r-- | coreutils/chgrp.c | 2 | ||||
-rw-r--r-- | coreutils/chown.c | 4 | ||||
-rw-r--r-- | coreutils/id.c | 16 | ||||
-rw-r--r-- | coreutils/install.c | 4 | ||||
-rw-r--r-- | coreutils/ls.c | 4 | ||||
-rw-r--r-- | coreutils/whoami.c | 2 | ||||
-rw-r--r-- | debianutils/start_stop_daemon.c | 2 | ||||
-rw-r--r-- | include/libbb.h | 16 | ||||
-rw-r--r-- | libbb/Makefile.in | 18 | ||||
-rw-r--r-- | libbb/procps.c | 2 | ||||
-rw-r--r-- | loginutils/adduser.c | 2 | ||||
-rw-r--r-- | loginutils/passwd.c | 2 | ||||
-rw-r--r-- | miscutils/makedevs.c | 4 | ||||
-rw-r--r-- | networking/httpd.c | 2 | ||||
-rw-r--r-- | sysklogd/logger.c | 2 |
17 files changed, 47 insertions, 43 deletions
diff --git a/archival/rpm.c b/archival/rpm.c index fa8db539a..9d16567bc 100644 --- a/archival/rpm.c +++ b/archival/rpm.c | |||
@@ -331,8 +331,8 @@ void fileaction_dobackup(char *filename, int fileref) | |||
331 | void fileaction_setowngrp(char *filename, int fileref) | 331 | void fileaction_setowngrp(char *filename, int fileref) |
332 | { | 332 | { |
333 | int uid, gid; | 333 | int uid, gid; |
334 | uid = my_getpwnam(rpm_getstring(RPMTAG_FILEUSERNAME, fileref)); | 334 | uid = bb_xgetpwnam(rpm_getstring(RPMTAG_FILEUSERNAME, fileref)); |
335 | gid = my_getgrnam(rpm_getstring(RPMTAG_FILEGROUPNAME, fileref)); | 335 | gid = bb_xgetgrnam(rpm_getstring(RPMTAG_FILEGROUPNAME, fileref)); |
336 | chown (filename, uid, gid); | 336 | chown (filename, uid, gid); |
337 | } | 337 | } |
338 | 338 | ||
diff --git a/archival/tar.c b/archival/tar.c index a2623863d..7a82b441b 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
@@ -234,9 +234,9 @@ static inline int writeTarHeader(struct TarBallInfo *tbInfo, | |||
234 | TAR_MAGIC_LEN + TAR_VERSION_LEN); | 234 | TAR_MAGIC_LEN + TAR_VERSION_LEN); |
235 | 235 | ||
236 | /* Enter the user and group names (default to root if it fails) */ | 236 | /* Enter the user and group names (default to root if it fails) */ |
237 | if (my_getpwuid(header.uname, statbuf->st_uid, sizeof(header.uname)) == NULL) | 237 | if (bb_getpwuid(header.uname, statbuf->st_uid, sizeof(header.uname)) == NULL) |
238 | strcpy(header.uname, "root"); | 238 | strcpy(header.uname, "root"); |
239 | if (my_getgrgid(header.gname, statbuf->st_gid, sizeof(header.gname)) == NULL) | 239 | if (bb_getgrgid(header.gname, statbuf->st_gid, sizeof(header.gname)) == NULL) |
240 | strcpy(header.gname, "root"); | 240 | strcpy(header.gname, "root"); |
241 | 241 | ||
242 | if (tbInfo->hlInfo) { | 242 | if (tbInfo->hlInfo) { |
diff --git a/coreutils/chgrp.c b/coreutils/chgrp.c index 8cfb54241..70ac672c2 100644 --- a/coreutils/chgrp.c +++ b/coreutils/chgrp.c | |||
@@ -58,7 +58,7 @@ int chgrp_main(int argc, char **argv) | |||
58 | argv += optind; | 58 | argv += optind; |
59 | 59 | ||
60 | /* Find the selected group */ | 60 | /* Find the selected group */ |
61 | gid = get_ug_id(*argv, my_getgrnam); | 61 | gid = get_ug_id(*argv, bb_xgetgrnam); |
62 | ++argv; | 62 | ++argv; |
63 | 63 | ||
64 | /* Ok, ready to do the deed now */ | 64 | /* Ok, ready to do the deed now */ |
diff --git a/coreutils/chown.c b/coreutils/chown.c index 638745f17..daf77e294 100644 --- a/coreutils/chown.c +++ b/coreutils/chown.c | |||
@@ -77,11 +77,11 @@ int chown_main(int argc, char **argv) | |||
77 | gid = -1; | 77 | gid = -1; |
78 | if (groupName) { | 78 | if (groupName) { |
79 | *groupName++ = '\0'; | 79 | *groupName++ = '\0'; |
80 | gid = get_ug_id(groupName, my_getgrnam); | 80 | gid = get_ug_id(groupName, bb_xgetgrnam); |
81 | } | 81 | } |
82 | 82 | ||
83 | /* Now check for the username */ | 83 | /* Now check for the username */ |
84 | uid = get_ug_id(*argv, my_getpwnam); | 84 | uid = get_ug_id(*argv, bb_xgetpwnam); |
85 | 85 | ||
86 | ++argv; | 86 | ++argv; |
87 | 87 | ||
diff --git a/coreutils/id.c b/coreutils/id.c index 03c6a6d2a..28050ddf2 100644 --- a/coreutils/id.c +++ b/coreutils/id.c | |||
@@ -80,8 +80,8 @@ extern int id_main(int argc, char **argv) | |||
80 | 80 | ||
81 | if(argv[optind]) { | 81 | if(argv[optind]) { |
82 | p=getpwnam(argv[optind]); | 82 | p=getpwnam(argv[optind]); |
83 | /* my_getpwnam is needed because it exits on failure */ | 83 | /* bb_xgetpwnam is needed because it exits on failure */ |
84 | uid = my_getpwnam(argv[optind]); | 84 | uid = bb_xgetpwnam(argv[optind]); |
85 | gid = p->pw_gid; | 85 | gid = p->pw_gid; |
86 | /* in this case PRINT_REAL is the same */ | 86 | /* in this case PRINT_REAL is the same */ |
87 | } | 87 | } |
@@ -89,8 +89,8 @@ extern int id_main(int argc, char **argv) | |||
89 | if(flags & (JUST_GROUP | JUST_USER)) { | 89 | if(flags & (JUST_GROUP | JUST_USER)) { |
90 | /* JUST_GROUP and JUST_USER are mutually exclusive */ | 90 | /* JUST_GROUP and JUST_USER are mutually exclusive */ |
91 | if(flags & NAME_NOT_NUMBER) { | 91 | if(flags & NAME_NOT_NUMBER) { |
92 | /* my_getpwuid and my_getgrgid exit on failure so puts cannot segfault */ | 92 | /* bb_getpwuid and bb_getgrgid exit on failure so puts cannot segfault */ |
93 | puts((flags & JUST_USER) ? my_getpwuid(NULL, uid, -1 ) : my_getgrgid(NULL, gid, -1 )); | 93 | puts((flags & JUST_USER) ? bb_getpwuid(NULL, uid, -1 ) : bb_getgrgid(NULL, gid, -1 )); |
94 | } else { | 94 | } else { |
95 | bb_printf("%u\n",(flags & JUST_USER) ? uid : gid); | 95 | bb_printf("%u\n",(flags & JUST_USER) ? uid : gid); |
96 | } | 96 | } |
@@ -99,11 +99,11 @@ extern int id_main(int argc, char **argv) | |||
99 | } | 99 | } |
100 | 100 | ||
101 | /* Print full info like GNU id */ | 101 | /* Print full info like GNU id */ |
102 | /* my_getpwuid doesn't exit on failure here */ | 102 | /* bb_getpwuid doesn't exit on failure here */ |
103 | status=printf_full(uid, my_getpwuid(NULL, uid, 0), 'u'); | 103 | status=printf_full(uid, bb_getpwuid(NULL, uid, 0), 'u'); |
104 | putchar(' '); | 104 | putchar(' '); |
105 | /* my_getgrgid doesn't exit on failure here */ | 105 | /* bb_getgrgid doesn't exit on failure here */ |
106 | status|=printf_full(gid, my_getgrgid(NULL, gid, 0), 'g'); | 106 | status|=printf_full(gid, bb_getgrgid(NULL, gid, 0), 'g'); |
107 | 107 | ||
108 | #ifdef CONFIG_SELINUX | 108 | #ifdef CONFIG_SELINUX |
109 | if ( is_selinux_enabled() ) { | 109 | if ( is_selinux_enabled() ) { |
diff --git a/coreutils/install.c b/coreutils/install.c index 74e1d9acd..d0460412e 100644 --- a/coreutils/install.c +++ b/coreutils/install.c | |||
@@ -73,8 +73,8 @@ extern int install_main(int argc, char **argv) | |||
73 | copy_flags |= FILEUTILS_PRESERVE_STATUS; | 73 | copy_flags |= FILEUTILS_PRESERVE_STATUS; |
74 | } | 74 | } |
75 | bb_parse_mode(mode_str, &mode); | 75 | bb_parse_mode(mode_str, &mode); |
76 | gid = get_ug_id(gid_str, my_getgrnam); | 76 | gid = get_ug_id(gid_str, bb_xgetgrnam); |
77 | uid = get_ug_id(uid_str, my_getpwnam); | 77 | uid = get_ug_id(uid_str, bb_xgetpwnam); |
78 | umask(0); | 78 | umask(0); |
79 | 79 | ||
80 | /* Create directories | 80 | /* Create directories |
diff --git a/coreutils/ls.c b/coreutils/ls.c index 4dfa9f507..d8d814a74 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c | |||
@@ -692,9 +692,9 @@ static int list_single(struct dnode *dn) | |||
692 | break; | 692 | break; |
693 | case LIST_ID_NAME: | 693 | case LIST_ID_NAME: |
694 | #ifdef CONFIG_FEATURE_LS_USERNAME | 694 | #ifdef CONFIG_FEATURE_LS_USERNAME |
695 | my_getpwuid(scratch, dn->dstat.st_uid, sizeof(scratch)); | 695 | bb_getpwuid(scratch, dn->dstat.st_uid, sizeof(scratch)); |
696 | printf("%-8.8s ", scratch); | 696 | printf("%-8.8s ", scratch); |
697 | my_getgrgid(scratch, dn->dstat.st_gid, sizeof(scratch)); | 697 | bb_getgrgid(scratch, dn->dstat.st_gid, sizeof(scratch)); |
698 | printf("%-8.8s", scratch); | 698 | printf("%-8.8s", scratch); |
699 | column += 17; | 699 | column += 17; |
700 | break; | 700 | break; |
diff --git a/coreutils/whoami.c b/coreutils/whoami.c index 6a6e2eec9..16d28083c 100644 --- a/coreutils/whoami.c +++ b/coreutils/whoami.c | |||
@@ -32,7 +32,7 @@ extern int whoami_main(int argc, char **argv) | |||
32 | if (argc > 1) | 32 | if (argc > 1) |
33 | bb_show_usage(); | 33 | bb_show_usage(); |
34 | 34 | ||
35 | puts(my_getpwuid(NULL, geteuid(), -1)); | 35 | puts(bb_getpwuid(NULL, geteuid(), -1)); |
36 | /* exits on error */ | 36 | /* exits on error */ |
37 | bb_fflush_stdout_and_exit(EXIT_SUCCESS); | 37 | bb_fflush_stdout_and_exit(EXIT_SUCCESS); |
38 | } | 38 | } |
diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c index b1ebe2fa7..f9310af8d 100644 --- a/debianutils/start_stop_daemon.c +++ b/debianutils/start_stop_daemon.c | |||
@@ -265,7 +265,7 @@ start_stop_daemon_main(int argc, char **argv) | |||
265 | argv += optind; | 265 | argv += optind; |
266 | 266 | ||
267 | if (userspec && sscanf(userspec, "%d", &user_id) != 1) | 267 | if (userspec && sscanf(userspec, "%d", &user_id) != 1) |
268 | user_id = my_getpwnam(userspec); | 268 | user_id = bb_xgetpwnam(userspec); |
269 | 269 | ||
270 | if (opt & SSD_CTX_STOP) { | 270 | if (opt & SSD_CTX_STOP) { |
271 | do_stop(); | 271 | do_stop(); |
diff --git a/include/libbb.h b/include/libbb.h index 3fb62e96b..b9794779d 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -221,16 +221,14 @@ extern unsigned long bb_xparse_number(const char *numstr, | |||
221 | const struct suffix_mult *suffixes); | 221 | const struct suffix_mult *suffixes); |
222 | 222 | ||
223 | 223 | ||
224 | //#warning change names? | ||
225 | |||
226 | /* These parse entries in /etc/passwd and /etc/group. This is desirable | 224 | /* These parse entries in /etc/passwd and /etc/group. This is desirable |
227 | * for BusyBox since we want to avoid using the glibc NSS stuff, which | 225 | * for BusyBox since we want to avoid using the glibc NSS stuff, which |
228 | * increases target size and is often not needed embedded systems. */ | 226 | * increases target size and is often not needed on embedded systems. */ |
229 | extern long my_getpwnam(const char *name); | 227 | extern long bb_xgetpwnam(const char *name); |
230 | extern long my_getgrnam(const char *name); | 228 | extern long bb_xgetgrnam(const char *name); |
231 | extern char * my_getug(char *buffer, char *idname, long id, int bufsize, char prefix); | 229 | extern char * bb_getug(char *buffer, char *idname, long id, int bufsize, char prefix); |
232 | extern char * my_getpwuid(char *name, long uid, int bufsize); | 230 | extern char * bb_getpwuid(char *name, long uid, int bufsize); |
233 | extern char * my_getgrgid(char *group, long gid, int bufsize); | 231 | extern char * bb_getgrgid(char *group, long gid, int bufsize); |
234 | extern char *bb_askpass(int timeout, const char * prompt); | 232 | extern char *bb_askpass(int timeout, const char * prompt); |
235 | 233 | ||
236 | extern int device_open(const char *device, int mode); | 234 | extern int device_open(const char *device, int mode); |
@@ -471,7 +469,7 @@ extern void print_login_prompt(void); | |||
471 | extern void vfork_daemon_rexec(int nochdir, int noclose, | 469 | extern void vfork_daemon_rexec(int nochdir, int noclose, |
472 | int argc, char **argv, char *foreground_opt); | 470 | int argc, char **argv, char *foreground_opt); |
473 | extern int get_terminal_width_height(int fd, int *width, int *height); | 471 | extern int get_terminal_width_height(int fd, int *width, int *height); |
474 | extern unsigned long get_ug_id(const char *s, long (*my_getxxnam)(const char *)); | 472 | extern unsigned long get_ug_id(const char *s, long (*__bb_getxxnam)(const char *)); |
475 | 473 | ||
476 | #define HASH_SHA1 1 | 474 | #define HASH_SHA1 1 |
477 | #define HASH_MD5 2 | 475 | #define HASH_MD5 2 |
diff --git a/libbb/Makefile.in b/libbb/Makefile.in index dae3c1213..be5350754 100644 --- a/libbb/Makefile.in +++ b/libbb/Makefile.in | |||
@@ -28,13 +28,12 @@ LIBBB_SRC:= \ | |||
28 | correct_password.c create_icmp_socket.c create_icmp6_socket.c \ | 28 | correct_password.c create_icmp_socket.c create_icmp6_socket.c \ |
29 | device_open.c dump.c error_msg.c error_msg_and_die.c find_mount_point.c \ | 29 | device_open.c dump.c error_msg.c error_msg_and_die.c find_mount_point.c \ |
30 | find_pid_by_name.c find_root_device.c fgets_str.c full_read.c \ | 30 | find_pid_by_name.c find_root_device.c fgets_str.c full_read.c \ |
31 | full_write.c get_last_path_component.c get_line_from_file.c get_ug_id.c \ | 31 | full_write.c get_last_path_component.c get_line_from_file.c \ |
32 | hash_fd.c herror_msg.c herror_msg_and_die.c \ | 32 | hash_fd.c herror_msg.c herror_msg_and_die.c \ |
33 | human_readable.c inet_common.c inode_hash.c interface.c isdirectory.c \ | 33 | human_readable.c inet_common.c inode_hash.c interface.c isdirectory.c \ |
34 | kernel_version.c last_char_is.c llist_add_to.c login.c loop.c \ | 34 | kernel_version.c last_char_is.c llist_add_to.c login.c loop.c \ |
35 | make_directory.c mode_string.c mtab.c mtab_file.c \ | 35 | make_directory.c mode_string.c mtab.c mtab_file.c \ |
36 | my_getgrgid.c my_getgrnam.c my_getpwnam.c my_getug.c\ | 36 | obscure.c parse_mode.c parse_number.c perror_msg.c \ |
37 | my_getpwuid.c obscure.c parse_mode.c parse_number.c perror_msg.c \ | ||
38 | perror_msg_and_die.c print_file.c get_console.c \ | 37 | perror_msg_and_die.c print_file.c get_console.c \ |
39 | process_escape_sequence.c procps.c pwd2spwd.c pw_encrypt.c qmodule.c \ | 38 | process_escape_sequence.c procps.c pwd2spwd.c pw_encrypt.c qmodule.c \ |
40 | read_package_field.c recursive_action.c remove_file.c \ | 39 | read_package_field.c recursive_action.c remove_file.c \ |
@@ -75,18 +74,22 @@ LIBBB_MOBJ3:=xgetularg_bnd_sfx.o xgetlarg_bnd_sfx.o getlarg10_sfx.o \ | |||
75 | LIBBB_MSRC4:=$(srcdir)/safe_strtol.c | 74 | LIBBB_MSRC4:=$(srcdir)/safe_strtol.c |
76 | LIBBB_MOBJ4:=safe_strtoi.o safe_strtod.o safe_strtol.o safe_strtoul.o | 75 | LIBBB_MOBJ4:=safe_strtoi.o safe_strtod.o safe_strtol.o safe_strtoul.o |
77 | 76 | ||
77 | LIBBB_MSRC5:=$(srcdir)/bb_pwd.c | ||
78 | LIBBB_MOBJ5:=bb_xgetpwnam.o bb_xgetgrnam.o bb_getgrgid.o bb_getpwuid.o \ | ||
79 | bb_getug.o get_ug_id.o | ||
80 | |||
78 | LIBBB_MOBJS0=$(patsubst %,$(LIBBB_DIR)%, $(LIBBB_MOBJ0)) | 81 | LIBBB_MOBJS0=$(patsubst %,$(LIBBB_DIR)%, $(LIBBB_MOBJ0)) |
79 | LIBBB_MOBJS1=$(patsubst %,$(LIBBB_DIR)%, $(LIBBB_MOBJ1)) | 82 | LIBBB_MOBJS1=$(patsubst %,$(LIBBB_DIR)%, $(LIBBB_MOBJ1)) |
80 | LIBBB_MOBJS2=$(patsubst %,$(LIBBB_DIR)%, $(LIBBB_MOBJ2)) | 83 | LIBBB_MOBJS2=$(patsubst %,$(LIBBB_DIR)%, $(LIBBB_MOBJ2)) |
81 | LIBBB_MOBJS3=$(patsubst %,$(LIBBB_DIR)%, $(LIBBB_MOBJ3)) | 84 | LIBBB_MOBJS3=$(patsubst %,$(LIBBB_DIR)%, $(LIBBB_MOBJ3)) |
82 | LIBBB_MOBJS4=$(patsubst %,$(LIBBB_DIR)%, $(LIBBB_MOBJ4)) | 85 | LIBBB_MOBJS4=$(patsubst %,$(LIBBB_DIR)%, $(LIBBB_MOBJ4)) |
86 | LIBBB_MOBJS5=$(patsubst %,$(LIBBB_DIR)%, $(LIBBB_MOBJ5)) | ||
83 | 87 | ||
84 | libraries-y+=$(LIBBB_DIR)$(LIBBB_AR) | 88 | libraries-y+=$(LIBBB_DIR)$(LIBBB_AR) |
85 | 89 | ||
86 | $(LIBBB_DIR)$(LIBBB_AR): $(LIBBB_OBJS) $(LIBBB_MOBJS0) $(LIBBB_MOBJS1) \ | 90 | $(LIBBB_DIR)$(LIBBB_AR): $(LIBBB_OBJS) $(LIBBB_MOBJS0) $(LIBBB_MOBJS1) \ |
87 | $(LIBBB_MOBJS2) $(LIBBB_MOBJS3) $(LIBBB_MOBJS4) | 91 | $(LIBBB_MOBJS2) $(LIBBB_MOBJS3) $(LIBBB_MOBJS4) $(LIBBB_MOBJS5) |
88 | $(AR) $(ARFLAGS) $@ $(LIBBB_OBJS) $(LIBBB_MOBJS0) $(LIBBB_MOBJS1) \ | 92 | $(AR) $(ARFLAGS) $(@) $(LIBBB_OBJS) $(^) |
89 | $(LIBBB_MOBJS2) $(LIBBB_MOBJS3) $(LIBBB_MOBJS4) | ||
90 | 93 | ||
91 | $(LIBBB_DIR)%.o: $(srcdir)/%.c | 94 | $(LIBBB_DIR)%.o: $(srcdir)/%.c |
92 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | 95 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< |
@@ -106,3 +109,6 @@ $(LIBBB_MOBJS3): $(LIBBB_MSRC3) | |||
106 | $(LIBBB_MOBJS4): $(LIBBB_MSRC4) | 109 | $(LIBBB_MOBJS4): $(LIBBB_MSRC4) |
107 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DL_$(notdir $*) -c $< -o $@ | 110 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DL_$(notdir $*) -c $< -o $@ |
108 | 111 | ||
112 | $(LIBBB_MOBJS5): $(LIBBB_MSRC5) | ||
113 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DL_$(notdir $*) -c $< -o $@ | ||
114 | |||
diff --git a/libbb/procps.c b/libbb/procps.c index 1e9d6869b..3e863b0de 100644 --- a/libbb/procps.c +++ b/libbb/procps.c | |||
@@ -53,7 +53,7 @@ extern procps_status_t * procps_scan(int save_user_arg0) | |||
53 | sprintf(status, "/proc/%d", pid); | 53 | sprintf(status, "/proc/%d", pid); |
54 | if(stat(status, &sb)) | 54 | if(stat(status, &sb)) |
55 | continue; | 55 | continue; |
56 | my_getpwuid(curstatus.user, sb.st_uid, sizeof(curstatus.user)); | 56 | bb_getpwuid(curstatus.user, sb.st_uid, sizeof(curstatus.user)); |
57 | 57 | ||
58 | sprintf(status, "/proc/%d/stat", pid); | 58 | sprintf(status, "/proc/%d/stat", pid); |
59 | 59 | ||
diff --git a/loginutils/adduser.c b/loginutils/adduser.c index 7fa05a013..eb9890168 100644 --- a/loginutils/adduser.c +++ b/loginutils/adduser.c | |||
@@ -305,7 +305,7 @@ int adduser_main(int argc, char **argv) | |||
305 | 305 | ||
306 | if (usegroup) { | 306 | if (usegroup) { |
307 | /* Add user to a group that already exists */ | 307 | /* Add user to a group that already exists */ |
308 | pw.pw_gid = my_getgrnam(usegroup); | 308 | pw.pw_gid = bb_xgetgrnam(usegroup); |
309 | /* exits on error */ | 309 | /* exits on error */ |
310 | } | 310 | } |
311 | 311 | ||
diff --git a/loginutils/passwd.c b/loginutils/passwd.c index c8940eed7..5d8380d4c 100644 --- a/loginutils/passwd.c +++ b/loginutils/passwd.c | |||
@@ -168,7 +168,7 @@ extern int passwd_main(int argc, char **argv) | |||
168 | bb_show_usage(); | 168 | bb_show_usage(); |
169 | } | 169 | } |
170 | } | 170 | } |
171 | myname = (char *) bb_xstrdup(my_getpwuid(NULL, getuid(), -1)); | 171 | myname = (char *) bb_xstrdup(bb_getpwuid(NULL, getuid(), -1)); |
172 | /* exits on error */ | 172 | /* exits on error */ |
173 | if (optind < argc) { | 173 | if (optind < argc) { |
174 | name = argv[optind]; | 174 | name = argv[optind]; |
diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c index 8a407299a..e988400eb 100644 --- a/miscutils/makedevs.c +++ b/miscutils/makedevs.c | |||
@@ -160,12 +160,12 @@ extern int makedevs_main(int argc, char **argv) | |||
160 | continue; | 160 | continue; |
161 | } | 161 | } |
162 | if (group) { | 162 | if (group) { |
163 | gid = get_ug_id(group, my_getgrnam); | 163 | gid = get_ug_id(group, bb_xgetgrnam); |
164 | } else { | 164 | } else { |
165 | gid = getgid(); | 165 | gid = getgid(); |
166 | } | 166 | } |
167 | if (user) { | 167 | if (user) { |
168 | uid = get_ug_id(user, my_getpwnam); | 168 | uid = get_ug_id(user, bb_xgetpwnam); |
169 | } else { | 169 | } else { |
170 | uid = getuid(); | 170 | uid = getuid(); |
171 | } | 171 | } |
diff --git a/networking/httpd.c b/networking/httpd.c index 69c30bf0d..66d8bfe09 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -2050,7 +2050,7 @@ int httpd_main(int argc, char *argv[]) | |||
2050 | uid = strtol(s_uid, &e, 0); | 2050 | uid = strtol(s_uid, &e, 0); |
2051 | if(*e != '\0') { | 2051 | if(*e != '\0') { |
2052 | /* not integer */ | 2052 | /* not integer */ |
2053 | uid = my_getpwnam(s_uid); | 2053 | uid = bb_xgetpwnam(s_uid); |
2054 | } | 2054 | } |
2055 | } | 2055 | } |
2056 | #endif | 2056 | #endif |
diff --git a/sysklogd/logger.c b/sysklogd/logger.c index fee33b788..4e2e50f36 100644 --- a/sysklogd/logger.c +++ b/sysklogd/logger.c | |||
@@ -108,7 +108,7 @@ extern int logger_main(int argc, char **argv) | |||
108 | char buf[1024], name[128]; | 108 | char buf[1024], name[128]; |
109 | 109 | ||
110 | /* Fill out the name string early (may be overwritten later) */ | 110 | /* Fill out the name string early (may be overwritten later) */ |
111 | my_getpwuid(name, geteuid(), sizeof(name)); | 111 | bb_getpwuid(name, geteuid(), sizeof(name)); |
112 | 112 | ||
113 | /* Parse any options */ | 113 | /* Parse any options */ |
114 | while ((opt = getopt(argc, argv, "p:st:")) > 0) { | 114 | while ((opt = getopt(argc, argv, "p:st:")) > 0) { |