summaryrefslogtreecommitdiff
path: root/libpam_misc
diff options
context:
space:
mode:
Diffstat (limited to 'libpam_misc')
-rw-r--r--libpam_misc/Makefile120
-rw-r--r--libpam_misc/Makefile.am22
-rw-r--r--libpam_misc/help_env.c17
-rw-r--r--libpam_misc/include/security/pam_misc.h10
-rw-r--r--libpam_misc/libpam_misc.map17
-rw-r--r--libpam_misc/misc_conv.c4
6 files changed, 41 insertions, 149 deletions
diff --git a/libpam_misc/Makefile b/libpam_misc/Makefile
deleted file mode 100644
index d575b18c..00000000
--- a/libpam_misc/Makefile
+++ /dev/null
@@ -1,120 +0,0 @@
-#
-# $Id$
-#
-
-# lots of debugging information goes to /tmp/pam-debug.log
-#MOREFLAGS += -D"DEBUG"
-
-include ../Make.Rules
-
-ifeq ($(WITH_LIBDEBUG),yes)
- LIBNAME=libpam_miscd
-else
- LIBNAME=libpam_misc
-endif
-ifeq ($(WITH_PRELUDE),yes)
- CFLAGS += -DPRELUDE -DLIBPRELUDE_CONFIG_PREFIX=\"`libprelude-config --prefix`\"
-endif
-VERSION=.$(MAJOR_REL)
-MODIFICATION=.$(MINOR_REL)
-
-CFLAGS += $(MOREFLAGS) $(DYNAMIC) $(STATIC)
-LINKLIBS += -L$(absolute_objdir)/libpam -lpam
-
-# dynamic library names
-
-LIBNAMED = $(LIBNAME).$(DYNTYPE)
-LIBNAMEDNAME = $(LIBNAMED)$(VERSION)
-LIBNAMEDFULL = $(LIBNAMEDNAME)$(MODIFICATION)
-
-# static library name
-
-LIBNAMEDSTATIC = $(LIBNAME).a
-
-LIBOBJECTS = help_env.o misc_conv.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) $(LINKLIBS)
- 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
- $(AR) rc $@ $(SLIBOBJECTS) $(MODULES)
- $(RANLIB) $@
-endif
-endif
-
-install: all
- $(MKDIR) $(FAKEROOT)$(INCLUDED)
- $(INSTALL) -m 644 include/security/pam_misc.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_misc.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/libpam_misc/Makefile.am b/libpam_misc/Makefile.am
new file mode 100644
index 00000000..b5bc9048
--- /dev/null
+++ b/libpam_misc/Makefile.am
@@ -0,0 +1,22 @@
+#
+# Copyright (c) 2005 Thorsten Kukuk <kukuk@suse.de>
+#
+
+CLEANFILES = *~
+
+EXTRA_DIST = libpam_misc.map
+
+include_HEADERS = include/security/pam_misc.h
+
+AM_CFLAGS = -I$(top_srcdir)/libpam/include \
+ -I$(top_srcdir)/libpamc/include -I$(srcdir)/include
+
+libpam_misc_la_LDFLAGS = -version-info 1:0:0
+if HAVE_VERSIONING
+ libpam_misc_la_LDFLAGS += -Wl,--version-script=libpam_misc.map
+endif
+
+lib_LTLIBRARIES = libpam_misc.la
+
+libpam_misc_la_SOURCES = help_env.c misc_conv.c
+
diff --git a/libpam_misc/help_env.c b/libpam_misc/help_env.c
index 9f66156e..2b800283 100644
--- a/libpam_misc/help_env.c
+++ b/libpam_misc/help_env.c
@@ -11,23 +11,6 @@
#include <security/pam_misc.h>
/*
- * This is a useful function for dumping the Linux-PAM environment
- * into some local memory, prior to it all getting lost when pam_end()
- * is called.
- *
- * Initially it was assumed that libpam did not do this part correctly
- * (based on a loose email definition). The X/Open XSSO spec makes it
- * clear that this function is a duplicate of the one already in
- * libpam and therefore unnecessary. IT WILL BE COMPLETELY REMOVED
- * IN libpam_misc 1.0 */
-
-char **pam_misc_copy_env(pam_handle_t *pamh);
-char **pam_misc_copy_env(pam_handle_t *pamh)
-{
- return pam_getenvlist(pamh);
-}
-
-/*
* This function should be used to carefully dispose of the copied
* environment.
*
diff --git a/libpam_misc/include/security/pam_misc.h b/libpam_misc/include/security/pam_misc.h
index 0ec2fdd1..07578e64 100644
--- a/libpam_misc/include/security/pam_misc.h
+++ b/libpam_misc/include/security/pam_misc.h
@@ -36,16 +36,6 @@ extern void (*pam_binary_handler_free)(void *appdata, pamc_bp_t *prompt_p);
extern int pam_misc_paste_env(pam_handle_t *pamh
, const char * const * user_env);
-/* char **pam_misc_copy_env(pam_handle_t *pamh);
-
- This is no longer defined as a prototype because the X/Open XSSO
- spec makes it clear that PAM's pam_getenvlist() does exactly
- what this was needed for.
-
- A wrapper is still provided in the pam_misc library - so that
- legacy applications will still work. But _BE_WARNED_ it will
- disappear by the release of libpam 1.0 . */
-
/* delete environment as obtained from (pam_getenvlist) */
extern char **pam_misc_drop_env(char **env);
diff --git a/libpam_misc/libpam_misc.map b/libpam_misc/libpam_misc.map
new file mode 100644
index 00000000..2f28d5cf
--- /dev/null
+++ b/libpam_misc/libpam_misc.map
@@ -0,0 +1,17 @@
+LIBPAM_MISC_1.0 {
+ global:
+ misc_conv;
+ pam_misc_conv_warn_time;
+ pam_misc_conv_die_time;
+ pam_misc_conv_warn_line;
+ pam_misc_conv_die_line;
+ pam_misc_conv_died;
+ pam_binary_handler_fn;
+ pam_binary_handler_free;
+ pam_misc_paste_env;
+ pam_misc_drop_env;
+ pam_misc_setenv;
+
+ local:
+ *;
+};
diff --git a/libpam_misc/misc_conv.c b/libpam_misc/misc_conv.c
index 90869f96..dc8e1b2e 100644
--- a/libpam_misc/misc_conv.c
+++ b/libpam_misc/misc_conv.c
@@ -45,7 +45,7 @@ int pam_misc_conv_died=0; /* application can probe this for timeout */
* being used.
*/
-static void pam_misc_conv_delete_binary(void *appdata,
+static void pam_misc_conv_delete_binary(void *appdata UNUSED,
pamc_bp_t *delete_me)
{
PAM_BP_RENEW(delete_me, 0, 0);
@@ -67,7 +67,7 @@ static void reset_alarm(struct sigaction *o_ptr)
}
/* this is where we intercept the alarm signal */
-static void time_is_up(int ignore)
+static void time_is_up(int ignore UNUSED)
{
expired = 1;
}