From 23624ea6f78ec8acc167a2491c00998907fc76b1 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Tue, 16 Aug 2005 12:27:38 +0000 Subject: Relevant BUGIDs: none Purpose of commit: new feature Commit summary: --------------- Big "automake/autoconf/libtool" commit --- examples/Makefile | 54 ---------------------------------------------------- examples/Makefile.am | 14 ++++++++++++++ examples/README | 13 +++++++++++++ examples/xsh.c | 2 +- 4 files changed, 28 insertions(+), 55 deletions(-) delete mode 100644 examples/Makefile create mode 100644 examples/Makefile.am create mode 100644 examples/README (limited to 'examples') diff --git a/examples/Makefile b/examples/Makefile deleted file mode 100644 index 7cabccaa..00000000 --- a/examples/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -# -# $Id$ -# - -include ../Make.Rules - -PROGS = blank xsh check_user -SRCS = blank.c xsh.c check_user.c -PROGSUID = - -ifeq ($(WITH_LIBDEBUG),yes) - LIBSUFFIX=d -else - LIBSUFFIX= -endif - -CFLAGS += -I$(absolute_srcdir)/libpam_misc/include - -LOADLIBES = -L$(absolute_objdir)/libpam -L$(absolute_objdir)/libpamc \ - -L$(absolute_objdir)/libpam_misc -lpam -lpam_misc - -ifeq ($(STATIC_LIBPAM),yes) - ifneq ($(DYNAMIC),) - CFLAGS += $(CC_STATIC) - LOADLIBES += $(LIBDL) - endif -endif - -all: $(PROGS) - -check_user: check_user.o - $(CC) $(CFLAGS) -o $@ $< $(LOADLIBES) - -blank: blank.o - $(CC) $(CFLAGS) -o $@ $< $(LOADLIBES) - -xsh: xsh.o - $(CC) $(CFLAGS) -o $@ $< $(LOADLIBES) - -clean: - rm -f *.a *.so *.o *~ $(PROGS) $(PROGSUID) - rm -f *.a *.out *.o *.so - -# note, the programs are test programs, they should not be -# installed on your system! - -install: all - if [ -n "$(PROGS)" ]; then cp $(PROGS) ../bin ; fi - if [ -n "$(PROGSUID)" ]; then \ - $(INSTALL) -m 4555 $(PROGSUID) ../bin ; fi - -remove: - cd ../bin ; rm -f $(PROGS) $(PROGSUID) - for x in $(PROGS) $(PROGSUID) ; do rm -f ../bin/$$x ; done diff --git a/examples/Makefile.am b/examples/Makefile.am new file mode 100644 index 00000000..f8b9f006 --- /dev/null +++ b/examples/Makefile.am @@ -0,0 +1,14 @@ +# +# Copyright (c) 2005 Thorsten Kukuk +# + +CLEANFILES = *~ + +EXTRA_DIST = README + +AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ + -I$(top_srcdir)/libpam_misc/include +AM_LDFLAGS = -L$(top_builddir)/libpam -lpam \ + -L$(top_builddir)/libpam_misc -lpam_misc + +noinst_PROGRAMS = xsh vpass blank check_user diff --git a/examples/README b/examples/README new file mode 100644 index 00000000..f4ae9511 --- /dev/null +++ b/examples/README @@ -0,0 +1,13 @@ + +(now we are getting networked apps, be careful to try and test on a +securely isolated system!) + +These programs grant no privileges, but they give an idea of how well +the modules are working. + +blank is new as of Linux-PAM-0.21. If you are writing/modifying an +application it might be a place to start... + +xsh is new as of Linux-PAM-0.31, it is identical to blank, but invokes +/bin/sh if the user is authenticated. + diff --git a/examples/xsh.c b/examples/xsh.c index e25531bb..08b4af11 100644 --- a/examples/xsh.c +++ b/examples/xsh.c @@ -173,5 +173,5 @@ int main(int argc, char **argv) pamh = NULL; bail_out(pamh,1,retcode,"pam_end"); - exit(0); + return (0); } -- cgit v1.2.3