diff options
author | Bernhard Reutner-Fischer | 2005-09-20 21:06:17 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer | 2005-09-20 21:06:17 +0000 |
commit | d5bd137a247145afabfbc3a3c376ad8787381d8f (patch) | |
tree | e55887632741516332495c4fe7cf4169e71984c3 /coreutils | |
parent | f912ebb7405bcb6cbcdf952bdf2fc2310d93cb3a (diff) | |
download | busybox-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 'coreutils')
-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 |
6 files changed, 16 insertions, 16 deletions
diff --git a/coreutils/chgrp.c b/coreutils/chgrp.c index 8cfb542..70ac672 100644 --- a/coreutils/chgrp.c +++ b/coreutils/chgrp.c @@ -58,7 +58,7 @@ int chgrp_main(int argc, char **argv) argv += optind; /* Find the selected group */ - gid = get_ug_id(*argv, my_getgrnam); + gid = get_ug_id(*argv, bb_xgetgrnam); ++argv; /* Ok, ready to do the deed now */ diff --git a/coreutils/chown.c b/coreutils/chown.c index 638745f..daf77e2 100644 --- a/coreutils/chown.c +++ b/coreutils/chown.c @@ -77,11 +77,11 @@ int chown_main(int argc, char **argv) gid = -1; if (groupName) { *groupName++ = '\0'; - gid = get_ug_id(groupName, my_getgrnam); + gid = get_ug_id(groupName, bb_xgetgrnam); } /* Now check for the username */ - uid = get_ug_id(*argv, my_getpwnam); + uid = get_ug_id(*argv, bb_xgetpwnam); ++argv; diff --git a/coreutils/id.c b/coreutils/id.c index 03c6a6d..28050dd 100644 --- a/coreutils/id.c +++ b/coreutils/id.c @@ -80,8 +80,8 @@ extern int id_main(int argc, char **argv) if(argv[optind]) { p=getpwnam(argv[optind]); - /* my_getpwnam is needed because it exits on failure */ - uid = my_getpwnam(argv[optind]); + /* bb_xgetpwnam is needed because it exits on failure */ + uid = bb_xgetpwnam(argv[optind]); gid = p->pw_gid; /* in this case PRINT_REAL is the same */ } @@ -89,8 +89,8 @@ extern int id_main(int argc, char **argv) if(flags & (JUST_GROUP | JUST_USER)) { /* JUST_GROUP and JUST_USER are mutually exclusive */ if(flags & NAME_NOT_NUMBER) { - /* my_getpwuid and my_getgrgid exit on failure so puts cannot segfault */ - puts((flags & JUST_USER) ? my_getpwuid(NULL, uid, -1 ) : my_getgrgid(NULL, gid, -1 )); + /* bb_getpwuid and bb_getgrgid exit on failure so puts cannot segfault */ + puts((flags & JUST_USER) ? bb_getpwuid(NULL, uid, -1 ) : bb_getgrgid(NULL, gid, -1 )); } else { bb_printf("%u\n",(flags & JUST_USER) ? uid : gid); } @@ -99,11 +99,11 @@ extern int id_main(int argc, char **argv) } /* Print full info like GNU id */ - /* my_getpwuid doesn't exit on failure here */ - status=printf_full(uid, my_getpwuid(NULL, uid, 0), 'u'); + /* bb_getpwuid doesn't exit on failure here */ + status=printf_full(uid, bb_getpwuid(NULL, uid, 0), 'u'); putchar(' '); - /* my_getgrgid doesn't exit on failure here */ - status|=printf_full(gid, my_getgrgid(NULL, gid, 0), 'g'); + /* bb_getgrgid doesn't exit on failure here */ + status|=printf_full(gid, bb_getgrgid(NULL, gid, 0), 'g'); #ifdef CONFIG_SELINUX if ( is_selinux_enabled() ) { diff --git a/coreutils/install.c b/coreutils/install.c index 74e1d9a..d046041 100644 --- a/coreutils/install.c +++ b/coreutils/install.c @@ -73,8 +73,8 @@ extern int install_main(int argc, char **argv) copy_flags |= FILEUTILS_PRESERVE_STATUS; } bb_parse_mode(mode_str, &mode); - gid = get_ug_id(gid_str, my_getgrnam); - uid = get_ug_id(uid_str, my_getpwnam); + gid = get_ug_id(gid_str, bb_xgetgrnam); + uid = get_ug_id(uid_str, bb_xgetpwnam); umask(0); /* Create directories diff --git a/coreutils/ls.c b/coreutils/ls.c index 4dfa9f5..d8d814a 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c @@ -692,9 +692,9 @@ static int list_single(struct dnode *dn) break; case LIST_ID_NAME: #ifdef CONFIG_FEATURE_LS_USERNAME - my_getpwuid(scratch, dn->dstat.st_uid, sizeof(scratch)); + bb_getpwuid(scratch, dn->dstat.st_uid, sizeof(scratch)); printf("%-8.8s ", scratch); - my_getgrgid(scratch, dn->dstat.st_gid, sizeof(scratch)); + bb_getgrgid(scratch, dn->dstat.st_gid, sizeof(scratch)); printf("%-8.8s", scratch); column += 17; break; diff --git a/coreutils/whoami.c b/coreutils/whoami.c index 6a6e2ee..16d2808 100644 --- a/coreutils/whoami.c +++ b/coreutils/whoami.c @@ -32,7 +32,7 @@ extern int whoami_main(int argc, char **argv) if (argc > 1) bb_show_usage(); - puts(my_getpwuid(NULL, geteuid(), -1)); + puts(bb_getpwuid(NULL, geteuid(), -1)); /* exits on error */ bb_fflush_stdout_and_exit(EXIT_SUCCESS); } |