diff options
author | Bram Moolenaar <Bram@vim.org> | 2008-05-07 17:09:24 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2008-05-07 17:09:24 +0000 |
commit | 588ebeb7a5a7ae7c86b4fe5c3aa34ad117b93b70 (patch) | |
tree | 4260a2d4f4d6debb7add7a4ae36758354ee33440 /src/fileio.c | |
parent | 2b57078d735b72fdbfa70eb9fcad1a4c1800f959 (diff) | |
download | vim-git-588ebeb7a5a7ae7c86b4fe5c3aa34ad117b93b70.tar.gz |
updated for version 7.1-296v7.1.296
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/fileio.c b/src/fileio.c index bcabbffc8..95970a3fd 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3651,6 +3651,9 @@ buf_write(buf, fname, sfname, start, end, eap, append, forceit, ) mch_setperm(backup, (perm & 0707) | ((perm & 07) << 3)); +# ifdef HAVE_SELINUX + mch_copy_sec(fname, backup); +# endif #endif /* @@ -3687,6 +3690,9 @@ buf_write(buf, fname, sfname, start, end, eap, append, forceit, #ifdef HAVE_ACL mch_set_acl(backup, acl); #endif +#ifdef HAVE_SELINUX + mch_copy_sec(fname, backup); +#endif break; } } @@ -4309,6 +4315,12 @@ restore_backup: } #endif +#ifdef HAVE_SELINUX + /* Probably need to set the security context. */ + if (!backup_copy) + mch_copy_sec(backup, wfname); +#endif + #ifdef UNIX /* When creating a new file, set its owner/group to that of the original * file. Get the new device and inode number. */ |