summaryrefslogtreecommitdiff
path: root/src/core/mount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-12 12:50:59 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-12 12:50:59 +0100
commit2a2e1b36a0417d748048b530e03d5428241f749d (patch)
tree422f752cf7c673187926627e6448a81c5f4b7e8e /src/core/mount.c
parente87e7f5651a741cd9bd7d4b1f759573faa555c08 (diff)
core: remove SmackFileSystemRootLabel= again
Apparently, util-linux' mount command implicitly drops the smack-related options anyway before passing them to the kernel, if the kernel doesn't know SMACK, hence there's no point in duplicating this in systemd. Fixes #1696
Diffstat (limited to 'src/core/mount.c')
-rw-r--r--src/core/mount.c34
1 files changed, 5 insertions, 29 deletions
diff --git a/src/core/mount.c b/src/core/mount.c
index e86bcf3830..9b44357e90 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -41,7 +41,6 @@
#include "parse-util.h"
#include "path-util.h"
#include "process-util.h"
-#include "smack-util.h"
#include "special.h"
#include "string-table.h"
#include "string-util.h"
@@ -211,7 +210,6 @@ static void mount_done(Unit *u) {
assert(m);
m->where = mfree(m->where);
- m->smack_fs_root_label = mfree(m->smack_fs_root_label);
mount_parameters_done(&m->parameters_proc_self_mountinfo);
mount_parameters_done(&m->parameters_fragment);
@@ -682,8 +680,7 @@ static void mount_dump(Unit *u, FILE *f, const char *prefix) {
"%sOptions: %s\n"
"%sFrom /proc/self/mountinfo: %s\n"
"%sFrom fragment: %s\n"
- "%sDirectoryMode: %04o\n"
- "%sSmackFileSystemRootLabel: %s\n",
+ "%sDirectoryMode: %04o\n",
prefix, mount_state_to_string(m->state),
prefix, mount_result_to_string(m->result),
prefix, m->where,
@@ -692,8 +689,7 @@ static void mount_dump(Unit *u, FILE *f, const char *prefix) {
prefix, p ? strna(p->options) : "n/a",
prefix, yes_no(m->from_proc_self_mountinfo),
prefix, yes_no(m->from_fragment),
- prefix, m->directory_mode,
- prefix, strna(m->smack_fs_root_label));
+ prefix, m->directory_mode);
if (m->control_pid > 0)
fprintf(f,
@@ -870,29 +866,9 @@ fail:
mount_enter_mounted(m, MOUNT_FAILURE_RESOURCES);
}
-static int mount_get_opts(Mount *m, char **_opts) {
- int r;
- char *o = NULL, *opts = NULL;
-
- r = fstab_filter_options(m->parameters_fragment.options,
- "nofail\0" "noauto\0" "auto\0", NULL, NULL, &o);
- if (r < 0)
- return r;
-
- if (mac_smack_use() && m->smack_fs_root_label) {
- if (!isempty(o)) {
- opts = strjoin(o, ",", "smackfsroot=", m->smack_fs_root_label, NULL);
- free(o);
- } else
- opts = strjoin("smackfsroot=", m->smack_fs_root_label, NULL);
-
- if (!opts)
- return -ENOMEM;
- } else
- opts = o;
-
- *_opts = opts;
- return 0;
+static int mount_get_opts(Mount *m, char **ret) {
+ return fstab_filter_options(m->parameters_fragment.options,
+ "nofail\0" "noauto\0" "auto\0", NULL, NULL, ret);
}
static void mount_enter_mounting(Mount *m) {