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 /libbb | |
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
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/Makefile.in | 18 | ||||
-rw-r--r-- | libbb/procps.c | 2 |
2 files changed, 13 insertions, 7 deletions
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 | ||