Version 249.11
This commit is contained in:
parent
9c9b28cd91
commit
b92f3c4187
|
@ -1,67 +0,0 @@
|
|||
From 2da7d0bc92e2423a5c7225c5d24b99d5d52a0bc6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Wed, 7 Jul 2021 18:02:50 +0200
|
||||
Subject: [PATCH] sd-bus: allow numerical uids in -M user@.host
|
||||
|
||||
UIDs don't work well over ssh, but locally or with containers they are OK.
|
||||
In particular, user@.service uses UIDs as identifiers, and it's nice to be
|
||||
able to copy&paste that UID for interaction with the user's managers.
|
||||
---
|
||||
src/libsystemd/sd-bus/sd-bus.c | 27 ++++++++++++++++++---------
|
||||
1 file changed, 18 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
|
||||
index a32e2f5e2085..6960161c3658 100644
|
||||
--- a/src/libsystemd/sd-bus/sd-bus.c
|
||||
+++ b/src/libsystemd/sd-bus/sd-bus.c
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "parse-util.h"
|
||||
#include "path-util.h"
|
||||
#include "process-util.h"
|
||||
+#include "stdio-util.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "user-util.h"
|
||||
@@ -1617,7 +1618,7 @@ static int user_and_machine_valid(const char *user_and_machine) {
|
||||
if (!user)
|
||||
return -ENOMEM;
|
||||
|
||||
- if (!isempty(user) && !valid_user_group_name(user, VALID_USER_RELAX))
|
||||
+ if (!isempty(user) && !valid_user_group_name(user, VALID_USER_RELAX | VALID_USER_ALLOW_NUMERIC))
|
||||
return false;
|
||||
|
||||
h++;
|
||||
@@ -1648,17 +1649,25 @@ static int user_and_machine_equivalent(const char *user_and_machine) {
|
||||
|
||||
/* Otherwise, if we are root, then we can also allow the ".host" syntax, as that's the user this
|
||||
* would connect to. */
|
||||
- if (geteuid() == 0 && STR_IN_SET(user_and_machine, ".host", "root@.host"))
|
||||
+ uid_t uid = geteuid();
|
||||
+
|
||||
+ if (uid == 0 && STR_IN_SET(user_and_machine, ".host", "root@.host", "0@.host"))
|
||||
return true;
|
||||
|
||||
- /* Otherwise, we have to figure our user name, and compare things with that. */
|
||||
- un = getusername_malloc();
|
||||
- if (!un)
|
||||
- return -ENOMEM;
|
||||
+ /* Otherwise, we have to figure out our user id and name, and compare things with that. */
|
||||
+ char buf[DECIMAL_STR_MAX(uid_t)];
|
||||
+ xsprintf(buf, UID_FMT, uid);
|
||||
+
|
||||
+ f = startswith(user_and_machine, buf);
|
||||
+ if (!f) {
|
||||
+ un = getusername_malloc();
|
||||
+ if (!un)
|
||||
+ return -ENOMEM;
|
||||
|
||||
- f = startswith(user_and_machine, un);
|
||||
- if (!f)
|
||||
- return false;
|
||||
+ f = startswith(user_and_machine, un);
|
||||
+ if (!f)
|
||||
+ return false;
|
||||
+ }
|
||||
|
||||
return STR_IN_SET(f, "@", "@.host");
|
||||
}
|
2
sources
2
sources
|
@ -1 +1 @@
|
|||
SHA512 (systemd-249.9.tar.gz) = ce57bc6c522082e55649fc1886c4dc818c89607e175df2c92feffe288dbd38757f36b30abeebe153f5be6b664a49d729405040a952473cb2133a2e39cf9cc164
|
||||
SHA512 (systemd-249.11.tar.gz) = fed7f81933648945a4bfac9fb12150ecd84d32181f79be0e14e0b3a789343a87569f868670e0b8dfc2801fab39f7490f95ee8c29ba831d7611f78c14ace5ddd8
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
Name: systemd
|
||||
Url: https://www.freedesktop.org/wiki/Software/systemd
|
||||
%if %{without inplace}
|
||||
Version: 249.9
|
||||
Release: 2%{?dist}
|
||||
Version: 249.11
|
||||
Release: 1%{?dist}
|
||||
%else
|
||||
# determine the build information from local checkout
|
||||
Version: %(tools/meson-vcs-tag.sh . error | sed -r 's/-([0-9])/.^\1/; s/-g/_g/')
|
||||
|
@ -98,8 +98,6 @@ Patch0004: 0004-rpm-restart-user-services-at-the-end-of-the-transact.patch
|
|||
Patch0005: 0005-update-helper-also-add-user-reexec-verb.patch
|
||||
Patch0006: 0006-update-helper-add-missing-loop-over-user-units.patch
|
||||
|
||||
Patch0007: https://github.com/systemd/systemd/commit/2da7d0bc92.patch
|
||||
|
||||
# Downstream-only patches (5000–9999)
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1738828
|
||||
Patch0500: use-bfq-scheduler.patch
|
||||
|
@ -1020,7 +1018,8 @@ fi
|
|||
%files standalone-sysusers -f .file-list-standalone-sysusers
|
||||
|
||||
%changelog
|
||||
* Wed Apr 6 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 249.9-2
|
||||
* Wed Apr 6 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 249.11-1
|
||||
- Update to latest bugfix release (#2039854)
|
||||
- Create /etc/resolv.conf symlink if nothing is present yet (#2032085)
|
||||
- Drop scriptlet for handling nobody user upgrades from Fedora <28
|
||||
- Move part of %%post scriptlet for resolved to %%posttrans (#2072574)
|
||||
|
|
Loading…
Reference in New Issue