</varlistentry>
<varlistentry>
- <term><varname>SmackFileSystemRootLabel=</varname></term>
- <listitem><para>Takes a string for the SMACK label.
- This option specifies the label to assign the root of the
- file system if it lacks the SMACK extended attribute.
- Note that this option will be ignored if kernel does not
- support the SMACK feature.
- See <ulink
- url="https://www.kernel.org/doc/Documentation/security/Smack.txt">Smack.txt</ulink>
- for details. </para></listitem>
- </varlistentry>
-
- <varlistentry>
<term><varname>TimeoutSec=</varname></term>
<listitem><para>Configures the time to wait for the mount
command to finish. If a command does not exit within the
SD_BUS_PROPERTY("ControlPID", "u", bus_property_get_pid, offsetof(Mount, control_pid), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
SD_BUS_PROPERTY("DirectoryMode", "u", bus_property_get_mode, offsetof(Mount, directory_mode), SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("SloppyOptions", "b", bus_property_get_bool, offsetof(Mount, sloppy_options), SD_BUS_VTABLE_PROPERTY_CONST),
- SD_BUS_PROPERTY("SmackFileSystemRootLabel", "s", NULL, offsetof(Mount, smack_fs_root_label), SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("Result", "s", property_get_result, offsetof(Mount, result), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
BUS_EXEC_COMMAND_VTABLE("ExecMount", offsetof(Mount, exec_command[MOUNT_EXEC_MOUNT]), SD_BUS_VTABLE_PROPERTY_EMITS_INVALIDATION),
BUS_EXEC_COMMAND_VTABLE("ExecUnmount", offsetof(Mount, exec_command[MOUNT_EXEC_UNMOUNT]), SD_BUS_VTABLE_PROPERTY_EMITS_INVALIDATION),
Mount.TimeoutSec, config_parse_sec, 0, offsetof(Mount, timeout_usec)
Mount.DirectoryMode, config_parse_mode, 0, offsetof(Mount, directory_mode)
Mount.SloppyOptions, config_parse_bool, 0, offsetof(Mount, sloppy_options)
-Mount.SmackFileSystemRootLabel, config_parse_string, 0, offsetof(Mount, smack_fs_root_label)
EXEC_CONTEXT_CONFIG_ITEMS(Mount)m4_dnl
CGROUP_CONTEXT_CONFIG_ITEMS(Mount)m4_dnl
KILL_CONTEXT_CONFIG_ITEMS(Mount)m4_dnl
#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"
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);
"%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,
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,
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) {
bool reset_cpu_usage:1;
bool sloppy_options;
- char *smack_fs_root_label;
MountResult result;
MountResult reload_result;
Where=/tmp
Type=tmpfs
Options=mode=1777,strictatime
-m4_ifdef(`HAVE_SMACK',
-SmackFileSystemRootLabel=*
-)m4_dnl