summaryrefslogtreecommitdiff
path: root/smsd/uid.c
diff options
context:
space:
mode:
authorMichal Čihař <nijel@debian.org>2017-10-18 10:25:29 +0200
committerMichal Čihař <nijel@debian.org>2017-10-18 10:25:29 +0200
commit1b4e1bec085a3a96d5683821a5f8875db8a45964 (patch)
tree1621cd0cb4fbbb567af9adb2516ee4c40ff9bbee /smsd/uid.c
parent105250a08aeaef4c4690ac00d4f956d04bc3a9f5 (diff)
parentaad5c0f31b8583d1de28434597fb81a2079434a0 (diff)
Updated version 1.38.5 from 'upstream/1.38.5'
with Debian dir ec9e041589bbe58997654cc8ebb3f0cd170098ed
Diffstat (limited to 'smsd/uid.c')
-rw-r--r--smsd/uid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/smsd/uid.c b/smsd/uid.c
index 17900c0..1041513 100644
--- a/smsd/uid.c
+++ b/smsd/uid.c
@@ -54,7 +54,7 @@ gboolean fill_uid(SMSD_Parameters *params, const char *name)
if (pwd == NULL) {
/* Try to handle it as a number */
uid = strtol(name, &endptr, 10);
- if (*endptr == 0 && uid > 0) {
+ if (*endptr == 0 && uid >= 0) {
pwd = getpwuid(uid);
}
}
@@ -85,7 +85,7 @@ gboolean fill_gid(SMSD_Parameters *params, const char *name)
/* Try to handle it as a number */
if (grp == NULL) {
gid = strtol(name, &endptr, 10);
- if (*endptr == 0 && gid > 0) {
+ if (*endptr == 0 && gid >= 0) {
grp = getgrgid(gid);
}
}