1
0
mirror of https://github.com/systemd/systemd synced 2025-09-29 00:34:45 +02:00

Compare commits

..

No commits in common. "4dbc0be2e5b2e4ad250b93f7f16194486a0a31db" and "23afa884d4f3bcd97160a893816f9ba170f62ad4" have entirely different histories.

5 changed files with 28 additions and 21 deletions

View File

@ -2212,7 +2212,7 @@ if conf.get('ENABLE_SYSEXT') == 1
link_with : [libshared],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootbindir)
install_dir : rootlibexecdir)
endif
if conf.get('ENABLE_USERDB') == 1

View File

@ -587,22 +587,34 @@ char* path_join_internal(const char *first, ...) {
static int check_x_access(const char *path, int *ret_fd) {
_cleanup_close_ int fd = -1;
const char *with_dash;
int r;
/* We need to use O_PATH because there may be executables for which we have only exec
* permissions, but not read (usually suid executables). */
fd = open(path, O_PATH|O_CLOEXEC);
if (fd < 0)
if (ret_fd) {
/* We need to use O_PATH because there may be executables for which we have only exec
* permissions, but not read (usually suid executables). */
fd = open(path, O_PATH|O_CLOEXEC);
if (fd < 0)
return -errno;
r = access_fd(fd, X_OK);
if (r < 0)
return r;
} else {
/* Let's optimize things a bit by not opening the file if we don't need the fd. */
if (access(path, X_OK) < 0)
return -errno;
}
with_dash = strjoina(path, "/");
/* If this passes, it must be a directory. */
if (access(with_dash, X_OK) >= 0)
return -EISDIR;
if (errno != ENOTDIR)
return -errno;
r = fd_verify_regular(fd);
if (r < 0)
return r;
r = access_fd(fd, X_OK);
if (r < 0)
return r;
if (ret_fd)
*ret_fd = TAKE_FD(fd);

View File

@ -948,11 +948,6 @@ static int run(int argc, char *argv[]) {
_cleanup_(context_clear) Context c;
int r;
log_set_target(LOG_TARGET_AUTO);
udev_parse_config();
log_parse_environment();
log_open();
context_init(&c);
r = parse_argv(argc, argv);

View File

@ -133,7 +133,6 @@ units = [
['systemd-poweroff.service', ''],
['systemd-reboot.service', ''],
['systemd-rfkill.socket', 'ENABLE_RFKILL'],
['systemd-sysext.service', 'ENABLE_SYSEXT'],
['systemd-sysusers.service', 'ENABLE_SYSUSERS',
'sysinit.target.wants/'],
['systemd-tmpfiles-clean.service', 'ENABLE_TMPFILES'],
@ -212,6 +211,7 @@ in_units = [
['systemd-oomd.service', 'ENABLE_OOMD'],
['systemd-portabled.service', 'ENABLE_PORTABLED',
'dbus-org.freedesktop.portable1.service'],
['systemd-sysext.service', 'ENABLE_SYSEXT'],
['systemd-userdbd.service', 'ENABLE_USERDB'],
['systemd-homed.service', 'ENABLE_HOMED'],
['systemd-quotacheck.service', 'ENABLE_QUOTACHECK'],

View File

@ -24,8 +24,8 @@ ConditionDirectoryNotEmpty=|/usr/lib/extensions
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=systemd-sysext --merge
ExecStop=systemd-sysext --unmerge
ExecStart=@rootlibexecdir@/systemd-sysext --merge
ExecStop=@rootlibexecdir@/systemd-sysext --unmerge
[Install]
WantedBy=sysinit.target