xfs
[Top] [All Lists]

TAKE - xfsrestore and suid files

To: linux-xfs@xxxxxxxxxxx
Subject: TAKE - xfsrestore and suid files
From: Timothy Shimmin <tes@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 15 May 2001 14:13:34 +1000 (EST)
Sender: owner-linux-xfs@xxxxxxxxxxx
This fixes the problem with xfsrestore not restoring the suid or guid
modes on a file.
It occurred because a chown was done after the chmod when restoring
the files and the chown was clearing these mode bits even running as root.
On IRIX, as root, this is not the case.
The Linux man page indicates that this behavior for root is dependent
on the kernel version. 
Anyway, I have changed the ordering so that the chown is done before
the chmod and test 056 now passes.

--Tim

Date:  Mon May 14 21:05:35 PDT 2001
Workarea:  snort.melbourne.sgi.com:/diskb/build4/tes/slinx-xfs-acl

The following file(s) were checked into:
  bonnie.engr.sgi.com:/isms/slinx/2.4.x-xfs


Modid:  2.4.x-xfs:slinx:94886a
cmd/xfstests/056 - 1.1
        - Test out that the modes of suid,guid,sticky are restored as well on
          files and directories.

cmd/xfstests/056.out - 1.1
        - output for 056 - does an ls -l comparison of permissions.

cmd/xfsdump/restore/tree.c - 1.4
        - Make chown come before chmod so that suid and guid bits are not 
cleared
          when restoring directories.

cmd/xfsdump/common/arch_xlate.c - 1.4
        - Add some diags for ino and mode on bstat translation.

cmd/xfsdump/restore/content.c - 1.7
        - Make chown come before chmod so that suid and guid bits are not 
cleared
          when restoring regular files.

cmd/xfstests/group - 1.9
        - Add 056.

cmd/xfstests/common.dump - 1.7
        - Add code to create directories and files with given permissions.



<Prev in Thread] Current Thread [Next in Thread>
  • TAKE - xfsrestore and suid files, Timothy Shimmin <=