aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-12-02 22:56:59 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-12-02 22:56:59 +0000
commit0c68a874e7d996c62c8d00b0c0289180bdce1590 (patch)
tree57a06bc9317dd24ccf417874c2ecfb10b056adb2 /include
parentb6ddee242592ffd02c05ae3ed6127c1dd80d7580 (diff)
downloadbusybox-w32-0c68a874e7d996c62c8d00b0c0289180bdce1590.tar.gz
busybox-w32-0c68a874e7d996c62c8d00b0c0289180bdce1590.tar.bz2
busybox-w32-0c68a874e7d996c62c8d00b0c0289180bdce1590.zip
libbb: password/group function helpers rewritten by Tito:
function old new delta xgetpwuid - 27 +27 uid2uname_utoa - 22 +22 gid2group_utoa - 22 +22 uid2uname - 18 +18 gid2group - 18 +18 buffer_fill_and_print 179 196 +17 print_user 12 24 +12 print_group 12 24 +12 get_cached 89 99 +10 ... print_common 134 120 -14 vlock_main 415 396 -19 logger_main 410 387 -23 crontab_main 642 609 -33 bb_getpwuid 42 - -42 bb_getgrgid 42 - -42 bb_getug 80 - -80 ------------------------------------------------------------------------------ (add/remove: 6/3 grow/shrink: 9/11 up/down: 187/-296) Total: -109 bytes
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/libbb.h b/include/libbb.h
index e4ccc7573..acae93a56 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -702,14 +702,14 @@ int get_uidgid(struct bb_uidgid_t*, const char*, int numeric_ok) FAST_FUNC;
702void xget_uidgid(struct bb_uidgid_t*, const char*) FAST_FUNC; 702void xget_uidgid(struct bb_uidgid_t*, const char*) FAST_FUNC;
703/* chown-like handling of "user[:[group]" */ 703/* chown-like handling of "user[:[group]" */
704void parse_chown_usergroup_or_die(struct bb_uidgid_t *u, char *user_group) FAST_FUNC; 704void parse_chown_usergroup_or_die(struct bb_uidgid_t *u, char *user_group) FAST_FUNC;
705/* bb_getpwuid, bb_getgrgid: 705struct passwd* xgetpwuid(uid_t uid) FAST_FUNC;
706 * bb_getXXXid(buf, bufsz, id) - copy user/group name or id 706struct group* xgetgrgid(gid_t gid) FAST_FUNC;
707 * as a string to buf, return user/group name or NULL 707char* xuid2uname(uid_t uid) FAST_FUNC;
708 * bb_getXXXid(NULL, 0, id) - return user/group name or NULL 708char* xgid2group(gid_t gid) FAST_FUNC;
709 * bb_getXXXid(NULL, -1, id) - return user/group name or exit 709char* uid2uname(uid_t uid) FAST_FUNC;
710*/ 710char* gid2group(gid_t gid) FAST_FUNC;
711char *bb_getpwuid(char *name, int bufsize, long uid) FAST_FUNC; 711char* uid2uname_utoa(long uid) FAST_FUNC;
712char *bb_getgrgid(char *group, int bufsize, long gid) FAST_FUNC; 712char* gid2group_utoa(long gid) FAST_FUNC;
713/* versions which cache results (useful for ps, ls etc) */ 713/* versions which cache results (useful for ps, ls etc) */
714const char* get_cached_username(uid_t uid) FAST_FUNC; 714const char* get_cached_username(uid_t uid) FAST_FUNC;
715const char* get_cached_groupname(gid_t gid) FAST_FUNC; 715const char* get_cached_groupname(gid_t gid) FAST_FUNC;