diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-05-21 11:15:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-21 11:15:10 +0200 |
commit | 1de77bbcec8ea4e50475e9b33986246e47614b84 (patch) | |
tree | 7dbdb40a561e7f894a07654250512373ef567080 /src/nvim/os_unix.c | |
parent | ca1ce590257c35426aeeaac349317d2cb163cd2e (diff) | |
download | rneovim-1de77bbcec8ea4e50475e9b33986246e47614b84.tar.gz rneovim-1de77bbcec8ea4e50475e9b33986246e47614b84.tar.bz2 rneovim-1de77bbcec8ea4e50475e9b33986246e47614b84.zip |
cleanup: remove HAVE_SELINUX #10040
We never define HAVE_SELINUX, and no one has asked for it.
So remove the dead code.
Diffstat (limited to 'src/nvim/os_unix.c')
-rw-r--r-- | src/nvim/os_unix.c | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c index 351350d939..8180a2e8ac 100644 --- a/src/nvim/os_unix.c +++ b/src/nvim/os_unix.c @@ -45,12 +45,6 @@ #include "nvim/os/signal.h" #include "nvim/msgpack_rpc/helpers.h" -#ifdef HAVE_SELINUX -# include <selinux/selinux.h> -static int selinux_enabled = -1; -#endif - - #ifdef INCLUDE_GENERATED_DECLARATIONS # include "os_unix.c.generated.h" #endif @@ -64,53 +58,6 @@ static int selinux_enabled = -1; # endif -#if defined(HAVE_SELINUX) -// Copy security info from "from_file" to "to_file". -void mch_copy_sec(char_u *from_file, char_u *to_file) -{ - if (from_file == NULL) - return; - - if (selinux_enabled == -1) - selinux_enabled = is_selinux_enabled(); - - if (selinux_enabled > 0) { - security_context_t from_context = NULL; - security_context_t to_context = NULL; - - if (getfilecon((char *)from_file, &from_context) < 0) { - // If the filesystem doesn't support extended attributes, - // the original had no special security context and the - // target cannot have one either. - if (errno == EOPNOTSUPP) { - return; - } - - MSG_PUTS(_("\nCould not get security context for ")); - msg_outtrans(from_file); - msg_putchar('\n'); - return; - } - if (getfilecon((char *)to_file, &to_context) < 0) { - MSG_PUTS(_("\nCould not get security context for ")); - msg_outtrans(to_file); - msg_putchar('\n'); - freecon (from_context); - return; - } - if (strcmp(from_context, to_context) != 0) { - if (setfilecon((char *)to_file, from_context) < 0) { - MSG_PUTS(_("\nCould not set security context for ")); - msg_outtrans(to_file); - msg_putchar('\n'); - } - } - freecon(to_context); - freecon(from_context); - } -} -#endif // HAVE_SELINUX - // Return a pointer to the ACL of file "fname" in allocated memory. // Return NULL if the ACL is not available for whatever reason. vim_acl_T mch_get_acl(const char_u *fname) |