1
0
mirror of https://github.com/systemd/systemd synced 2026-03-16 18:14:46 +01:00

Compare commits

..

No commits in common. "a9859a62f1af8bcd21bd7d7f3840d363e033bea2" and "d0badc0a619e15c67d38f65730ac210316ece84c" have entirely different histories.

4 changed files with 9 additions and 4 deletions

View File

@ -255,8 +255,8 @@ int mkdir_p_root_full(const char *root, const char *p, uid_t uid, gid_t gid, mod
if (nfd < 0) if (nfd < 0)
return nfd; return nfd;
if ((uid_is_valid(uid) || gid_is_valid(gid)) && fchown(nfd, uid, gid) < 0) if (ts == USEC_INFINITY && !uid_is_valid(uid) && !gid_is_valid(gid))
return -errno; return 1;
if (ts != USEC_INFINITY) { if (ts != USEC_INFINITY) {
struct timespec tspec; struct timespec tspec;
@ -269,5 +269,8 @@ int mkdir_p_root_full(const char *root, const char *p, uid_t uid, gid_t gid, mod
return -errno; return -errno;
} }
if ((uid_is_valid(uid) || gid_is_valid(gid)) && fchown(nfd, uid, gid) < 0)
return -errno;
return 1; return 1;
} }

View File

@ -2,7 +2,7 @@
#include <unistd.h> #include <unistd.h>
#include "sd-varlink.h" #include <sd-varlink.h>
#include "alloc-util.h" #include "alloc-util.h"
#include "glyph-util.h" #include "glyph-util.h"

View File

@ -1,6 +1,8 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */ /* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once #pragma once
#include <stdbool.h>
#include "shared-forward.h" #include "shared-forward.h"
typedef enum PromptFlags { typedef enum PromptFlags {

View File

@ -6,7 +6,7 @@
#include "shared-forward.h" #include "shared-forward.h"
typedef enum RereadPartitionTableFlags { typedef enum RereadPartitionTableFlags {
REREADPT_FORCE_UEVENT = 1 << 0, /* Force a "change" uevent out on partitions we didn't resize/remove/add */ REREADPT_FORCE_UEVENT = 1 << 0, /* Force a "change" ueven out on partitions we didn't resize/remove/add */
REREADPT_BSD_LOCK = 1 << 1, /* Take a BSD lock on the device around the rescan operation */ REREADPT_BSD_LOCK = 1 << 1, /* Take a BSD lock on the device around the rescan operation */
} RereadPartitionTableFlags; } RereadPartitionTableFlags;