chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
unit: set default working directory to the user's home directory when running in...
[elogind.git]
/
src
/
core
/
mount-setup.c
diff --git
a/src/core/mount-setup.c
b/src/core/mount-setup.c
index 6d37bbde3c8bf6cddf7da6dfead1b25f266e6682..07794df049adb65da3c8fe6e8c7add99973ac408 100644
(file)
--- a/
src/core/mount-setup.c
+++ b/
src/core/mount-setup.c
@@
-38,6
+38,8
@@
#include "set.h"
#include "strv.h"
#include "mkdir.h"
#include "set.h"
#include "strv.h"
#include "mkdir.h"
+#include "path-util.h"
+#include "missing.h"
#ifndef TTY_GID
#define TTY_GID 5
#ifndef TTY_GID
#define TTY_GID 5
@@
-119,7
+121,7
@@
static int mount_one(const MountPoint *p, bool relabel) {
/* Relabel first, just in case */
if (relabel)
/* Relabel first, just in case */
if (relabel)
- label_fix(p->where, true);
+ label_fix(p->where, true
, true
);
if ((r = path_is_mount_point(p->where, true)) < 0)
return r;
if ((r = path_is_mount_point(p->where, true)) < 0)
return r;
@@
-129,7
+131,7
@@
static int mount_one(const MountPoint *p, bool relabel) {
/* The access mode here doesn't really matter too much, since
* the mounted file system will take precedence anyway. */
/* The access mode here doesn't really matter too much, since
* the mounted file system will take precedence anyway. */
- mkdir_p(p->where, 0755);
+ mkdir_p
_label
(p->where, 0755);
log_debug("Mounting %s to %s of type %s with options %s.",
p->what,
log_debug("Mounting %s to %s of type %s with options %s.",
p->what,
@@
-148,7
+150,7
@@
static int mount_one(const MountPoint *p, bool relabel) {
/* Relabel again, since we now mounted something fresh here */
if (relabel)
/* Relabel again, since we now mounted something fresh here */
if (relabel)
- label_fix(p->where, false);
+ label_fix(p->where, false
, false
);
return 1;
}
return 1;
}
@@
-345,7
+347,7
@@
static int nftw_cb(
if (_unlikely_(ftwbuf->level == 0))
return FTW_CONTINUE;
if (_unlikely_(ftwbuf->level == 0))
return FTW_CONTINUE;
- label_fix(fpath,
tru
e);
+ label_fix(fpath,
false, fals
e);
/* /run/initramfs is static data and big, no need to
* dynamically relabel its contents at boot... */
/* /run/initramfs is static data and big, no need to
* dynamically relabel its contents at boot... */
@@
-389,7
+391,7
@@
int mount_setup(bool loaded_policy) {
/* Explicitly relabel these */
NULSTR_FOREACH(j, relabel)
/* Explicitly relabel these */
NULSTR_FOREACH(j, relabel)
- label_fix(j, true);
+ label_fix(j, true
, false
);
after_relabel = now(CLOCK_MONOTONIC);
after_relabel = now(CLOCK_MONOTONIC);
@@
-403,8
+405,8
@@
int mount_setup(bool loaded_policy) {
dev_setup();
/* Create a few directories we always want around */
dev_setup();
/* Create a few directories we always want around */
-
label_mkdir
("/run/systemd", 0755);
-
label_mkdir
("/run/systemd/system", 0755);
+
mkdir_label
("/run/systemd", 0755);
+
mkdir_label
("/run/systemd/system", 0755);
return 0;
}
return 0;
}