summaryrefslogtreecommitdiff
path: root/src/execute.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-07-23 00:47:17 +0200
committerLennart Poettering <lennart@poettering.net>2011-07-23 00:47:17 +0200
commitddd88763921a1534081ed28e36f6712a85449005 (patch)
treef027ce791a7525a75acb5381f97a81279d42ede4 /src/execute.c
parent034a2a52ac0ec83e0229941d635d310b23eb04df (diff)
util: user parse_uid() wherever applicable
Diffstat (limited to 'src/execute.c')
-rw-r--r--src/execute.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/execute.c b/src/execute.c
index 92f4eafd35..40af7d65f1 100644
--- a/src/execute.c
+++ b/src/execute.c
@@ -551,7 +551,7 @@ static int restore_confirm_stdio(const ExecContext *context,
static int get_group_creds(const char *groupname, gid_t *gid) {
struct group *g;
- unsigned long lu;
+ gid_t id;
assert(groupname);
assert(gid);
@@ -564,9 +564,9 @@ static int get_group_creds(const char *groupname, gid_t *gid) {
return 0;
}
- if (safe_atolu(groupname, &lu) >= 0) {
+ if (parse_gid(groupname, &id) >= 0) {
errno = 0;
- g = getgrgid((gid_t) lu);
+ g = getgrgid(id);
} else {
errno = 0;
g = getgrnam(groupname);