diff options
author | bde <bde@FreeBSD.org> | 1995-10-03 12:55:01 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-10-03 12:55:01 +0000 |
commit | d7de6aca5b60f32d716173fbebe41ef42f3d202a (patch) | |
tree | 4ed18e038b22dd383b42c0f4760dcccb6764b556 /bin | |
parent | 4c830ecd4fa501a32bdc5e2fb3af9f90d56ce72e (diff) | |
download | FreeBSD-src-d7de6aca5b60f32d716173fbebe41ef42f3d202a.zip FreeBSD-src-d7de6aca5b60f32d716173fbebe41ef42f3d202a.tar.gz |
Preserve sticky bit for `cp -pR'. It was already preserved for `cp -R'.
This also fixes loss of the sticky bit for `mv' across file systems.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/cp/utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/cp/utils.c b/bin/cp/utils.c index 600f999..ca2d2c5 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: utils.c,v 1.3 1995/05/30 00:06:22 rgrimes Exp $ + * $Id: utils.c,v 1.4 1995/06/14 05:41:27 bde Exp $ */ #ifndef lint @@ -241,7 +241,8 @@ setfile(fs, fd) int rval; rval = 0; - fs->st_mode &= S_ISUID | S_ISGID | S_IRWXU | S_IRWXG | S_IRWXO; + fs->st_mode &= S_ISUID | S_ISGID | S_ISVTX | + S_IRWXU | S_IRWXG | S_IRWXO; TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atimespec); TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtimespec); |