Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
2ed8030
app-arch/xz-utils: Sync with Gentoo
Sep 14, 2026
61c649f
app-containers/containerd: Sync with Gentoo
Sep 14, 2026
0b37ad4
app-containers/containers-shortnames: Sync with Gentoo
Sep 14, 2026
9dde62a
app-containers/cri-tools: Sync with Gentoo
Sep 14, 2026
b6807b2
app-containers/crun: Sync with Gentoo
Sep 14, 2026
1fb4ba3
app-containers/docker: Sync with Gentoo
Sep 14, 2026
9fcd87b
app-containers/docker-cli: Sync with Gentoo
Sep 14, 2026
32ce9fd
app-containers/incus: Sync with Gentoo
Sep 14, 2026
33e8803
app-containers/lxc: Sync with Gentoo
Sep 14, 2026
81ca330
app-crypt/gpgme: Sync with Gentoo
Sep 14, 2026
cf66ada
app-crypt/p11-kit: Sync with Gentoo
Sep 14, 2026
8b92d13
app-misc/jq: Sync with Gentoo
Sep 14, 2026
953bc46
app-portage/gemato: Sync with Gentoo
Sep 14, 2026
73c5c62
dev-build/cmake: Sync with Gentoo
Sep 14, 2026
9bf74c2
dev-build/gtk-doc-am: Sync with Gentoo
Sep 14, 2026
03cca7f
dev-lang/go: Sync with Gentoo
Sep 14, 2026
74b1325
dev-libs/elfutils: Sync with Gentoo
Sep 14, 2026
f5ee285
dev-libs/glib: Sync with Gentoo
Sep 14, 2026
9db032d
dev-libs/libassuan: Sync with Gentoo
Sep 14, 2026
c778d8a
dev-libs/libgcrypt: Sync with Gentoo
Sep 14, 2026
1ac06cc
dev-libs/tree-sitter: Sync with Gentoo
Sep 14, 2026
3a3a141
dev-python/ensurepip-pip: Sync with Gentoo
Sep 14, 2026
9192a70
dev-python/ensurepip-setuptools: Sync with Gentoo
Sep 14, 2026
bee4244
dev-python/hatchling: Sync with Gentoo
Sep 14, 2026
103d206
dev-python/pip: Sync with Gentoo
Sep 14, 2026
3c790fc
dev-python/platformdirs: Sync with Gentoo
Sep 14, 2026
840e1c5
dev-python/setuptools: Sync with Gentoo
Sep 14, 2026
cb8f14f
dev-python/setuptools-scm: Sync with Gentoo
Sep 14, 2026
713b91a
dev-python/snakeoil: Sync with Gentoo
Sep 14, 2026
f2b35c6
dev-python/tree-sitter: Sync with Gentoo
Sep 14, 2026
f5ea5b5
dev-python/vcs-versioning: Sync with Gentoo
Sep 14, 2026
bd12359
dev-python/wheel: Sync with Gentoo
Sep 14, 2026
05ae211
dev-util/bpftool: Sync with Gentoo
Sep 14, 2026
07fc9e9
dev-util/gdbus-codegen: Sync with Gentoo
Sep 14, 2026
57c1863
dev-util/glib-utils: Sync with Gentoo
Sep 14, 2026
bbac860
dev-util/pkgcheck: Sync with Gentoo
Sep 14, 2026
1008bbb
dev-util/pkgconf: Sync with Gentoo
Sep 14, 2026
5a3847e
dev-vcs/git: Sync with Gentoo
Sep 14, 2026
aeee029
eclass/cmake: Sync with Gentoo
Sep 14, 2026
6f44fae
net-dns/bind: Sync with Gentoo
Sep 14, 2026
1f72473
net-fs/samba: Sync with Gentoo
Sep 14, 2026
14681aa
net-libs/libmicrohttpd: Sync with Gentoo
Sep 14, 2026
70b5cf4
net-libs/libpcap: Sync with Gentoo
Sep 14, 2026
eb4d24f
net-misc/chrony: Sync with Gentoo
Sep 14, 2026
2efc3f5
net-misc/curl: Sync with Gentoo
Sep 14, 2026
0609ca5
profiles: Sync with Gentoo
Sep 14, 2026
939d28f
sec-policy/selinux-base: Sync with Gentoo
Sep 14, 2026
b6e5da2
sec-policy/selinux-base-policy: Sync with Gentoo
Sep 14, 2026
9db9427
sec-policy/selinux-container: Sync with Gentoo
Sep 14, 2026
50275dc
sec-policy/selinux-dbus: Sync with Gentoo
Sep 14, 2026
36e3d5b
sec-policy/selinux-policykit: Sync with Gentoo
Sep 14, 2026
7e0aa3c
sec-policy/selinux-sssd: Sync with Gentoo
Sep 14, 2026
ab3a551
sec-policy/selinux-unconfined: Sync with Gentoo
Sep 14, 2026
b98aceb
sys-apps/bubblewrap: Sync with Gentoo
Sep 14, 2026
abb62ce
sys-apps/checkpolicy: Sync with Gentoo
Sep 14, 2026
7ee5a6d
sys-apps/coreutils: Sync with Gentoo
Sep 14, 2026
bfe0142
sys-apps/iproute2: Sync with Gentoo
Sep 14, 2026
8fa2e07
sys-apps/pkgcore: Sync with Gentoo
Sep 14, 2026
362028f
sys-apps/sandbox: Sync with Gentoo
Sep 14, 2026
34e025a
sys-apps/semodule-utils: Sync with Gentoo
Sep 14, 2026
692f91d
sys-apps/systemd: Sync with Gentoo
Sep 14, 2026
7353212
sys-auth/sssd: Sync with Gentoo
Sep 14, 2026
3d321da
sys-devel/gcc: Sync with Gentoo
Sep 14, 2026
3d201ae
sys-devel/gnuconfig: Sync with Gentoo
Sep 14, 2026
524b768
sys-fs/cryptsetup: Sync with Gentoo
Sep 14, 2026
c5674b5
sys-fs/fuse: Sync with Gentoo
Sep 14, 2026
c5872da
sys-fs/xfsprogs: Sync with Gentoo
Sep 14, 2026
de966a6
sys-kernel/dracut: Sync with Gentoo
Sep 14, 2026
005eaa8
sys-libs/glibc: Sync with Gentoo
Sep 14, 2026
c9f0ecb
sys-libs/libseccomp: Sync with Gentoo
Sep 14, 2026
3fff129
sys-libs/libselinux: Sync with Gentoo
Sep 14, 2026
2382c4f
sys-libs/libsepol: Sync with Gentoo
Sep 14, 2026
4248372
sys-libs/readline: Sync with Gentoo
Sep 14, 2026
daed9f5
sys-libs/timezone-data: Sync with Gentoo
Sep 14, 2026
19f3bb9
x11-drivers/nvidia-drivers: Sync with Gentoo
Sep 14, 2026
311e90c
overlay coreos/user-patches: Add another patch for sys-auth/sssd
krnowak Sep 14, 2026
8148ce3
overlay profiles: Update accept keywords for app-containers/incus
krnowak Sep 14, 2026
304bab0
net-dns/bind: Reinstate our modifications
krnowak Aug 10, 2026
63bd608
overlay coreos/user-patches: Add patches for app-containers/crun
krnowak Sep 14, 2026
07e0521
overlay coreos/user-patches: Add a patch for dev-lang/python
krnowak Sep 14, 2026
03003b2
overlay profiles: Add accept keywords for app-arch/xz-utils
krnowak Sep 14, 2026
beedc81
overlay profiles: Add accept keywords for net-libs/nghttp2
krnowak Sep 14, 2026
b4ba92f
overlay coreos/user-patches: Add patches for app-arch/cpio
krnowak Sep 14, 2026
edc652e
overlay profiles: Add accept keywords for sys-apps/gawk
krnowak Sep 14, 2026
eff22df
overlay profiles: Add accept keywords for pcre2
krnowak Sep 14, 2026
89a19e6
overlay profiles: Add accept keywords for dev-libs/libxml2
krnowak Sep 14, 2026
dbc9f9f
overlay profiles: Add accept keywords for net-misc/curl
krnowak Sep 14, 2026
19b9ee2
overlay profiles: Update accept keywords for app-containers/cri-tools
krnowak Sep 14, 2026
37de5e1
dev-python/tomlkit: Add from Gentoo
krnowak Sep 14, 2026
c05128e
dev-python/py-landlock: Add from Gentoo
krnowak Sep 14, 2026
837eefb
.github: Add new packages to automation
krnowak Sep 14, 2026
845a54e
overlay profiles: Add accept keywords for app-containers/crun
krnowak Sep 14, 2026
a02e8f7
overlay profiles: Drop accept keywords for app-crypt/p11-kit
krnowak Sep 14, 2026
76f01ec
overlay profiles: Drop accept keywords for dev-libs/libgcrypt
krnowak Sep 14, 2026
cbb017d
overlay coreos/user-patches: Drop patches for dev-libs/libxml2
krnowak Sep 14, 2026
6570874
overlay coreos/user-patches: Drop patches for dev-vcs/git
krnowak Sep 14, 2026
3ceb326
overlay coreos/user-patches: Regenerate SELinux policy patch
krnowak Sep 14, 2026
6065904
overlay profiles: Drop accept keywords for sys-apps/semodule-utils
krnowak Sep 14, 2026
dcbb933
overlay profiles: Drop accept keywords for sys-libs/libseccomp
krnowak Sep 14, 2026
097d01f
overlay profiles: Drop accept keywords for sys-libs/libse{linux,pol}
krnowak Sep 14, 2026
b7cd989
changelog: Add entries
krnowak Sep 14, 2026
1502abd
overlay profiles: Mask the selinux policy update for now
krnowak Sep 17, 2026
43fc336
dev-python/gpep517: Patch to fix cross-compiling with setuptools 84.0.0
chewi Sep 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/portage-stable-packages-list
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ dev-python/platformdirs
dev-python/pluggy
dev-python/ply
dev-python/poetry-core
dev-python/py-landlock
dev-python/pycparser
dev-python/pydecomp
dev-python/pygments
Expand All @@ -371,6 +372,7 @@ dev-python/six
dev-python/snakeoil
dev-python/tomli
dev-python/tomli-w
dev-python/tomlkit
dev-python/tree-sitter
dev-python/trove-classifiers
dev-python/truststore
Expand Down
13 changes: 13 additions & 0 deletions changelog/security/2026-09-14-weekly-updates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
- containerd ([CVE-2026-53495](https://www.cve.org/CVERecord?id=CVE-2026-53495), [GHSA-rp3h-jf77-q9p4](https://github.com/containerd/containerd/security/advisories/GHSA-rp3h-jf77-q9p4))
- cpio ([CVE-2026-66485](https://www.cve.org/CVERecord?id=CVE-2026-66485), [CVE-2026-66486](https://www.cve.org/CVERecord?id=CVE-2026-66486))
- cri-tools ([CVE-2026-34040](https://www.cve.org/CVERecord?id=CVE-2026-34040), [CVE-2026-41567](https://www.cve.org/CVERecord?id=CVE-2026-41567), [CVE-2026-42306](https://www.cve.org/CVERecord?id=CVE-2026-42306), [CVE-2026-39883](https://www.cve.org/CVERecord?id=CVE-2026-39883))
- crun ([CVE-2026-88264](https://www.cve.org/CVERecord?id=CVE-2026-88264), [CVE-2026-88265](https://www.cve.org/CVERecord?id=CVE-2026-88265))
- curl ([CVE-2026-13608](https://www.cve.org/CVERecord?id=CVE-2026-13608), [CVE-2026-18924](https://www.cve.org/CVERecord?id=CVE-2026-18924), [CVE-2026-19931](https://www.cve.org/CVERecord?id=CVE-2026-19931), [CVE-2026-80229](https://www.cve.org/CVERecord?id=CVE-2026-80229), [CVE-2026-80230](https://www.cve.org/CVERecord?id=CVE-2026-80230), [CVE-2026-80231](https://www.cve.org/CVERecord?id=CVE-2026-80231), [CVE-2026-80255](https://www.cve.org/CVERecord?id=CVE-2026-80255), [CVE-2026-80256](https://www.cve.org/CVERecord?id=CVE-2026-80256))
- gawk ([CVE-2026-40553](https://www.cve.org/CVERecord?id=CVE-2026-40553), [CVE-2026-40467](https://www.cve.org/CVERecord?id=CVE-2026-40467), [CVE-2026-40468](https://www.cve.org/CVERecord?id=CVE-2026-40468))
- libpcap ([CVE-2026-0799](https://www.cve.org/CVERecord?id=CVE-2026-0799), [CVE-2026-18238](https://www.cve.org/CVERecord?id=CVE-2026-18238), [CVE-2026-18313](https://www.cve.org/CVERecord?id=CVE-2026-18313), [CVE-2026-31911](https://www.cve.org/CVERecord?id=CVE-2026-31911), [CVE-2026-31912](https://www.cve.org/CVERecord?id=CVE-2026-31912), [CVE-2026-6244](https://www.cve.org/CVERecord?id=CVE-2026-6244), [CVE-2026-6554](https://www.cve.org/CVERecord?id=CVE-2026-6554))
- libpcre2 ([CVE-2026-86145](https://www.cve.org/CVERecord?id=CVE-2026-86145), [CVE-2026-89156](https://www.cve.org/CVERecord?id=CVE-2026-89156), [CVE-2026-89161](https://www.cve.org/CVERecord?id=CVE-2026-89161), [GHSA-9qww-pwc4-77qq](https://github.com/PCRE2Project/pcre2/security/advisories/GHSA-9qww-pwc4-77qq), [GHSA-q7rw-r7qq-2hx6](https://github.com/PCRE2Project/pcre2/security/advisories/GHSA-q7rw-r7qq-2hx6))
- libxml2 ([CVE-2026-86137](https://www.cve.org/CVERecord?id=CVE-2026-86137), [CVE-2026-86138](https://www.cve.org/CVERecord?id=CVE-2026-86138), [CVE-2026-86139](https://www.cve.org/CVERecord?id=CVE-2026-86139), [CVE-2026-86140](https://www.cve.org/CVERecord?id=CVE-2026-86140), [CVE-2026-86141](https://www.cve.org/CVERecord?id=CVE-2026-86141), [CVE-2026-86142](https://www.cve.org/CVERecord?id=CVE-2026-86142), [CVE-2026-86143](https://www.cve.org/CVERecord?id=CVE-2026-86143), [CVE-2026-86144](https://www.cve.org/CVERecord?id=CVE-2026-86144))
- nghttp2 ([CVE-2026-58055](https://www.cve.org/CVERecord?id=CVE-2026-58055))
- python ([CVE-2026-19672](https://www.cve.org/CVERecord?id=CVE-2026-19672))
- sssd ([CVE-2026-87853](https://www.cve.org/CVERecord?id=CVE-2026-87853))
- xz-utils ([GHSA-5qpq-xqfv-j9pg](https://github.com/tukaani-project/xz/security/advisories/GHSA-5qpq-xqfv-j9pg))
26 changes: 26 additions & 0 deletions changelog/updates/2026-09-14-weekly-updates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
- SDK: pkgcheck ([0.10.43](https://github.com/pkgcore/pkgcheck/releases/tag/v0.10.43))
- base, dev: checkpolicy ([3.11](https://github.com/SELinuxProject/selinux/releases/tag/3.11))
- base, dev: cri-tools ([1.37.0](https://github.com/kubernetes-sigs/cri-tools/releases/tag/v1.37.0))
- base, dev: curl ([8.22.0](https://curl.se/ch/8.22.0.html))
- base, dev: dracut ([112](https://github.com/dracut-ng/dracut/releases/tag/112))
- base, dev: gawk ([5.4.1](https://lists.gnu.org/archive/html/info-gnu/2026-07/msg00001.html) (includes [5.4.0](https://lists.gnu.org/archive/html/info-gnu/2026-02/msg00011.html)))
- base, dev: libgcrypt ([1.12.4](https://lists.gnu.org/archive/html/info-gnu/2026-09/msg00002.html))
- base, dev: libpcap ([1.10.7](https://raw.githubusercontent.com/the-tcpdump-group/libpcap/refs/tags/libpcap-1.10.7/CHANGES))
- base, dev: libpcre2 ([10.48](https://github.com/PCRE2Project/pcre2/releases/tag/pcre2-10.48))
- base, dev: libxml2 ([2.15.4](https://gitlab.gnome.org/GNOME/libxml2/-/raw/v2.15.4/NEWS))
- base, dev: nghttp2 ([1.70.0](https://github.com/nghttp2/nghttp2/releases/tag/v1.70.0))
- base, dev: pkgconf ([3.0.7](https://raw.githubusercontent.com/pkgconf/pkgconf/refs/tags/pkgconf-3.0.7/NEWS) (includes [3.0.0](https://raw.githubusercontent.com/pkgconf/pkgconf/refs/tags/pkgconf-3.0.0/NEWS)))
- base, dev: selinux-base ([2.20260616_p1](https://github.com/SELinuxProject/refpolicy/releases/tag/RELEASE_2_20260616))
- base, dev: selinux-base-policy ([2.20260616_p1](https://github.com/SELinuxProject/refpolicy/releases/tag/RELEASE_2_20260616))
- base, dev: selinux-container ([2.20260616_p1](https://github.com/SELinuxProject/refpolicy/releases/tag/RELEASE_2_20260616))
- base, dev: selinux-dbus ([2.20260616_p1](https://github.com/SELinuxProject/refpolicy/releases/tag/RELEASE_2_20260616))
- base, dev: selinux-policykit ([2.20260616_p1](https://github.com/SELinuxProject/refpolicy/releases/tag/RELEASE_2_20260616))
- base, dev: selinux-sssd ([2.20260616_p1](https://github.com/SELinuxProject/refpolicy/releases/tag/RELEASE_2_20260616))
- base, dev: selinux-unconfined ([2.20260616_p1](https://github.com/SELinuxProject/refpolicy/releases/tag/RELEASE_2_20260616))
- base, dev: xz-utils ([5.8.4](https://github.com/tukaani-project/xz/releases/tag/v5.8.4))
- dev: gnuconfig (20260517)
- sysext-containerd: containerd ([2.3.5](https://github.com/containerd/containerd/releases/tag/v2.3.5))
- sysext-podman: crun ([1.29.1](https://github.com/containers/crun/releases/tag/1.29.1) (includes [1.29](https://github.com/containers/crun/releases/tag/1.29)))
- sysext-python: platformdirs ([4.11.3](https://github.com/tox-dev/platformdirs/releases/tag/4.11.3) (includes [4.11.2](https://github.com/tox-dev/platformdirs/releases/tag/4.11.2), [4.11.1](https://github.com/tox-dev/platformdirs/releases/tag/4.11.1), [4.11.0](https://github.com/tox-dev/platformdirs/releases/tag/4.11.0)))
- sysext-python: setuptools ([84.0.0](https://raw.githubusercontent.com/pypa/setuptools/refs/tags/v84.0.0/NEWS.rst))
- sysext-python: wheel ([0.48.0](https://github.com/pypa/wheel/releases/tag/0.48.0))
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
From 17bf1b06a49a36eb13ee8dd8799f732f223f2257 Mon Sep 17 00:00:00 2001
From: Sergey Poznyakoff <gray@gnu.org>
Date: Fri, 1 May 2026 08:19:41 +0300
Subject: [PATCH 1/2] Minor fixes

* src/makepath.c: Don't use alloca.
* src/userspec.c: Likewise.
---
src/makepath.c | 31 ++++++++++++++---------
src/userspec.c | 67 +++++++++++++++++++++++++-------------------------
2 files changed, 53 insertions(+), 45 deletions(-)

diff --git a/src/makepath.c b/src/makepath.c
index 29d2992..0de1adb 100644
--- a/src/makepath.c
+++ b/src/makepath.c
@@ -47,24 +47,19 @@
Return 0 if ARGPATH exists as a directory with the proper
ownership and permissions when done, otherwise 1. */

-int
-make_path (char const *argpath,
- uid_t owner,
- gid_t group,
- const char *verbose_fmt_string)
+static int
+make_path0 (char *dirpath,
+ uid_t owner,
+ gid_t group,
+ const char *verbose_fmt_string)
{
- char *dirpath; /* A copy we can scribble NULs on. */
struct stat stats;
- int retval = 0;
mode_t tmpmode;
mode_t invert_permissions;
int we_are_root = getuid () == 0;
- dirpath = alloca (strlen (argpath) + 1);
-
- strcpy (dirpath, argpath);

if (stat (dirpath, &stats))
- {
+ {
tmpmode = MODE_RWX & ~ newdir_umask;
invert_permissions = we_are_root ? 0 : MODE_WXUSR & ~ tmpmode;

@@ -157,5 +152,19 @@ make_path (char const *argpath,

}

+ return 0;
+}
+
+int
+make_path (char const *argpath,
+ uid_t owner,
+ gid_t group,
+ const char *verbose_fmt_string)
+{
+ char *dirpath = xstrdup (argpath);
+ int retval = make_path0 (dirpath, owner, group, verbose_fmt_string);
+ free (dirpath);
return retval;
}
+
+
diff --git a/src/userspec.c b/src/userspec.c
index 43d565c..f116ae7 100644
--- a/src/userspec.c
+++ b/src/userspec.c
@@ -19,7 +19,6 @@
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */

#include <system.h>
-#include <alloca.h>
#include <stdio.h>
#include <ctype.h>
#include <sys/types.h>
@@ -33,18 +32,6 @@
# define endgrent()
#endif

-/* Perform the equivalent of the statement `dest = strdup (src);',
- but obtaining storage via alloca instead of from the heap. */
-
-#define V_STRDUP(dest, src) \
- do \
- { \
- int _len = strlen ((src)); \
- (dest) = (char *) alloca (_len + 1); \
- strcpy (dest, src); \
- } \
- while (0)
-
/* Return nonzero if STR represents an unsigned decimal integer,
otherwise return 0. */

@@ -57,6 +44,18 @@ isnumber_p (const char *str)
return 1;
}

+static void
+store_string (char **bufptr, size_t *buflen, char *str)
+{
+ size_t len = strlen (str) + 1;
+ if (len > *buflen)
+ {
+ *bufptr = xrealloc (*bufptr, len);
+ *buflen = len;
+ }
+ strcpy (*bufptr, str);
+}
+
/* Extract from NAME, which has the form "[user][:.][group]",
a USERNAME, UID U, GROUPNAME, and GID G.
Either user or group, or both, must be present.
@@ -70,23 +69,21 @@ isnumber_p (const char *str)
Return NULL if successful, a static error message string if not. */

const char *
-parse_user_spec (const char *spec_arg, uid_t *uid, gid_t *gid,
- char **username_arg, char **groupname_arg)
+parse_user_spec0 (char *spec, uid_t *uid, gid_t *gid,
+ char **username_arg, char **groupname_arg)
{
static const char *tired = "virtual memory exhausted";
const char *error_msg;
- char *spec; /* A copy we can write on. */
struct passwd *pwd;
struct group *grp;
char *g, *u, *separator;
- char *groupname;
+ char *groupname = NULL;
+ size_t grouplen = 0;

error_msg = NULL;
*username_arg = *groupname_arg = NULL;
groupname = NULL;

- V_STRDUP (spec, spec_arg);
-
/* Find the separator if there is one. */
separator = strchr (spec, ':');
if (separator == NULL)
@@ -143,11 +140,12 @@ parse_user_spec (const char *spec_arg, uid_t *uid, gid_t *gid,
if (grp == NULL)
{
char nbuf[UINTMAX_STRSIZE_BOUND];
- V_STRDUP (groupname, umaxtostr (pwd->pw_gid, nbuf));
+ store_string (&groupname, &grouplen,
+ umaxtostr (pwd->pw_gid, nbuf));
}
else
{
- V_STRDUP (groupname, grp->gr_name);
+ store_string (&groupname, &grouplen, grp->gr_name);
}
endgrent ();
}
@@ -178,7 +176,7 @@ parse_user_spec (const char *spec_arg, uid_t *uid, gid_t *gid,
endgrent (); /* Save a file descriptor. */

if (error_msg == NULL)
- V_STRDUP (groupname, g);
+ store_string (&groupname, &grouplen, g);
}

if (error_msg == NULL)
@@ -191,23 +189,24 @@ parse_user_spec (const char *spec_arg, uid_t *uid, gid_t *gid,
}

if (groupname != NULL && error_msg == NULL)
- {
- *groupname_arg = strdup (groupname);
- if (*groupname_arg == NULL)
- {
- if (*username_arg != NULL)
- {
- free (*username_arg);
- *username_arg = NULL;
- }
- error_msg = tired;
- }
- }
+ *groupname_arg = groupname;
}
+ else
+ free (groupname);

return error_msg;
}

+const char *
+parse_user_spec (const char *spec_arg, uid_t *uid, gid_t *gid,
+ char **username, char **groupname)
+{
+ char *spec = xstrdup (spec_arg);
+ const char *retval = parse_user_spec0 (spec, uid, gid, username, groupname);
+ free (spec);
+ return retval;
+}
+
#ifdef TEST

#define NULL_CHECK(s) ((s) == NULL ? "(null)" : (s))
--
2.55.0

Loading