mirror of
https://github.com/systemd/systemd
synced 2025-09-28 16:24:45 +02:00
Compare commits
3 Commits
23afa884d4
...
4dbc0be2e5
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4dbc0be2e5 | ||
![]() |
888f65ace6 | ||
![]() |
aac5fbff0b |
@ -2212,7 +2212,7 @@ if conf.get('ENABLE_SYSEXT') == 1
|
|||||||
link_with : [libshared],
|
link_with : [libshared],
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : rootlibexecdir)
|
install_dir : rootbindir)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if conf.get('ENABLE_USERDB') == 1
|
if conf.get('ENABLE_USERDB') == 1
|
||||||
|
@ -587,34 +587,22 @@ char* path_join_internal(const char *first, ...) {
|
|||||||
|
|
||||||
static int check_x_access(const char *path, int *ret_fd) {
|
static int check_x_access(const char *path, int *ret_fd) {
|
||||||
_cleanup_close_ int fd = -1;
|
_cleanup_close_ int fd = -1;
|
||||||
const char *with_dash;
|
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
if (ret_fd) {
|
/* We need to use O_PATH because there may be executables for which we have only exec
|
||||||
/* We need to use O_PATH because there may be executables for which we have only exec
|
* permissions, but not read (usually suid executables). */
|
||||||
* permissions, but not read (usually suid executables). */
|
fd = open(path, O_PATH|O_CLOEXEC);
|
||||||
fd = open(path, O_PATH|O_CLOEXEC);
|
if (fd < 0)
|
||||||
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;
|
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)
|
if (ret_fd)
|
||||||
*ret_fd = TAKE_FD(fd);
|
*ret_fd = TAKE_FD(fd);
|
||||||
|
|
||||||
|
@ -948,6 +948,11 @@ static int run(int argc, char *argv[]) {
|
|||||||
_cleanup_(context_clear) Context c;
|
_cleanup_(context_clear) Context c;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
log_set_target(LOG_TARGET_AUTO);
|
||||||
|
udev_parse_config();
|
||||||
|
log_parse_environment();
|
||||||
|
log_open();
|
||||||
|
|
||||||
context_init(&c);
|
context_init(&c);
|
||||||
|
|
||||||
r = parse_argv(argc, argv);
|
r = parse_argv(argc, argv);
|
||||||
|
@ -133,6 +133,7 @@ units = [
|
|||||||
['systemd-poweroff.service', ''],
|
['systemd-poweroff.service', ''],
|
||||||
['systemd-reboot.service', ''],
|
['systemd-reboot.service', ''],
|
||||||
['systemd-rfkill.socket', 'ENABLE_RFKILL'],
|
['systemd-rfkill.socket', 'ENABLE_RFKILL'],
|
||||||
|
['systemd-sysext.service', 'ENABLE_SYSEXT'],
|
||||||
['systemd-sysusers.service', 'ENABLE_SYSUSERS',
|
['systemd-sysusers.service', 'ENABLE_SYSUSERS',
|
||||||
'sysinit.target.wants/'],
|
'sysinit.target.wants/'],
|
||||||
['systemd-tmpfiles-clean.service', 'ENABLE_TMPFILES'],
|
['systemd-tmpfiles-clean.service', 'ENABLE_TMPFILES'],
|
||||||
@ -211,7 +212,6 @@ in_units = [
|
|||||||
['systemd-oomd.service', 'ENABLE_OOMD'],
|
['systemd-oomd.service', 'ENABLE_OOMD'],
|
||||||
['systemd-portabled.service', 'ENABLE_PORTABLED',
|
['systemd-portabled.service', 'ENABLE_PORTABLED',
|
||||||
'dbus-org.freedesktop.portable1.service'],
|
'dbus-org.freedesktop.portable1.service'],
|
||||||
['systemd-sysext.service', 'ENABLE_SYSEXT'],
|
|
||||||
['systemd-userdbd.service', 'ENABLE_USERDB'],
|
['systemd-userdbd.service', 'ENABLE_USERDB'],
|
||||||
['systemd-homed.service', 'ENABLE_HOMED'],
|
['systemd-homed.service', 'ENABLE_HOMED'],
|
||||||
['systemd-quotacheck.service', 'ENABLE_QUOTACHECK'],
|
['systemd-quotacheck.service', 'ENABLE_QUOTACHECK'],
|
||||||
|
@ -24,8 +24,8 @@ ConditionDirectoryNotEmpty=|/usr/lib/extensions
|
|||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
ExecStart=@rootlibexecdir@/systemd-sysext --merge
|
ExecStart=systemd-sysext --merge
|
||||||
ExecStop=@rootlibexecdir@/systemd-sysext --unmerge
|
ExecStop=systemd-sysext --unmerge
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=sysinit.target
|
WantedBy=sysinit.target
|
Loading…
x
Reference in New Issue
Block a user