head	1.15;
access;
symbols
	Real-Release-0-59:1.15
	Release-0-59:1.15
	pniam_change:1.15.0.2
	Real-Release-0-58:1.9
	Release-0-58:1.9
	broken-signals-0-57:1.7.0.2
	Release-0-56-last:1.7
	Release-0-57:1.7;
locks; strict;
comment	@# @;


1.15
date	99.02.19.12.03.59;	author saw;	state Rel;
branches;
next	1.14;

1.14
date	98.12.07.11.26.55;	author saw;	state Exp;
branches;
next	1.13;

1.13
date	98.11.25.10.15.40;	author saw;	state Exp;
branches;
next	1.12;

1.12
date	98.11.24.15.00.15;	author saw;	state Exp;
branches;
next	1.11;

1.11
date	98.11.24.14.08.15;	author agalat;	state Exp;
branches;
next	1.10;

1.10
date	98.11.23.16.29.34;	author saw;	state Exp;
branches;
next	1.9;

1.9
date	98.06.13.07.48.34;	author saw;	state Exp;
branches;
next	1.8;

1.8
date	98.06.13.06.39.28;	author saw;	state Exp;
branches;
next	1.7;

1.7
date	98.06.12.16.24.57;	author saw;	state Exp;
branches;
next	1.6;

1.6
date	97.06.24.14.24.53;	author morgan;	state Exp;
branches;
next	1.5;

1.5
date	97.02.24.06.09.59;	author morgan;	state Exp;
branches;
next	1.4;

1.4
date	97.01.29.03.19.09;	author morgan;	state Exp;
branches;
next	1.3;

1.3
date	96.12.01.00.56.34;	author morgan;	state Exp;
branches;
next	1.2;

1.2
date	96.11.10.15.41.30;	author morgan;	state Exp;
branches;
next	1.1;

1.1
date	96.07.08.07.10.26;	author morgan;	state Exp;
branches;
next	;


desc
@@


1.15
log
@`make release' fixes.
@
text
@##
## Makefile for SimplePAMApps
##
## $Id: Makefile,v 1.14 1998/12/07 11:26:55 saw Exp $
##

# this should be the name of this directory
RELNAME = SimplePAMApps-0.59

# this is the name of the archive file
DISTFILE = $(RELNAME).tar.gz
CVSDISTFILE = CVS+$(RELNAME).tar.gz

# ////////////////////////////////////////////////////
# // You should not modify anything below this line //
# ////////////////////////////////////////////////////

include Rules.make

SHELL = /bin/bash

TOPDIR := $(shell pwd)
PARDIR := $(shell cd .. ; pwd)

DIRS = conf common $(TAGDIR)

#
# Package building
#
all install:
	set -e ; for i in $(DIRS) ; do $(MAKE) -C "$${i}" $(@@) ; done

all: Rules.make

Rules.make: Rules.make.in configure
	./configure

configure: configure.in
	autoconf

install: all

#
# Package cleanup
#
remove:
	for i in $(DIRS) ; do $(MAKE) -C "$${i}" $(@@) ; done

clean extraclean:
	rm -f config.* *~ core
	for i in $(DIRS) ; do $(MAKE) -C "$${i}" $(@@) ; done

check:
	$(MAKE) -C conf check

#
# Packaging
#
.filelist:
	rm -f .freezemake .filelist
	install -m0600 /dev/null .filelist
	( \
	  cd ..; \
	  if [ -e '$(PARDIR)/$(RELNAME)' ]; then \
	    [ '$(PARDIR)/$(RELNAME)' != '$(TOPDIR)' ] && exit 1; \
	  else \
	    mv '$(TOPDIR)' '$(PARDIR)/$(RELNAME)'; \
	  fi; \
	  find '$(RELNAME)' -name CVS -prune -o \! -type d \! -path '$(RELNAME)/conf/.md5sum' -print > '$(RELNAME)/.filelist' \
	)
	chmod 0400 .filelist

release: extraclean .filelist check
	(cat .filelist; echo '$(RELNAME)/conf/.md5sum') | (cd ..; tar -cz -f'$(DISTFILE)' -T-)
	( \
	  repository=`cat CVS/Repository` ; \
	  repdir=`dirname "$${repository}"` ; \
	  repbase=`basename "$${repository}"` ; \
	  cd .. ; \
	  tar -cz -f'$(CVSDISTFILE)' -C"$${repdir}" "$${repbase}" ; \
	)

#
# Making control
#
.PHONY: all install remove clean extraclean check .filelist release
@


1.14
log
@ - Makefiles were fixed to allow separate building in each directory.
 - .EXPORT_ALL_VARIABLES were removed from Makefiles.  All Makefiles
   include Rules.make with all necessary definitions.
 - _POSIX_SOURCE was changed to _GNU_SOURCE to see vhangup() and
   other non-posix functions.
 - configure script was fixed to handle --with and --without
   arguments properly.
 - Release number was changed.  I may forget to do it later.
@
text
@d4 1
a4 1
## $Id: Makefile,v 1.13 1998/11/25 10:15:40 saw Exp $
d78 1
a78 1
	  repbase=`basename "$${repository}" ; \
