-
- Downloads
Filesystem.Tar: Reorder operations in extract_bits()
As is mentioned in [LysLysKOM 23152065], Linux of recent versions clears the S_ISUID and S_ISGID bits when chowning to another user. While POSIX mandates this only for unprivileged users performing the chown, Linux starting with 2.2.13 does not treat root as a special case anymore. The operations were previously reordered to make utime() on __NT__ more robust, which caused chown() to be executed after chmod(). In the current order, we do utime() first, then chown(), then chmod(). While it seems a bit weird to chown() files that do not belong to us, especially in the non-root-case, this has been the historical order of operations in Filesystem.Tar. Thanks to Per Cederqvist <ceder@lysator.liu.se> for the report.
Loading
Please register or sign in to comment