projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
206e986
)
execute: generalize uid/gid handling in two cases for any kind of uid/gid
author
Lennart Poettering
<lennart@poettering.net>
Thu, 14 Mar 2019 16:24:47 +0000
(17:24 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 19 Mar 2019 15:57:33 +0000
(16:57 +0100)
src/core/execute.c
patch
|
blob
|
history
diff --git
a/src/core/execute.c
b/src/core/execute.c
index
6df9016
..
d464766
100644
(file)
--- a/
src/core/execute.c
+++ b/
src/core/execute.c
@@
-3161,7
+3161,7
@@
static int exec_child(
USER_PROCESS,
username);
- if (
context->user
) {
+ if (
uid_is_valid(uid)
) {
r = chown_terminal(STDIN_FILENO, uid);
if (r < 0) {
*exit_status = EXIT_STDIN;
@@
-3466,7
+3466,7
@@
static int exec_child(
}
if (needs_setuid) {
- if (
context->user
) {
+ if (
uid_is_valid(uid)
) {
r = enforce_user(context, uid);
if (r < 0) {
*exit_status = EXIT_USER;