d80 1
a80 1
	  tar -cz -f'$(CVSDISTFILE)' -C"${repdir}" "${repbase}" ; \
@


1.13
log
@Code restructurization to separate PAM/PNIAM independent
helper functions.
@
text
@d4 1
a4 1
## $Id: Makefile,v 1.12 1998/11/24 15:00:15 saw Exp $
d8 1
a8 1
RELNAME = SimplePAMApps-0.58
a85 2
.EXPORT_ALL_VARIABLES:

@


1.12
log
@ - Cleanup sections fixes.
 - Implemented (or started) points were removed from TODO.
@
text
@d4 1
a4 1
## $Id: Makefile,v 1.11 1998/11/24 14:08:15 agalat Exp $
d25 1
a25 1
DIRS = conf lib $(TAGDIR)
@


1.11
log
@Make files improved.
@
text
@d4 1
a4 1
## $Id: Makefile,v 1.10 1998/11/23 16:29:34 saw Exp $
a45 2
sterile: remove extraclean

d88 1
a88 1
.PHONY: all install sterile remove clean extraclean check .filelist release
@


1.10
log
@ - CHANGELOG update to mention the recent changes.
 - Major making process reorganization.  A simple configure script
   was written.  Makefiles were greatly simplified.  The common
   make code was moved to Application.make include file.
@
text
@d4 1
a4 1
## $Id: Makefile,v 1.9 1998/06/13 07:48:34 saw Exp $
d25 1
a25 2
###DIRS = conf lib $(TAGDIR)
DIRS = conf $(TAGDIR)
@


1.9
log
@`make release' was rewritten.
@
text
@d4 1
a4 1
## $Id: Makefile,v 1.8 1998/06/13 06:39:28 saw Exp $
d14 10
a23 5
# This is where you would indicate you do not want to use libpwdb
# make the following line: WANT_PWDB=no
ifndef WANT_PWDB
WANT_PWDB=yes
endif
d25 5
a29 2
# If you want to link the application to a static libpam.a library
# you should un-comment the following:
d31 4
a34 1
# STATICALLY_LINK=true
d36 5
a40 3
# ////////////////////////////////////////////////////
# // You should not modify anything below this line //
# ////////////////////////////////////////////////////
d42 1
a42 2
TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
PARDIR := $(shell cd ..; if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
d45 1
a45 1
# This section is for Andrew to help him compile the binaries
d47 1
a47 73
WHERE_AM_I = $(PARDIR)
ifeq ($(WHERE_AM_I),/home/morgan/misc/pam)
MY_INCLUDES = -I$(WHERE_AM_I)/Linux-PAM-0.59/include
MY_LIBS = -L$(WHERE_AM_I)/Linux-PAM-0.59/libpam -L$(WHERE_AM_I)/Linux-PAM-0.59/libpam_misc
endif

# the shared libraries for including by applications... 

PAMLIB=$(MY_LIBS) -lpam -lpam_misc 
#-lefence

ifeq ($(WANT_PWDB),no)
# nothing to add
else
PAMLIB+=-lpwdb 
EXTRAS+=-DHAVE_PWDB
endif

CC=gcc
export CC
ifndef COPTFLAGS
COPTFLAGS=-O2
endif
CFLAG=-pipe $(COPTFLAGS) $(EXTRAS) # -ggdb
#DEBUG=-DDEBUG

# memory debugging? ( to work it must be defined here and for compiling
# libpam{,_misc} )
#MEMORY_DEBUG=-DMEMORY_DEBUG
ifdef MEMORY_DEBUG
export MEMORY_DEBUG
endif

# the following is used for linking the executables in apps: this
# ifdef is needed because the libpam functions will then be in the
# executable

ifdef STATICALLY_LINK
RDYNAMIC=-rdynamic
endif

LIBDL=-ldl

#
LOADLIBES = $(PAMLIB) $(RDYNAMIC) $(LIBDL)
export LOADLIBES
#
DIRS = conf apps

WARNINGS = -ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
        -Wpointer-arith -Wcast-qual -Wcast-align \
        -Wtraditional -Wstrict-prototypes -Wmissing-prototypes \
        -Wnested-externs -Winline -Wshadow -pedantic
# -Wenum-clash

CFLAGS  = -DLINUX $(WARNINGS) $(DEBUG) $(MEMORY_DEBUG) $(CFLAG) $(MY_INCLUDES)
export CFLAGS

all:
	for i in $(DIRS) ; do \
		$(MAKE) -C $$i all ; \
		if [ $$? -ne 0 ]; then break ; fi ; \
	done

install:
	for i in $(DIRS) ; do \
		$(MAKE) -C $$i install ; \
		if [ $$? -ne 0 ]; then break ; fi ; \
	done

sterile:
	@@$(MAKE) remove
	@@$(MAKE) extraclean
d50 1
a50 1
	for i in $(DIRS) ; do $(MAKE) -C $$i remove ; done
d52 3
a54 10
clean:
	rm -f *~ core
	for i in $(DIRS) ; do \
		$(MAKE) -C $$i clean ; \
	done

extraclean:
	for i in $(DIRS) ; do \
		$(MAKE) -C $$i extraclean ; \
	done
d59 6
a64 4
release: extraclean
	rm -f .freezemake
	touch .filelist
	chmod 600 .filelist
d74 3
a76 2
	chmod 400 .filelist
	$(MAKE) check
d78 12
a89 1
	(cd ..; tar -cz -f'$(CVSDISTFILE)' -C"`cat '$(RELNAME)/CVS/Root'`" "`basename \"\`cat '$(RELNAME)/CVS/Repository'\`\"`")
