diff options
author | Steve Langasek <steve.langasek@ubuntu.com> | 2019-01-03 16:09:38 -0800 |
---|---|---|
committer | Steve Langasek <steve.langasek@ubuntu.com> | 2019-01-03 16:09:38 -0800 |
commit | 03398c56c56ed427818d2ce879d45d1009f7d46b (patch) | |
tree | 9a7bc0d7d15ac988ac9ad31ad18a769030faced7 /Linux-PAM/modules | |
parent | e78677298d54010c3a62b932baefdae152fd0fed (diff) | |
parent | 281e859131adad49301befbc50cfc5cd282c6937 (diff) | |
download | pam-03398c56c56ed427818d2ce879d45d1009f7d46b.tar.gz pam-03398c56c56ed427818d2ce879d45d1009f7d46b.tar.bz2 pam-03398c56c56ed427818d2ce879d45d1009f7d46b.zip |
merge upstream version 0.99.9.0
Diffstat (limited to 'Linux-PAM/modules')
95 files changed, 450 insertions, 319 deletions
diff --git a/Linux-PAM/modules/Makefile.in b/Linux-PAM/modules/Makefile.in index ea167a5c..112f5a94 100644 --- a/Linux-PAM/modules/Makefile.in +++ b/Linux-PAM/modules/Makefile.in @@ -154,6 +154,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ diff --git a/Linux-PAM/modules/pam_access/Makefile.am b/Linux-PAM/modules/pam_access/Makefile.am index 8641b97c..9b58e81e 100644 --- a/Linux-PAM/modules/pam_access/Makefile.am +++ b/Linux-PAM/modules/pam_access/Makefile.am @@ -15,13 +15,13 @@ secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ -DPAM_ACCESS_CONFIG=\"$(SCONFIGDIR)/access.conf\" -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam @LIBNSL@ +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_access.la +pam_access_la_LIBADD = -L$(top_builddir)/libpam -lpam @LIBNSL@ secureconf_DATA = access.conf diff --git a/Linux-PAM/modules/pam_access/Makefile.in b/Linux-PAM/modules/pam_access/Makefile.in index 86303308..9b9febc2 100644 --- a/Linux-PAM/modules/pam_access/Makefile.in +++ b/Linux-PAM/modules/pam_access/Makefile.in @@ -65,7 +65,7 @@ am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man5dir)" \ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(secureconfdir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_access_la_LIBADD = +pam_access_la_DEPENDENCIES = pam_access_la_SOURCES = pam_access.c pam_access_la_OBJECTS = pam_access.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -178,6 +178,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -256,9 +257,9 @@ secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ -DPAM_ACCESS_CONFIG=\"$(SCONFIGDIR)/access.conf\" -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam @LIBNSL@ $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_access.la +pam_access_la_LIBADD = -L$(top_builddir)/libpam -lpam @LIBNSL@ secureconf_DATA = access.conf @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README TESTS = tst-pam_access diff --git a/Linux-PAM/modules/pam_access/pam_access.c b/Linux-PAM/modules/pam_access/pam_access.c index 29a1606c..e12bc721 100644 --- a/Linux-PAM/modules/pam_access/pam_access.c +++ b/Linux-PAM/modules/pam_access/pam_access.c @@ -153,7 +153,7 @@ parse_args(pam_handle_t *pamh, struct login_info *loginfo, typedef int match_func (pam_handle_t *, char *, struct login_info *); -static int list_match (pam_handle_t *, char *, struct login_info *, +static int list_match (pam_handle_t *, char *, char *, struct login_info *, match_func *); static int user_match (pam_handle_t *, char *, struct login_info *); static int group_match (pam_handle_t *, const char *, const char *); @@ -376,11 +376,11 @@ login_access (pam_handle_t *pamh, struct login_info *item) if (pam_access_debug) pam_syslog (pamh, LOG_DEBUG, "line %d: %s : %s : %s", lineno, perm, users, froms); - match = list_match(pamh, froms, item, from_match); + match = list_match(pamh, froms, NULL, item, from_match); if (pam_access_debug) pam_syslog (pamh, LOG_DEBUG, "from_match=%d, \"%s\"", match, item->from); - match = match && list_match (pamh, users, item, user_match); + match = match && list_match (pamh, users, NULL, item, user_match); if (pam_access_debug) pam_syslog (pamh, LOG_DEBUG, "user_match=%d, \"%s\"", match, item->user->pw_name); @@ -400,14 +400,14 @@ login_access (pam_handle_t *pamh, struct login_info *item) /* list_match - match an item against a list of tokens with exceptions */ -static int list_match(pam_handle_t *pamh, - char *list, struct login_info *item, match_func *match_fn) +static int +list_match(pam_handle_t *pamh, char *list, char *sptr, + struct login_info *item, match_func *match_fn) { char *tok; int match = NO; - char *sptr; - if (pam_access_debug) + if (pam_access_debug && list != NULL) pam_syslog (pamh, LOG_DEBUG, "list_match: list=%s, item=%s", list, item->user->pw_name); @@ -430,7 +430,7 @@ static int list_match(pam_handle_t *pamh, if (match != NO) { while ((tok = strtok_r(NULL, sep, &sptr)) && strcasecmp(tok, "EXCEPT")) /* VOID */ ; - if (tok == 0 || list_match(pamh, sptr, item, match_fn) == NO) + if (tok == 0 || list_match(pamh, NULL, sptr, item, match_fn) == NO) return (match); } return (NO); diff --git a/Linux-PAM/modules/pam_cracklib/Makefile.am b/Linux-PAM/modules/pam_cracklib/Makefile.am index cc8d6ff9..619ffc93 100644 --- a/Linux-PAM/modules/pam_cracklib/Makefile.am +++ b/Linux-PAM/modules/pam_cracklib/Makefile.am @@ -14,8 +14,7 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif @@ -26,7 +25,8 @@ securelib_LTLIBRARIES = pam_cracklib.la TESTS = tst-pam_cracklib endif -pam_cracklib_la_LIBADD = @LIBCRACK@ @LIBCRYPT@ +pam_cracklib_la_LIBADD = -L$(top_builddir)/libpam -lpam \ + @LIBCRACK@ @LIBCRYPT@ if ENABLE_REGENERATE_MAN diff --git a/Linux-PAM/modules/pam_cracklib/Makefile.in b/Linux-PAM/modules/pam_cracklib/Makefile.in index bda59695..5ce6f91f 100644 --- a/Linux-PAM/modules/pam_cracklib/Makefile.in +++ b/Linux-PAM/modules/pam_cracklib/Makefile.in @@ -176,6 +176,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -252,11 +253,12 @@ XMLS = README.xml pam_cracklib.8.xml securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) @HAVE_LIBCRACK_TRUE@securelib_LTLIBRARIES = pam_cracklib.la @HAVE_LIBCRACK_TRUE@TESTS = tst-pam_cracklib -pam_cracklib_la_LIBADD = @LIBCRACK@ @LIBCRYPT@ +pam_cracklib_la_LIBADD = -L$(top_builddir)/libpam -lpam \ + @LIBCRACK@ @LIBCRYPT@ + @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README all: all-am diff --git a/Linux-PAM/modules/pam_cracklib/pam_cracklib.c b/Linux-PAM/modules/pam_cracklib/pam_cracklib.c index 6decf2bf..532a72b2 100644 --- a/Linux-PAM/modules/pam_cracklib/pam_cracklib.c +++ b/Linux-PAM/modules/pam_cracklib/pam_cracklib.c @@ -56,6 +56,10 @@ extern char *FascistCheck(char *pw, const char *dictpath); #endif +#ifndef CRACKLIB_DICTS +#define CRACKLIB_DICTS NULL +#endif + /* For Translators: "%s%s" could be replaced with "<service> " or "". */ #define PROMPT1 _("New %s%spassword: ") /* For Translators: "%s%s" could be replaced with "<service> " or "". */ @@ -95,7 +99,7 @@ struct cracklib_options { int min_class; int use_authtok; char prompt_type[BUFSIZ]; - char cracklib_dictpath[PATH_MAX]; + const char *cracklib_dictpath; }; #define CO_RETRY_TIMES 1 @@ -166,14 +170,15 @@ _pam_parse (pam_handle_t *pamh, struct cracklib_options *opt, } else if (!strncmp(*argv,"use_authtok",11)) { opt->use_authtok = 1; } else if (!strncmp(*argv,"dictpath=",9)) { - strncpy(opt->cracklib_dictpath, *argv+9, - sizeof(opt->cracklib_dictpath) - 1); + opt->cracklib_dictpath = *argv+9; + if (!*(opt->cracklib_dictpath)) { + opt->cracklib_dictpath = CRACKLIB_DICTS; + } } else { pam_syslog(pamh,LOG_ERR,"pam_parse: unknown option; %s",*argv); } } opt->prompt_type[sizeof(opt->prompt_type) - 1] = '\0'; - opt->cracklib_dictpath[sizeof(opt->cracklib_dictpath) - 1] = '\0'; return ctrl; } @@ -571,8 +576,7 @@ PAM_EXTERN int pam_sm_chauthtok(pam_handle_t *pamh, int flags, options.use_authtok = CO_USE_AUTHTOK; memset(options.prompt_type, 0, BUFSIZ); strcpy(options.prompt_type,"UNIX"); - memset(options.cracklib_dictpath, 0, - sizeof (options.cracklib_dictpath)); + options.cracklib_dictpath = CRACKLIB_DICTS; ctrl = _pam_parse(pamh, &options, argc, argv); @@ -666,7 +670,7 @@ PAM_EXTERN int pam_sm_chauthtok(pam_handle_t *pamh, int flags, const char *crack_msg; D(("against cracklib")); - if ((crack_msg = FascistCheck(token1,options.cracklib_dictpath[0] == '\0'?NULL:options.cracklib_dictpath))) { + if ((crack_msg = FascistCheck(token1,options.cracklib_dictpath))) { if (ctrl & PAM_DEBUG_ARG) pam_syslog(pamh,LOG_DEBUG,"bad password: %s",crack_msg); pam_error(pamh, _("BAD PASSWORD: %s"), crack_msg); diff --git a/Linux-PAM/modules/pam_debug/Makefile.am b/Linux-PAM/modules/pam_debug/Makefile.am index 889d7877..0b798516 100644 --- a/Linux-PAM/modules/pam_debug/Makefile.am +++ b/Linux-PAM/modules/pam_debug/Makefile.am @@ -13,13 +13,13 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_debug.la +pam_debug_la_LIBADD = -L$(top_builddir)/libpam -lpam TESTS = tst-pam_debug diff --git a/Linux-PAM/modules/pam_debug/Makefile.in b/Linux-PAM/modules/pam_debug/Makefile.in index b2d11867..e99f25ba 100644 --- a/Linux-PAM/modules/pam_debug/Makefile.in +++ b/Linux-PAM/modules/pam_debug/Makefile.in @@ -64,7 +64,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_debug_la_LIBADD = +pam_debug_la_DEPENDENCIES = pam_debug_la_SOURCES = pam_debug.c pam_debug_la_OBJECTS = pam_debug.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -251,9 +252,9 @@ XMLS = README.xml pam_debug.8.xml securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_debug.la +pam_debug_la_LIBADD = -L$(top_builddir)/libpam -lpam TESTS = tst-pam_debug @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README all: all-am diff --git a/Linux-PAM/modules/pam_deny/Makefile.am b/Linux-PAM/modules/pam_deny/Makefile.am index 9837f880..94b5f0f6 100644 --- a/Linux-PAM/modules/pam_deny/Makefile.am +++ b/Linux-PAM/modules/pam_deny/Makefile.am @@ -14,13 +14,13 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_deny.la +pam_deny_la_LIBADD = -L$(top_builddir)/libpam -lpam if ENABLE_REGENERATE_MAN diff --git a/Linux-PAM/modules/pam_deny/Makefile.in b/Linux-PAM/modules/pam_deny/Makefile.in index 3fcee127..da6046e4 100644 --- a/Linux-PAM/modules/pam_deny/Makefile.in +++ b/Linux-PAM/modules/pam_deny/Makefile.in @@ -64,7 +64,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_deny_la_LIBADD = +pam_deny_la_DEPENDENCIES = pam_deny_la_SOURCES = pam_deny.c pam_deny_la_OBJECTS = pam_deny.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -251,9 +252,9 @@ XMLS = README.xml pam_deny.8.xml securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_deny.la +pam_deny_la_LIBADD = -L$(top_builddir)/libpam -lpam @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README TESTS = tst-pam_deny all: all-am diff --git a/Linux-PAM/modules/pam_echo/Makefile.am b/Linux-PAM/modules/pam_echo/Makefile.am index 40415c7b..d004e8f4 100644 --- a/Linux-PAM/modules/pam_echo/Makefile.am +++ b/Linux-PAM/modules/pam_echo/Makefile.am @@ -14,13 +14,13 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_echo.la +pam_echo_la_LIBADD = -L$(top_builddir)/libpam -lpam if ENABLE_REGENERATE_MAN noinst_DATA = README diff --git a/Linux-PAM/modules/pam_echo/Makefile.in b/Linux-PAM/modules/pam_echo/Makefile.in index b584cfdd..60d814e4 100644 --- a/Linux-PAM/modules/pam_echo/Makefile.in +++ b/Linux-PAM/modules/pam_echo/Makefile.in @@ -64,7 +64,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_echo_la_LIBADD = +pam_echo_la_DEPENDENCIES = pam_echo_la_SOURCES = pam_echo.c pam_echo_la_OBJECTS = pam_echo.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -251,9 +252,9 @@ XMLS = README.xml pam_echo.8.xml securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_echo.la +pam_echo_la_LIBADD = -L$(top_builddir)/libpam -lpam @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README TESTS = tst-pam_echo all: all-am diff --git a/Linux-PAM/modules/pam_env/Makefile.am b/Linux-PAM/modules/pam_env/Makefile.am index 83236e9b..87813688 100644 --- a/Linux-PAM/modules/pam_env/Makefile.am +++ b/Linux-PAM/modules/pam_env/Makefile.am @@ -15,13 +15,13 @@ secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ -DDEFAULT_CONF_FILE=\"$(SCONFIGDIR)/pam_env.conf\" -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_env.la +pam_env_la_LIBADD = -L$(top_builddir)/libpam -lpam secureconf_DATA = pam_env.conf sysconf_DATA = environment diff --git a/Linux-PAM/modules/pam_env/Makefile.in b/Linux-PAM/modules/pam_env/Makefile.in index 7bd1e9a3..46abe640 100644 --- a/Linux-PAM/modules/pam_env/Makefile.in +++ b/Linux-PAM/modules/pam_env/Makefile.in @@ -66,7 +66,7 @@ am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man5dir)" \ "$(DESTDIR)$(sysconfdir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_env_la_LIBADD = +pam_env_la_DEPENDENCIES = pam_env_la_SOURCES = pam_env.c pam_env_la_OBJECTS = pam_env.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -180,6 +180,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -258,9 +259,9 @@ secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ -DDEFAULT_CONF_FILE=\"$(SCONFIGDIR)/pam_env.conf\" -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_env.la +pam_env_la_LIBADD = -L$(top_builddir)/libpam -lpam secureconf_DATA = pam_env.conf sysconf_DATA = environment @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README diff --git a/Linux-PAM/modules/pam_exec/Makefile.am b/Linux-PAM/modules/pam_exec/Makefile.am index 4fc28b28..55fe9297 100644 --- a/Linux-PAM/modules/pam_exec/Makefile.am +++ b/Linux-PAM/modules/pam_exec/Makefile.am @@ -14,13 +14,13 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_exec.la +pam_exec_la_LIBADD = -L$(top_builddir)/libpam -lpam if ENABLE_REGENERATE_MAN diff --git a/Linux-PAM/modules/pam_exec/Makefile.in b/Linux-PAM/modules/pam_exec/Makefile.in index 34f7ac51..e78b00b9 100644 --- a/Linux-PAM/modules/pam_exec/Makefile.in +++ b/Linux-PAM/modules/pam_exec/Makefile.in @@ -64,7 +64,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_exec_la_LIBADD = +pam_exec_la_DEPENDENCIES = pam_exec_la_SOURCES = pam_exec.c pam_exec_la_OBJECTS = pam_exec.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -251,9 +252,9 @@ XMLS = README.xml pam_exec.8.xml securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_exec.la +pam_exec_la_LIBADD = -L$(top_builddir)/libpam -lpam @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README TESTS = tst-pam_exec all: all-am diff --git a/Linux-PAM/modules/pam_faildelay/Makefile.am b/Linux-PAM/modules/pam_faildelay/Makefile.am index ac1bc1d3..2796018c 100644 --- a/Linux-PAM/modules/pam_faildelay/Makefile.am +++ b/Linux-PAM/modules/pam_faildelay/Makefile.am @@ -15,13 +15,13 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_faildelay.la +pam_faildelay_la_LIBADD = -L$(top_builddir)/libpam -lpam if ENABLE_REGENERATE_MAN noinst_DATA = README diff --git a/Linux-PAM/modules/pam_faildelay/Makefile.in b/Linux-PAM/modules/pam_faildelay/Makefile.in index 02c94322..94cc110d 100644 --- a/Linux-PAM/modules/pam_faildelay/Makefile.in +++ b/Linux-PAM/modules/pam_faildelay/Makefile.in @@ -64,7 +64,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_faildelay_la_LIBADD = +pam_faildelay_la_DEPENDENCIES = pam_faildelay_la_SOURCES = pam_faildelay.c pam_faildelay_la_OBJECTS = pam_faildelay.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -252,9 +253,9 @@ TESTS = tst-pam_faildelay securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_faildelay.la +pam_faildelay_la_LIBADD = -L$(top_builddir)/libpam -lpam @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README all: all-am diff --git a/Linux-PAM/modules/pam_filter/Makefile.am b/Linux-PAM/modules/pam_filter/Makefile.am index b218bffb..ab2ceee9 100644 --- a/Linux-PAM/modules/pam_filter/Makefile.am +++ b/Linux-PAM/modules/pam_filter/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2006 Thorsten Kukuk <kukuk@suse.de> +# Copyright (c) 2005, 2006, 2007 Thorsten Kukuk <kukuk@thkukuk.de> # SUBDIRS = upperLOWER @@ -15,13 +15,13 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif include_HEADERS=pam_filter.h +pam_filter_la_LIBADD = -L$(top_builddir)/libpam -lpam securelib_LTLIBRARIES = pam_filter.la TESTS = tst-pam_filter diff --git a/Linux-PAM/modules/pam_filter/Makefile.in b/Linux-PAM/modules/pam_filter/Makefile.in index 03b39bcd..d45b8d4a 100644 --- a/Linux-PAM/modules/pam_filter/Makefile.in +++ b/Linux-PAM/modules/pam_filter/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # -# Copyright (c) 2005, 2006 Thorsten Kukuk <kukuk@suse.de> +# Copyright (c) 2005, 2006, 2007 Thorsten Kukuk <kukuk@thkukuk.de> # @@ -67,7 +67,7 @@ am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" \ "$(DESTDIR)$(includedir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_filter_la_LIBADD = +pam_filter_la_DEPENDENCIES = pam_filter_la_SOURCES = pam_filter.c pam_filter_la_OBJECTS = pam_filter.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -190,6 +190,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -267,9 +268,9 @@ XMLS = README.xml pam_filter.8.xml securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) include_HEADERS = pam_filter.h +pam_filter_la_LIBADD = -L$(top_builddir)/libpam -lpam securelib_LTLIBRARIES = pam_filter.la TESTS = tst-pam_filter @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README diff --git a/Linux-PAM/modules/pam_filter/upperLOWER/Makefile.am b/Linux-PAM/modules/pam_filter/upperLOWER/Makefile.am index 205429c8..93d24ff5 100644 --- a/Linux-PAM/modules/pam_filter/upperLOWER/Makefile.am +++ b/Linux-PAM/modules/pam_filter/upperLOWER/Makefile.am @@ -9,6 +9,7 @@ securelibfilterdir = $(SECUREDIR)/pam_filter AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ -I$(srcdir)/.. @PIE_CFLAGS@ -AM_LDFLAGS = @PIE_LDFLAGS@ -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = @PIE_LDFLAGS@ +LDADD = -L$(top_builddir)/libpam -lpam securelibfilter_PROGRAMS = upperLOWER diff --git a/Linux-PAM/modules/pam_filter/upperLOWER/Makefile.in b/Linux-PAM/modules/pam_filter/upperLOWER/Makefile.in index e2d799f4..21145056 100644 --- a/Linux-PAM/modules/pam_filter/upperLOWER/Makefile.in +++ b/Linux-PAM/modules/pam_filter/upperLOWER/Makefile.in @@ -60,6 +60,7 @@ PROGRAMS = $(securelibfilter_PROGRAMS) upperLOWER_SOURCES = upperLOWER.c upperLOWER_OBJECTS = upperLOWER.$(OBJEXT) upperLOWER_LDADD = $(LDADD) +upperLOWER_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -164,6 +165,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -238,7 +240,8 @@ securelibfilterdir = $(SECUREDIR)/pam_filter AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ -I$(srcdir)/.. @PIE_CFLAGS@ -AM_LDFLAGS = @PIE_LDFLAGS@ -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = @PIE_LDFLAGS@ +LDADD = -L$(top_builddir)/libpam -lpam all: all-am .SUFFIXES: diff --git a/Linux-PAM/modules/pam_ftp/Makefile.am b/Linux-PAM/modules/pam_ftp/Makefile.am index e6d510a1..a4ce03df 100644 --- a/Linux-PAM/modules/pam_ftp/Makefile.am +++ b/Linux-PAM/modules/pam_ftp/Makefile.am @@ -13,13 +13,13 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_ftp.la +pam_ftp_la_LIBADD = -L$(top_builddir)/libpam -lpam TESTS = tst-pam_ftp diff --git a/Linux-PAM/modules/pam_ftp/Makefile.in b/Linux-PAM/modules/pam_ftp/Makefile.in index 875a71a1..77e9b3e9 100644 --- a/Linux-PAM/modules/pam_ftp/Makefile.in +++ b/Linux-PAM/modules/pam_ftp/Makefile.in @@ -64,7 +64,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_ftp_la_LIBADD = +pam_ftp_la_DEPENDENCIES = pam_ftp_la_SOURCES = pam_ftp.c pam_ftp_la_OBJECTS = pam_ftp.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -251,9 +252,9 @@ XMLS = README.xml pam_ftp.8.xml securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_ftp.la +pam_ftp_la_LIBADD = -L$(top_builddir)/libpam -lpam TESTS = tst-pam_ftp @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README all: all-am diff --git a/Linux-PAM/modules/pam_group/Makefile.am b/Linux-PAM/modules/pam_group/Makefile.am index 544fa12f..22dc831b 100644 --- a/Linux-PAM/modules/pam_group/Makefile.am +++ b/Linux-PAM/modules/pam_group/Makefile.am @@ -14,13 +14,13 @@ secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ -DPAM_GROUP_CONF=\"$(SCONFIGDIR)/group.conf\" -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_group.la +pam_group_la_LIBADD = -L$(top_builddir)/libpam -lpam secureconf_DATA = group.conf diff --git a/Linux-PAM/modules/pam_group/Makefile.in b/Linux-PAM/modules/pam_group/Makefile.in index 7deca09c..48fcfe47 100644 --- a/Linux-PAM/modules/pam_group/Makefile.in +++ b/Linux-PAM/modules/pam_group/Makefile.in @@ -65,7 +65,7 @@ am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man5dir)" \ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(secureconfdir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_group_la_LIBADD = +pam_group_la_DEPENDENCIES = pam_group_la_SOURCES = pam_group.c pam_group_la_OBJECTS = pam_group.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -178,6 +178,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -256,9 +257,9 @@ secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ -DPAM_GROUP_CONF=\"$(SCONFIGDIR)/group.conf\" -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_group.la +pam_group_la_LIBADD = -L$(top_builddir)/libpam -lpam secureconf_DATA = group.conf TESTS = tst-pam_group @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README diff --git a/Linux-PAM/modules/pam_group/group.conf b/Linux-PAM/modules/pam_group/group.conf index d4a10672..b766becb 100644 --- a/Linux-PAM/modules/pam_group/group.conf +++ b/Linux-PAM/modules/pam_group/group.conf @@ -10,7 +10,7 @@ # *** like. Example: games are allowed between the hours of 6pm and 6am # *** user joe logs in at 7pm writes a small C-program toplay.c that # *** invokes their favorite shell, compiles it and does -# *** "chgrp games toplay; chmod g+s toplay". They are basically able +# *** "chgrp play toplay; chmod g+s toplay". They are basically able # *** to play games any time... You have been warned. AGM # @@ -74,7 +74,7 @@ # # 1. to run an application as root # 2. add the following groups to the /etc/group file: -# floppy, games, sound +# floppy, play, sound # # @@ -88,10 +88,10 @@ # # another example: running 'xsh' on tty* (any ttyXXX device), # the user 'sword' is given access to games (through membership of -# the floppy group) after work hours +# the sound and play group) after work hours. # -#xsh; tty* ;sword;!Wk0900-1800;games, sound +#xsh; tty* ;sword;!Wk0900-1800;sound, play #xsh; tty* ;*;Al0900-1800;floppy # diff --git a/Linux-PAM/modules/pam_group/pam_group.c b/Linux-PAM/modules/pam_group/pam_group.c index 1dc329ef..4a54da14 100644 --- a/Linux-PAM/modules/pam_group/pam_group.c +++ b/Linux-PAM/modules/pam_group/pam_group.c @@ -329,6 +329,13 @@ is_same (const pam_handle_t *pamh UNUSED, return FALSE; } } + + /* Ok, we know that b is a substring from A and does not contain + wildcards, but now the length of both strings must be the same, + too. */ + if (strlen (a) != strlen(b)) + return FALSE; + return ( !len ); } diff --git a/Linux-PAM/modules/pam_issue/Makefile.am b/Linux-PAM/modules/pam_issue/Makefile.am index 4e43bd05..8161fd81 100644 --- a/Linux-PAM/modules/pam_issue/Makefile.am +++ b/Linux-PAM/modules/pam_issue/Makefile.am @@ -15,13 +15,13 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_issue.la +pam_issue_la_LIBADD = -L$(top_builddir)/libpam -lpam if ENABLE_REGENERATE_MAN noinst_DATA = README diff --git a/Linux-PAM/modules/pam_issue/Makefile.in b/Linux-PAM/modules/pam_issue/Makefile.in index 9cec3a85..af10757f 100644 --- a/Linux-PAM/modules/pam_issue/Makefile.in +++ b/Linux-PAM/modules/pam_issue/Makefile.in @@ -64,7 +64,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_issue_la_LIBADD = +pam_issue_la_DEPENDENCIES = pam_issue_la_SOURCES = pam_issue.c pam_issue_la_OBJECTS = pam_issue.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -252,9 +253,9 @@ TESTS = tst-pam_issue securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_issue.la +pam_issue_la_LIBADD = -L$(top_builddir)/libpam -lpam @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README all: all-am diff --git a/Linux-PAM/modules/pam_keyinit/Makefile.am b/Linux-PAM/modules/pam_keyinit/Makefile.am index 49e34d75..5039705a 100644 --- a/Linux-PAM/modules/pam_keyinit/Makefile.am +++ b/Linux-PAM/modules/pam_keyinit/Makefile.am @@ -22,8 +22,7 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif @@ -31,3 +30,4 @@ endif if HAVE_KEY_MANAGEMENT securelib_LTLIBRARIES = pam_keyinit.la endif +pam_keyinit_la_LIBADD = -L$(top_builddir)/libpam -lpam diff --git a/Linux-PAM/modules/pam_keyinit/Makefile.in b/Linux-PAM/modules/pam_keyinit/Makefile.in index 401c09b6..5ea2133d 100644 --- a/Linux-PAM/modules/pam_keyinit/Makefile.in +++ b/Linux-PAM/modules/pam_keyinit/Makefile.in @@ -64,7 +64,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_keyinit_la_LIBADD = +pam_keyinit_la_DEPENDENCIES = pam_keyinit_la_SOURCES = pam_keyinit.c pam_keyinit_la_OBJECTS = pam_keyinit.lo @HAVE_KEY_MANAGEMENT_TRUE@am_pam_keyinit_la_rpath = -rpath \ @@ -177,6 +177,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -255,9 +256,9 @@ XMLS = README.xml pam_keyinit.8.xml securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) @HAVE_KEY_MANAGEMENT_TRUE@securelib_LTLIBRARIES = pam_keyinit.la +pam_keyinit_la_LIBADD = -L$(top_builddir)/libpam -lpam all: all-am .SUFFIXES: diff --git a/Linux-PAM/modules/pam_lastlog/Makefile.am b/Linux-PAM/modules/pam_lastlog/Makefile.am index e81e7833..899bda7b 100644 --- a/Linux-PAM/modules/pam_lastlog/Makefile.am +++ b/Linux-PAM/modules/pam_lastlog/Makefile.am @@ -15,13 +15,13 @@ XMLS = README.xml pam_lastlog.8.xml TESTS = tst-pam_lastlog AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam -lutil +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_lastlog.la +pam_lastlog_la_LIBADD = -L$(top_builddir)/libpam -lpam -lutil if ENABLE_REGENERATE_MAN noinst_DATA = README diff --git a/Linux-PAM/modules/pam_lastlog/Makefile.in b/Linux-PAM/modules/pam_lastlog/Makefile.in index 6f19ba1f..12448a34 100644 --- a/Linux-PAM/modules/pam_lastlog/Makefile.in +++ b/Linux-PAM/modules/pam_lastlog/Makefile.in @@ -64,7 +64,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_lastlog_la_LIBADD = +pam_lastlog_la_DEPENDENCIES = pam_lastlog_la_SOURCES = pam_lastlog.c pam_lastlog_la_OBJECTS = pam_lastlog.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -252,9 +253,9 @@ man_MANS = pam_lastlog.8 XMLS = README.xml pam_lastlog.8.xml TESTS = tst-pam_lastlog AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam -lutil $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_lastlog.la +pam_lastlog_la_LIBADD = -L$(top_builddir)/libpam -lpam -lutil @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README all: all-am diff --git a/Linux-PAM/modules/pam_limits/Makefile.am b/Linux-PAM/modules/pam_limits/Makefile.am index 60256a7c..13232ea6 100644 --- a/Linux-PAM/modules/pam_limits/Makefile.am +++ b/Linux-PAM/modules/pam_limits/Makefile.am @@ -18,13 +18,13 @@ limits_conf_dir = $(SCONFIGDIR)/limits.d AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ -DLIMITS_FILE_DIR=\"$(limits_conf_dir)/*.conf\" \ -DLIMITS_FILE=\"$(SCONFIGDIR)/limits.conf\" -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_limits.la +pam_limits_la_LIBADD = -L$(top_builddir)/libpam -lpam secureconf_DATA = limits.conf diff --git a/Linux-PAM/modules/pam_limits/Makefile.in b/Linux-PAM/modules/pam_limits/Makefile.in index 4ae28dea..b01b88a3 100644 --- a/Linux-PAM/modules/pam_limits/Makefile.in +++ b/Linux-PAM/modules/pam_limits/Makefile.in @@ -65,7 +65,7 @@ am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man5dir)" \ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(secureconfdir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_limits_la_LIBADD = +pam_limits_la_DEPENDENCIES = pam_limits_la_SOURCES = pam_limits.c pam_limits_la_OBJECTS = pam_limits.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -178,6 +178,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -259,9 +260,9 @@ AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ -DLIMITS_FILE_DIR=\"$(limits_conf_dir)/*.conf\" \ -DLIMITS_FILE=\"$(SCONFIGDIR)/limits.conf\" -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_limits.la +pam_limits_la_LIBADD = -L$(top_builddir)/libpam -lpam secureconf_DATA = limits.conf @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README all: all-am diff --git a/Linux-PAM/modules/pam_limits/limits.conf.5 b/Linux-PAM/modules/pam_limits/limits.conf.5 index 3cf62f26..9fef98d7 100644 --- a/Linux-PAM/modules/pam_limits/limits.conf.5 +++ b/Linux-PAM/modules/pam_limits/limits.conf.5 @@ -1,11 +1,11 @@ .\" Title: limits.conf .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/> -.\" Date: 04/30/2007 -.\" Manual: Linux\-PAM Manual -.\" Source: Linux\-PAM Manual +.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/> +.\" Date: 08/30/2007 +.\" Manual: Linux-PAM Manual +.\" Source: Linux-PAM Manual .\" -.TH "LIMITS.CONF" "5" "04/30/2007" "Linux\-PAM Manual" "Linux\-PAM Manual" +.TH "LIMITS.CONF" "5" "08/30/2007" "Linux\-PAM Manual" "Linux\-PAM Manual" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) @@ -27,21 +27,19 @@ The fields listed above should be filled as follows: \fB<domain>\fR .RS 4 .RS 4 -.TP 4 -\(bu -a username -.TP 4 -\(bu -a groupname, with +\h'-04'\(bu\h'+03'a username +.RE +.RS 4 +\h'-04'\(bu\h'+03'a groupname, with \fB@group\fR syntax. This should not be confused with netgroups. -.TP 4 -\(bu -the wildcard +.RE +.RS 4 +\h'-04'\(bu\h'+03'the wildcard \fB*\fR, for default entry. -.TP 4 -\(bu -the wildcard +.RE +.RS 4 +\h'-04'\(bu\h'+03'the wildcard \fB%\fR, for maxlogins limit only, can also be used with \fI%group\fR syntax. @@ -139,7 +137,8 @@ address space limit (KB) .PP \fBmaxlogins\fR .RS 4 -maximum number of logins for this user +maximum number of logins for this user except for this with +\fIuid=0\fR .RE .PP \fBmaxsyslogins\fR diff --git a/Linux-PAM/modules/pam_limits/limits.conf.5.xml b/Linux-PAM/modules/pam_limits/limits.conf.5.xml index 830aa022..48798470 100644 --- a/Linux-PAM/modules/pam_limits/limits.conf.5.xml +++ b/Linux-PAM/modules/pam_limits/limits.conf.5.xml @@ -175,7 +175,8 @@ <varlistentry> <term><option>maxlogins</option></term> <listitem> - <para>maximum number of logins for this user</para> + <para>maximum number of logins for this user except + for this with <emphasis>uid=0</emphasis></para> </listitem> </varlistentry> <varlistentry> diff --git a/Linux-PAM/modules/pam_limits/pam_limits.c b/Linux-PAM/modules/pam_limits/pam_limits.c index a4bc727f..d65e64bf 100644 --- a/Linux-PAM/modules/pam_limits/pam_limits.c +++ b/Linux-PAM/modules/pam_limits/pam_limits.c @@ -14,7 +14,7 @@ */ #if !defined(linux) && !defined(__linux) -#error THIS CODE IS KNOWN TO WORK ONLY ON LINUX !!! +#warning THIS CODE IS KNOWN TO WORK ONLY ON LINUX !!! #endif #include "config.h" @@ -281,8 +281,10 @@ process_limit (const pam_handle_t *pamh, int source, const char *lim_type, limit_item = RLIMIT_NOFILE; else if (strcmp(lim_item, "memlock") == 0) limit_item = RLIMIT_MEMLOCK; +#ifdef RLIMIT_AS else if (strcmp(lim_item, "as") == 0) limit_item = RLIMIT_AS; +#endif /*RLIMIT_AS*/ #ifdef RLIMIT_LOCKS else if (strcmp(lim_item, "locks") == 0) limit_item = RLIMIT_LOCKS; @@ -389,7 +391,9 @@ process_limit (const pam_handle_t *pamh, int source, const char *lim_type, case RLIMIT_CORE: case RLIMIT_RSS: case RLIMIT_MEMLOCK: +#ifdef RLIMIT_AS case RLIMIT_AS: +#endif if (rlimit_value != RLIM_INFINITY) { if (rlimit_value >= RLIM_INFINITY/1024) @@ -461,8 +465,6 @@ static int parse_config_file(pam_handle_t *pamh, const char *uname, int ctrl, return PAM_SERVICE_ERR; } - /* init things */ - memset(buf, 0, sizeof(buf)); /* start the show */ while (fgets(buf, LINE_LENGTH, fil) != NULL) { char domain[LINE_LENGTH]; @@ -471,46 +473,40 @@ static int parse_config_file(pam_handle_t *pamh, const char *uname, int ctrl, char value[LINE_LENGTH]; int i; size_t j; - char *tptr; + char *tptr,*line; - tptr = buf; + line = buf; /* skip the leading white space */ - while (*tptr && isspace(*tptr)) - tptr++; - strncpy(buf, tptr, sizeof(buf)-1); - buf[sizeof(buf)-1] = '\0'; + while (*line && isspace(*line)) + line++; /* Rip off the comments */ - tptr = strchr(buf,'#'); + tptr = strchr(line,'#'); if (tptr) *tptr = '\0'; /* Rip off the newline char */ - tptr = strchr(buf,'\n'); + tptr = strchr(line,'\n'); if (tptr) *tptr = '\0'; /* Anything left ? */ - if (!strlen(buf)) { - memset(buf, 0, sizeof(buf)); + if (!strlen(line)) continue; - } - memset(domain, 0, sizeof(domain)); - memset(ltype, 0, sizeof(ltype)); - memset(item, 0, sizeof(item)); - memset(value, 0, sizeof(value)); + domain[0] = ltype[0] = item[0] = value[0] = '\0'; - i = sscanf(buf,"%s%s%s%s", domain, ltype, item, value); + i = sscanf(line,"%s%s%s%s", domain, ltype, item, value); D(("scanned line[%d]: domain[%s], ltype[%s], item[%s], value[%s]", i, domain, ltype, item, value)); for(j=0; j < strlen(ltype); j++) ltype[j]=tolower(ltype[j]); - for(j=0; j < strlen(item); j++) - item[j]=tolower(item[j]); - for(j=0; j < strlen(value); j++) - value[j]=tolower(value[j]); if (i == 4) { /* a complete line */ + for(j=0; j < strlen(item); j++) + item[j]=tolower(item[j]); + for(j=0; j < strlen(value); j++) + value[j]=tolower(value[j]); + if (strcmp(uname, domain) == 0) /* this user have a limit */ process_limit(pamh, LIMITS_DEF_USER, ltype, item, value, ctrl, pl); else if (domain[0]=='@') { @@ -556,7 +552,7 @@ static int parse_config_file(pam_handle_t *pamh, const char *uname, int ctrl, return PAM_IGNORE; } } else { - pam_syslog(pamh, LOG_WARNING, "invalid line '%s' - skipped", buf); + pam_syslog(pamh, LOG_WARNING, "invalid line '%s' - skipped", line); } } fclose(fil); diff --git a/Linux-PAM/modules/pam_listfile/Makefile.am b/Linux-PAM/modules/pam_listfile/Makefile.am index 5eb5c75c..2f211320 100644 --- a/Linux-PAM/modules/pam_listfile/Makefile.am +++ b/Linux-PAM/modules/pam_listfile/Makefile.am @@ -15,13 +15,13 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_listfile.la +pam_listfile_la_LIBADD = -L$(top_builddir)/libpam -lpam if ENABLE_REGENERATE_MAN noinst_DATA = README diff --git a/Linux-PAM/modules/pam_listfile/Makefile.in b/Linux-PAM/modules/pam_listfile/Makefile.in index bf08192d..8e12f5d9 100644 --- a/Linux-PAM/modules/pam_listfile/Makefile.in +++ b/Linux-PAM/modules/pam_listfile/Makefile.in @@ -64,7 +64,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_listfile_la_LIBADD = +pam_listfile_la_DEPENDENCIES = pam_listfile_la_SOURCES = pam_listfile.c pam_listfile_la_OBJECTS = pam_listfile.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -252,9 +253,9 @@ TESTS = tst-pam_listfile securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_listfile.la +pam_listfile_la_LIBADD = -L$(top_builddir)/libpam -lpam @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README all: all-am diff --git a/Linux-PAM/modules/pam_listfile/README b/Linux-PAM/modules/pam_listfile/README index f0aaaf7f..51bb13d2 100644 --- a/Linux-PAM/modules/pam_listfile/README +++ b/Linux-PAM/modules/pam_listfile/README @@ -58,6 +58,11 @@ apply=[user|@group] item=[user|ruser|group] this oes not make sense, but for item=[tty|rhost| shell] it have a meaning. +quiet + + Do not treat service refusals or missing list files as errors that need to + be logged. + EXAMPLES Classic 'ftpusers' authentication can be implemented with this entry in /etc/ diff --git a/Linux-PAM/modules/pam_listfile/pam_listfile.8 b/Linux-PAM/modules/pam_listfile/pam_listfile.8 index 2ccecd4b..0103aa5e 100644 --- a/Linux-PAM/modules/pam_listfile/pam_listfile.8 +++ b/Linux-PAM/modules/pam_listfile/pam_listfile.8 @@ -1,11 +1,11 @@ .\" Title: pam_listfile .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/> -.\" Date: 06/22/2006 -.\" Manual: Linux\-PAM Manual -.\" Source: Linux\-PAM Manual +.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/> +.\" Date: 08/25/2007 +.\" Manual: Linux-PAM Manual +.\" Source: Linux-PAM Manual .\" -.TH "PAM_LISTFILE" "8" "06/22/2006" "Linux\-PAM Manual" "Linux\-PAM Manual" +.TH "PAM_LISTFILE" "8" "08/25/2007" "Linux\-PAM Manual" "Linux\-PAM Manual" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) @@ -14,7 +14,7 @@ pam_listfile \- deny or allow services based on an arbitrary file .SH "SYNOPSIS" .HP 16 -\fBpam_listfile.so\fR item=[tty|user|rhost|ruser|group|shell] sense=[allow|deny] file=\fI/path/filename\fR onerr=[succeed|fail] [apply=[\fIuser\fR|\fI@group\fR]] +\fBpam_listfile.so\fR item=[tty|user|rhost|ruser|group|shell] sense=[allow|deny] file=\fI/path/filename\fR onerr=[succeed|fail] [apply=[\fIuser\fR|\fI@group\fR]] [quiet] .SH "DESCRIPTION" .PP pam_listfile is a PAM module which provides a way to deny or allow services based on an arbitrary file. @@ -64,25 +64,40 @@ Besides this last one, all arguments should be specified; do not count on any de No credentials are awarded by this module. .SH "OPTIONS" .PP -.TP 3n +.PP \fBitem=[tty|user|rhost|ruser|group|shell]\fR +.RS 4 What is listed in the file and should be checked for. -.TP 3n +.RE +.PP \fBsense=[allow|deny]\fR +.RS 4 Action to take if found in file, if the item is NOT found in the file, then the opposite action is requested. -.TP 3n +.RE +.PP \fBfile=\fR\fB\fI/path/filename\fR\fR +.RS 4 File containing one item per line. The file needs to be a plain file and not world writeable. -.TP 3n +.RE +.PP \fBonerr=[succeed|fail]\fR +.RS 4 What to do if something weird happens like being unable to open the file. -.TP 3n +.RE +.PP \fBapply=[\fR\fB\fIuser\fR\fR\fB|\fR\fB\fI@group\fR\fR\fB]\fR +.RS 4 Restrict the user class for which the restriction apply. Note that with \fBitem=[user|ruser|group]\fR this oes not make sense, but for \fBitem=[tty|rhost|shell]\fR it have a meaning. +.RE +.PP +\fBquiet\fR +.RS 4 +Do not treat service refusals or missing list files as errors that need to be logged. +.RE .SH "MODULE SERVICES PROVIDED" .PP The services @@ -94,34 +109,44 @@ and are supported. .SH "RETURN VALUES" .PP -.TP 3n +.PP PAM_AUTH_ERR +.RS 4 Authentication failure. -.TP 3n +.RE +.PP PAM_BUF_ERR +.RS 4 Memory buffer error. -.TP 3n +.RE +.PP PAM_IGNORE +.RS 4 The rule does not apply to the \fBapply\fR option. -.TP 3n +.RE +.PP PAM_SERVICE_ERR +.RS 4 Error in service module. -.TP 3n +.RE +.PP PAM_SUCCESS +.RS 4 Success. +.RE .SH "EXAMPLES" .PP Classic 'ftpusers' authentication can be implemented with this entry in \fI/etc/pam.d/ftpd\fR: .sp -.RS 3n +.RS 4 .nf # # deny ftp\-access to users listed in the /etc/ftpusers file # -auth required pam_listfile.so \\ +auth required pam_listfile.so \e onerr=succeed item=user sense=deny file=/etc/ftpusers .fi @@ -137,12 +162,12 @@ To allow login access only for certain users, you can use a \fI/etc/pam.d/login\fR entry like this: .sp -.RS 3n +.RS 4 .nf # # permit login to users listed in /etc/loginusers # -auth required pam_listfile.so \\ +auth required pam_listfile.so \e onerr=fail item=user sense=allow file=/etc/loginusers .fi diff --git a/Linux-PAM/modules/pam_listfile/pam_listfile.8.xml b/Linux-PAM/modules/pam_listfile/pam_listfile.8.xml index 0e90414a..2aab4962 100644 --- a/Linux-PAM/modules/pam_listfile/pam_listfile.8.xml +++ b/Linux-PAM/modules/pam_listfile/pam_listfile.8.xml @@ -33,6 +33,9 @@ <arg choice="opt"> apply=[<replaceable>user</replaceable>|<replaceable>@group</replaceable>] </arg> + <arg choice="opt"> + quiet + </arg> </cmdsynopsis> </refsynopsisdiv> @@ -155,6 +158,18 @@ </para> </listitem> </varlistentry> + + <varlistentry> + <term> + <option>quiet</option> + </term> + <listitem> + <para> + Do not treat service refusals or missing list files as + errors that need to be logged. + </para> + </listitem> + </varlistentry> </variablelist> </para> diff --git a/Linux-PAM/modules/pam_listfile/pam_listfile.c b/Linux-PAM/modules/pam_listfile/pam_listfile.c index 1545fe03..f276e5b8 100644 --- a/Linux-PAM/modules/pam_listfile/pam_listfile.c +++ b/Linux-PAM/modules/pam_listfile/pam_listfile.c @@ -68,7 +68,7 @@ PAM_EXTERN int pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED, int argc, const char **argv) { - int retval, i, citem=0, extitem=0, onerr=PAM_SERVICE_ERR, sense=2; + int retval, i, citem=0, extitem=0, onerr=PAM_SERVICE_ERR, sense=2, quiet=0; const void *void_citemp; const char *citemp; char *ifname=NULL; @@ -155,6 +155,8 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED, apply_type=APPLY_TYPE_USER; strncpy(apply_val,myval,sizeof(apply_val)-1); } + } else if (!strcmp(mybuf,"quiet")) { + quiet = 1; } else { free(ifname); pam_syslog(pamh,LOG_ERR, "Unknown option: %s",mybuf); @@ -399,8 +401,9 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED, #endif (void) pam_get_item(pamh, PAM_SERVICE, &service); (void) pam_get_user(pamh, &user_name, NULL); - pam_syslog (pamh, LOG_ALERT, "Refused user %s for service %s", - user_name, (const char *)service); + if (!quiet) + pam_syslog (pamh, LOG_ALERT, "Refused user %s for service %s", + user_name, (const char *)service); return PAM_AUTH_ERR; } } diff --git a/Linux-PAM/modules/pam_localuser/Makefile.am b/Linux-PAM/modules/pam_localuser/Makefile.am index ae331755..d4e47937 100644 --- a/Linux-PAM/modules/pam_localuser/Makefile.am +++ b/Linux-PAM/modules/pam_localuser/Makefile.am @@ -15,13 +15,13 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_localuser.la +pam_localuser_la_LIBADD = -L$(top_builddir)/libpam -lpam if ENABLE_REGENERATE_MAN noinst_DATA = README diff --git a/Linux-PAM/modules/pam_localuser/Makefile.in b/Linux-PAM/modules/pam_localuser/Makefile.in index 24daef1f..f70ab2e8 100644 --- a/Linux-PAM/modules/pam_localuser/Makefile.in +++ b/Linux-PAM/modules/pam_localuser/Makefile.in @@ -64,7 +64,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_localuser_la_LIBADD = +pam_localuser_la_DEPENDENCIES = pam_localuser_la_SOURCES = pam_localuser.c pam_localuser_la_OBJECTS = pam_localuser.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -252,9 +253,9 @@ XMLS = README.xml pam_localuser.8.xml securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_localuser.la +pam_localuser_la_LIBADD = -L$(top_builddir)/libpam -lpam @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README all: all-am diff --git a/Linux-PAM/modules/pam_loginuid/Makefile.am b/Linux-PAM/modules/pam_loginuid/Makefile.am index 6f2d84b0..636db963 100644 --- a/Linux-PAM/modules/pam_loginuid/Makefile.am +++ b/Linux-PAM/modules/pam_loginuid/Makefile.am @@ -14,13 +14,13 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam @LIBAUDIT@ +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_loginuid.la +pam_loginuid_la_LIBADD = -L$(top_builddir)/libpam -lpam @LIBAUDIT@ if ENABLE_REGENERATE_MAN diff --git a/Linux-PAM/modules/pam_loginuid/Makefile.in b/Linux-PAM/modules/pam_loginuid/Makefile.in index 4a4edd3c..956286ed 100644 --- a/Linux-PAM/modules/pam_loginuid/Makefile.in +++ b/Linux-PAM/modules/pam_loginuid/Makefile.in @@ -64,7 +64,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_loginuid_la_LIBADD = +pam_loginuid_la_DEPENDENCIES = pam_loginuid_la_SOURCES = pam_loginuid.c pam_loginuid_la_OBJECTS = pam_loginuid.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -251,9 +252,9 @@ XMLS = README.xml pam_loginuid.8.xml securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam @LIBAUDIT@ $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_loginuid.la +pam_loginuid_la_LIBADD = -L$(top_builddir)/libpam -lpam @LIBAUDIT@ @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README TESTS = tst-pam_loginuid all: all-am diff --git a/Linux-PAM/modules/pam_mail/Makefile.am b/Linux-PAM/modules/pam_mail/Makefile.am index 95a25a61..0b5d2d70 100644 --- a/Linux-PAM/modules/pam_mail/Makefile.am +++ b/Linux-PAM/modules/pam_mail/Makefile.am @@ -15,13 +15,13 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_mail.la +pam_mail_la_LIBADD = -L$(top_builddir)/libpam -lpam if ENABLE_REGENERATE_MAN noinst_DATA = README diff --git a/Linux-PAM/modules/pam_mail/Makefile.in b/Linux-PAM/modules/pam_mail/Makefile.in index bacd62ca..c4bfb4a4 100644 --- a/Linux-PAM/modules/pam_mail/Makefile.in +++ b/Linux-PAM/modules/pam_mail/Makefile.in @@ -64,7 +64,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_mail_la_LIBADD = +pam_mail_la_DEPENDENCIES = pam_mail_la_SOURCES = pam_mail.c pam_mail_la_OBJECTS = pam_mail.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -252,9 +253,9 @@ TESTS = tst-pam_mail securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_mail.la +pam_mail_la_LIBADD = -L$(top_builddir)/libpam -lpam @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README all: all-am diff --git a/Linux-PAM/modules/pam_mkhomedir/Makefile.am b/Linux-PAM/modules/pam_mkhomedir/Makefile.am index 1feea688..7ed3a9f0 100644 --- a/Linux-PAM/modules/pam_mkhomedir/Makefile.am +++ b/Linux-PAM/modules/pam_mkhomedir/Makefile.am @@ -16,14 +16,14 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_mkhomedir.la pam_mkhomedir_la_SOURCES = pam_mkhomedir.c +pam_mkhomedir_la_LIBADD = -L$(top_builddir)/libpam -lpam if ENABLE_REGENERATE_MAN noinst_DATA = README diff --git a/Linux-PAM/modules/pam_mkhomedir/Makefile.in b/Linux-PAM/modules/pam_mkhomedir/Makefile.in index 2d4a5fc3..5562821c 100644 --- a/Linux-PAM/modules/pam_mkhomedir/Makefile.in +++ b/Linux-PAM/modules/pam_mkhomedir/Makefile.in @@ -64,7 +64,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_mkhomedir_la_LIBADD = +pam_mkhomedir_la_DEPENDENCIES = am_pam_mkhomedir_la_OBJECTS = pam_mkhomedir.lo pam_mkhomedir_la_OBJECTS = $(am_pam_mkhomedir_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -252,10 +253,10 @@ TESTS = tst-pam_mkhomedir securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_mkhomedir.la pam_mkhomedir_la_SOURCES = pam_mkhomedir.c +pam_mkhomedir_la_LIBADD = -L$(top_builddir)/libpam -lpam @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README all: all-am diff --git a/Linux-PAM/modules/pam_motd/Makefile.am b/Linux-PAM/modules/pam_motd/Makefile.am index d6e1bafa..872e5d37 100644 --- a/Linux-PAM/modules/pam_motd/Makefile.am +++ b/Linux-PAM/modules/pam_motd/Makefile.am @@ -15,13 +15,13 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_motd.la +pam_motd_la_LIBADD = -L$(top_builddir)/libpam -lpam if ENABLE_REGENERATE_MAN noinst_DATA = README diff --git a/Linux-PAM/modules/pam_motd/Makefile.in b/Linux-PAM/modules/pam_motd/Makefile.in index 24235722..670ef5e4 100644 --- a/Linux-PAM/modules/pam_motd/Makefile.in +++ b/Linux-PAM/modules/pam_motd/Makefile.in @@ -64,7 +64,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_motd_la_LIBADD = +pam_motd_la_DEPENDENCIES = pam_motd_la_SOURCES = pam_motd.c pam_motd_la_OBJECTS = pam_motd.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -252,9 +253,9 @@ TESTS = tst-pam_motd securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_motd.la +pam_motd_la_LIBADD = -L$(top_builddir)/libpam -lpam @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README all: all-am diff --git a/Linux-PAM/modules/pam_namespace/Makefile.am b/Linux-PAM/modules/pam_namespace/Makefile.am index bbcb2f70..002678ba 100644 --- a/Linux-PAM/modules/pam_namespace/Makefile.am +++ b/Linux-PAM/modules/pam_namespace/Makefile.am @@ -22,8 +22,7 @@ secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ -DPAM_NAMESPACE_CONFIG=\"$(SCONFIGDIR)/namespace.conf\" -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam @LIBSELINUX@ +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif @@ -31,6 +30,7 @@ endif if HAVE_UNSHARE securelib_LTLIBRARIES = pam_namespace.la pam_namespace_la_SOURCES = pam_namespace.c pam_namespace.h md5.c md5.h +pam_namespace_la_LIBADD = -L$(top_builddir)/libpam -lpam @LIBSELINUX@ secureconf_DATA = namespace.conf secureconf_SCRIPTS = namespace.init diff --git a/Linux-PAM/modules/pam_namespace/Makefile.in b/Linux-PAM/modules/pam_namespace/Makefile.in index 8beee4ce..89244535 100644 --- a/Linux-PAM/modules/pam_namespace/Makefile.in +++ b/Linux-PAM/modules/pam_namespace/Makefile.in @@ -69,7 +69,7 @@ am__installdirs = "$(DESTDIR)$(securelibdir)" \ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(secureconfdir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_namespace_la_LIBADD = +pam_namespace_la_DEPENDENCIES = am__pam_namespace_la_SOURCES_DIST = pam_namespace.c pam_namespace.h \ md5.c md5.h @HAVE_UNSHARE_TRUE@am_pam_namespace_la_OBJECTS = pam_namespace.lo \ @@ -189,6 +189,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -270,10 +271,10 @@ secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ -DPAM_NAMESPACE_CONFIG=\"$(SCONFIGDIR)/namespace.conf\" -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam @LIBSELINUX@ $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) @HAVE_UNSHARE_TRUE@securelib_LTLIBRARIES = pam_namespace.la @HAVE_UNSHARE_TRUE@pam_namespace_la_SOURCES = pam_namespace.c pam_namespace.h md5.c md5.h +@HAVE_UNSHARE_TRUE@pam_namespace_la_LIBADD = -L$(top_builddir)/libpam -lpam @LIBSELINUX@ @HAVE_UNSHARE_TRUE@secureconf_DATA = namespace.conf @HAVE_UNSHARE_TRUE@secureconf_SCRIPTS = namespace.init @HAVE_UNSHARE_TRUE@TESTS = tst-pam_namespace diff --git a/Linux-PAM/modules/pam_namespace/pam_namespace.c b/Linux-PAM/modules/pam_namespace/pam_namespace.c index 73d8e591..d3612f59 100644 --- a/Linux-PAM/modules/pam_namespace/pam_namespace.c +++ b/Linux-PAM/modules/pam_namespace/pam_namespace.c @@ -589,8 +589,9 @@ static int poly_name(const struct polydir_s *polyptr, char **i_name, #ifdef WITH_SELINUX *i_context = NULL; *origcon = NULL; - if ((rc=form_context(polyptr, i_context, origcon, idata)) != PAM_SUCCESS) { - return rc; + if ((idata->flags & PAMNS_SELINUX_ENABLED) && + (rc=form_context(polyptr, i_context, origcon, idata)) != PAM_SUCCESS) { + return rc; } #endif diff --git a/Linux-PAM/modules/pam_nologin/Makefile.am b/Linux-PAM/modules/pam_nologin/Makefile.am index dc5fe58f..02840dde 100644 --- a/Linux-PAM/modules/pam_nologin/Makefile.am +++ b/Linux-PAM/modules/pam_nologin/Makefile.am @@ -15,13 +15,13 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_nologin.la +pam_nologin_la_LIBADD = -L$(top_builddir)/libpam -lpam if ENABLE_REGENERATE_MAN noinst_DATA = README diff --git a/Linux-PAM/modules/pam_nologin/Makefile.in b/Linux-PAM/modules/pam_nologin/Makefile.in index 162e0f49..2733b3e1 100644 --- a/Linux-PAM/modules/pam_nologin/Makefile.in +++ b/Linux-PAM/modules/pam_nologin/Makefile.in @@ -64,7 +64,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_nologin_la_LIBADD = +pam_nologin_la_DEPENDENCIES = pam_nologin_la_SOURCES = pam_nologin.c pam_nologin_la_OBJECTS = pam_nologin.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -252,9 +253,9 @@ XMLS = README.xml pam_nologin.8.xml securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_nologin.la +pam_nologin_la_LIBADD = -L$(top_builddir)/libpam -lpam @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README all: all-am diff --git a/Linux-PAM/modules/pam_permit/Makefile.am b/Linux-PAM/modules/pam_permit/Makefile.am index 76e24472..aa6db7a1 100644 --- a/Linux-PAM/modules/pam_permit/Makefile.am +++ b/Linux-PAM/modules/pam_permit/Makefile.am @@ -15,13 +15,13 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_permit.la +pam_permit_la_LIBADD = -L$(top_builddir)/libpam -lpam if ENABLE_REGENERATE_MAN noinst_DATA = README diff --git a/Linux-PAM/modules/pam_permit/Makefile.in b/Linux-PAM/modules/pam_permit/Makefile.in index 43df7fdb..25fa67e5 100644 --- a/Linux-PAM/modules/pam_permit/Makefile.in +++ b/Linux-PAM/modules/pam_permit/Makefile.in @@ -64,7 +64,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_permit_la_LIBADD = +pam_permit_la_DEPENDENCIES = pam_permit_la_SOURCES = pam_permit.c pam_permit_la_OBJECTS = pam_permit.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -252,9 +253,9 @@ TESTS = tst-pam_permit securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_permit.la +pam_permit_la_LIBADD = -L$(top_builddir)/libpam -lpam @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README all: all-am diff --git a/Linux-PAM/modules/pam_rhosts/Makefile.am b/Linux-PAM/modules/pam_rhosts/Makefile.am index d4ca7578..26fdf9c6 100644 --- a/Linux-PAM/modules/pam_rhosts/Makefile.am +++ b/Linux-PAM/modules/pam_rhosts/Makefile.am @@ -16,13 +16,14 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_rhosts_auth.la pam_rhosts.la +pam_rhosts_auth_la_LIBADD = -L$(top_builddir)/libpam -lpam +pam_rhosts_la_LIBADD = -L$(top_builddir)/libpam -lpam if ENABLE_REGENERATE_MAN noinst_DATA = README diff --git a/Linux-PAM/modules/pam_rhosts/Makefile.in b/Linux-PAM/modules/pam_rhosts/Makefile.in index 138a1195..99415320 100644 --- a/Linux-PAM/modules/pam_rhosts/Makefile.in +++ b/Linux-PAM/modules/pam_rhosts/Makefile.in @@ -64,10 +64,10 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_rhosts_la_LIBADD = +pam_rhosts_la_DEPENDENCIES = pam_rhosts_la_SOURCES = pam_rhosts.c pam_rhosts_la_OBJECTS = pam_rhosts.lo -pam_rhosts_auth_la_LIBADD = +pam_rhosts_auth_la_DEPENDENCIES = pam_rhosts_auth_la_SOURCES = pam_rhosts_auth.c pam_rhosts_auth_la_OBJECTS = pam_rhosts_auth.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -178,6 +178,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -255,9 +256,10 @@ XMLS = README.xml pam_rhosts.8.xml securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_rhosts_auth.la pam_rhosts.la +pam_rhosts_auth_la_LIBADD = -L$(top_builddir)/libpam -lpam +pam_rhosts_la_LIBADD = -L$(top_builddir)/libpam -lpam @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README all: all-am diff --git a/Linux-PAM/modules/pam_rhosts/pam_rhosts_auth.c b/Linux-PAM/modules/pam_rhosts/pam_rhosts_auth.c index b2248ccb..48fdeced 100644 --- a/Linux-PAM/modules/pam_rhosts/pam_rhosts_auth.c +++ b/Linux-PAM/modules/pam_rhosts/pam_rhosts_auth.c @@ -64,11 +64,10 @@ #include <sys/fsuid.h> #endif /* HAVE_SYS_FSUID_H */ #ifdef HAVE_NET_IF_H -#include <sys/if.h> +#include <net/if.h> #endif #include <sys/types.h> #include <sys/uio.h> -#include <net/if.h> #include <netinet/in.h> #ifndef MAXDNAME @@ -268,7 +267,7 @@ __icheckhost (pam_handle_t *pamh, struct _options *opts, u_int32_t raddr /* Try for raw ip address first. */ - if (isdigit(*lhost) && (long)(laddr = inet_addr(lhost)) != -1) + if (isdigit(*lhost) && (int32_t)(laddr = inet_addr(lhost) != -1)) return (negate*(! (raddr ^ laddr))); /* Better be a hostname. */ @@ -294,7 +293,6 @@ __icheckuser (pam_handle_t *pamh, struct _options *opts, /* luser is user entry from .rhosts/hosts.equiv file ruser is user id on remote host - rhost is the remote host name */ const void *user; @@ -349,11 +347,17 @@ __ivaliduser (pam_handle_t *pamh, struct _options *opts, register const char *user; register char *p; int hcheck, ucheck; - char buf[MAXHOSTNAMELEN + 128]; /* host + login */ + int retval = 1; +#ifdef HAVE_GETLINE + char *buf=NULL; + size_t buflen=0; - buf[sizeof (buf)-1] = '\0'; /* terminate line */ + while (getline(&buf,&buflen,hostf) > 0) { +#else + char buf[MAXHOSTNAMELEN + 128]; /* host + login */ while (fgets(buf, sizeof(buf), hostf) != NULL) { /* hostf file line */ +#endif p = buf; /* from beginning of file.. */ /* Skip empty or comment lines */ @@ -402,7 +406,7 @@ __ivaliduser (pam_handle_t *pamh, struct _options *opts, hcheck=__icheckhost(pamh, opts, raddr, buf, rhost); if (hcheck<0) - return(1); + break; if (hcheck) { /* Then check user part */ @@ -412,18 +416,23 @@ __ivaliduser (pam_handle_t *pamh, struct _options *opts, ucheck=__icheckuser(pamh, opts, user, ruser); /* Positive 'host user' match? */ - if (ucheck>0) - return(0); + if (ucheck>0) { + retval = 0; + break; + } /* Negative 'host -user' match? */ if (ucheck<0) - return(1); + break; /* Neither, go on looking for match */ } } +#ifdef HAVE_GETLINE + if(buf)free(buf); +#endif - return (1); + return retval; } /* diff --git a/Linux-PAM/modules/pam_rootok/Makefile.am b/Linux-PAM/modules/pam_rootok/Makefile.am index 7a97f20f..54fe2720 100644 --- a/Linux-PAM/modules/pam_rootok/Makefile.am +++ b/Linux-PAM/modules/pam_rootok/Makefile.am @@ -18,13 +18,13 @@ AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include if HAVE_LIBSELINUX AM_CFLAGS += -DWITH_SELINUX endif -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam @LIBSELINUX@ +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_rootok.la +pam_rootok_la_LIBADD = -L$(top_builddir)/libpam -lpam @LIBSELINUX@ if ENABLE_REGENERATE_MAN noinst_DATA = README diff --git a/Linux-PAM/modules/pam_rootok/Makefile.in b/Linux-PAM/modules/pam_rootok/Makefile.in index 03128f8d..21fd8438 100644 --- a/Linux-PAM/modules/pam_rootok/Makefile.in +++ b/Linux-PAM/modules/pam_rootok/Makefile.in @@ -65,7 +65,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_rootok_la_LIBADD = +pam_rootok_la_DEPENDENCIES = pam_rootok_la_SOURCES = pam_rootok.c pam_rootok_la_OBJECTS = pam_rootok.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -176,6 +176,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -254,9 +255,9 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include \ -I$(top_srcdir)/libpamc/include $(am__append_1) -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam @LIBSELINUX@ $(am__append_2) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_2) securelib_LTLIBRARIES = pam_rootok.la +pam_rootok_la_LIBADD = -L$(top_builddir)/libpam -lpam @LIBSELINUX@ @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README all: all-am diff --git a/Linux-PAM/modules/pam_securetty/Makefile.am b/Linux-PAM/modules/pam_securetty/Makefile.am index ca97ef4d..dd8d9473 100644 --- a/Linux-PAM/modules/pam_securetty/Makefile.am +++ b/Linux-PAM/modules/pam_securetty/Makefile.am @@ -15,13 +15,13 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_securetty.la +pam_securetty_la_LIBADD = -L$(top_builddir)/libpam -lpam if ENABLE_REGENERATE_MAN noinst_DATA = README diff --git a/Linux-PAM/modules/pam_securetty/Makefile.in b/Linux-PAM/modules/pam_securetty/Makefile.in index 763404f5..9c67545e 100644 --- a/Linux-PAM/modules/pam_securetty/Makefile.in +++ b/Linux-PAM/modules/pam_securetty/Makefile.in @@ -64,7 +64,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_securetty_la_LIBADD = +pam_securetty_la_DEPENDENCIES = pam_securetty_la_SOURCES = pam_securetty.c pam_securetty_la_OBJECTS = pam_securetty.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -252,9 +253,9 @@ XMLS = README.xml pam_securetty.8.xml securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_securetty.la +pam_securetty_la_LIBADD = -L$(top_builddir)/libpam -lpam @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README all: all-am diff --git a/Linux-PAM/modules/pam_selinux/Makefile.am b/Linux-PAM/modules/pam_selinux/Makefile.am index ee2773e9..d11b507c 100644 --- a/Linux-PAM/modules/pam_selinux/Makefile.am +++ b/Linux-PAM/modules/pam_selinux/Makefile.am @@ -19,15 +19,15 @@ secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ -I$(top_srcdir)/libpam_misc/include -AM_LDFLAGS = -no-undefined \ - -L$(top_builddir)/libpam -lpam @LIBSELINUX@ -pam_selinux_check_LDFLAGS = $(AM_LDFLAGS) -L$(top_builddir)/libpam_misc -lpam_misc +pam_selinux_check_LDFLAGS = $(AM_LDFLAGS) \ + -L$(top_builddir)/libpam -lpam \ + -L$(top_builddir)/libpam_misc -lpam_misc -pam_selinux_la_LDFLAGS = $(AM_LDFLAGS) +pam_selinux_la_LIBADD = -L$(top_builddir)/libpam -lpam @LIBSELINUX@ +pam_selinux_la_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING - pam_selinux_la_LDFLAGS += -avoid-version -module \ - -Wl,--version-script=$(srcdir)/../modules.map + pam_selinux_la_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif if HAVE_LIBSELINUX diff --git a/Linux-PAM/modules/pam_selinux/Makefile.in b/Linux-PAM/modules/pam_selinux/Makefile.in index 05321ab8..5868eb56 100644 --- a/Linux-PAM/modules/pam_selinux/Makefile.in +++ b/Linux-PAM/modules/pam_selinux/Makefile.in @@ -38,9 +38,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -@HAVE_VERSIONING_TRUE@am__append_1 = -avoid-version -module \ -@HAVE_VERSIONING_TRUE@ -Wl,--version-script=$(srcdir)/../modules.map - +@HAVE_VERSIONING_TRUE@am__append_1 = -Wl,--version-script=$(srcdir)/../modules.map @HAVE_LIBSELINUX_TRUE@noinst_PROGRAMS = pam_selinux_check$(EXEEXT) subdir = modules/pam_selinux DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in @@ -68,7 +66,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_selinux_la_LIBADD = +pam_selinux_la_DEPENDENCIES = pam_selinux_la_SOURCES = pam_selinux.c pam_selinux_la_OBJECTS = pam_selinux.lo pam_selinux_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -190,6 +188,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -271,11 +270,13 @@ secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ -I$(top_srcdir)/libpam_misc/include -AM_LDFLAGS = -no-undefined \ - -L$(top_builddir)/libpam -lpam @LIBSELINUX@ +pam_selinux_check_LDFLAGS = $(AM_LDFLAGS) \ + -L$(top_builddir)/libpam -lpam \ + -L$(top_builddir)/libpam_misc -lpam_misc -pam_selinux_check_LDFLAGS = $(AM_LDFLAGS) -L$(top_builddir)/libpam_misc -lpam_misc -pam_selinux_la_LDFLAGS = $(AM_LDFLAGS) $(am__append_1) +pam_selinux_la_LIBADD = -L$(top_builddir)/libpam -lpam @LIBSELINUX@ +pam_selinux_la_LDFLAGS = -no-undefined -avoid-version -module \ + $(am__append_1) @HAVE_LIBSELINUX_TRUE@securelib_LTLIBRARIES = pam_selinux.la @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README pam_selinux.8 all: all-am diff --git a/Linux-PAM/modules/pam_shells/Makefile.am b/Linux-PAM/modules/pam_shells/Makefile.am index 03ac8b15..543e01b4 100644 --- a/Linux-PAM/modules/pam_shells/Makefile.am +++ b/Linux-PAM/modules/pam_shells/Makefile.am @@ -15,13 +15,13 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_shells.la +pam_shells_la_LIBADD = -L$(top_builddir)/libpam -lpam if ENABLE_REGENERATE_MAN noinst_DATA = README diff --git a/Linux-PAM/modules/pam_shells/Makefile.in b/Linux-PAM/modules/pam_shells/Makefile.in index f8779d1a..2faa7c54 100644 --- a/Linux-PAM/modules/pam_shells/Makefile.in +++ b/Linux-PAM/modules/pam_shells/Makefile.in @@ -64,7 +64,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_shells_la_LIBADD = +pam_shells_la_DEPENDENCIES = pam_shells_la_SOURCES = pam_shells.c pam_shells_la_OBJECTS = pam_shells.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -252,9 +253,9 @@ TESTS = tst-pam_shells securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_shells.la +pam_shells_la_LIBADD = -L$(top_builddir)/libpam -lpam @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README all: all-am diff --git a/Linux-PAM/modules/pam_stress/Makefile.am b/Linux-PAM/modules/pam_stress/Makefile.am index 64fe516f..b5f80938 100644 --- a/Linux-PAM/modules/pam_stress/Makefile.am +++ b/Linux-PAM/modules/pam_stress/Makefile.am @@ -12,9 +12,9 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_stress.la +pam_stress_la_LIBADD = -L$(top_builddir)/libpam -lpam diff --git a/Linux-PAM/modules/pam_stress/Makefile.in b/Linux-PAM/modules/pam_stress/Makefile.in index d1dca7bc..85580760 100644 --- a/Linux-PAM/modules/pam_stress/Makefile.in +++ b/Linux-PAM/modules/pam_stress/Makefile.in @@ -63,7 +63,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_stress_la_LIBADD = +pam_stress_la_DEPENDENCIES = pam_stress_la_SOURCES = pam_stress.c pam_stress_la_OBJECTS = pam_stress.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -170,6 +170,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -245,9 +246,9 @@ TESTS = tst-pam_stress securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_stress.la +pam_stress_la_LIBADD = -L$(top_builddir)/libpam -lpam all: all-am .SUFFIXES: diff --git a/Linux-PAM/modules/pam_succeed_if/Makefile.am b/Linux-PAM/modules/pam_succeed_if/Makefile.am index d97f4c1d..0394f42d 100644 --- a/Linux-PAM/modules/pam_succeed_if/Makefile.am +++ b/Linux-PAM/modules/pam_succeed_if/Makefile.am @@ -16,13 +16,13 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_succeed_if.la +pam_succeed_if_la_LIBADD = -L$(top_builddir)/libpam -lpam if ENABLE_REGENERATE_MAN noinst_DATA = README diff --git a/Linux-PAM/modules/pam_succeed_if/Makefile.in b/Linux-PAM/modules/pam_succeed_if/Makefile.in index a5090537..890024cb 100644 --- a/Linux-PAM/modules/pam_succeed_if/Makefile.in +++ b/Linux-PAM/modules/pam_succeed_if/Makefile.in @@ -64,7 +64,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_succeed_if_la_LIBADD = +pam_succeed_if_la_DEPENDENCIES = pam_succeed_if_la_SOURCES = pam_succeed_if.c pam_succeed_if_la_OBJECTS = pam_succeed_if.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -252,9 +253,9 @@ XMLS = README.xml pam_succeed_if.8.xml securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_succeed_if.la +pam_succeed_if_la_LIBADD = -L$(top_builddir)/libpam -lpam @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README all: all-am diff --git a/Linux-PAM/modules/pam_succeed_if/pam_succeed_if.c b/Linux-PAM/modules/pam_succeed_if/pam_succeed_if.c index 4f33ba2e..06cb5d6a 100644 --- a/Linux-PAM/modules/pam_succeed_if/pam_succeed_if.c +++ b/Linux-PAM/modules/pam_succeed_if/pam_succeed_if.c @@ -191,13 +191,19 @@ static int evaluate_inlist(const char *left, const char *right) { char *p; - if ((p=strstr(right, left)) == NULL) - return PAM_AUTH_ERR; - if (p == right || *(p-1) == ':') { /* ':' is a list separator */ - p += strlen(left); - if (*p == '\0' || *p == ':') { - return PAM_SUCCESS; + /* Don't care about left containing ':'. */ + while ((p=strstr(right, left)) != NULL) { + if (p == right || *(p-1) == ':') { /* ':' is a list separator */ + p += strlen(left); + if (*p == '\0' || *p == ':') { + return PAM_SUCCESS; + } } + right = strchr(p, ':'); + if (right == NULL) + break; + else + ++right; } return PAM_AUTH_ERR; } diff --git a/Linux-PAM/modules/pam_tally/Makefile.am b/Linux-PAM/modules/pam_tally/Makefile.am index ffb88886..4fad738f 100644 --- a/Linux-PAM/modules/pam_tally/Makefile.am +++ b/Linux-PAM/modules/pam_tally/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2006 Thorsten Kukuk <kukuk@suse.de> +# Copyright (c) 2005, 2006, 2007 Thorsten Kukuk <kukuk@thkukuk.de> # CLEANFILES = *~ @@ -18,8 +18,8 @@ noinst_HEADERS = faillog.h AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -pam_tally_la_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +pam_tally_la_LDFLAGS = -no-undefined -avoid-version -module +pam_tally_la_LIBADD = -L$(top_builddir)/libpam -lpam if HAVE_VERSIONING pam_tally_la_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif @@ -28,7 +28,7 @@ securelib_LTLIBRARIES = pam_tally.la sbin_PROGRAMS = pam_tally pam_tally_SOURCES = pam_tally_app.c -pam_tally_LDFLAGS = -L$(top_builddir)/libpam -lpam +pam_tally_LDADD = -L$(top_builddir)/libpam -lpam if ENABLE_REGENERATE_MAN noinst_DATA = README diff --git a/Linux-PAM/modules/pam_tally/Makefile.in b/Linux-PAM/modules/pam_tally/Makefile.in index 631d79c4..b3ee2698 100644 --- a/Linux-PAM/modules/pam_tally/Makefile.in +++ b/Linux-PAM/modules/pam_tally/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # -# Copyright (c) 2005, 2006 Thorsten Kukuk <kukuk@suse.de> +# Copyright (c) 2005, 2006, 2007 Thorsten Kukuk <kukuk@thkukuk.de> # @@ -69,7 +69,7 @@ am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(sbindir)" \ "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_tally_la_LIBADD = +pam_tally_la_DEPENDENCIES = pam_tally_la_SOURCES = pam_tally.c pam_tally_la_OBJECTS = pam_tally.lo pam_tally_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -79,10 +79,7 @@ sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(sbin_PROGRAMS) am_pam_tally_OBJECTS = pam_tally_app.$(OBJEXT) pam_tally_OBJECTS = $(am_pam_tally_OBJECTS) -pam_tally_LDADD = $(LDADD) -pam_tally_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(pam_tally_LDFLAGS) $(LDFLAGS) -o $@ +pam_tally_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -192,6 +189,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -271,10 +269,11 @@ secureconfdir = $(SCONFIGDIR) noinst_HEADERS = faillog.h AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include pam_tally_la_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) + $(am__append_1) +pam_tally_la_LIBADD = -L$(top_builddir)/libpam -lpam securelib_LTLIBRARIES = pam_tally.la pam_tally_SOURCES = pam_tally_app.c -pam_tally_LDFLAGS = -L$(top_builddir)/libpam -lpam +pam_tally_LDADD = -L$(top_builddir)/libpam -lpam @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README all: all-am @@ -368,7 +367,7 @@ clean-sbinPROGRAMS: done pam_tally$(EXEEXT): $(pam_tally_OBJECTS) $(pam_tally_DEPENDENCIES) @rm -f pam_tally$(EXEEXT) - $(pam_tally_LINK) $(pam_tally_OBJECTS) $(pam_tally_LDADD) $(LIBS) + $(LINK) $(pam_tally_OBJECTS) $(pam_tally_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) diff --git a/Linux-PAM/modules/pam_time/Makefile.am b/Linux-PAM/modules/pam_time/Makefile.am index 6c5ae3a2..9c63ee5e 100644 --- a/Linux-PAM/modules/pam_time/Makefile.am +++ b/Linux-PAM/modules/pam_time/Makefile.am @@ -16,11 +16,11 @@ secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ -DPAM_TIME_CONF=\"$(SCONFIGDIR)/time.conf\" -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif +pam_time_la_LIBADD = -L$(top_builddir)/libpam -lpam securelib_LTLIBRARIES = pam_time.la secureconf_DATA = time.conf diff --git a/Linux-PAM/modules/pam_time/Makefile.in b/Linux-PAM/modules/pam_time/Makefile.in index 9e3810bf..5058d1a8 100644 --- a/Linux-PAM/modules/pam_time/Makefile.in +++ b/Linux-PAM/modules/pam_time/Makefile.in @@ -65,7 +65,7 @@ am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man5dir)" \ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(secureconfdir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_time_la_LIBADD = +pam_time_la_DEPENDENCIES = pam_time_la_SOURCES = pam_time.c pam_time_la_OBJECTS = pam_time.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -178,6 +178,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -257,8 +258,8 @@ secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ -DPAM_TIME_CONF=\"$(SCONFIGDIR)/time.conf\" -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) +pam_time_la_LIBADD = -L$(top_builddir)/libpam -lpam securelib_LTLIBRARIES = pam_time.la secureconf_DATA = time.conf @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README diff --git a/Linux-PAM/modules/pam_time/pam_time.c b/Linux-PAM/modules/pam_time/pam_time.c index 43b716f0..56b418f4 100644 --- a/Linux-PAM/modules/pam_time/pam_time.c +++ b/Linux-PAM/modules/pam_time/pam_time.c @@ -59,7 +59,7 @@ shift_bytes(char *mem, int from, int by) } static int -read_field(pam_handle_t *pamh, int fd, char **buf, int *from, int *to) +read_field(const pam_handle_t *pamh, int fd, char **buf, int *from, int *to) { /* is buf set ? */ @@ -137,6 +137,7 @@ read_field(pam_handle_t *pamh, int fd, char **buf, int *from, int *to) switch ((*buf)[i]) { int j,c; case '#': + c = 0; for (j=i; j < *to && (c = (*buf)[j]) != '\n'; ++j); if (j >= *to) { (*buf)[*to = ++i] = '\0'; @@ -324,6 +325,13 @@ is_same(pam_handle_t *pamh UNUSED, const void *A, const char *b, return FALSE; } } + + /* Ok, we know that b is a substring from A and does not contain + wildcards, but now the length of both strings must be the same, + too. */ + if (strlen (a) != strlen(b)) + return FALSE; + return ( !len ); } diff --git a/Linux-PAM/modules/pam_umask/Makefile.am b/Linux-PAM/modules/pam_umask/Makefile.am index 56fa63b4..53a666aa 100644 --- a/Linux-PAM/modules/pam_umask/Makefile.am +++ b/Linux-PAM/modules/pam_umask/Makefile.am @@ -16,13 +16,13 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif securelib_LTLIBRARIES = pam_umask.la +pam_umask_la_LIBADD = -L$(top_builddir)/libpam -lpam if ENABLE_REGENERATE_MAN noinst_DATA = README diff --git a/Linux-PAM/modules/pam_umask/Makefile.in b/Linux-PAM/modules/pam_umask/Makefile.in index 45dd9509..54e8868f 100644 --- a/Linux-PAM/modules/pam_umask/Makefile.in +++ b/Linux-PAM/modules/pam_umask/Makefile.in @@ -64,7 +64,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_umask_la_LIBADD = +pam_umask_la_DEPENDENCIES = pam_umask_la_SOURCES = pam_umask.c pam_umask_la_OBJECTS = pam_umask.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -252,9 +253,9 @@ TESTS = tst-pam_umask securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) securelib_LTLIBRARIES = pam_umask.la +pam_umask_la_LIBADD = -L$(top_builddir)/libpam -lpam @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README all: all-am diff --git a/Linux-PAM/modules/pam_unix/Makefile.am b/Linux-PAM/modules/pam_unix/Makefile.am index 83b6c0b3..f9d77f4c 100644 --- a/Linux-PAM/modules/pam_unix/Makefile.am +++ b/Linux-PAM/modules/pam_unix/Makefile.am @@ -25,12 +25,12 @@ if HAVE_LIBCRACK AM_CFLAGS += -D"USE_CRACKLIB" endif -pam_unix_la_LDFLAGS = -no-undefined -avoid-version -module \ - @LIBCRACK@ @LIBNSL@ -L$(top_builddir)/libpam -lpam \ - @LIBCRYPT@ @LIBSELINUX@ +pam_unix_la_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING pam_unix_la_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif +pam_unix_la_LIBADD = @LIBCRACK@ @LIBNSL@ -L$(top_builddir)/libpam -lpam \ + @LIBCRYPT@ @LIBSELINUX@ securelib_LTLIBRARIES = pam_unix.la @@ -46,12 +46,12 @@ pam_unix_la_SOURCES = bigcrypt.c pam_unix_acct.c \ bigcrypt_SOURCES = bigcrypt.c bigcrypt_main.c bigcrypt_CFLAGS = $(AM_CFLAGS) -bigcrypt_LDFLAGS = @LIBCRYPT@ +bigcrypt_LDADD = @LIBCRYPT@ unix_chkpwd_SOURCES = unix_chkpwd.c md5_good.c md5_broken.c bigcrypt.c unix_chkpwd_CFLAGS = $(AM_CFLAGS) @PIE_CFLAGS@ -unix_chkpwd_LDFLAGS = @PIE_LDFLAGS@ -L$(top_builddir)/libpam -lpam \ - @LIBCRYPT@ @LIBSELINUX@ +unix_chkpwd_LDFLAGS = @PIE_LDFLAGS@ +unix_chkpwd_LDADD = -L$(top_builddir)/libpam -lpam @LIBCRYPT@ @LIBSELINUX@ if ENABLE_REGENERATE_MAN noinst_DATA = README diff --git a/Linux-PAM/modules/pam_unix/Makefile.in b/Linux-PAM/modules/pam_unix/Makefile.in index e3b34afb..c566522c 100644 --- a/Linux-PAM/modules/pam_unix/Makefile.in +++ b/Linux-PAM/modules/pam_unix/Makefile.in @@ -72,7 +72,7 @@ am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(sbindir)" \ "$(DESTDIR)$(man8dir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_unix_la_LIBADD = +pam_unix_la_DEPENDENCIES = am_pam_unix_la_OBJECTS = bigcrypt.lo pam_unix_acct.lo pam_unix_auth.lo \ pam_unix_passwd.lo pam_unix_sess.lo support.lo yppasswd_xdr.lo \ md5_good.lo md5_broken.lo @@ -85,16 +85,16 @@ PROGRAMS = $(noinst_PROGRAMS) $(sbin_PROGRAMS) am_bigcrypt_OBJECTS = bigcrypt-bigcrypt.$(OBJEXT) \ bigcrypt-bigcrypt_main.$(OBJEXT) bigcrypt_OBJECTS = $(am_bigcrypt_OBJECTS) -bigcrypt_LDADD = $(LDADD) +bigcrypt_DEPENDENCIES = bigcrypt_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(bigcrypt_CFLAGS) $(CFLAGS) \ - $(bigcrypt_LDFLAGS) $(LDFLAGS) -o $@ + --mode=link $(CCLD) $(bigcrypt_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ am_unix_chkpwd_OBJECTS = unix_chkpwd-unix_chkpwd.$(OBJEXT) \ unix_chkpwd-md5_good.$(OBJEXT) \ unix_chkpwd-md5_broken.$(OBJEXT) \ unix_chkpwd-bigcrypt.$(OBJEXT) unix_chkpwd_OBJECTS = $(am_unix_chkpwd_OBJECTS) -unix_chkpwd_LDADD = $(LDADD) +unix_chkpwd_DEPENDENCIES = unix_chkpwd_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(unix_chkpwd_CFLAGS) \ $(CFLAGS) $(unix_chkpwd_LDFLAGS) $(LDFLAGS) -o $@ @@ -209,6 +209,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -291,9 +292,11 @@ AM_CFLAGS = -I$(top_srcdir)/libpam/include \ -I$(top_srcdir)/libpamc/include \ -DCHKPWD_HELPER=\"$(sbindir)/unix_chkpwd\" $(am__append_1) \ $(am__append_2) -pam_unix_la_LDFLAGS = -no-undefined -avoid-version -module @LIBCRACK@ \ - @LIBNSL@ -L$(top_builddir)/libpam -lpam @LIBCRYPT@ \ - @LIBSELINUX@ $(am__append_3) +pam_unix_la_LDFLAGS = -no-undefined -avoid-version -module \ + $(am__append_3) +pam_unix_la_LIBADD = @LIBCRACK@ @LIBNSL@ -L$(top_builddir)/libpam -lpam \ + @LIBCRYPT@ @LIBSELINUX@ + securelib_LTLIBRARIES = pam_unix.la noinst_HEADERS = md5.h support.h yppasswd.h bigcrypt.h pam_unix_la_SOURCES = bigcrypt.c pam_unix_acct.c \ @@ -302,12 +305,11 @@ pam_unix_la_SOURCES = bigcrypt.c pam_unix_acct.c \ bigcrypt_SOURCES = bigcrypt.c bigcrypt_main.c bigcrypt_CFLAGS = $(AM_CFLAGS) -bigcrypt_LDFLAGS = @LIBCRYPT@ +bigcrypt_LDADD = @LIBCRYPT@ unix_chkpwd_SOURCES = unix_chkpwd.c md5_good.c md5_broken.c bigcrypt.c unix_chkpwd_CFLAGS = $(AM_CFLAGS) @PIE_CFLAGS@ -unix_chkpwd_LDFLAGS = @PIE_LDFLAGS@ -L$(top_builddir)/libpam -lpam \ - @LIBCRYPT@ @LIBSELINUX@ - +unix_chkpwd_LDFLAGS = @PIE_LDFLAGS@ +unix_chkpwd_LDADD = -L$(top_builddir)/libpam -lpam @LIBCRYPT@ @LIBSELINUX@ @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README all: all-am diff --git a/Linux-PAM/modules/pam_unix/support.c b/Linux-PAM/modules/pam_unix/support.c index fc95f2c0..1472b966 100644 --- a/Linux-PAM/modules/pam_unix/support.c +++ b/Linux-PAM/modules/pam_unix/support.c @@ -665,12 +665,12 @@ int _unix_verify_password(pam_handle_t * pamh, const char *name if (on(UNIX_AUDIT, ctrl)) { /* this might be a typo and the user has given a password instead of a username. Careful with this. */ - pam_syslog(pamh, LOG_ALERT, + pam_syslog(pamh, LOG_WARNING, "check pass; user (%s) unknown", name); } else { name = NULL; if (on(UNIX_DEBUG, ctrl) || pwd == NULL) { - pam_syslog(pamh, LOG_ALERT, + pam_syslog(pamh, LOG_WARNING, "check pass; user unknown"); } else { /* don't log failure as another pam module can succeed */ diff --git a/Linux-PAM/modules/pam_unix/unix_chkpwd.c b/Linux-PAM/modules/pam_unix/unix_chkpwd.c index 236ad5c2..486a8498 100644 --- a/Linux-PAM/modules/pam_unix/unix_chkpwd.c +++ b/Linux-PAM/modules/pam_unix/unix_chkpwd.c @@ -179,7 +179,7 @@ static int _unix_verify_password(const char *name, const char *p, int nullok) } } if (pwd == NULL || salt == NULL) { - _log_err(LOG_ALERT, "check pass; user unknown"); + _log_err(LOG_WARNING, "check pass; user unknown"); p = NULL; return PAM_USER_UNKNOWN; } diff --git a/Linux-PAM/modules/pam_userdb/Makefile.in b/Linux-PAM/modules/pam_userdb/Makefile.in index 1c439359..2698b22b 100644 --- a/Linux-PAM/modules/pam_userdb/Makefile.in +++ b/Linux-PAM/modules/pam_userdb/Makefile.in @@ -179,6 +179,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ diff --git a/Linux-PAM/modules/pam_warn/Makefile.in b/Linux-PAM/modules/pam_warn/Makefile.in index aa0c0adf..f2a3d051 100644 --- a/Linux-PAM/modules/pam_warn/Makefile.in +++ b/Linux-PAM/modules/pam_warn/Makefile.in @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ diff --git a/Linux-PAM/modules/pam_wheel/Makefile.in b/Linux-PAM/modules/pam_wheel/Makefile.in index 2dd057d3..0f7b9db6 100644 --- a/Linux-PAM/modules/pam_wheel/Makefile.in +++ b/Linux-PAM/modules/pam_wheel/Makefile.in @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ diff --git a/Linux-PAM/modules/pam_xauth/Makefile.in b/Linux-PAM/modules/pam_xauth/Makefile.in index 944d6778..6e5ea64e 100644 --- a/Linux-PAM/modules/pam_xauth/Makefile.in +++ b/Linux-PAM/modules/pam_xauth/Makefile.in @@ -175,6 +175,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ diff --git a/Linux-PAM/modules/pam_xauth/pam_xauth.c b/Linux-PAM/modules/pam_xauth/pam_xauth.c index 3772bd06..1135d4b7 100644 --- a/Linux-PAM/modules/pam_xauth/pam_xauth.c +++ b/Linux-PAM/modules/pam_xauth/pam_xauth.c @@ -63,6 +63,11 @@ #define XAUTHDEF ".Xauthority" #define XAUTHTMP ".xauthXXXXXX" +/* Hurd compatibility */ +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif + /* Possible paths to xauth executable */ static const char * const xauthpaths[] = { #ifdef PAM_PATH_XAUTH @@ -573,6 +578,7 @@ pam_sm_open_session (pam_handle_t *pamh, int flags UNUSED, "can't set environment variable '%s'", xauthority); putenv (xauthority); /* The environment owns this string now. */ + xauthority = NULL; /* Don't free environment variables. */ /* set $DISPLAY in pam handle to make su - work */ { |