diff options
author | Thorsten Kukuk <kukuk@thkukuk.de> | 2005-08-16 12:27:38 +0000 |
---|---|---|
committer | Thorsten Kukuk <kukuk@thkukuk.de> | 2005-08-16 12:27:38 +0000 |
commit | 23624ea6f78ec8acc167a2491c00998907fc76b1 (patch) | |
tree | a57b3caee23a167d442d7d4e0419c4689dfba565 /libpamc | |
parent | 2b5457bbf7352200f7bc77795adbbcfd47550855 (diff) | |
download | pam-23624ea6f78ec8acc167a2491c00998907fc76b1.tar.gz pam-23624ea6f78ec8acc167a2491c00998907fc76b1.tar.bz2 pam-23624ea6f78ec8acc167a2491c00998907fc76b1.zip |
Relevant BUGIDs: none
Purpose of commit: new feature
Commit summary:
---------------
Big "automake/autoconf/libtool" commit
Diffstat (limited to 'libpamc')
-rw-r--r-- | libpamc/Makefile | 119 | ||||
-rw-r--r-- | libpamc/Makefile.am | 24 | ||||
-rw-r--r-- | libpamc/libpamc.map | 12 | ||||
-rw-r--r-- | libpamc/pamc_converse.c | 6 | ||||
-rw-r--r-- | libpamc/test/Makefile.am | 11 |
5 files changed, 50 insertions, 122 deletions
diff --git a/libpamc/Makefile b/libpamc/Makefile deleted file mode 100644 index 08bbfbf2..00000000 --- a/libpamc/Makefile +++ /dev/null @@ -1,119 +0,0 @@ -# -# $Id$ -# - -# lots of debugging information goes to /tmp/pam-debug.log -#MOREFLAGS += -D"DEBUG" - -include ../Make.Rules - -ifeq ($(DEBUG_REL),yes) - LIBNAME=libpamcd -else - LIBNAME=libpamc -endif -ifeq ($(WITH_PRELUDE),yes) - CFLAGS += -DPRELUDE -DLIBPRELUDE_CONFIG_PREFIX=\"`libprelude-config --prefix`\" -endif -VERSION=.$(MAJOR_REL) -MODIFICATION=.$(MINOR_REL) - -CFLAGS += $(MOREFLAGS) $(DYNAMIC) $(STATIC) - -# dynamic library names - -LIBNAMED = $(LIBNAME).$(DYNTYPE) -LIBNAMEDNAME = $(LIBNAMED)$(VERSION) -LIBNAMEDFULL = $(LIBNAMEDNAME)$(MODIFICATION) - -# static library name - -LIBNAMEDSTATIC = $(LIBNAME).a - -LIBOBJECTS = pamc_client.o pamc_converse.o pamc_load.o - -ifeq ($(DYNAMIC_LIBPAM),yes) -DLIBOBJECTS = $(addprefix dynamic/,$(LIBOBJECTS)) -endif - -ifeq ($(STATIC_LIBPAM),yes) -SLIBOBJECTS = $(addprefix static/,$(LIBOBJECTS)) -endif - -# --------------------------------------------- -## rules - -all: dirs $(LIBNAMED) $(LIBNAMEDSTATIC) - -dirs: -ifeq ($(DYNAMIC_LIBPAM),yes) - $(MKDIR) dynamic -endif -ifeq ($(STATIC_LIBPAM),yes) - $(MKDIR) static -endif - -dynamic/%.o : %.c - $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@ - -static/%.o : %.c - $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@ - -$(LIBNAMED): $(DLIBOBJECTS) -ifeq ($(DYNAMIC_LIBPAM),yes) - ifeq ($(USESONAME),yes) - $(LD_L) $(SOSWITCH)$(LIBNAMEDNAME) -o $@ $(DLIBOBJECTS) $(MODULES) $(LINKLIBS) - else - $(LD_L) -o $@ $(DLIBOBJECTS) $(MODULES) - endif - ifeq ($(NEEDSONAME),yes) - rm -f $(LIBNAMEDFULL) - ln -s $(LIBNAMED) $(LIBNAMEDFULL) - rm -f $(LIBNAMEDNAME) - ln -s $(LIBNAMED) $(LIBNAMEDNAME) - endif -endif - -$(LIBNAMEDSTATIC): $(SLIBOBJECTS) -ifeq ($(STATIC_LIBPAM),yes) - $(AR) rcu $@ $(SLIBOBJECTS) $(MODULES) -ifdef RANLIB - $(RANLIB) $@ -endif -endif - -install: all - $(MKDIR) $(FAKEROOT)$(INCLUDED) - $(INSTALL) -m 644 include/security/pam_client.h $(FAKEROOT)$(INCLUDED) -ifeq ($(DYNAMIC_LIBPAM),yes) - $(MKDIR) $(FAKEROOT)$(libdir) - $(INSTALL) -m $(SHLIBMODE) $(LIBNAMED) $(FAKEROOT)$(libdir)/$(LIBNAMEDFULL) -ifndef FAKEROOT - $(LDCONFIG) -else - $(LDCONFIG) -n $(FAKEROOT)$(libdir) -endif - ifneq ($(DYNTYPE),"sl") - ( cd $(FAKEROOT)$(libdir) ; rm -f $(LIBNAMED) ; ln -s $(LIBNAMEDNAME) $(LIBNAMED) ) - endif -endif -ifeq ($(STATIC_LIBPAM),yes) - $(INSTALL) -m 644 $(LIBNAMEDSTATIC) $(FAKEROOT)$(libdir) -endif - -remove: - rm -f $(FAKEROOT)$(INCLUDED)/pam_client.h - rm -f $(FAKEROOT)$(libdir)/$(LIBNAMEDFULL) - rm -f $(FAKEROOT)$(libdir)/$(LIBNAMED) -ifndef FAKEROOT - $(LDCONFIG) -endif - rm -f $(FAKEROOT)$(libdir)/$(LIBNAMEDSTATIC) - -clean: - rm -f a.out core *~ static/*.o dynamic/*.o - rm -f *.a *.out *.o *.so ./include/security/*~ - rm -f *.orig $(LIBNAMEDNAME) $(LIBNAMEDFULL) - if [ -d dynamic ]; then rmdir dynamic ; fi - if [ -d static ]; then rmdir static ; fi - diff --git a/libpamc/Makefile.am b/libpamc/Makefile.am new file mode 100644 index 00000000..0bfd5f6b --- /dev/null +++ b/libpamc/Makefile.am @@ -0,0 +1,24 @@ +# +# Copyright (c) 2005 Thorsten Kukuk <kukuk@suse.de> +# + +SUBDIRS = test + +CLEANFILES = *~ + +EXTRA_DIST = libpamc.map + +include_HEADERS = include/security/pam_client.h + +noinst_HEADERS = libpamc.h + +AM_CFLAGS=-I$(top_srcdir)/libpam/include -I$(srcdir)/include + +libpamc_la_LDFLAGS = -version-info 1:0:0 +if HAVE_VERSIONING + libpamc_la_LDFLAGS += -Wl,--version-script=libpamc.map +endif + +lib_LTLIBRARIES = libpamc.la + +libpamc_la_SOURCES = pamc_client.c pamc_converse.c pamc_load.c diff --git a/libpamc/libpamc.map b/libpamc/libpamc.map new file mode 100644 index 00000000..cc61a33b --- /dev/null +++ b/libpamc/libpamc.map @@ -0,0 +1,12 @@ +LIBPAMC_1.0 { + global: + pamc_start; + pamc_end; + pamc_load; + pamc_converse; + pamc_disable; + pamc_list_agents; + + local: + *; +}; diff --git a/libpamc/pamc_converse.c b/libpamc/pamc_converse.c index 76685df6..f334c5b9 100644 --- a/libpamc/pamc_converse.c +++ b/libpamc/pamc_converse.c @@ -66,11 +66,12 @@ int pamc_converse(pamc_handle_t pch, pamc_bp_t *prompt_p) D(("*prompt_p is not legal for the client to use")); goto pamc_unknown_prompt; } - + /* do we need to select the agent? */ if ((*prompt_p)->control == PAM_BPC_SELECT) { char *rawh; - int i, retval; + size_t i; + int retval; D(("selecting a specified agent")); @@ -208,4 +209,3 @@ pamc_unknown_prompt: PAM_BP_RENEW(prompt_p, PAM_BPC_FAIL, 0); return PAM_BPC_TRUE; } - diff --git a/libpamc/test/Makefile.am b/libpamc/test/Makefile.am new file mode 100644 index 00000000..fc0cac46 --- /dev/null +++ b/libpamc/test/Makefile.am @@ -0,0 +1,11 @@ +# +# Copyright (c) 2005 Thorsten Kukuk <kukuk@suse.de> +# + +AUTOMAKE_OPTIONS = 1.6 gnits + +CLEANFILES = *~ */*~ + +EXTRA_DIST = agents/secret@here modules/Makefile modules/pam_secret.c \ + regress/Makefile regress/run_test.sh regress/test.libpamc.c \ + regress/test.secret@here |