Rebase patch 501_commonio_group_shadow

This commit is contained in:
Chris Hofstaedtler
2024-06-22 15:12:39 +02:00
parent 6c1c44f0fc
commit 10c72480c0
2 changed files with 21 additions and 15 deletions
@@ -2,19 +2,21 @@ Goal: save the [g]shadow files with the 'shadow' group and mode 0440
Fixes: #166793
--- a/lib/commonio.c
+++ b/lib/commonio.c
Index: shadow/lib/commonio.c
===================================================================
--- shadow.orig/lib/commonio.c
+++ shadow/lib/commonio.c
@@ -21,6 +21,7 @@
#include <errno.h>
#include <stdio.h>
#include <signal.h>
+#include <grp.h>
#include "nscd.h"
#include "sssd.h"
#ifdef WITH_TCB
@@ -970,12 +971,23 @@
#include "alloc.h"
#include "memzero.h"
@@ -956,12 +957,23 @@ int commonio_close (struct commonio_db *
if (errors != 0)
goto fail;
}
} else {
+ struct group *grp;
/*
@@ -35,10 +37,12 @@ Fixes: #166793
+ }
}
snprintf (buf, sizeof buf, "%s+", db->filename);
--- a/lib/sgroupio.c
+++ b/lib/sgroupio.c
@@ -206,7 +206,7 @@
if (SNPRINTF(buf, "%s+", db->filename) == -1)
Index: shadow/lib/sgroupio.c
===================================================================
--- shadow.orig/lib/sgroupio.c
+++ shadow/lib/sgroupio.c
@@ -209,7 +209,7 @@ static struct commonio_db gshadow_db = {
#ifdef WITH_SELINUX
NULL, /* scontext */
#endif
@@ -47,9 +51,11 @@ Fixes: #166793
0, /* st_uid */
0, /* st_gid */
NULL, /* head */
--- a/lib/shadowio.c
+++ b/lib/shadowio.c
@@ -84,7 +84,7 @@
Index: shadow/lib/shadowio.c
===================================================================
--- shadow.orig/lib/shadowio.c
+++ shadow/lib/shadowio.c
@@ -85,7 +85,7 @@ static struct commonio_db shadow_db = {
#ifdef WITH_SELINUX
NULL, /* scontext */
#endif /* WITH_SELINUX */
+1 -1
View File
@@ -6,7 +6,7 @@
# 402 should be merged in 401, but should be reviewed by SE Linux experts first
402_cppw_selinux.patch
463_login_delay_obeys_to_PAM.patch
501_commonio_group_shadow
501_commonio_group_shadow.patch
502_debian_useradd_defaults
503_shadowconfig.8
505_useradd_recommend_adduser