d91 1
a91 1
.PHONY: all install sterile remove clean extraclean check release
@


1.8
log
@  - utmp_{open,close}_session() were modified to fail gracefully.
  - pam_get_user() abuse was removed from utmp_open_session.
  - wtmp file locking was rewritten.
  - Unnecessary malloc()s were eliminated in utmp_{open,close}_session().
  - More accurate struct utmp clearing was implemented. Glibc had introduced
    additional fields and could do it further.
  - utmp search was rewritten to be more compatible with libc.
  - Protection against unexpected SIGPIPEs was implemented.
  - TODO file was revived.
  - RCS logs were removed.
@
text
@d4 1
a4 1
## $Id$
d12 1
d29 3
d35 1
a35 1
WHERE_AM_I=$(shell cd .. ; pwd)
d126 1
a126 10
RCScheck:
	$(MAKE) -C conf RCScheck

# this can be used to see what hasn't been check'd into RCS

open:
	find . \( -type f -a -perm 644 \) -print

release:
	$(MAKE) extraclean
d128 12
a139 5
	touch .filelist .RCSlist
	chmod 600 .filelist .RCSlist
	cd .. ; find $(RELNAME) \! -type d -print | grep -v RCS | grep -v 'conf/.md5sum' > $(RELNAME)/.filelist
	cd .. ; find $(RELNAME) -type f -print | grep RCS | fgrep -v 'conf/.RCSsum' > $(RELNAME)/.RCSlist
	chmod 400 .filelist .RCSlist
d141 2
a142 4
	$(MAKE) RCScheck
	(cat .filelist ; echo $(RELNAME)/conf/.md5sum) | (cd .. ; tar -cz -f$(DISTFILE) -T-)
	chmod 444 .RCSlist
	(cat .RCSlist ; echo $(RELNAME)/conf/.RCSsum) | (cd .. ; tar -cz -fRCS+$(DISTFILE) -T-)
d144 1
a144 1
.PHONY: all install sterile remove clean extraclean check open release
@


1.7
log
@*** empty log message ***
@
text
@d2 1
a2 20
## $Id: Makefile,v 1.6 1997/06/24 14:24:53 morgan Exp morgan $
##
## $Log: Makefile,v $
## Revision 1.6  1997/06/24 14:24:53  morgan
## update for .55
##
## Revision 1.5  1997/02/24 06:09:59  morgan
## update for .54
##
## Revision 1.4  1997/01/29 03:19:09  morgan
## make -> $(MAKE)
##
## Revision 1.3  1996/12/01 00:56:34  morgan
## update for .52
##
## Revision 1.2  1996/11/10 15:41:30  morgan
## revised for new task
##
## Revision 1.1  1996/07/08 07:10:26  morgan
## Initial revision
d4 1
d8 1
a8 1
RELNAME = SimplePAMApps-0.56
d143 2
@


1.6
log
@update for .55
@
text
@d2 1
a2 1
## $Id: Makefile,v 1.5 1997/02/24 06:09:59 morgan Exp morgan $
d5 3
d26 1
a26 1
RELNAME = SimplePAMApps-0.55
d46 9
d57 1
a57 1
PAMLIB=-lpam -lpam_misc 
a95 1

