summaryrefslogtreecommitdiff
blob: cae4afbb6c51c5d33ba9cae539128855133c7425 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff -BurpN gammu-1.36.8.orig/smsd/uid.c gammu-1.38.4/smsd/uid.c
--- gammu-1.38.4.orig/smsd/uid.c	2017-06-18 14:33:32.000000000 +0300
+++ gammu-1.38.4/smsd/uid.c	2017-10-10 01:48:20.696098522 +0300
@@ -54,7 +54,7 @@
     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 @@
     /* 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);
         }
     }