diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-10 16:58:49 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-10 16:58:49 +0000 |
commit | 49622d784672bf2f7b2fe80589714cdef5adde0c (patch) | |
tree | 892bb79b0ef031d729e688d6be4950f6d17f13b9 /coreutils/cp.c | |
parent | 4eb8b936cb0aeb27c3e12f9a93fc43aa1e9668f5 (diff) | |
download | busybox-w32-49622d784672bf2f7b2fe80589714cdef5adde0c.tar.gz busybox-w32-49622d784672bf2f7b2fe80589714cdef5adde0c.tar.bz2 busybox-w32-49622d784672bf2f7b2fe80589714cdef5adde0c.zip |
selinux support by Yuichi Nakamura <ynakam@hitachisoft.jp> (HitachiSoft)
Diffstat (limited to 'coreutils/cp.c')
-rw-r--r-- | coreutils/cp.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 @@ | |||
3 | * Mini cp implementation for busybox | 3 | * Mini cp implementation for busybox |
4 | * | 4 | * |
5 | * Copyright (C) 2000 by Matt Kraai <kraai@alumni.carnegiemellon.edu> | 5 | * Copyright (C) 2000 by Matt Kraai <kraai@alumni.carnegiemellon.edu> |
6 | * SELinux support by Yuichi Nakamura <ynakam@hitachisoft.jp> | ||
6 | * | 7 | * |
7 | * Licensed under GPL v2 or later, see file LICENSE in this tarball for details. | 8 | * Licensed under GPL v2 or later, see file LICENSE in this tarball for details. |
8 | */ | 9 | */ |
@@ -50,6 +51,12 @@ int cp_main(int argc, char **argv) | |||
50 | if (flags & OPT_H) ... // deref command-line params only | 51 | if (flags & OPT_H) ... // deref command-line params only |
51 | */ | 52 | */ |
52 | 53 | ||
54 | #if ENABLE_SELINUX | ||
55 | if (flags & FILEUTILS_PRESERVE_SECURITY_CONTEXT) { | ||
56 | selinux_or_die(); | ||
57 | } | ||
58 | #endif | ||
59 | |||
53 | flags ^= FILEUTILS_DEREFERENCE; /* The sense of this flag was reversed. */ | 60 | flags ^= FILEUTILS_DEREFERENCE; /* The sense of this flag was reversed. */ |
54 | 61 | ||
55 | if (optind + 2 > argc) { | 62 | if (optind + 2 > argc) { |