aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorLibravatar smitsohu <smitsohu@gmail.com>2018-08-19 21:43:14 +0200
committerLibravatar smitsohu <smitsohu@gmail.com>2018-08-19 21:43:14 +0200
commitf8257b7d96de1dc739b96284eafa9fc8f22fe4b4 (patch)
tree2e0c5b0cebfc5b61b2a73fcca6f019ec387106c0 /src/lib
parentfix pid_get_uid for the root user (diff)
downloadfirejail-f8257b7d96de1dc739b96284eafa9fc8f22fe4b4.tar.gz
firejail-f8257b7d96de1dc739b96284eafa9fc8f22fe4b4.tar.zst
firejail-f8257b7d96de1dc739b96284eafa9fc8f22fe4b4.zip
fix also the second instance of pid_get_uid
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/pid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/pid.c b/src/lib/pid.c
index b73a57409..75576c787 100644
--- a/src/lib/pid.c
+++ b/src/lib/pid.c
@@ -149,7 +149,7 @@ uid_t pid_get_uid(pid_t pid) {
149 char buf[PIDS_BUFLEN]; 149 char buf[PIDS_BUFLEN];
150 while (fgets(buf, PIDS_BUFLEN - 1, fp)) { 150 while (fgets(buf, PIDS_BUFLEN - 1, fp)) {
151 if (strncmp(buf, "Uid:", 4) == 0) { 151 if (strncmp(buf, "Uid:", 4) == 0) {
152 char *ptr = buf + 5; 152 char *ptr = buf + 4;
153 while (*ptr != '\0' && (*ptr == ' ' || *ptr == '\t')) { 153 while (*ptr != '\0' && (*ptr == ' ' || *ptr == '\t')) {
154 ptr++; 154 ptr++;
155 } 155 }