-
- Downloads
security_dac: compute supplemental groups before fork
Commit 75c12564 states that virGetGroupList must not be called between fork and exec, then commit ee777e99 promptly violated that for lxc's use of virSecurityManagerSetProcessLabel. Hoist the supplemental group detection to the time that the security manager needs to fork. Qemu is safe, as it uses virSecurityManagerSetChildProcessLabel which in turn uses virCommand to determine supplemental groups. This does not fix the fact that virSecurityManagerSetProcessLabel calls virSecurityDACParseIds calls parseIds which eventually calls getpwnam_r, which also violates fork/exec async-signal-safe safety rules, but so far no one has complained of hitting deadlock in that case. * src/security/security_dac.c (_virSecurityDACData): Track groups in private data. (virSecurityDACPreFork): New function, to set them. (virSecurityDACClose): Clean up new fields. (virSecurityDACGetIds): Alter signature. (virSecurityDACSetSecurityHostdevLabelHelper) (virSecurityDACSetChardevLabel, virSecurityDACSetProcessLabel) (virSecurityDACSetChildProcessLabel): Update callers. Signed-off-by:Eric Blake <eblake@redhat.com>
-
mentioned in commit c061ff5e
-
mentioned in commit 0b2750c2
-
mentioned in commit 53b882aa
-
mentioned in commit 00c2003e
-
mentioned in commit 65985101
-
mentioned in commit 9a1145a9
-
mentioned in commit 47d520cd
-
mentioned in commit 7f72e6c3
-
mentioned in commit fe11d34a
-
mentioned in commit d23cf2c9
Please register or sign in to comment