Mercurial > vim
comparison src/fileio.c @ 1583:ebe059f69b9e v7.1.296
updated for version 7.1-296
author | vimboss |
---|---|
date | Wed, 07 May 2008 17:09:24 +0000 |
parents | 2c4ca49319a6 |
children | 80b9076e9e17 |
comparison
equal
deleted
inserted
replaced
1582:73c5752b957d | 1583:ebe059f69b9e |
---|---|
3649 && fchown(bfd, (uid_t)-1, st_old.st_gid) != 0 | 3649 && fchown(bfd, (uid_t)-1, st_old.st_gid) != 0 |
3650 # endif | 3650 # endif |
3651 ) | 3651 ) |
3652 mch_setperm(backup, | 3652 mch_setperm(backup, |
3653 (perm & 0707) | ((perm & 07) << 3)); | 3653 (perm & 0707) | ((perm & 07) << 3)); |
3654 # ifdef HAVE_SELINUX | |
3655 mch_copy_sec(fname, backup); | |
3656 # endif | |
3654 #endif | 3657 #endif |
3655 | 3658 |
3656 /* | 3659 /* |
3657 * copy the file. | 3660 * copy the file. |
3658 */ | 3661 */ |
3684 #ifdef UNIX | 3687 #ifdef UNIX |
3685 set_file_time(backup, st_old.st_atime, st_old.st_mtime); | 3688 set_file_time(backup, st_old.st_atime, st_old.st_mtime); |
3686 #endif | 3689 #endif |
3687 #ifdef HAVE_ACL | 3690 #ifdef HAVE_ACL |
3688 mch_set_acl(backup, acl); | 3691 mch_set_acl(backup, acl); |
3692 #endif | |
3693 #ifdef HAVE_SELINUX | |
3694 mch_copy_sec(fname, backup); | |
3689 #endif | 3695 #endif |
3690 break; | 3696 break; |
3691 } | 3697 } |
3692 } | 3698 } |
3693 } | 3699 } |
4305 if (p_fs && fsync(fd) != 0 && !device) | 4311 if (p_fs && fsync(fd) != 0 && !device) |
4306 { | 4312 { |
4307 errmsg = (char_u *)_("E667: Fsync failed"); | 4313 errmsg = (char_u *)_("E667: Fsync failed"); |
4308 end = 0; | 4314 end = 0; |
4309 } | 4315 } |
4316 #endif | |
4317 | |
4318 #ifdef HAVE_SELINUX | |
4319 /* Probably need to set the security context. */ | |
4320 if (!backup_copy) | |
4321 mch_copy_sec(backup, wfname); | |
4310 #endif | 4322 #endif |
4311 | 4323 |
4312 #ifdef UNIX | 4324 #ifdef UNIX |
4313 /* When creating a new file, set its owner/group to that of the original | 4325 /* When creating a new file, set its owner/group to that of the original |
4314 * file. Get the new device and inode number. */ | 4326 * file. Get the new device and inode number. */ |