diff options
author | Charl Botha <cpbotha@cpbotha.net> | 2001-04-17 21:16:12 +0000 |
---|---|---|
committer | Charl Botha <cpbotha@cpbotha.net> | 2001-04-17 21:16:12 +0000 |
commit | e7bcbd45289f6a0e7fd5445c928f72162f5749d3 (patch) | |
tree | cd95a2524b136dee3ebd8b26fac6b75227b5d017 | |
parent | f750816ad6e6645c4fb0e1458a5afe5806192eaa (diff) | |
download | libpam-pwdfile-e7bcbd45289f6a0e7fd5445c928f72162f5749d3.tar.gz |
Updated for Linux-PAM-0.75. Released 0.7.
-rw-r--r-- | INSTALL | 26 | ||||
-rw-r--r-- | Makefile | 82 | ||||
-rw-r--r-- | README | 4 | ||||
-rw-r--r-- | changelog | 6 | ||||
-rw-r--r-- | pam_pwdfile.c | 19 |
5 files changed, 28 insertions, 109 deletions
@@ -1,5 +1,5 @@ INSTALL for pam_pwdfile PAM module - Charl P. Botha <cpbotha@ieee.org> -$Id: INSTALL,v 1.2 2000-08-29 07:23:11 cpbotha Exp $ +$Id: INSTALL,v 1.3 2001-04-17 21:16:12 cpbotha Exp $ --------------------------------------------------------------------------- This file is the quick and dirty on how to get pam_pwdfile compiled on your @@ -7,41 +7,33 @@ system. As per usual, I can not be held responsible for the results of the application of this information. 1. Get the Linux PAM source code tarball. Currently, this is at: -http://www.us.kernel.org/pub/linux/libs/pam/pre/library/Linux-PAM-0.72.tar.bz2 +http://www.us.kernel.org/pub/linux/libs/pam/pre/library/Linux-PAM-0.75.tar.bz2 2. Extract the tarball somewhere convenient: -bunzip2 -c Linux-PAM-0.72.tar.bz2 | tar -xvf - +bunzip2 -c Linux-PAM-0.75.tar.bz2 | tar -xvf - 3. Prepare pam_pwdfile -cd Linux-PAM-0.72/modules +cd Linux-PAM-0.75/modules tar -xzvf /where/you/put/it/pam_pwdfile-x.y.tar.gz cd .. -(x.y represents the pam_pwdfile version, e.g. 0.4) +(x.y represents the pam_pwdfile version, e.g. 0.7) 4. Prepare Linux-PAM rm default.defs ln -s defs/whatever.defs default.defs (on my system whatever == debian) -5. Also, it seems one of the modules needs a little help: -cd modules/pam_pwdb -edit Makefile -search the dependency for $(CHKPWD), add $(EXTRALS) to $(CC) line -(Alternatively, you can just delete any modules that cause problems, see the -note at the "make all" step) - -6. cd ../.. (so that you're back in Linux-PAM-0.72) +5. in Linux-PAM-0.72/ do: make all NOTE: if you only need pam_pwdfile and some of the other modules are causing you problems during compilation, go and delete them (i.e. - delete the whole modules dir, e.g. rm -rf modules/pam_pwdb) and then + delete the whole module dir, e.g. rm -rf modules/pam_pwdb) and then restart make all in the top level directory. -7. When you're done, there should be a pam_pwdfile.so in modules/pam_pwdfile; +6. When you're done, there should be a pam_pwdfile.so in modules/pam_pwdfile; copy this into your pam modules directory. (this is /lib/security/ on my debian 2.2. system) -8. You should now be operational. - +7. You should now be operational. See the README for more info. Remember that pam_pwdfile is packaged as a .deb and is part of the official Debian distribution. @@ -1,86 +1,14 @@ -# $Id: Makefile,v 1.1.1.1 1999-08-05 13:09:07 cpbotha Exp $ +# $Id: Makefile,v 1.2 2001-04-17 21:16:12 cpbotha Exp $ # # This Makefile controls a build process of $(TITLE) module for # Linux-PAM. You should not modify this Makefile (unless you know # what you are doing!). # -TITLE=pam_pwdfile - -# - -LIBSRC = $(TITLE).c -LIBOBJ = $(TITLE).o -LDLIBS = -lcrypt -LIBOBJD = $(addprefix dynamic/,$(LIBOBJ)) -LIBOBJS = $(addprefix static/,$(LIBOBJ)) - -dynamic/%.o : %.c - $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@ - -static/%.o : %.c - $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@ - - -ifdef DYNAMIC -LIBSHARED = $(TITLE).so -endif - -ifdef STATIC -LIBSTATIC = lib$(TITLE).o -endif - -####################### don't edit below ####################### - -dummy: - - @echo "**** This is not a top-level Makefile " - exit +include ../../Make.Rules -all: dirs $(LIBSHARED) $(LIBSTATIC) register - -dirs: -ifdef DYNAMIC - $(MKDIR) ./dynamic -endif -ifdef STATIC - $(MKDIR) ./static -endif - -register: -ifdef STATIC - ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) ) -endif - -ifdef DYNAMIC -$(LIBOBJD): $(LIBSRC) - -$(LIBSHARED): $(LIBOBJD) - $(LD_D) -o $@ $(LIBOBJD) $(LDLIBS) -endif - -ifdef STATIC -$(LIBOBJS): $(LIBSRC) - -$(LIBSTATIC): $(LIBOBJS) - $(LD) -r -o $@ $(LIBOBJS) $(LDLIBS) -endif - -install: all - $(MKDIR) $(FAKEROOT)$(SECUREDIR) -ifdef DYNAMIC - $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR) -endif - -remove: - rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so - -clean: - rm -f $(LIBOBJD) $(LIBOBJS) core *~ - -extraclean: clean - rm -f *.a *.o *.so *.bak dynamic/* static/* +TITLE=pam_pwdfile -.c.o: - $(CC) $(CFLAGS) -c $< +MODULE_SIMPLE_EXTRALIBS = -lcrypt +include ../Simple.Rules @@ -1,8 +1,8 @@ README for pam_pwdfile PAM module - Charl P. Botha <cpbotha@ieee.org> -$Id: README,v 1.4 2000-11-11 22:52:54 cpbotha Exp $ +$Id: README,v 1.5 2001-04-17 21:16:12 cpbotha Exp $ --------------------------------------------------------------------------- -This is version 0.6 of pam_pwdfile. +This is version 0.7 of pam_pwdfile. This pam module can be used for the authentication service only, in cases where one wants to use a different set of passwords than those in the main @@ -1,10 +1,12 @@ changelog for pam_pwdfile PAM module - Charl P. Botha <cpbotha@ieee.org> -$Id: changelog,v 1.6 2000-11-25 16:56:29 cpbotha Exp $ +$Id: changelog,v 1.7 2001-04-17 21:16:12 cpbotha Exp $ --------------------------------------------------------------------------- -0.7: +0.7: Tue Apr 17 23:13:34 CEST 2001 * changed error message if user is not found in password file +* updated to work with > Linux-PAM-0.75 (thanks to Kelly Corbin + <kcorbin@theiqgroup.com> for reporting the problem) 0.6: Sat Nov 11 23:51:32 CET 2000 diff --git a/pam_pwdfile.c b/pam_pwdfile.c index 88e9368..3d91d3d 100644 --- a/pam_pwdfile.c +++ b/pam_pwdfile.c @@ -1,12 +1,12 @@ /* pam_pwdfile.c copyright 1999 by Charl P. Botha <cpbotha@ieee.org> * - * $Id: pam_pwdfile.c,v 1.9 2000-11-25 16:55:43 cpbotha Exp $ + * $Id: pam_pwdfile.c,v 1.10 2001-04-17 21:16:12 cpbotha Exp $ * * pam authentication module that can be pointed at any username/crypted * text file so that pam using application can use an alternate set of * passwords than specified in system password database * - * version 0.6 + * version 0.7 * * Copyright (c) Charl P. Botha, 1999. All rights reserved * @@ -42,12 +42,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef LINUX -#include <security/pam_appl.h> -#endif /* LINUX */ - -#define PAM_SM_AUTH -#include <security/pam_modules.h> +#include <security/_pam_aconf.h> #include <syslog.h> #include <stdarg.h> @@ -59,10 +54,13 @@ #include <sys/stat.h> #include <sys/wait.h> #include <sys/file.h> - -#define _XOPEN_SOURCE #include <unistd.h> +#include <security/pam_appl.h> + +#define PAM_SM_AUTH +#include <security/pam_modules.h> + /* unistd.h does not declare this as it should */ extern char *crypt(const char *key, const char *salt); @@ -72,7 +70,6 @@ extern char *crypt(const char *key, const char *salt); #define CRYPTED_DESPWD_LEN 13 #define CRYPTED_MD5PWD_LEN 34 - #ifdef DEBUG # define D(a) a; #else |