X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fextract.c;h=ccaf5fe6f1ee22c1ef842ea5654308d23b6357af;hb=562d543b2dda9c6d8d6a2995fb9127f5bae58fb4;hp=5ca7a2676c835d28bc7b3f50885644e1dd975905;hpb=49086e2770abfa6ad6a7647e2d0707b607ee1bf8;p=chaz%2Ftar diff --git a/src/extract.c b/src/extract.c index 5ca7a26..ccaf5fe 100644 --- a/src/extract.c +++ b/src/extract.c @@ -204,9 +204,9 @@ set_stat (char *file_name, struct stat *stat_info, int symlink_flag) /* On a few systems, and in particular, those allowing to give files away, changing the owner or group destroys the suid or sgid bits. - So, when root, let's attempt setting these bits once more. */ + So let's attempt setting these bits once more. */ - if (we_are_root && (stat_info->st_mode & (S_ISUID | S_ISGID | S_ISVTX))) + if (stat_info->st_mode & (S_ISUID | S_ISGID | S_ISVTX)) set_mode (file_name, stat_info); } }