aboutsummaryrefslogtreecommitdiff
path: root/libpwdgrp
diff options
context:
space:
mode:
authorGravatar Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-07-21 14:41:33 +0000
committerGravatar Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-07-21 14:41:33 +0000
commitd73cbd31a295ac757e59f129f162d9cd69440224 (patch)
tree53d9c4cff7223be124698ec8cc3ccba4bded52eb /libpwdgrp
parenta53de7f7c2cd3ac46b26642aafb1a573a096a80d (diff)
downloadbusybox-d73cbd31a295ac757e59f129f162d9cd69440224.tar.gz
busybox-d73cbd31a295ac757e59f129f162d9cd69440224.tar.bz2
- first pass to unify/cleanup uid handling (-236b)
This needs further love, alot of love.. Tito?
Diffstat (limited to 'libpwdgrp')
-rw-r--r--libpwdgrp/uidgid_get.c8
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)
}
return 1;
}
+void FAST_FUNC xget_uidgid(struct bb_uidgid_t *u, const char *ug)
+{
+ if (!get_uidgid(u, ug, 1))
+ bb_error_msg_and_die("unknown user/group %s", ug);
+}
/* chown-like:
* "user" sets uid only,
@@ -106,8 +111,7 @@ void FAST_FUNC parse_chown_usergroup_or_die(struct bb_uidgid_t *u, char *user_gr
} else {
if (!group[1]) /* "user:" */
*group = '\0';
- if (!get_uidgid(u, user_group, 1))
- bb_error_msg_and_die("unknown user/group %s", user_group);
+ xget_uidgid(u, user_group);
}
}