1
0
mirror of https://github.com/systemd/systemd synced 2025-09-25 23:04:46 +02:00

Compare commits

..

No commits in common. "dee00c1939c6194404c15a80650d0c04bb01b0db" and "293772c27a73bf44957795ed0d14db60abf37a82" have entirely different histories.

5 changed files with 16 additions and 40 deletions

16
NEWS
View File

@ -85,22 +85,6 @@ CHANGES WITH 247 in spe:
this is not caused by systemd/udev changes, but result of a kernel
behaviour change.
* Since PAM 1.2.0 (2015) configuration snippets may be placed in
/usr/lib/pam.d/ in addition to /etc/pam.d/. If a file exists in the
latter it takes precedence over the former, similar to how most of
systemd's own configuration is handled. Given that PAM stack
definitions are primarily put together by OS vendors/distributions
(though possibly overriden by users), this systemd release moves its
own PAM stack configuration for the "systemd-user" PAM service (i.e.
for the PAM session invoked by the per-user user@.service instance)
from /etc/pam.d/ to /usr/lib/pam.d/. We recommend moving all
packages' vendor versions of their PAM stack definitions from
/etc/pam.d/ to /usr/lib/pam.d/, but if such OS-wide migration is not
desired the location to which systemd installs its PAM stack
configuration file may be changed via the "pamconfdir" meson variable
at build time, optionally undoing ths change of default paths
introduced with systemd 247.
CHANGES WITH 246:
* The service manager gained basic support for cgroup v2 freezer. Units

View File

@ -201,7 +201,7 @@ endif
pamconfdir = get_option('pamconfdir')
if pamconfdir == ''
pamconfdir = join_paths(prefixdir, 'lib/pam.d')
pamconfdir = join_paths(sysconfdir, 'pam.d')
endif
memory_accounting_default = get_option('memory-accounting-default')

View File

@ -229,7 +229,6 @@ int chmod_and_chown(const char *path, mode_t mode, uid_t uid, gid_t gid) {
int fchmod_and_chown(int fd, mode_t mode, uid_t uid, gid_t gid) {
bool do_chown, do_chmod;
struct stat st;
int r;
/* Change ownership and access mode of the specified fd. Tries to do so safely, ensuring that at no
* point in time the access mode is above the old access mode under the old ownership or the new
@ -260,22 +259,18 @@ int fchmod_and_chown(int fd, mode_t mode, uid_t uid, gid_t gid) {
if (do_chown && do_chmod) {
mode_t minimal = st.st_mode & mode; /* the subset of the old and the new mask */
if (((minimal ^ st.st_mode) & 07777) != 0) {
r = fchmod_opath(fd, minimal & 07777);
if (r < 0)
return r;
}
if (((minimal ^ st.st_mode) & 07777) != 0)
if (fchmod_opath(fd, minimal & 07777) < 0)
return -errno;
}
if (do_chown)
if (fchownat(fd, "", uid, gid, AT_EMPTY_PATH) < 0)
return -errno;
if (do_chmod) {
r = fchmod_opath(fd, mode & 07777);
if (r < 0)
return r;
}
if (do_chmod)
if (fchmod_opath(fd, mode & 07777) < 0)
return -errno;
return do_chown || do_chmod;
}

View File

@ -1231,15 +1231,15 @@ static int verb_status(int argc, char *argv[], void *userdata) {
printf(" Secure Boot: %sd\n", enable_disable(is_efi_secure_boot()));
printf(" Setup Mode: %s\n", is_efi_secure_boot_setup_mode() ? "setup" : "user");
k = efi_get_reboot_to_firmware();
if (k > 0)
r = efi_get_reboot_to_firmware();
if (r > 0)
printf(" Boot into FW: %sactive%s\n", ansi_highlight_yellow(), ansi_normal());
else if (k == 0)
else if (r == 0)
printf(" Boot into FW: supported\n");
else if (k == -EOPNOTSUPP)
else if (r == -EOPNOTSUPP)
printf(" Boot into FW: not supported\n");
else {
errno = -k;
errno = -r;
printf(" Boot into FW: %sfailed%s (%m)\n", ansi_highlight_red(), ansi_normal());
}
printf("\n");

View File

@ -836,7 +836,6 @@ static int fd_set_perms(Item *i, int fd, const char *path, const struct stat *st
struct stat stbuf;
mode_t new_mode;
bool do_chown;
int r;
assert(i);
assert(fd);
@ -882,9 +881,8 @@ static int fd_set_perms(Item *i, int fd, const char *path, const struct stat *st
log_debug("\"%s\" matches temporary mode %o already.", path, m);
else {
log_debug("Temporarily changing \"%s\" to mode %o.", path, m);
r = fchmod_opath(fd, m);
if (r < 0)
return log_error_errno(r, "fchmod() of %s failed: %m", path);
if (fchmod_opath(fd, m) < 0)
return log_error_errno(errno, "fchmod() of %s failed: %m", path);
}
}
}
@ -915,9 +913,8 @@ static int fd_set_perms(Item *i, int fd, const char *path, const struct stat *st
log_debug("\"%s\" matches mode %o already.", path, new_mode);
else {
log_debug("Changing \"%s\" to mode %o.", path, new_mode);
r = fchmod_opath(fd, new_mode);
if (r < 0)
return log_error_errno(r, "fchmod() of %s failed: %m", path);
if (fchmod_opath(fd, new_mode) < 0)
return log_error_errno(errno, "fchmod() of %s failed: %m", path);
}
}
}