summaryrefslogtreecommitdiff
path: root/src/shared/mkdir.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-05-31 12:40:20 +0200
committerKay Sievers <kay@vrfy.org>2012-05-31 12:40:20 +0200
commitd2e54fae5ca7a0f71b5ac8b356a589ff0a09ea0a (patch)
treeb1a4773022e0904f6e023bcff832d897ed46c893 /src/shared/mkdir.c
parent051d68786bd5bfe87e7cc0c1d68ec4be83eb662a (diff)
mkdir: append _label to all mkdir() calls that explicitly set the selinux context
Diffstat (limited to 'src/shared/mkdir.c')
-rw-r--r--src/shared/mkdir.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/shared/mkdir.c b/src/shared/mkdir.c
index b102af779d..0eb70f268e 100644
--- a/src/shared/mkdir.c
+++ b/src/shared/mkdir.c
@@ -31,7 +31,11 @@
#include "util.h"
#include "log.h"
-int safe_mkdir(const char *path, mode_t mode, uid_t uid, gid_t gid) {
+int mkdir_label(const char *path, mode_t mode) {
+ return label_mkdir(path, mode);
+}
+
+int mkdir_safe_label(const char *path, mode_t mode, uid_t uid, gid_t gid) {
struct stat st;
if (label_mkdir(path, mode) >= 0)
@@ -52,7 +56,7 @@ int safe_mkdir(const char *path, mode_t mode, uid_t uid, gid_t gid) {
return 0;
}
-int mkdir_parents(const char *path, mode_t mode) {
+int mkdir_parents_label(const char *path, mode_t mode) {
struct stat st;
const char *p, *e;
@@ -96,12 +100,12 @@ int mkdir_parents(const char *path, mode_t mode) {
}
}
-int mkdir_p(const char *path, mode_t mode) {
+int mkdir_p_label(const char *path, mode_t mode) {
int r;
/* Like mkdir -p */
- if ((r = mkdir_parents(path, mode)) < 0)
+ if ((r = mkdir_parents_label(path, mode)) < 0)
return r;
if (label_mkdir(path, mode) < 0 && errno != EEXIST)