chiark / gitweb /
execute: properly enforce group
[elogind.git] / src / execute.c
index f07d018a37a29468707f0956fc2e9d3cdea7fc3b..668bf9d0f06bb544e45309d01571bbf2cdaa870c 100644 (file)
@@ -1193,7 +1193,7 @@ int exec_spawn(ExecCommand *command,
                 }
 
                 if (apply_permissions)
-                        if (enforce_groups(context, username, uid) < 0) {
+                        if (enforce_groups(context, username, gid) < 0) {
                                 r = EXIT_GROUP;
                                 goto fail_child;
                         }