summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2005-09-20 21:06:17 +0000
committerBernhard Reutner-Fischer2005-09-20 21:06:17 +0000
commitd5bd137a247145afabfbc3a3c376ad8787381d8f (patch)
treee55887632741516332495c4fe7cf4169e71984c3 /libbb
parentf912ebb7405bcb6cbcdf952bdf2fc2310d93cb3a (diff)
downloadbusybox-d5bd137a247145afabfbc3a3c376ad8787381d8f.zip
busybox-d5bd137a247145afabfbc3a3c376ad8787381d8f.tar.gz
- 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.in18
-rw-r--r--libbb/procps.c2
2 files changed, 13 insertions, 7 deletions
diff --git a/libbb/Makefile.in b/libbb/Makefile.in
index dae3c12..be53507 100644
--- a/libbb/Makefile.in
+++ b/libbb/Makefile.in
@@ -28,13 +28,12 @@ LIBBB_SRC:= \
correct_password.c create_icmp_socket.c create_icmp6_socket.c \
device_open.c dump.c error_msg.c error_msg_and_die.c find_mount_point.c \
find_pid_by_name.c find_root_device.c fgets_str.c full_read.c \
- full_write.c get_last_path_component.c get_line_from_file.c get_ug_id.c \
+ full_write.c get_last_path_component.c get_line_from_file.c \
hash_fd.c herror_msg.c herror_msg_and_die.c \
human_readable.c inet_common.c inode_hash.c interface.c isdirectory.c \
kernel_version.c last_char_is.c llist_add_to.c login.c loop.c \
make_directory.c mode_string.c mtab.c mtab_file.c \
- my_getgrgid.c my_getgrnam.c my_getpwnam.c my_getug.c\
- my_getpwuid.c obscure.c parse_mode.c parse_number.c perror_msg.c \
+ obscure.c parse_mode.c parse_number.c perror_msg.c \
perror_msg_and_die.c print_file.c get_console.c \
process_escape_sequence.c procps.c pwd2spwd.c pw_encrypt.c qmodule.c \
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 \
LIBBB_MSRC4:=$(srcdir)/safe_strtol.c
LIBBB_MOBJ4:=safe_strtoi.o safe_strtod.o safe_strtol.o safe_strtoul.o
+LIBBB_MSRC5:=$(srcdir)/bb_pwd.c
+LIBBB_MOBJ5:=bb_xgetpwnam.o bb_xgetgrnam.o bb_getgrgid.o bb_getpwuid.o \
+ bb_getug.o get_ug_id.o
+
LIBBB_MOBJS0=$(patsubst %,$(LIBBB_DIR)%, $(LIBBB_MOBJ0))
LIBBB_MOBJS1=$(patsubst %,$(LIBBB_DIR)%, $(LIBBB_MOBJ1))
LIBBB_MOBJS2=$(patsubst %,$(LIBBB_DIR)%, $(LIBBB_MOBJ2))
LIBBB_MOBJS3=$(patsubst %,$(LIBBB_DIR)%, $(LIBBB_MOBJ3))
LIBBB_MOBJS4=$(patsubst %,$(LIBBB_DIR)%, $(LIBBB_MOBJ4))
+LIBBB_MOBJS5=$(patsubst %,$(LIBBB_DIR)%, $(LIBBB_MOBJ5))
libraries-y+=$(LIBBB_DIR)$(LIBBB_AR)
$(LIBBB_DIR)$(LIBBB_AR): $(LIBBB_OBJS) $(LIBBB_MOBJS0) $(LIBBB_MOBJS1) \
- $(LIBBB_MOBJS2) $(LIBBB_MOBJS3) $(LIBBB_MOBJS4)
- $(AR) $(ARFLAGS) $@ $(LIBBB_OBJS) $(LIBBB_MOBJS0) $(LIBBB_MOBJS1) \
- $(LIBBB_MOBJS2) $(LIBBB_MOBJS3) $(LIBBB_MOBJS4)
+ $(LIBBB_MOBJS2) $(LIBBB_MOBJS3) $(LIBBB_MOBJS4) $(LIBBB_MOBJS5)
+ $(AR) $(ARFLAGS) $(@) $(LIBBB_OBJS) $(^)
$(LIBBB_DIR)%.o: $(srcdir)/%.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
@@ -106,3 +109,6 @@ $(LIBBB_MOBJS3): $(LIBBB_MSRC3)
$(LIBBB_MOBJS4): $(LIBBB_MSRC4)
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DL_$(notdir $*) -c $< -o $@
+$(LIBBB_MOBJS5): $(LIBBB_MSRC5)
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DL_$(notdir $*) -c $< -o $@
+
diff --git a/libbb/procps.c b/libbb/procps.c
index 1e9d686..3e863b0 100644
--- a/libbb/procps.c
+++ b/libbb/procps.c
@@ -53,7 +53,7 @@ extern procps_status_t * procps_scan(int save_user_arg0)
sprintf(status, "/proc/%d", pid);
if(stat(status, &sb))
continue;
- my_getpwuid(curstatus.user, sb.st_uid, sizeof(curstatus.user));
+ bb_getpwuid(curstatus.user, sb.st_uid, sizeof(curstatus.user));
sprintf(status, "/proc/%d/stat", pid);