From 6cfd0dc01d967e15c09e1f73a722663c416be558a4e2e50ec410bcc927705afd Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Sat, 6 Sep 2008 01:00:51 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pam_krb5?expand=0&rev=20 --- pam_krb5-2.3.1-post.dif | 94 +++++++++++++++++++++++++++++++++++++++++ pam_krb5.changes | 7 +++ pam_krb5.spec | 6 ++- 3 files changed, 106 insertions(+), 1 deletion(-) diff --git a/pam_krb5-2.3.1-post.dif b/pam_krb5-2.3.1-post.dif index 0087ed0..293a8d5 100644 --- a/pam_krb5-2.3.1-post.dif +++ b/pam_krb5-2.3.1-post.dif @@ -32,3 +32,97 @@ Index: src/v5.c } else { warn("error opening default ccache"); i = KRB5_CC_NOTFOUND; +Index: configure.ac +=================================================================== +--- configure.ac.orig ++++ configure.ac +@@ -360,6 +360,18 @@ if test x$keyutils != xno ; then + AC_SUBST(KEYUTILS_LIBS) + fi + ++AC_MSG_CHECKING(whether to link directly with libpam) ++AC_ARG_WITH(libpam, ++[AC_HELP_STRING(--without-libpam,[Refrain from linking directly with libpam.])], ++ [with_libpam=$withval], ++ [with_libpam=yes]) ++if test "$with_libpam" != no ; then ++ AC_MSG_RESULT(yes) ++else ++ AC_MSG_RESULT(no) ++fi ++AM_CONDITIONAL(WITH_DIRECT_LIBPAM,test "$with_libpam" != no) ++ + AC_ARG_ENABLE(default-realm,AC_HELP_STRING([--enable-default-realm=REALM],[last-ditch fallback realm (default is EXAMPLE.COM)]),default_realm=$enableval,default_realm=EXAMPLE.COM) + AC_DEFINE_UNQUOTED(DEFAULT_REALM,"$default_realm",[Define to the realm name which will be used if no realm is given as a parameter and none is given in krb5.conf.]) + AC_MSG_RESULT([Using "$default_realm" as the default realm.]) +Index: src/Makefile.am +=================================================================== +--- src/Makefile.am.orig ++++ src/Makefile.am +@@ -21,6 +21,12 @@ man_MANS += afs5log.1 + noinst_PROGRAMS += pagsh + endif + ++if WITH_DIRECT_LIBPAM ++DIRECT_LIBPAM = -lpam ++else ++DIRECT_LIBPAM = ++endif ++ + libpam_krb5_la_SOURCES = \ + conv.c \ + conv.h \ +@@ -47,7 +53,7 @@ libpam_krb5_la_SOURCES = \ + v5.h + + pam_krb5_la_LDFLAGS = -avoid-version -export-dynamic -module -export-symbols-regex 'pam_sm.*' @SYMBOLIC_LINKER_FLAG@ +-pam_krb5_la_LIBADD = libpam_krb5.la @KRB5_LIBS@ @KRB4_LIBS@ @KEYUTILS_LIBS@ ++pam_krb5_la_LIBADD = libpam_krb5.la @KRB5_LIBS@ @KRB4_LIBS@ @KEYUTILS_LIBS@ $(DIRECT_LIBPAM) + pam_krb5_la_SOURCES = \ + initopts.c \ + initopts.h \ +Index: src/options.c +=================================================================== +--- src/options.c.orig ++++ src/options.c +@@ -105,7 +105,8 @@ option_b(int argc, PAM_KRB5_MAYBE_CONST + ret = -1; + + /* configured service yes */ +- if ((ret == -1) && (service != NULL) && (strlen(service) > 0)) { ++ if ((ret == -1) && (realm != NULL) && ++ (service != NULL) && (strlen(service) > 0)) { + list = option_l(argc, argv, ctx, realm, s, ""); + for (i = 0; ((list != NULL) && (list[i] != NULL)); i++) { + if (strcmp(list[i], service) == 0) { +@@ -116,7 +117,8 @@ option_b(int argc, PAM_KRB5_MAYBE_CONST + } + + /* configured service no */ +- if ((ret == -1) && (service != NULL) && (strlen(service) > 0)) { ++ if ((ret == -1) && (realm != NULL) && ++ (service != NULL) && (strlen(service) > 0)) { + for (i = 0; i < (sizeof(prefix) / sizeof(prefix[0])); i++) { + nots = malloc(strlen(prefix[i]) + strlen(s) + 1); + if (nots != NULL) { +@@ -142,7 +144,7 @@ option_b(int argc, PAM_KRB5_MAYBE_CONST + } + + /* configured boolean */ +- if (ret == -1) { ++ if ((ret == -1) && (realm != NULL)) { + v5_appdefault_boolean(ctx, realm, s, -1, &ret); + } + +@@ -331,6 +333,11 @@ _pam_krb5_options_init(pam_handle_t *pam + _pam_krb5_get_item_text(pamh, PAM_SERVICE, &service); + } + ++ /* command-line option */ ++ options->debug = option_b(argc, argv, ctx, NULL, ++ service, NULL, NULL, ++ "debug", 0); ++ + for (i = 0; i < argc; i++) { + if (strncmp(argv[i], "realm=", 6) == 0) { + if (options->realm != NULL) { diff --git a/pam_krb5.changes b/pam_krb5.changes index 4eb7abe..1dc13c6 100644 --- a/pam_krb5.changes +++ b/pam_krb5.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Sep 4 10:21:53 CEST 2008 - mc@suse.de + +- if the realm name given to us is NULL, don't bother consulting + the appdefaults +- check for the "debug" flag earlier + ------------------------------------------------------------------- Mon Sep 1 11:19:22 CEST 2008 - mc@suse.de diff --git a/pam_krb5.spec b/pam_krb5.spec index 283b8e6..93d2966 100644 --- a/pam_krb5.spec +++ b/pam_krb5.spec @@ -26,7 +26,7 @@ Group: Productivity/Networking/Security Provides: pam_krb AutoReqProv: on Version: 2.3.1 -Release: 28 +Release: 30 Summary: PAM Module for Kerberos Authentication Url: http://sourceforge.net/projects/pam-krb5/ Source: pam_krb5-%{version}-%{PAM_RELEASE}.tar.bz2 @@ -93,6 +93,10 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) /usr/bin/afs5log %changelog +* Thu Sep 04 2008 mc@suse.de +- if the realm name given to us is NULL, don't bother consulting + the appdefaults +- check for the "debug" flag earlier * Mon Sep 01 2008 mc@suse.de - validate new fetched credentials * Fri Jun 20 2008 mc@suse.de