You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setuid/setgid bits are not always retained on extract. I notice this most obviously when moving Ubuntu containers around, in /sbin pam_extrausers_chkpwd and unix_chkpwd should be setgid. They get created correctly, but then reset:
fchown(2) behaviour on Linux seems to be responsible, per man page:
When the owner or group of an executable file is changed by an unprivileged user, the S_ISUID and S_ISGID mode bits are cleared. POSIX does not specify whether this also should happen when root does the chown(); the Linux behavior depends on the kernel version, and since Linux 2.2.13, root is treated like other users.
ca_decoder_finalize_child performs the fchown(), so probably needs to reset the mode again afterwards...
Slightly baffled how this one has slipped through the net for so long?
The text was updated successfully, but these errors were encountered:
Setuid/setgid bits are not always retained on extract. I notice this most obviously when moving Ubuntu containers around, in /sbin pam_extrausers_chkpwd and unix_chkpwd should be setgid. They get created correctly, but then reset:
fchown(2) behaviour on Linux seems to be responsible, per man page:
ca_decoder_finalize_child performs the fchown(), so probably needs to reset the mode again afterwards...
Slightly baffled how this one has slipped through the net for so long?
The text was updated successfully, but these errors were encountered: