diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-06-21 19:44:35 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-06-23 10:34:58 +0200 |
commit | 9c6535367d07650bb531beb6cce57497862a36da (patch) | |
tree | b1d70708e39b8bb4c214816582a7ddbdf56b3b8b /src/basic/mountpoint-util.c | |
parent | f69c2926f896d628426447f2a0a81bfcd1f4a75d (diff) | |
download | systemd-9c6535367d07650bb531beb6cce57497862a36da.tar.gz |
basic,shared: move make_mount_point_inode_*() to shared/
Those pull in selinux for labelling, and we should avoid selinux in basic/.
Diffstat (limited to 'src/basic/mountpoint-util.c')
-rw-r--r-- | src/basic/mountpoint-util.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/basic/mountpoint-util.c b/src/basic/mountpoint-util.c index 1d617e87b2..8c836a1b74 100644 --- a/src/basic/mountpoint-util.c +++ b/src/basic/mountpoint-util.c @@ -8,7 +8,6 @@ #include "fd-util.h" #include "fileio.h" #include "fs-util.h" -#include "label.h" #include "missing_stat.h" #include "missing_syscall.h" #include "mkdir.h" @@ -510,25 +509,3 @@ int mount_propagation_flags_from_string(const char *name, unsigned long *ret) { return -EINVAL; return 0; } - -int make_mount_point_inode_from_stat(const struct stat *st, const char *dest, mode_t mode) { - assert(st); - assert(dest); - - if (S_ISDIR(st->st_mode)) - return mkdir_label(dest, mode); - else - return mknod(dest, S_IFREG|(mode & ~0111), 0); -} - -int make_mount_point_inode_from_path(const char *source, const char *dest, mode_t mode) { - struct stat st; - - assert(source); - assert(dest); - - if (stat(source, &st) < 0) - return -errno; - - return make_mount_point_inode_from_stat(&st, dest, mode); -} |