summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/login/logind-user.c9
-rw-r--r--src/shared/watchdog.c9
2 files changed, 14 insertions, 4 deletions
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
index 6720899def..738e69cced 100644
--- a/src/login/logind-user.c
+++ b/src/login/logind-user.c
@@ -36,9 +36,10 @@
#include "bus-error.h"
#include "conf-parser.h"
#include "clean-ipc.h"
-#include "logind-user.h"
#include "smack-util.h"
#include "formats-util.h"
+#include "label.h"
+#include "logind-user.h"
User* user_new(Manager *m, uid_t uid, gid_t gid, const char *name) {
User *u;
@@ -323,7 +324,7 @@ static int user_mkdir_runtime_path(User *u) {
if (path_is_mount_point(p, 0) <= 0) {
_cleanup_free_ char *t = NULL;
- (void) mkdir(p, 0700);
+ (void) mkdir_label(p, 0700);
if (mac_smack_use())
r = asprintf(&t, "mode=0700,smackfsroot=*,uid=" UID_FMT ",gid=" GID_FMT ",size=%zu", u->uid, u->gid, u->manager->runtime_dir_size);
@@ -351,6 +352,10 @@ static int user_mkdir_runtime_path(User *u) {
goto fail;
}
}
+
+ r = label_fix(p, false, false);
+ if (r < 0)
+ log_warning_errno(r, "Failed to fix label of '%s', ignoring: %m", p);
}
u->runtime_path = p;
diff --git a/src/shared/watchdog.c b/src/shared/watchdog.c
index 2fe4eb81cf..9d39beb340 100644
--- a/src/shared/watchdog.c
+++ b/src/shared/watchdog.c
@@ -60,8 +60,13 @@ static int update_timeout(void) {
flags = WDIOS_ENABLECARD;
r = ioctl(watchdog_fd, WDIOC_SETOPTIONS, &flags);
- if (r < 0)
- return log_warning_errno(errno, "Failed to enable hardware watchdog: %m");
+ if (r < 0) {
+ /* ENOTTY means the watchdog is always enabled so we're fine */
+ log_full(errno == ENOTTY ? LOG_DEBUG : LOG_WARNING,
+ "Failed to enable hardware watchdog: %m");
+ if (errno != ENOTTY)
+ return -errno;
+ }
r = ioctl(watchdog_fd, WDIOC_KEEPALIVE, 0);
if (r < 0)