d104 1
a104 1
CFLAGS  = -DLINUX $(WARNINGS) $(DEBUG) $(MEMORY_DEBUG) $(CFLAG)
@


1.5
log
@update for .54
@
text
@d2 1
a2 1
## $Id: Makefile,v 1.4 1997/01/29 03:19:09 morgan Exp morgan $
d5 3
d23 1
a23 1
RELNAME = SimplePAMApps-0.54
d30 1
d32 1
d45 2
a46 2
PAMLIB=-lpam -lpam_misc
# -lefence
d57 5
a61 2
CFLAG=-O2 -pipe $(EXTRAS) # -ggdb
DEBUG= #-g -DDEBUG
d138 4
a141 2
	@@$(MAKE) extraclean
	rm -f .filelist .RCSlist .freezemake
d143 4
a146 2
	chmod 444 .filelist
	@@$(MAKE) check
a147 1
	cd .. ; find $(RELNAME) -type f -print | grep RCS | fgrep -v 'conf/.RCSsum' > $(RELNAME)/.RCSlist
a148 1
	@@$(MAKE) RCScheck
@


1.4
log
@make -> $(MAKE)
@
text
@d2 1
a2 1
## $Id: Makefile,v 1.3 1996/12/01 00:56:34 morgan Exp morgan $
d5 3
d20 1
a20 1
RELNAME = SimplePAMApps-0.53
d25 3
a27 6
# Uncomment this for the pam_fail_delay() libpam function to be
# activated. There is an example of how it might be used in
# examples/blank.c of the Linux-PAM distribution, this feature
# is likely not to be officially supported

EXTRAS= -DPAM_FAIL_DELAY_ON
d38 12
d52 2
a53 2
CFLAG=-O7 -pipe $(EXTRAS) # -ggdb
DEBUG= -g #-DDEBUG
a61 10
# use the libpwdb calls instead of those in libc
#USE_LIBPWDB=-DUSE_LIBPWDB
ifdef USE_LIBPWDB
export USE_LIBPWDB
endif

# the shared libraries for including by applications... 

PAMLIB=-lpam -lpam_misc -lpwdb # -lefence

d67 1
a67 1
RDYNAMIC = -rdynamic
d85 1
a85 1
CFLAGS  = -DLINUX $(WARNINGS) $(DEBUG) $(MEMORY_DEBUG) $(USE_LIBPWDB) $(CFLAG) -fPIC
@


1.3
log
@update for .52
@
text
@d2 1
a2 1
## $Id: Makefile,v 1.2 1996/11/10 15:41:30 morgan Exp morgan $
d5 3
d17 1
a17 1
RELNAME = SimplePAMApps-0.52
d58 1
a58 2
PAMLIB=-lpam -lpam_misc -lpwdb 
# -lefence
d88 1
a88 1
		make -C $$i all ; \
d94 1
a94 1
		make -C $$i install ; \
d99 2
a100 2
	@@make remove
	@@make extraclean
d103 1
a103 1
	for i in $(DIRS) ; do make -C $$i remove ; done
d108 1
a108 1
		make -C $$i clean ; \
d113 1
a113 1
		make -C $$i extraclean ; \
d117 1
a117 1
	make -C conf check
d120 1
a120 1
	make -C conf RCScheck
d128 1
a128 1
	@@make extraclean
d132 1
a132 1
	@@make check
d136 1
a136 1
	@@make RCScheck
@


1.2
log
@revised for new task
@
text
@d2 1
a2 1
## $Id: Makefile,v 1.1 1996/07/08 07:10:26 morgan Exp morgan $
d5 3
d14 1
a14 1
RELNAME = SimplePAMApps-0.51
@


1.1
log
@Initial revision
@
text
@d2 1
a2 1
## $Id: Makefile,v 1.24 1996/07/08 00:07:53 morgan Exp $
d5 3
d11 1
a11 1
RELNAME = SimplePAMApps-0.50
d18 2
a19 2
# examples/blank.c of the Linux-PAM distribution, but this feature
# is likely not to be officially supported--It may well disappear!
d26 1
a26 1
#STATICALLY_LINK=true
d37 14
a50 5
# the shared library for including by applications... [eventutally,
# this should be replaced with an absolute path since there may be
# some security issue involved with respect to LD_LIBRARY_PATH?]  this
# uses the libpam/libpam.so file for compilation but the system
# library for running... So 'make install' before you try it!
d52 2
a53 1
PAMLIB=-lpam -lpam_misc # -lefence
d66 1
a66 1
LOADLIBES = $(PAMLIB) $(RDYNAMIC) -lpam_misc $(LIBDL)
d78 1
a78 1
CFLAGS  = -DLINUX $(WARNINGS) $(DEBUG) $(CFLAG) -fPIC
@
