Changeset 855 in openpam for branches/nooath


Ignore:
Timestamp:
Jan 27, 2015, 10:33:15 PM (6 years ago)
Author:
Dag-Erling Smørgrav
Message:

merge r787,r830-r840,r845,r852-r853: build and packaging improvements
merge r854: silence all cast-qual warnings except in test suite

Location:
branches/nooath
Files:
1 deleted
23 edited

Legend:

Unmodified
Added
Removed
  • branches/nooath

  • branches/nooath/CREDITS

    r815 r855  
    2222        Daniel Richard G. <skunk@iskunk.org>
    2323        Darren J. Moffat <darren.moffat@sun.com>
     24        Dimitry Andric <dim@freebsd.org>
    2425        Dmitry V. Levin <ldv@altlinux.org>
    2526        Don Lewis <truckman@freebsd.org>
  • branches/nooath/README

    r807 r855  
    88compatibility.
    99
    10 These are some of OpenPAM's features:
    11 
    12    - Implements the complete PAM API as described in the original PAM
    13      paper and in OSF-RFC 86.0; this corresponds to the full XSSO API
    14      except for mappings and secondary authentication.  Also
    15      implements some extensions found in Solaris 9.
    16 
    17    - Extends the API with several useful and time-saving functions.
    18 
    19    - Performs strict checking of return values from service modules.
    20 
    21    - Reads configuration from /etc/pam.d/, /etc/pam.conf,
    22      /usr/local/etc/pam.d/ and /usr/local/etc/pam.conf, in that order;
    23      this will be made configurable in a future release.
    24 
    2510Please direct bug reports and inquiries to <des@des.no>.
  • branches/nooath/autogen.des

    r714 r855  
    1111export CONFIG_SHELL=/bin/sh
    1212
     13# BullseyeCoverage needs to know exactly which compiler we're using
     14if [ -z "$CC" -a -z "$CPP" -a -z "$CXX" ] ; then
     15        if $(which clang clang++ >/dev/null) ; then
     16                export CC=${CC:-clang}
     17                export CPP=${CPP:-clang -E}
     18                export CXX=${CXX:-clang++}
     19        elif $(which gcc g++ >/dev/null) ; then
     20                export CC=${CC:-gcc}
     21                export CPP=${CPP:-gcc -E}
     22                export CXX=${CXX:-g++}
     23        fi
     24fi
     25
    1326./configure \
    1427        --with-doc \
  • branches/nooath/bin/openpam_dump_policy/Makefile.am

    r648 r855  
    55noinst_PROGRAMS = openpam_dump_policy
    66openpam_dump_policy_SOURCES = openpam_dump_policy.c
     7if WITH_SYSTEM_LIBPAM
     8openpam_dump_policy_LDADD = $(SYSTEM_LIBPAM)
     9else
    710openpam_dump_policy_LDADD = $(top_builddir)/lib/libpam/libpam.la
     11endif
  • branches/nooath/bin/pamtest/Makefile.am

    r648 r855  
    55bin_PROGRAMS = pamtest
    66pamtest_SOURCES = pamtest.c
     7if WITH_SYSTEM_LIBPAM
     8pamtest_LDADD = $(SYSTEM_LIBPAM)
     9else
    710pamtest_LDADD = $(top_builddir)/lib/libpam/libpam.la
     11endif
    812
    913dist_man1_MANS = pamtest.1
  • branches/nooath/bin/su/Makefile.am

    r648 r855  
    55bin_PROGRAMS = su
    66su_SOURCES = su.c
     7if WITH_SYSTEM_LIBPAM
     8su_LDADD = $(SYSTEM_LIBPAM)
     9else
    710su_LDADD = $(top_builddir)/lib/libpam/libpam.la
     11endif
    812
    913dist_man1_MANS = su.1
  • branches/nooath/configure.ac

    r807 r855  
    8080AM_CONDITIONAL([WITH_SU], [test x"$with_su" = x"yes"])
    8181
     82AC_ARG_WITH(system-libpam,
     83    AC_HELP_STRING([--with-system-libpam], [use system libpam]),
     84    [],
     85    [with_system_libpam=no])
     86AM_CONDITIONAL([WITH_SYSTEM_LIBPAM], [test x"$with_system_libpam" = x"yes"])
     87
     88AC_ARG_WITH(system-liboath,
     89    AC_HELP_STRING([--with-system-liboath], [use system liboath]),
     90    [],
     91    [with_system_liboath=no])
     92AM_CONDITIONAL([WITH_SYSTEM_LIBOATH], [test x"$with_system_liboath" = x"yes"])
     93
    8294AC_CHECK_HEADERS([crypt.h])
    8395
     
    109121AC_SUBST(CRYPTO_LIBS)
    110122
     123saved_LIBS="${LIBS}"
     124LIBS=""
     125AC_CHECK_LIB([pam], [pam_start])
     126SYSTEM_LIBPAM="${LIBS}"
     127LIBS="${saved_LIBS}"
     128AC_SUBST(SYSTEM_LIBPAM)
     129
     130saved_LIBS="${LIBS}"
     131LIBS=""
     132AC_CHECK_LIB([oath], [oath_key_alloc])
     133SYSTEM_LIBOATH="${LIBS}"
     134LIBS="${saved_LIBS}"
     135AC_SUBST(SYSTEM_LIBOATH)
     136
    111137AC_ARG_ENABLE([developer-warnings],
    112138    AS_HELP_STRING([--enable-developer-warnings], [enable strict warnings (default is NO)]),
    113     [CFLAGS="${CFLAGS} -Wall -Wextra"])
     139    [CFLAGS="${CFLAGS} -Wall -Wextra -Wcast-qual"])
    114140AC_ARG_ENABLE([debugging-symbols],
    115141    AS_HELP_STRING([--enable-debugging-symbols], [enable debugging symbols (default is NO)]),
     
    137163    t/Makefile
    138164])
    139 AC_CONFIG_FILES([pamgdb],[chmod +x pamgdb])
    140165AC_CONFIG_FILES([mkpkgng],[chmod +x mkpkgng])
    141166AC_OUTPUT
  • branches/nooath/doc/man/Makefile.am

    r720 r855  
    6666ALLCMAN = $(PMAN) $(MMAN) $(OMAN)
    6767GENMAN = $(ALLCMAN) openpam.3 pam.3
     68endif
     69
     70ALLCMAN = $(PAMCMAN) $(OATHCMAN)
     71GENMAN = $(ALLCMAN) $(PAMXMAN) $(OATHXMAN)
    6872
    6973dist_man3_MANS = $(GENMAN) pam_conv.3
     
    7680
    7781LIBSRCDIR = $(top_srcdir)/lib/libpam
     82endif
    7883
    7984VPATH = $(LIBSRCDIR) $(srcdir)
  • branches/nooath/lib/Makefile.am

    r714 r855  
    11# $Id$
    22
    3 SUBDIRS = libpam
     3SUBDIRS =
     4
     5if !WITH_SYSTEM_LIBPAM
     6SUBDIRS += libpam
     7endif
  • branches/nooath/lib/libpam/Makefile.am

    r807 r855  
    8080        $(NULL)
    8181
    82 libpam_la_LDFLAGS = -no-undefined -version-info @LIB_MAJ@
    83 libpam_la_LIBADD = @DL_LIBS@
     82libpam_la_LDFLAGS = -no-undefined -version-info $(LIB_MAJ)
     83libpam_la_LIBADD = $(DL_LIBS)
    8484
    8585EXTRA_DIST = \
  • branches/nooath/lib/libpam/openpam_dispatch.c

    r807 r855  
    118118                            pam_sm_func_name[primitive], chain->module->path);
    119119                        r = (chain->module->func[primitive])(pamh, flags,
    120                             chain->optc, (const char **)chain->optv);
     120                            chain->optc, (const char **)(intptr_t)chain->optv);
    121121                        pamh->current = NULL;
    122122                        openpam_log(PAM_LOG_LIBDEBUG, "%s: %s(): %s",
  • branches/nooath/lib/libpam/openpam_load.c

    r664 r855  
    8585openpam_release_module(pam_module_t *module)
    8686{
     87
    8788        if (module == NULL)
    8889                return;
     
    105106openpam_destroy_chain(pam_chain_t *chain)
    106107{
     108
    107109        if (chain == NULL)
    108110                return;
  • branches/nooath/misc/gendoc.pl

    r736 r855  
    293293        s/\s*=($func)\b\s*/\n.Fn $1\n/gs;
    294294        s/\s*=($argnames)\b\s*/\n.Fa $1\n/gs;
    295         s/\s*=(struct \w+(?: \*)?)\b\s*/\n.Vt $1\n/gs;
     295        s/\s*=((?:enum|struct|union) \w+(?: \*)?)\b\s*/\n.Vt $1\n/gs;
    296296        s/\s*:([a-z][0-9a-z_]+)\b\s*/\n.Va $1\n/gs;
    297297        s/\s*;([a-z][0-9a-z_]+)\b\s*/\n.Dv $1\n/gs;
  • branches/nooath/mkpkgng.in

    r751 r855  
    6262#
    6363srcdir="@abs_top_srcdir@"
    64 [ -f "$srcdir/include/security/openpam.h" ] || \
    65     error "Unable to locate source directory."
    6664builddir="@abs_top_builddir@"
    6765cd "$srcdir"
     
    8482        svnversion=$(expr "$svnversion" : '\([0-9][0-9]*\)[A-Z]\{0,1\}$')
    8583        if [ -n "$svnversion" ] ; then
    86                 version="$version-r${svnversion}"
     84                package="$package-$version"
     85                version="r$svnversion"
    8786        fi
    8887fi
     
    116115
    117116#
     117# Compress man pages
     118#
     119find $tmproot -type d -name 'man[0-9]' |
     120while read mandir ; do
     121        find $mandir -type f -name '*.[0-9]' |
     122        while read manpage ; do
     123                gzip "$manpage"
     124        done
     125        find $mandir -type l -name '*.[0-9]' |
     126        while read manlink ; do
     127                ln -s "$(readlink $manlink).gz" "$manlink.gz"
     128        done
     129done
     130
     131#
    118132# Generate stub manifest
    119133#
     
    129143maintainer: @PACKAGE_BUGREPORT@
    130144prefix: @prefix@
    131 desc:
    132   OpenPAM is an open source PAM library that focuses on simplicity,
    133   correctness, and cleanliness.
    134  
    135   OpenPAM aims to gather the best features of Solaris PAM, XSSO and
    136   Linux-PAM, plus some innovations of its own.  In areas where these
    137   implementations disagree, OpenPAM tries to remain compatible with
    138   Solaris, at the expense of XSSO conformance and Linux-PAM
    139   compatibility.
    140 categories: local, security
     145categories: [ local, security ]
    141146EOF
     147cp "$srcdir/README" "$tmproot/+DESC"
    142148
    143149#
     
    146152info "Generating the file list."
    147153(
    148         echo "files:"
    149         find -s "$tmproot" -type f | while read file ; do
    150                 [ "$file" = "$manifest" ] && continue
     154        echo "files: {"
     155        find -s "$tmproot@prefix@" -type f -or -type l | while read file ; do
     156                case $file in
     157                *.la)
     158                        continue
     159                        ;;
     160                esac
    151161                mode=$(stat -f%p "$file" | cut -c 3-)
    152162                file="${file#$tmproot}"
    153163                echo "  $file: { uname: root, gname: wheel, perm: $mode }"
    154164        done
     165        echo "}"
    155166)>>"$manifest"
    156167
  • branches/nooath/modules/pam_deny/Makefile.am

    r690 r855  
    22
    33if CUSTOM_MODULES_DIR
    4 moduledir = @OPENPAM_MODULES_DIR@
     4moduledir = $(OPENPAM_MODULES_DIR)
    55else
    66moduledir = $(libdir)
     
    1111
    1212pam_deny_la_SOURCES = pam_deny.c
    13 pam_deny_la_LDFLAGS = -no-undefined -module -version-info @LIB_MAJ@ \
     13pam_deny_la_LDFLAGS = -no-undefined -module -version-info $(LIB_MAJ) \
    1414        -export-symbols-regex '^pam_sm_'
     15if WITH_SYSTEM_LIBPAM
     16pam_deny_la_LIBADD = $(SYSTEM_LIBPAM)
     17else
    1518pam_deny_la_LIBADD = $(top_builddir)/lib/libpam/libpam.la
     19endif
  • branches/nooath/modules/pam_permit/Makefile.am

    r690 r855  
    22
    33if CUSTOM_MODULES_DIR
    4 moduledir = @OPENPAM_MODULES_DIR@
     4moduledir = $(OPENPAM_MODULES_DIR)
    55else
    66moduledir = $(libdir)
     
    1111
    1212pam_permit_la_SOURCES = pam_permit.c
    13 pam_permit_la_LDFLAGS = -no-undefined -module -version-info @LIB_MAJ@ \
     13pam_permit_la_LDFLAGS = -no-undefined -module -version-info $(LIB_MAJ) \
    1414        -export-symbols-regex '^pam_sm_'
     15if WITH_SYSTEM_LIBPAM
     16pam_permit_la_LIBADD = $(SYSTEM_LIBPAM)
     17else
    1518pam_permit_la_LIBADD = $(top_builddir)/lib/libpam/libpam.la
     19endif
  • branches/nooath/modules/pam_unix/Makefile.am

    r690 r855  
    22
    33if CUSTOM_MODULES_DIR
    4 moduledir = @OPENPAM_MODULES_DIR@
     4moduledir = $(OPENPAM_MODULES_DIR)
    55else
    66moduledir = $(libdir)
     
    1111
    1212pam_unix_la_SOURCES = pam_unix.c
    13 pam_unix_la_LDFLAGS = -no-undefined -module -version-info @LIB_MAJ@ \
     13pam_unix_la_LDFLAGS = -no-undefined -module -version-info $(LIB_MAJ) \
    1414        -export-symbols-regex '^pam_sm_'
    15 pam_unix_la_LIBADD = $(top_builddir)/lib/libpam/libpam.la @CRYPT_LIBS@
     15if WITH_SYSTEM_LIBPAM
     16pam_unix_la_LIBADD = $(SYSTEM_LIBPAM)
     17else
     18pam_unix_la_LIBADD = $(top_builddir)/lib/libpam/libpam.la $(CRYPT_LIBS)
     19endif
  • branches/nooath/modules/pam_unix/pam_unix.c

    r648 r855  
    7575        struct passwd *pwd;
    7676        const char *user;
    77         char *crypt_password, *password;
     77        const char *crypt_password, *password;
    7878        int pam_err, retry;
    7979
     
    9999#ifdef OPENPAM
    100100                pam_err = pam_get_authtok(pamh, PAM_AUTHTOK,
    101                     (const char **)&password, NULL);
     101                    &password, NULL);
    102102#else
    103103                resp = NULL;
  • branches/nooath/t/Makefile.am

    r763 r855  
    1717
    1818# link with libpam and libt
    19 LDADD = libt.a $(top_builddir)/lib/libpam/libpam.la
     19LDADD = libt.a
     20if WITH_SYSTEM_LIBPAM
     21LDADD += $(SYSTEM_LIBPAM)
     22else
     23LDADD += $(top_builddir)/lib/libpam/libpam.la
     24endif
  • branches/nooath/t/t_openpam_ctype.c

    r763 r855  
    9696 */
    9797
    98 const struct t_test *t_plan[] = {
     98static const struct t_test *t_plan[] = {
    9999        T(t_oc_digit),
    100100        T(t_oc_xdigit),
  • branches/nooath/t/t_openpam_readlinev.c

    r826 r855  
    226226}
    227227
     228T_FUNC(line_continuation_within_whitespace, "line continuation within whitespace")
     229{
     230        struct t_file *tf;
     231        int ret;
     232
     233        tf = t_fopen(NULL);
     234        t_fprintf(tf, "%s \\\n %s\n", hello_world[0], hello_world[1]);
     235        t_frewind(tf);
     236        ret = orlv_expect(tf, hello_world, 2 /*lines*/, 0 /*eof*/) &&
     237            orlv_expect(tf, NULL, 0 /*lines*/, 1 /*eof*/);
     238        t_fclose(tf);
     239        return (ret);
     240}
     241
    228242
    229243
     
    293307 */
    294308
    295 const struct t_test *t_plan[] = {
     309static const struct t_test *t_plan[] = {
    296310        T(empty_input),
    297311        T(empty_line),
     
    300314        T(comment),
    301315        T(whitespace_before_comment),
     316        T(line_continuation_within_whitespace),
    302317
    303318        T(one_word),
  • branches/nooath/t/t_openpam_readword.c

    r829 r855  
    903903
    904904        tf = t_fopen(NULL);
    905         t_fprintf(tf, " \\\n \n");
    906         t_frewind(tf);
    907         ret = orw_expect(tf, NULL, 1 /*lines*/, 0 /*eof*/, 1 /*eol*/);
     905        t_fprintf(tf, "hello \\\n world\n");
     906        t_frewind(tf);
     907        ret = orw_expect(tf, "hello", 0 /*lines*/, 0 /*eof*/, 0 /*eol*/) &&
     908            orw_expect(tf, "world", 1 /*lines*/, 0 /*eof*/, 1 /*eol*/);
    908909        t_fclose(tf);
    909910        return (ret);
     
    916917
    917918        tf = t_fopen(NULL);
    918         t_fprintf(tf, "xyzzy\\\n \n");
    919         t_frewind(tf);
    920         ret = orw_expect(tf, "xyzzy", 1 /*lines*/, 0 /*eof*/, 0 /*eol*/) &&
    921             orw_expect(tf, NULL, 0 /*lines*/, 0 /*eof*/, 1 /*eol*/);
     919        t_fprintf(tf, "hello\\\n world\n");
     920        t_frewind(tf);
     921        ret = orw_expect(tf, "hello", 1 /*lines*/, 0 /*eof*/, 0 /*eol*/) &&
     922            orw_expect(tf, "world", 0 /*lines*/, 0 /*eof*/, 1 /*eol*/);
    922923        t_fclose(tf);
    923924        return (ret);
     
    930931
    931932        tf = t_fopen(NULL);
    932         t_fprintf(tf, " \\\nxyzzy\n");
    933         t_frewind(tf);
    934         ret = orw_expect(tf, "xyzzy", 1 /*lines*/, 0 /*eof*/, 1 /*eol*/);
     933        t_fprintf(tf, "hello \\\nworld\n");
     934        t_frewind(tf);
     935        ret = orw_expect(tf, "hello", 0 /*lines*/, 0 /*eof*/, 0 /*eol*/) &&
     936            orw_expect(tf, "world", 1 /*lines*/, 0 /*eof*/, 1 /*eol*/);
    935937        t_fclose(tf);
    936938        return (ret);
     
    943945
    944946        tf = t_fopen(NULL);
    945         t_fprintf(tf, "xyz\\\nzy\n");
    946         t_frewind(tf);
    947         ret = orw_expect(tf, "xyzzy", 1 /*lines*/, 0 /*eof*/, 1 /*eol*/);
     947        t_fprintf(tf, "hello\\\nworld\n");
     948        t_frewind(tf);
     949        ret = orw_expect(tf, "helloworld", 1 /*lines*/, 0 /*eof*/, 1 /*eol*/);
    948950        t_fclose(tf);
    949951        return (ret);
     
    956958 */
    957959
    958 const struct t_test *t_plan[] = {
     960static const struct t_test *t_plan[] = {
    959961        T(empty_input),
    960962        T(empty_line),
Note: See TracChangeset for help on using the changeset viewer.