[systemd-bugs] [Bug 77646] use_smack have corrupt cached result if no /sys/fs/smackfs systemd statup

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Apr 22 01:32:58 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=77646

--- Comment #3 from Ronan22 <ronan at fridu.net> ---
When systemd do is first "use_smack" ?

-At the begining of systemd (main at src/core/main.c), mount_setup_early is
execute.

-mount_setup_early mount each entry of the "mount_table" thow function
mount_one.

-mount_one use mkdir_p_label.

-mkdir_p_label use label_mkdir.

-label_mkdir use use_smack.

So At the first mount of the first entry of "mount_table" ("/proc"), the return
value of use_smack is cached.

Add a funct "retest_smack()" seems to be heavy to me.

-------------------------------------------------------------------
For me, a cleaner way is to mount "/sys" first (before "/proc").

static const MountPoint mount_table[] = {
        { "sysfs",      "/sys",                      "sysfs",      NULL,
MS_NOSUID|MS_NOEXEC|MS_NODEV,
          NULL,       MNT_FATAL|MNT_IN_CONTAINER },
        { "proc",       "/proc",                     "proc",       NULL,
MS_NOSUID|MS_NOEXEC|MS_NODEV,
          NULL,       MNT_FATAL|MNT_IN_CONTAINER },
...

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20140422/25d05680/attachment.html>


More information about the systemd-bugs mailing list