diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-12 18:22:55 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-12 18:22:55 +0000 |
commit | 39c651e9097e0e55a52c897982d6e84d281f7396 (patch) | |
tree | ad535283af2299825f65b6b44c889dc7e7bfc842 /libbb/selinux_common.c | |
parent | b3f09f4a5092aacbdc3da80d4fefeaf06445a4f8 (diff) | |
download | busybox-w32-39c651e9097e0e55a52c897982d6e84d281f7396.tar.gz busybox-w32-39c651e9097e0e55a52c897982d6e84d281f7396.tar.bz2 busybox-w32-39c651e9097e0e55a52c897982d6e84d281f7396.zip |
introduce and use setfscreatecon_or_die
(patch by Yuichi Nakamura <ynakam@hitachisoft.jp>)
runcon: *yet another* fix for vda's brainfart :(
Diffstat (limited to 'libbb/selinux_common.c')
-rw-r--r-- | libbb/selinux_common.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libbb/selinux_common.c b/libbb/selinux_common.c index 70d63a465..d506f0636 100644 --- a/libbb/selinux_common.c +++ b/libbb/selinux_common.c | |||
@@ -28,3 +28,13 @@ error: | |||
28 | context_free(con); | 28 | context_free(con); |
29 | return NULL; | 29 | return NULL; |
30 | } | 30 | } |
31 | |||
32 | void setfscreatecon_or_die(security_context_t scontext) | ||
33 | { | ||
34 | if (setfscreatecon(scontext) < 0) { | ||
35 | /* Can be NULL. All known printf implementations | ||
36 | * display "(null)", "<null>" etc */ | ||
37 | bb_perror_msg_and_die("cannot set default " | ||
38 | "file creation context to %s", scontext); | ||
39 | } | ||
40 | } | ||