won't leave 0.0 files around which are SUID if they're supposed to be
authorewt <devnull@localhost>
Tue, 30 Jan 1996 17:35:13 +0000 (17:35 +0000)
committerewt <devnull@localhost>
Tue, 30 Jan 1996 17:35:13 +0000 (17:35 +0000)
owned by someone else

CVS patchset: 256
CVS date: 1996/01/30 17:35:13

lib/install.c

index 48ae9b1..648d87d 100644 (file)
@@ -516,6 +516,8 @@ static int setFileOwner(char * prefix, char * file, char * owner,
     if (chown(filespec, uid, gid)) {
        error(RPMERR_CHOWN, "cannot set owner and group for %s - %s\n",
                filespec, strerror(errno));
+       /* screw with the permissions so it's not SUID and 0.0 */
+       chmod(filespec, 0644);
        return 1;
     }