From 6377d64a53ac6c9f9303138999526f97d27533304ff5c9a3a14d2ec1331a76bb Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Tue, 7 Sep 2021 14:19:56 +0000 Subject: [PATCH] - Update to version 1.4 - Fix support for mulitple locations for configuration files - Drop pam-config-fix-pam_keyinit-options.patch - Drop pam-config-remove-bad-access-call.patch OBS-URL: https://build.opensuse.org/package/show/Linux-PAM/pam-config?expand=0&rev=100 --- pam-config-1.3.tar.xz | 3 -- pam-config-1.4.tar.xz | 3 ++ pam-config-fix-pam_keyinit-options.patch | 42 ------------------ pam-config-remove-bad-access-call.patch | 54 ------------------------ pam-config.changes | 8 ++++ pam-config.spec | 6 +-- 6 files changed, 12 insertions(+), 104 deletions(-) delete mode 100644 pam-config-1.3.tar.xz create mode 100644 pam-config-1.4.tar.xz delete mode 100644 pam-config-fix-pam_keyinit-options.patch delete mode 100644 pam-config-remove-bad-access-call.patch diff --git a/pam-config-1.3.tar.xz b/pam-config-1.3.tar.xz deleted file mode 100644 index 2c40003..0000000 --- a/pam-config-1.3.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0d14da33ded8b68db5f0a22cfc6ffd32f9bf7e03d1394fc44c10cf5c3a4e9ba1 -size 267476 diff --git a/pam-config-1.4.tar.xz b/pam-config-1.4.tar.xz new file mode 100644 index 0000000..c620c8d --- /dev/null +++ b/pam-config-1.4.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:845cfcc57077a9c1b9aefcccedcfcb8072ecc2539433e6ef665d9caf577caae9 +size 264796 diff --git a/pam-config-fix-pam_keyinit-options.patch b/pam-config-fix-pam_keyinit-options.patch deleted file mode 100644 index f9749ad..0000000 --- a/pam-config-fix-pam_keyinit-options.patch +++ /dev/null @@ -1,42 +0,0 @@ -Index: pam-config-1.3/src/mod_pam_keyinit.c -=================================================================== ---- pam-config-1.3.orig/src/mod_pam_keyinit.c -+++ pam-config-1.3/src/mod_pam_keyinit.c -@@ -47,20 +47,15 @@ write_config_keyinit (pam_module_t *this - fp = create_service_file (gl_service); - if (!fp) return 0; - -- fprintf(stderr, "writeit=%d, is_written=%d\n", writeit, is_written); - while (cfg_content != NULL) - { -- fprintf(stderr, "cfg_content->line = >>%s", cfg_content->line); - if (writeit) - { -- fprintf(stderr, "writeit=%d\n", writeit); - if (!is_written) - { -- fprintf(stderr, "is_written=%d\n", is_written); - /* write this entry as the first in the session part */ - if (strstr(cfg_content->line, "session") != NULL) - { -- fprintf(stderr, "strstr(cfg_content->line, \"session\") != NULL\n"); - write_entry(fp, opt_set); - is_written = 1; - } -@@ -97,7 +92,6 @@ write_config_keyinit (pam_module_t *this - static void - write_entry(FILE *fp, option_set_t *opt_set) - { -- fprintf(stderr, "write_entry(fp, opt_set)\n"); - fprintf (fp, "session optional\tpam_keyinit.so revoke "); - if (opt_set->is_enabled (opt_set, "force")) - fprintf (fp, "force "); -@@ -121,7 +115,7 @@ PRINT_ARGS("keyinit") - PRINT_XMLHELP("keyinit") - - /* ---- contruct module object ---- */ --DECLARE_BOOL_OPTS_3 (is_enabled, debug, force); -+DECLARE_BOOL_OPTS_4 (is_enabled, debug, force, revoke); - DECLARE_STRING_OPTS_0; - DECLARE_OPT_SETS; - diff --git a/pam-config-remove-bad-access-call.patch b/pam-config-remove-bad-access-call.patch deleted file mode 100644 index 524f225..0000000 --- a/pam-config-remove-bad-access-call.patch +++ /dev/null @@ -1,54 +0,0 @@ -Index: pam-config-1.3/src/pam-config.c -=================================================================== ---- pam-config-1.3.orig/src/pam-config.c -+++ pam-config-1.3/src/pam-config.c -@@ -1075,19 +1075,10 @@ main (int argc, char *argv[]) - if (debug) - printf ("*** write_config (%s/pam.d/%s)\n", confdir, gl_service); - -- /* Check if service file exists */ -- char *conffile; -- if (asprintf (&conffile, "%s/pam.d/%s", confdir, gl_service) < 0) -- return 1; -- -- if (access (conffile, R_OK) != 0) -- { -- fprintf (stderr, _("Cannot access '%s': %m\n"), conffile); -- free (conffile); -- return 1; -- } -- free (conffile); -- -+ /* -+ * Note that the modules in service_module_list[] -+ * do not use the "op" and the "fp" parameters. -+ */ - while (*modptr != NULL) - { - retval |= (*modptr)->write_config (*modptr, -1, NULL); -Index: pam-config-1.3/src/single_config.c -=================================================================== ---- pam-config-1.3.orig/src/single_config.c -+++ pam-config-1.3/src/single_config.c -@@ -245,12 +245,15 @@ create_service_file (const char *service - return NULL; - - if (stat (conffile, &f_stat) != 0) -- { -- fprintf (stderr, _("Cannot stat '%s': %m\n"), conffile); -- free (tmp_file); -- free (conffile); -- return NULL; -- } -+ { -+ /* Make them owned by root and writable only by root */ -+ fprintf (stderr, _("Cannot stat '%s': %m\n"), conffile); -+ -+ memset(&f_stat, 0, sizeof(struct stat)); /* To be on the safe side ... */ -+ f_stat.st_mode = 0644; -+ f_stat.st_uid = 0; -+ f_stat.st_gid = 0; -+ } - - free (conffile); - fd = mkstemp (tmp_file); diff --git a/pam-config.changes b/pam-config.changes index 9db3808..6b59d28 100644 --- a/pam-config.changes +++ b/pam-config.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Sep 7 14:15:42 UTC 2021 - Thorsten Kukuk + +- Update to version 1.4 + - Fix support for mulitple locations for configuration files + - Drop pam-config-fix-pam_keyinit-options.patch + - Drop pam-config-remove-bad-access-call.patch + ------------------------------------------------------------------- Tue Jun 8 12:46:00 UTC 2021 - Josef Möllers diff --git a/pam-config.spec b/pam-config.spec index 0da204b..7cdc621 100644 --- a/pam-config.spec +++ b/pam-config.spec @@ -17,15 +17,13 @@ Name: pam-config -Version: 1.3 +Version: 1.4 Release: 0 Summary: Utility to modify common PAM configuration files License: GPL-2.0-only Group: System/Management URL: https://github.com/SUSE/pam-config Source: %{name}-%{version}.tar.xz -Patch1: pam-config-remove-bad-access-call.patch -Patch2: pam-config-fix-pam_keyinit-options.patch PreReq: pam >= 1.3.0 Recommends: pam_pwquality @@ -38,8 +36,6 @@ add/adjust/remove other PAM modules and their options. %prep %setup -q -%patch1 -p1 -%patch2 -p1 %build %configure