diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-07-21 14:41:33 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-07-21 14:41:33 +0000 |
commit | d73cbd31a295ac757e59f129f162d9cd69440224 (patch) | |
tree | 53d9c4cff7223be124698ec8cc3ccba4bded52eb /libpwdgrp/uidgid_get.c | |
parent | a53de7f7c2cd3ac46b26642aafb1a573a096a80d (diff) | |
download | busybox-w32-d73cbd31a295ac757e59f129f162d9cd69440224.tar.gz busybox-w32-d73cbd31a295ac757e59f129f162d9cd69440224.tar.bz2 busybox-w32-d73cbd31a295ac757e59f129f162d9cd69440224.zip |
- first pass to unify/cleanup uid handling (-236b)
This needs further love, alot of love.. Tito?
Diffstat (limited to 'libpwdgrp/uidgid_get.c')
-rw-r--r-- | libpwdgrp/uidgid_get.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libpwdgrp/uidgid_get.c b/libpwdgrp/uidgid_get.c index 88f4e2545..dc7cc6614 100644 --- a/libpwdgrp/uidgid_get.c +++ b/libpwdgrp/uidgid_get.c | |||
@@ -76,6 +76,11 @@ int FAST_FUNC get_uidgid(struct bb_uidgid_t *u, const char *ug, int numeric_ok) | |||
76 | } | 76 | } |
77 | return 1; | 77 | return 1; |
78 | } | 78 | } |
79 | void FAST_FUNC xget_uidgid(struct bb_uidgid_t *u, const char *ug) | ||
80 | { | ||
81 | if (!get_uidgid(u, ug, 1)) | ||
82 | bb_error_msg_and_die("unknown user/group %s", ug); | ||
83 | } | ||
79 | 84 | ||
80 | /* chown-like: | 85 | /* chown-like: |
81 | * "user" sets uid only, | 86 | * "user" sets uid only, |
@@ -106,8 +111,7 @@ void FAST_FUNC parse_chown_usergroup_or_die(struct bb_uidgid_t *u, char *user_gr | |||
106 | } else { | 111 | } else { |
107 | if (!group[1]) /* "user:" */ | 112 | if (!group[1]) /* "user:" */ |
108 | *group = '\0'; | 113 | *group = '\0'; |
109 | if (!get_uidgid(u, user_group, 1)) | 114 | xget_uidgid(u, user_group); |
110 | bb_error_msg_and_die("unknown user/group %s", user_group); | ||
111 | } | 115 | } |
112 | } | 116 | } |
113 | 117 | ||