diff options
Diffstat (limited to '')
-rw-r--r-- | debian/patches/Set-group-and-mode-for-g-shadow-files.patch (renamed from debian/patches/501_commonio_group_shadow) | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/debian/patches/501_commonio_group_shadow b/debian/patches/Set-group-and-mode-for-g-shadow-files.patch index cfdf10c..c5e21ac 100644 --- a/debian/patches/501_commonio_group_shadow +++ b/debian/patches/Set-group-and-mode-for-g-shadow-files.patch @@ -1,7 +1,20 @@ -Goal: save the [g]shadow files with the 'shadow' group and mode 0440 +From: Shadow package maintainers <pkg-shadow-devel@lists.alioth.debian.org> +Date: Sat, 22 Jun 2024 17:39:41 +0200 +Subject: Set group and mode for [g]shadow files + +Set group 'shadow' and mode 0400. Fixes: #166793 +Gbp-Topic: debian +--- + lib/commonio.c | 12 ++++++++++++ + lib/sgroupio.c | 2 +- + lib/shadowio.c | 2 +- + 3 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/lib/commonio.c b/lib/commonio.c +index 01a26c9..72e53b0 100644 --- a/lib/commonio.c +++ b/lib/commonio.c @@ -21,6 +21,7 @@ @@ -9,12 +22,12 @@ Fixes: #166793 #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 *db) + if (errors != 0) goto fail; - } } else { + struct group *grp; /* @@ -35,10 +48,12 @@ Fixes: #166793 + } } - snprintf (buf, sizeof buf, "%s+", db->filename); + if (SNPRINTF(buf, "%s+", db->filename) == -1) +diff --git a/lib/sgroupio.c b/lib/sgroupio.c +index 0297df4..107b1e5 100644 --- a/lib/sgroupio.c +++ b/lib/sgroupio.c -@@ -206,7 +206,7 @@ +@@ -209,7 +209,7 @@ static struct commonio_db gshadow_db = { #ifdef WITH_SELINUX NULL, /* scontext */ #endif @@ -47,9 +62,11 @@ Fixes: #166793 0, /* st_uid */ 0, /* st_gid */ NULL, /* head */ +diff --git a/lib/shadowio.c b/lib/shadowio.c +index d2c3b47..53dac0b 100644 --- a/lib/shadowio.c +++ b/lib/shadowio.c -@@ -84,7 +84,7 @@ +@@ -85,7 +85,7 @@ static struct commonio_db shadow_db = { #ifdef WITH_SELINUX NULL, /* scontext */ #endif /* WITH_SELINUX */ |