diff options
author | 2016-04-04 10:49:18 -0400 | |
---|---|---|
committer | 2016-04-04 10:49:18 -0400 | |
commit | fc459ad70dac4052095dd1b7ce582ce4ea09d597 (patch) | |
tree | f0c5267b5eb887826fa842197b4c944cda9cad4f | |
parent | grsecurity fix: check existing sandbox with euid set (diff) | |
download | firejail-fc459ad70dac4052095dd1b7ce582ce4ea09d597.tar.gz firejail-fc459ad70dac4052095dd1b7ce582ce4ea09d597.tar.zst firejail-fc459ad70dac4052095dd1b7ce582ce4ea09d597.zip |
tentative grsecurity fix for Error getpwuid:init_cfg(179): Permission denied
-rw-r--r-- | src/firejail/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c index 477c6ac7d..91e5e9229 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -174,9 +174,11 @@ static void init_cfg(int argc, char **argv) { | |||
174 | cfg.bridge3.devsandbox = "eth3"; | 174 | cfg.bridge3.devsandbox = "eth3"; |
175 | 175 | ||
176 | // extract user data | 176 | // extract user data |
177 | EUID_ROOT(); | ||
177 | struct passwd *pw = getpwuid(getuid()); | 178 | struct passwd *pw = getpwuid(getuid()); |
178 | if (!pw) | 179 | if (!pw) |
179 | errExit("getpwuid"); | 180 | errExit("getpwuid"); |
181 | EUID_USER(); | ||
180 | cfg.username = strdup(pw->pw_name); | 182 | cfg.username = strdup(pw->pw_name); |
181 | if (!cfg.username) | 183 | if (!cfg.username) |
182 | errExit("strdup"); | 184 | errExit("strdup"); |