Accepting request 112382 from Linux-PAM
- Add support for pam_ecryptfs [bnc#752851] OBS-URL: https://build.opensuse.org/request/show/112382 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pam-config?expand=0&rev=53
This commit is contained in:
commit
bf0152e34b
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:95874d52c64bb112672ae7ce7083acff9d1f9d2e7e759d02e89611526d803ed4
|
||||
size 303789
|
3
pam-config-0.80.tar.bz2
Normal file
3
pam-config-0.80.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ef6ce7ccb8fc3b9dd2ad234becaad8de1e1afc0acc2af272e43c6adef50f29db
|
||||
size 317459
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 3 16:07:52 CEST 2012 - kukuk@suse.de
|
||||
|
||||
- Add support for pam_ecryptfs [bnc#752851]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 7 14:00:35 UTC 2011 - jengelh@medozas.de
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package pam-config
|
||||
#
|
||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -16,18 +16,16 @@
|
||||
#
|
||||
|
||||
|
||||
|
||||
Name: pam-config
|
||||
Summary: Modify common PAM configuration files
|
||||
License: GPL-2.0
|
||||
Group: System/Management
|
||||
Version: 0.79
|
||||
Version: 0.80
|
||||
Release: 0
|
||||
BuildRequires: automake
|
||||
PreReq: pam >= 0.99
|
||||
Requires: pam-modules >= 10.2
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
Patch0: pam_systemd.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@ -41,11 +39,8 @@ add/adjust/remove other PAM modules and their options.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
#needed by patch0
|
||||
autoreconf
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
|
||||
|
@ -1,166 +0,0 @@
|
||||
Index: pam-config-0.79/src/Makefile.am
|
||||
===================================================================
|
||||
--- pam-config-0.79.orig/src/Makefile.am
|
||||
+++ pam-config-0.79/src/Makefile.am
|
||||
@@ -30,7 +30,7 @@ pam_config_SOURCES = pam-config.c load_c
|
||||
mod_pam_group.c mod_pam_time.c mod_pam_ssh.c mod_pam_succeed_if.c \
|
||||
mod_pam_csync.c mod_pam_fp.c mod_pam_fprint.c mod_pam_pwhistory.c \
|
||||
mod_pam_selinux.c mod_pam_gnome_keyring.c mod_pam_passwdqc.c \
|
||||
- mod_pam_exec.c mod_pam_sss.c mod_pam_fprintd.c
|
||||
+ mod_pam_exec.c mod_pam_sss.c mod_pam_fprintd.c mod_pam_systemd.c
|
||||
|
||||
noinst_HEADERS = pam-config.h pam-module.h
|
||||
|
||||
Index: pam-config-0.79/src/mod_pam_systemd.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ pam-config-0.79/src/mod_pam_systemd.c
|
||||
@@ -0,0 +1,120 @@
|
||||
+/* Copyright (C) 2011 Frederic Crozat
|
||||
+ Author: Frederic Crozat <fcrozat@suse.com>
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License version 2 as
|
||||
+ published by the Free Software Foundation.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program; if not, write to the Free Software Foundation,
|
||||
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
+
|
||||
+#ifdef HAVE_CONFIG_H
|
||||
+#include <config.h>
|
||||
+#endif
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <string.h>
|
||||
+#include <ctype.h>
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
+#include "pam-config.h"
|
||||
+#include "pam-module.h"
|
||||
+
|
||||
+static int
|
||||
+write_config_systemd (pam_module_t *this, enum write_type op, FILE *fp)
|
||||
+{
|
||||
+ option_set_t *opt_set = this->get_opt_set (this, op);
|
||||
+ char *opt;
|
||||
+
|
||||
+ if (debug)
|
||||
+ debug_write_call (this, op);
|
||||
+
|
||||
+ if (op != SESSION || !opt_set->is_enabled (opt_set, "is_enabled"))
|
||||
+ return 0;
|
||||
+
|
||||
+ fprintf (fp, "session\toptional\tpam_systemd.so");
|
||||
+
|
||||
+ if (opt_set->is_enabled (opt_set, "debug"))
|
||||
+ fprintf(fp, " debug");
|
||||
+ if ((opt = opt_set->get_opt (opt_set, "kill_session_processes")))
|
||||
+ fprintf(fp, " kill-session-processes=%s",opt);
|
||||
+ if ((opt = opt_set->get_opt (opt_set, "kill_only_users")))
|
||||
+ fprintf(fp, " kill-only-users=%s",opt);
|
||||
+ if ((opt = opt_set->get_opt (opt_set, "kill_exclude_users")))
|
||||
+ fprintf(fp, " kill-exclude-users=%s",opt);
|
||||
+ if ((opt = opt_set->get_opt (opt_set, "controllers")))
|
||||
+ fprintf(fp, " controllers=%s",opt);
|
||||
+ if ((opt = opt_set->get_opt (opt_set, "reset_controllers")))
|
||||
+ fprintf(fp, " reset-controllers=%s",opt);
|
||||
+
|
||||
+ fprintf(fp, "\n");
|
||||
+ return 0;
|
||||
+
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+parse_config_systemd (pam_module_t *this, char *args, write_type_t type)
|
||||
+{
|
||||
+ option_set_t *opt_set = this->get_opt_set (this, type);
|
||||
+
|
||||
+ if (debug)
|
||||
+ printf ("**** parse_config_%s (%s): '%s'\n", this->name,
|
||||
+ type2string (type), args ? args : "");
|
||||
+
|
||||
+ opt_set->enable (opt_set, "is_enabled", TRUE);
|
||||
+
|
||||
+ while (args && strlen (args) > 0)
|
||||
+ {
|
||||
+ char *cp = strsep (&args, " \t");
|
||||
+
|
||||
+ if (args)
|
||||
+ while (isspace ((int) *args))
|
||||
+ ++args;
|
||||
+
|
||||
+ if (strcmp (cp, "debug") == 0)
|
||||
+ opt_set->enable (opt_set, "debug", TRUE);
|
||||
+ else if (strncmp (cp, "kill-session-processes=", 13) == 0)
|
||||
+ opt_set->set_opt (opt_set, "kill_session_processes", strdup(&cp[13]));
|
||||
+ else if (strncmp (cp, "kill-only-users=", 16) == 0)
|
||||
+ opt_set->set_opt (opt_set, "kill_only_users", strdup (&cp[16]));
|
||||
+ else if (strncmp (cp, "kill-exclude-users=", 19) == 0)
|
||||
+ opt_set->set_opt (opt_set, "kill_exclude_users", strdup (&cp[19]));
|
||||
+ else if (strncmp (cp, "controllers=", 12) == 0)
|
||||
+ opt_set->set_opt (opt_set, "controllers", strdup (&cp[12]));
|
||||
+ else if (strncmp (cp, "reset-controllers=", 18) == 0)
|
||||
+ opt_set->set_opt (opt_set, "reset_controllers", strdup (&cp[18]));
|
||||
+ else
|
||||
+ print_unknown_option_error ("pam_systemd.so", cp);
|
||||
+ }
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+GETOPT_START_1(SESSION)
|
||||
+GETOPT_END_1(SESSION)
|
||||
+
|
||||
+PRINT_ARGS("systemd")
|
||||
+PRINT_XMLHELP("systemd")
|
||||
+
|
||||
+/* ---- contruct module object ---- */
|
||||
+DECLARE_BOOL_OPTS_2 (is_enabled, debug);
|
||||
+DECLARE_STRING_OPTS_5 (kill_session_processes, kill_only_users, kill_exclude_users, controllers, reset_controllers);
|
||||
+DECLARE_OPT_SETS;
|
||||
+
|
||||
+static module_helptext_t helptext[] = {{NULL, NULL, NULL}};
|
||||
+
|
||||
+
|
||||
+/* at last construct the complete module object */
|
||||
+pam_module_t mod_pam_systemd = { "pam_systemd.so", opt_sets, helptext,
|
||||
+ &parse_config_systemd,
|
||||
+ &def_print_module,
|
||||
+ &write_config_systemd,
|
||||
+ &get_opt_set,
|
||||
+ &getopt,
|
||||
+ &print_args,
|
||||
+ &print_xmlhelp};
|
||||
Index: pam-config-0.79/src/supported-modules.h
|
||||
===================================================================
|
||||
--- pam-config-0.79.orig/src/supported-modules.h
|
||||
+++ pam-config-0.79/src/supported-modules.h
|
||||
@@ -39,6 +39,7 @@ extern pam_module_t mod_pam_cryptpass;
|
||||
extern pam_module_t mod_pam_csync;
|
||||
extern pam_module_t mod_pam_loginuid;
|
||||
extern pam_module_t mod_pam_mount;
|
||||
+extern pam_module_t mod_pam_systemd;
|
||||
|
||||
pam_module_t *common_module_list[] = {
|
||||
&mod_pam_apparmor,
|
||||
@@ -67,6 +68,7 @@ pam_module_t *common_module_list[] = {
|
||||
&mod_pam_ssh,
|
||||
&mod_pam_sss,
|
||||
&mod_pam_succeed_if,
|
||||
+ &mod_pam_systemd,
|
||||
&mod_pam_thinkfinger,
|
||||
&mod_pam_umask,
|
||||
&mod_pam_unix,
|
||||
@@ -143,6 +145,7 @@ static pam_module_t *module_list_session
|
||||
&mod_pam_nam,
|
||||
&mod_pam_umask,
|
||||
&mod_pam_ssh,
|
||||
+ &mod_pam_systemd,
|
||||
&mod_pam_selinux,
|
||||
&mod_pam_gnome_keyring,
|
||||
&mod_pam_exec,
|
Loading…
Reference in New Issue
Block a user