From 49622d784672bf2f7b2fe80589714cdef5adde0c Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sat, 10 Mar 2007 16:58:49 +0000 Subject: selinux support by Yuichi Nakamura (HitachiSoft) --- coreutils/cp.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'coreutils/cp.c') diff --git a/coreutils/cp.c b/coreutils/cp.c index 7b0de477b..64cf63797 100644 --- a/coreutils/cp.c +++ b/coreutils/cp.c @@ -3,6 +3,7 @@ * Mini cp implementation for busybox * * Copyright (C) 2000 by Matt Kraai + * SELinux support by Yuichi Nakamura * * Licensed under GPL v2 or later, see file LICENSE in this tarball for details. */ @@ -50,6 +51,12 @@ int cp_main(int argc, char **argv) if (flags & OPT_H) ... // deref command-line params only */ +#if ENABLE_SELINUX + if (flags & FILEUTILS_PRESERVE_SECURITY_CONTEXT) { + selinux_or_die(); + } +#endif + flags ^= FILEUTILS_DEREFERENCE; /* The sense of this flag was reversed. */ if (optind + 2 > argc) { -- cgit v1.2.3-55-g6feb