Projects
openEuler:Mainline
shadow
_service:tar_scm:backport-useradd-check-if-subi...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:backport-useradd-check-if-subid-range-exists-for-user.patch of Package shadow
From e0524e813a3bae2891b33a66f35876841c11cee7 Mon Sep 17 00:00:00 2001 From: Iker Pedrosa <ipedrosa@redhat.com> Date: Mon, 24 Oct 2022 10:46:36 +0200 Subject: [PATCH 1/4] useradd: check if subid range exists for user Check if a user already has a subid range before assigning one. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2012929 Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com> Reference: https://github.com/shadow-maint/shadow/commit/e0524e813a3bae2891b33a66f35876841c11cee7 Conflict: NA --- src/useradd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/useradd.c b/src/useradd.c index 7ea0a9c4..e784d602 100644 --- a/src/useradd.c +++ b/src/useradd.c @@ -2188,14 +2188,14 @@ static void usr_update (unsigned long subuid_count, unsigned long subgid_count) fail_exit (E_PW_UPDATE); } #ifdef ENABLE_SUBIDS - if (is_sub_uid && + if (is_sub_uid && !local_sub_uid_assigned(user_name) && (sub_uid_add(user_name, sub_uid_start, subuid_count) == 0)) { fprintf (stderr, _("%s: failed to prepare the new %s entry\n"), Prog, sub_uid_dbname ()); fail_exit (E_SUB_UID_UPDATE); } - if (is_sub_gid && + if (is_sub_gid && !local_sub_gid_assigned(user_name) && (sub_gid_add(user_name, sub_gid_start, subgid_count) == 0)) { fprintf (stderr, _("%s: failed to prepare the new %s entry\n"), -- 2.12.3
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2