From 9c473137611b1b7ccb9c90b0696b705405c9ef83 Mon Sep 17 00:00:00 2001 From: fu-shanqing Date: Mon, 31 Oct 2022 14:35:51 +0800 Subject: [PATCH] remove redundant patches --- shadow-4.1.5.1-var-lock.patch | 47 ------------------------ shadow-utils-fix-lock-file-residue.patch | 31 ---------------- shadow.spec | 39 ++++++++++---------- 3 files changed, 20 insertions(+), 97 deletions(-) delete mode 100644 shadow-4.1.5.1-var-lock.patch delete mode 100644 shadow-utils-fix-lock-file-residue.patch diff --git a/shadow-4.1.5.1-var-lock.patch b/shadow-4.1.5.1-var-lock.patch deleted file mode 100644 index 46f75cb..0000000 --- a/shadow-4.1.5.1-var-lock.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 19efe574cd394a769672dac951e650c14a730e77 Mon Sep 17 00:00:00 2001 -From: hanzhijun -Date: Wed, 6 Mar 2019 10:15:19 +0800 -Subject: [PATCH] change VAR_DIR - -reason: change VAR_DIR - -Signed-off-by: hanzhijun ---- - lib/commonio.c | 11 +++++++---- - 1 file changed, 7 insertion(+), 4 deletion(-) - -diff -Nur shadow-4.6.old/lib/commonio.c shadow-4.6/lib/commonio.c ---- shadow-4.6.old/lib/commonio.c 2019-03-05 06:42:27.620509161 -0500 -+++ shadow-4.6/lib/commonio.c 2019-03-05 06:48:05.048509161 -0500 -@@ -51,6 +51,8 @@ - #include "prototypes.h" - #include "commonio.h" - -+#define VAR_DIR "/var/run/" -+ - /* local function prototypes */ - static int lrename (const char *, const char *); - static int check_link_count (const char *file); -@@ -399,9 +401,10 @@ - if(lock == NULL) { - goto cleanup_ENOMEM; - } -- snprintf (file, file_len, "%s.%lu", -- db->filename, (unsigned long) getpid ()); -- snprintf (lock, lock_file_len, "%s.lock", db->filename); -+ snprintf (file, file_len, "%s%s.%lu", -+ VAR_DIR, basename(db->filename), (unsigned long) getpid ()); -+ snprintf (lock, lock_file_len, "%s%s.lock", VAR_DIR, basename(db->filename)); -+ - if (do_lock_file (file, lock, log) != 0) { - db->locked = true; - lock_count++; -@@ -517,7 +520,7 @@ - * then call ulckpwdf() (if used) on last unlock. - */ - db->locked = false; -- snprintf (lock, sizeof lock, "%s.lock", db->filename); -+ snprintf (lock, sizeof lock, "%s%s.lock", VAR_DIR, basename(db->filename)); - unlink (lock); - dec_lock_count (); - return 1; diff --git a/shadow-utils-fix-lock-file-residue.patch b/shadow-utils-fix-lock-file-residue.patch deleted file mode 100644 index f04e4b9..0000000 --- a/shadow-utils-fix-lock-file-residue.patch +++ /dev/null @@ -1,31 +0,0 @@ -From f0c78e7ba1e2721398ff811b709cc1d46ae31386 Mon Sep 17 00:00:00 2001 -From: lubing -Date: Fri, 3 May 2019 16:46:45 +0800 -Subject: [PATCH] shadow-utils: fix lock file residue - -reason: fix lock file residue - -Signed-off-by: lubing ---- - lib/commonio.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/lib/commonio.c b/lib/commonio.c -index 2c223e4..a110ca9 100644 ---- a/lib/commonio.c -+++ b/lib/commonio.c -@@ -389,8 +389,9 @@ int commonio_lock_nowait (struct commonio_db *db, bool log) - if (db->locked) { - return 1; - } -- file_len = strlen(db->filename) + 11;/* %lu max size */ -- lock_file_len = strlen(db->filename) + 6; /* sizeof ".lock" */ -+ /* files moved from /etc/ to /var/run/, change malloc size */ -+ file_len = strlen(db->filename) + 15;/* %lu max size */ -+ lock_file_len = strlen(db->filename) + 15; /* sizeof ".lock" */ - file = (char*)malloc(file_len); - if(file == NULL) { - goto cleanup_ENOMEM; --- -1.8.3.1 - diff --git a/shadow.spec b/shadow.spec index bbd5854..cd5ce07 100644 --- a/shadow.spec +++ b/shadow.spec @@ -1,6 +1,6 @@ Name: shadow Version: 4.9 -Release: 4 +Release: 5 Epoch: 2 License: BSD and GPLv2+ Summary: Tools for managing accounts and shadow password files @@ -21,24 +21,22 @@ Patch1: shadow-4.9-null-tm.patch Patch2: shadow-4.8-long-entry.patch Patch3: usermod-unlock.patch Patch4: useradd-create-directories-after-the-SELinux-user.patch -Patch5: shadow-4.1.5.1-var-lock.patch -Patch6: shadow-utils-fix-lock-file-residue.patch -Patch7: Makefile-include-libeconf-dependency-in-new-idmap.patch -Patch8: usermod-allow-all-group-types-with-G-option.patch -Patch9: useradd-avoid-generating-an-empty-subid-range.patch -Patch10: libmisc-fix-default-value-in-SHA_get_salt_rounds.patch -Patch11: semanage-close-the-selabel-handle.patch -Patch12: Revert-useradd.c-fix-memleaks-of-grp.patch -Patch13: useradd-change-SELinux-labels-for-home-files.patch -Patch14: libsubid-link-to-PAM-libraries.patch -Patch15: Fix-out-of-tree-builds-with-respect-to-libsubid-incl.patch -Patch16: Respect-enable-static-no-in-libsubid.patch -Patch17: Fixes-the-linking-issues-when-libsubid-is-static-and.patch -Patch18: pwck-fix-segfault-when-calling-fprintf.patch -Patch19: newgrp-fix-segmentation-fault.patch -Patch20: groupdel-fix-SIGSEGV-when-passwd-does-not-exist.patch -Patch21: backport-useradd-modify-check-ID-range-for-system-users.patch -Patch22: shadow-add-sm3-crypt-support.patch +Patch5: Makefile-include-libeconf-dependency-in-new-idmap.patch +Patch6: usermod-allow-all-group-types-with-G-option.patch +Patch7: useradd-avoid-generating-an-empty-subid-range.patch +Patch8: libmisc-fix-default-value-in-SHA_get_salt_rounds.patch +Patch9: semanage-close-the-selabel-handle.patch +Patch10: Revert-useradd.c-fix-memleaks-of-grp.patch +Patch11: useradd-change-SELinux-labels-for-home-files.patch +Patch12: libsubid-link-to-PAM-libraries.patch +Patch13: Fix-out-of-tree-builds-with-respect-to-libsubid-incl.patch +Patch14: Respect-enable-static-no-in-libsubid.patch +Patch15: Fixes-the-linking-issues-when-libsubid-is-static-and.patch +Patch16: pwck-fix-segfault-when-calling-fprintf.patch +Patch17: newgrp-fix-segmentation-fault.patch +Patch18: groupdel-fix-SIGSEGV-when-passwd-does-not-exist.patch +Patch19: backport-useradd-modify-check-ID-range-for-system-users.patch +Patch20: shadow-add-sm3-crypt-support.patch BuildRequires: gcc, libselinux-devel, audit-libs-devel, libsemanage-devel BuildRequires: libacl-devel, libattr-devel @@ -205,6 +203,9 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libsubid.la %{_mandir}/*/* %changelog +* Mon Oct 31 2022 fushanqing - 2:4.9-5 +- remove patch 'shadow-4.1.5.1-var-lock.patch' and 'shadow-utils-fix-lock-file-residue.patch' + * Tue Aug 2 2022 zhengxiaoxiao - 2:4.9-4 - add-sm3-crypt-support.patch add update release to 4.9-4 -- Gitee