Resolve conflicts.

This commit is contained in:
Mark Murray
2001-05-03 10:48:56 +00:00
parent 2406bb3ce7
commit de4efa569a
18 changed files with 190 additions and 414 deletions
+108 -11
View File
@@ -1,7 +1,8 @@
.\" Hey Emacs! This file is -*- nroff -*- source.
.\" $Id: pam.8,v 1.2 1997/02/15 18:37:27 morgan Exp $
.\" Copyright (c) Andrew G. Morgan 1996-7 <morgan@linux.kernel.org>
.TH PAM 8 "1997 Feb 9" "PAM 0.56" "PAM Manual"
.\" $Id: pam.8,v 1.2 2001/01/20 23:47:07 agmorgan Exp $
.\" Copyright (c) Andrew G. Morgan 1996-7,2001 <morgan@kernel.org>
.\" $FreeBSD$
.TH PAM 8 "2001 Jan 20" "PAM 0.74" "PAM Manual"
.SH NAME
PAM \- Pluggable Authentication Modules
@@ -14,7 +15,7 @@ PAM \- Pluggable Authentication Modules
This manual is intended to offer a quick introduction to
.BR PAM ". "
For more information the reader is directed to the
.BR "Linux-PAM system administrators' guide".
.BR "PAM system administrators' guide".
.sp
.BR PAM
@@ -197,7 +198,14 @@ The meaning of each of these tokens was explained above.
The third field,
.BR control ", "
indicates the behavior of the PAM-API should the module fail to
succeed in its authentication task. Valid
succeed in its authentication task. There are two types of syntax for
this control field: the simple one has a single simple keyword; the
more complicated one involves a square-bracketed selection of
.B value=action
pairs.
.sp
For the simple (historical) syntax valid
.BR control
values are:
.BR requisite
@@ -223,9 +231,98 @@ module has failed the success of this one is
only module in the stack associated with this
.BR service "+" type "."
.sp
For the more complicated syntax valid
.B control
values have the following form:
.sp
.RB [value1=action1 value2=action2 ...]
.sp
Where
.B valueN
corresponds to the return code from the function invoked in the module
for which the line is defined. It is selected from one of these:
.BR success ;
.BR open_err ;
.BR symbol_err ;
.BR service_err ;
.BR system_err ;
.BR buf_err ;
.BR perm_denied ;
.BR auth_err ;
.BR cred_insufficient ;
.BR authinfo_unavail ;
.BR user_unknown ;
.BR maxtries ;
.BR new_authtok_reqd ;
.BR acct_expired ;
.BR session_err ;
.BR cred_unavail ;
.BR cred_expired ;
.BR cred_err ;
.BR no_module_data ;
.BR conv_err ;
.BR authtok_err ;
.BR authtok_recover_err ;
.BR authtok_lock_busy ;
.BR authtok_disable_aging ;
.BR try_again ;
.BR ignore ;
.BR abort ;
.BR authtok_expired ;
.BR module_unknown ;
.BR bad_item "; and"
.BR default .
The last of these,
.BR default ,
implies 'all
.BR valueN 's
not mentioned explicitly. Note, the full list of PAM errors is
available in /usr/include/security/_pam_types.h . The
.B actionN
can be: an unsigned integer,
.BR J ,
signifying an action of 'jump over the next J modules in the stack';
or take one of the following forms:
.br
.B ignore
- when used with a stack of modules, the module's return status will
not contribute to the return code the application obtains;
.br
.B bad
- this action indicates that the return code should be thought of as
indicative of the module failing. If this module is the first in the
stack to fail, its status value will be used for that of the whole
stack.
.br
.B die
- equivalent to bad with the side effect of terminating the module
stack and PAM immediately returning to the application.
.br
.B ok
- this tells PAM that the administrator thinks this return code
should contribute directly to the return code of the full stack of
modules. In other words, if the former state of the stack would lead
to a return of
.BR PAM_SUCCESS ,
the module's return code will override this value. Note, if the former
state of the stack holds some value that is indicative of a modules
failure, this 'ok' value will not be used to override that value.
.br
.B done
- equivalent to ok with the side effect of terminating the module
stack and PAM immediately returning to the application.
.br
.B reset
- clear all memory of the state of the module stack and start again
with the next stacked module.
.sp
.BR module-path
- this is the full filename of the PAM to be used by the application
- this is either the full filename of the PAM to be used by the
application (it begins with a '/'), or a relative pathname from the
default module location:
.BR /usr/lib/ .
.sp
.BR module-arguments
@@ -238,7 +335,7 @@ documented for each individual module.
.br
.BR /etc/pam.d/ " - the"
.BR PAM
configuration directory. If this directory is present, the
configuration directory. Generally, if this directory is present, the
.B /etc/pam.conf
file is ignored.
.br
@@ -255,8 +352,8 @@ system of libraries, will be written to
.SH "CONFORMING TO"
DCE-RFC 86.0, October 1995.
.br
Contains additional features, currently under consideration by the
DCE-RFC committee.
Contains additional features, but remains backwardly compatible with
this RFC.
.SH BUGS
.sp 2
@@ -265,9 +362,9 @@ None known.
.SH "SEE ALSO"
The three
.BR Linux-PAM
.BR PAM
Guides, for
.BR "System administrators" ", "
.BR "system administrators" ", "
.BR "module developers" ", "
and
.BR "application developers" ". "
+2 -1
View File
@@ -1,6 +1,7 @@
.\" Hey Emacs! This file is -*- nroff -*- source.
.\" $Id: pam_authenticate.3,v 1.2 1997/02/15 18:39:59 morgan Exp $
.\" $Id: pam_authenticate.3,v 1.1.1.1 2000/06/20 22:10:57 agmorgan Exp $
.\" Copyright (c) Andrew G. Morgan 1996-7 <morgan@parc.power.net>
.\" $FreeBSD$
.TH PAM_AUTHENTICATE 3 "1996 Dec 9" "PAM 0.55" "App. Programmers' Manual"
.SH NAME
+2 -1
View File
@@ -1,6 +1,7 @@
.\" Hey Emacs! This file is -*- nroff -*- source.
.\" $Id: pam_chauthtok.3,v 1.2 1997/02/15 18:42:23 morgan Exp $
.\" $Id: pam_chauthtok.3,v 1.1.1.1 2000/06/20 22:10:57 agmorgan Exp $
.\" Copyright (c) Andrew G. Morgan 1997 <morgan@parc.power.net>
.\" $FreeBSD$
.TH PAM_CHAUTHTOK 3 "1997 Jan 4" "PAM 0.55" "App. Programmers' Manual"
.SH NAME
+3 -2
View File
@@ -1,6 +1,7 @@
.\" Hey Emacs! This file is -*- nroff -*- source.
.\" $Id: pam_fail_delay.3,v 1.2 1997/02/15 18:47:46 morgan Exp morgan $
.\" $Id: pam_fail_delay.3,v 1.1.1.1 2000/06/20 22:10:58 agmorgan Exp $
.\" Copyright (c) Andrew G. Morgan 1997 <morgan@parc.power.net>
.\" $FreeBSD$
.TH PAM_FAIL_DELAY 3 "1997 Jan 12" "PAM 0.56" "Programmers' Manual"
.SH NAME
@@ -122,7 +123,7 @@ and
.BR pam_strerror "(3). "
Also, see the three
.BR Linux-PAM
.BR PAM
Guides, for
.BR "System administrators" ", "
.BR "module developers" ", "
+3 -2
View File
@@ -1,6 +1,7 @@
.\" Hey Emacs! This file is -*- nroff -*- source.
.\" $Id: pam_open_session.3,v 1.2 1997/02/15 18:49:02 morgan Exp $
.\" $Id: pam_open_session.3,v 1.1.1.1 2000/06/20 22:10:58 agmorgan Exp $
.\" Copyright (c) Andrew G. Morgan 1997 <morgan@parc.power.net>
.\" $FreeBSD$
.TH PAM_OPEN_SESSION 3 "1997 Jan 4" "PAM 0.55" "App. Programmers' Manual"
.SH NAME
@@ -91,7 +92,7 @@ and
.br
Also, see the three
.BR Linux-PAM
.BR PAM
Guides, for
.BR "System administrators" ", "
.BR "module developers" ", "
+3 -2
View File
@@ -1,6 +1,7 @@
.\" Hey Emacs! This file is -*- nroff -*- source.
.\" $Id: pam_setcred.3,v 1.1.1.1 1998/07/09 22:10:18 jdp Exp $
.\" $Id: pam_setcred.3,v 1.1.1.1 2000/06/20 22:10:58 agmorgan Exp $
.\" Copyright (c) Andrew G. Morgan 1996,1997 <morgan@parc.power.net>
.\" $FreeBSD$
.TH PAM_SETCRED 3 "1997 July 6" "PAM 0.58" "App. Programmers' Manual"
.SH NAME
@@ -71,7 +72,7 @@ and
.BR pam_open_session "(3). "
Also, see the three
.BR Linux-PAM
.BR PAM
Guides, for
.BR "System administrators" ", "
.BR "module developers" ", "
+3 -2
View File
@@ -1,6 +1,7 @@
.\" Hey Emacs! This file is -*- nroff -*- source.
.\" $Id: pam_start.3,v 1.2 1997/02/15 18:51:54 morgan Exp $
.\" $Id: pam_start.3,v 1.1.1.1 2000/06/20 22:10:58 agmorgan Exp $
.\" Copyright (c) Andrew G. Morgan 1996-7 <morgan@parc.power.net>
.\" $FreeBSD$
.TH PAM_START 3 "1997 Feb 15" "PAM 0.56" "Application Programmers' Manual"
.SH NAME
@@ -90,7 +91,7 @@ and
.BR pam_chauthtok "(3)."
Also, see the three
.BR Linux-PAM
.BR PAM
Guides, for
.BR "System administrators" ", "
.BR "module developers" ", "
+10 -7
View File
@@ -1,8 +1,9 @@
.\" Hey Emacs! This file is -*- nroff -*- source.
.\" ripped off from Rick Faith's getgroups man page
.\" $Id: pam_strerror.3,v 1.2 1997/02/15 18:53:04 morgan Exp $
.\" Copyright (c) Andrew G. Morgan 1996-7 <morgan@parc.power.net>
.TH PAM_STRERROR 3 "1997 Feb 15" "PAM 0.56" "Programmers' Manual"
.\" $Id: pam_strerror.3,v 1.1.1.1 2000/06/20 22:10:58 agmorgan Exp $
.\" Copyright (c) Andrew G. Morgan 1996-7 <morgan@linux.kernel.org>
.\" $FreeBSD$
.TH PAM_STRERROR 3 "1999 Oct 4" "PAM 0.70" "Programmers' Manual"
.SH NAME
pam_strerror \- return a textual description of a PAM error
@@ -14,14 +15,16 @@ or,
.br
.B #include <security/pam_modules.h>
.sp
.BI "const char *pam_strerror(" int " pam_error);
.BI "const char * pam_strerror( pam_handle_t " "*pamh" ", int " pam_error ");"
.sp 2
.SH DESCRIPTION
.B pam_strerror
This function returns a pointer to a line of text describing the
This function returns some text describing the
.BR PAM
error passed as its sole argument.
error associated with the
.B pam_error
argument.
.SH "RETURN VALUE"
@@ -41,7 +44,7 @@ This function should be internationalized.
.BR pam "(8). "
Also, see the three
.BR Linux-PAM
.BR PAM
Guides, for
.BR "System administrators" ", "
.BR "module developers" ", "
+3 -2
View File
@@ -1,7 +1,8 @@
.\" Hey Emacs! This file is -*- nroff -*- source.
.\" $Id: template-man,v 1.1.1.1 2000/06/20 22:10:58 agmorgan Exp $
.\" Copyright (c) Andrew G. Morgan 1997 <morgan@parc.power.net>
.TH PAM_???? 2 "1997 Jan 4" "Linux-PAM 0.55" "Application Programmers' Manual"
.\" $FreeBSD$
.TH PAM_???? 2 "1997 Jan 4" "PAM 0.55" "Application Programmers' Manual"
.SH NAME
function names \- brief summary of function
@@ -44,7 +45,7 @@ and
.BR pam_??? "(2). "
Also, see the three
.BR Linux-PAM
.BR PAM
Guides, for
.BR "System administrators" ", "
.BR "module developers" ", "
@@ -1,27 +1,8 @@
/*
* <security/pam_modules.h>
*
* $Id: pam_modules.h,v 1.8 1997/01/04 20:14:42 morgan Exp morgan $
*
* This header file documents the PAM SPI --- that is, interface
* between the PAM library and a PAM service library which is called
* by the PAM library.
*
* Note, the copyright information is at end of file.
*
* $Log: pam_modules.h,v $
* Revision 1.8 1997/01/04 20:14:42 morgan
* moved PAM_DATA_SILENT to _pam_types.h so applications can use it too
*
* Revision 1.7 1996/11/10 19:57:08 morgan
* pam_get_user prototype.
*
* Revision 1.6 1996/09/05 06:18:45 morgan
* added some data error_status masks, changed prototype for cleanup()
*
* Revision 1.5 1996/06/02 07:58:37 morgan
* altered the way in which modules obtain static prototypes for
* functions
* $Id: pam_modules.h,v 1.3 2001/02/05 06:50:41 agmorgan Exp $
* $FreeBSD$
*
*/
@@ -188,7 +169,7 @@ PAM_EXTERN int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
#define PAM_PRELIM_CHECK 0x4000
/* The password service should update passwords Note: PAM_PRELIM_CHECK
* and PAM_UPDATE_AUTHTOK can not both be set simultaneously! */
* and PAM_UPDATE_AUTHTOK cannot both be set simultaneously! */
#define PAM_UPDATE_AUTHTOK 0x2000
+23 -80
View File
@@ -1,17 +1,17 @@
/*
* pam_log.c -- PAM system logging
*
* $Id$
* $Id: pam_log.c,v 1.2 2000/11/19 23:54:02 agmorgan Exp $
* $FreeBSD$
*
* $Log$
*/
#include "pam_private.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include "pam_private.h"
#ifdef __hpux
# include <stdio.h>
# include <syslog.h>
@@ -342,92 +342,35 @@ vsyslog(priority, fmt, va_alist)
}
#endif /* __hpux */
void pam_vsystem_log(const pam_handle_t *pamh,
const struct pam_log_state *log_state,
int priority, const char *format, va_list args)
/* internal logging function */
void _pam_system_log(int priority, const char *format, ... )
{
const char *ident;
int option, facility;
D(("pam_vsystem_log called"));
#ifndef __FreeBSD__
/* make sure we have a log state to use */
if (NULL == log_state) {
if (NULL != pamh && NULL != pamh->pam_default_log.ident) {
ident = pamh->pam_default_log.ident;
option = pamh->pam_default_log.option;
facility = pamh->pam_default_log.facility;
} else {
ident = PAM_LOG_STATE_IDENT;
option = PAM_LOG_STATE_OPTION;
facility = PAM_LOG_STATE_FACILITY;
}
openlog(ident, option, facility);
} else {
openlog(log_state->ident, log_state->option, log_state->facility);
}
#endif
vsyslog(priority, format, args);
#ifndef __FreeBSD__
closelog();
#endif
D(("done."));
}
void pam_system_log(const pam_handle_t *pamh,
const struct pam_log_state *log_state,
int priority, const char *format, ... )
{
const char *ident;
int option, facility;
va_list args;
char *eformat;
D(("pam_system_log called"));
#ifndef __FreeBSD__
/* make sure we have a log state to use */
if (NULL == log_state) {
if (NULL != pamh && NULL != pamh->pam_default_log.ident) {
ident = pamh->pam_default_log.ident;
option = pamh->pam_default_log.option;
facility = pamh->pam_default_log.facility;
} else {
ident = PAM_LOG_STATE_IDENT;
option = PAM_LOG_STATE_OPTION;
facility = PAM_LOG_STATE_FACILITY;
}
openlog(ident, option, facility);
} else {
openlog(log_state->ident, log_state->option, log_state->facility);
if (format == NULL) {
D(("NULL format to _pam_system_log() call"));
return;
}
#endif
va_start(args, format);
vsyslog(priority, format, args);
eformat = malloc(sizeof(_PAM_SYSTEM_LOG_PREFIX)+strlen(format));
if (eformat != NULL) {
strcpy(eformat, _PAM_SYSTEM_LOG_PREFIX);
strcpy(eformat + sizeof(_PAM_SYSTEM_LOG_PREFIX) - 1, format);
vsyslog(priority, eformat, args);
_pam_overwrite(eformat);
_pam_drop(eformat);
} else {
vsyslog(priority, format, args);
}
va_end(args);
#ifndef __FreeBSD__
closelog();
#endif
D(("done."));
}
/*
* Recommended #defines to make porting legacy apps easier [Ed. at this
* point, the syslog() #define is breoken -- suggestions?]
*
* #ifdef PAM_LOG_STATE
* # define openlog(ident, option, facility) { \
* struct pam_log_state tmp_state; \
* tmp_state.ident = ident; \
* tmp_state.option = option; \
* tmp_state.facility = facility; \
* (void) pam_set_item(pamh, PAM_LOG_STATE, &tmp_state); \
* }
* # define syslog pam_system_log
* # define closelog()
* #endif
*/
+9 -20
View File
@@ -2,21 +2,8 @@
/* created by Michael K. Johnson, johnsonm@redhat.com
*
* $Id: pam_static.c,v 1.4 1996/12/01 03:14:13 morgan Exp $
*
* $Log: pam_static.c,v $
* Revision 1.4 1996/12/01 03:14:13 morgan
* use _pam_macros.h
*
* Revision 1.3 1996/11/10 20:09:16 morgan
* name convention change _pam_
*
* Revision 1.2 1996/06/02 08:02:56 morgan
* Michael's minor alterations
*
* Revision 1.1 1996/05/26 04:34:04 morgan
* Initial revision
*
* $Id: pam_static.c,v 1.1.1.1 2000/06/20 22:11:21 agmorgan Exp $
* $FreeBSD$
*/
#include <stdlib.h>
@@ -32,18 +19,20 @@
extern struct linker_set _pam_static_modules;
/* Return pointer to data structure used to define a static module */
struct pam_module * _pam_open_static_handler(char *path) {
struct pam_module * _pam_open_static_handler(const char *path)
{
int i;
char *lpath = path, *end;
const char *clpath = path;
char *lpath, *end;
struct pam_module **static_modules =
(struct pam_module **)_pam_static_modules.ls_items;
if (strchr(lpath, '/')) {
if (strchr(clpath, '/')) {
/* ignore path and leading "/" */
lpath = strrchr(lpath, '/') + 1;
clpath = strrchr(lpath, '/') + 1;
}
/* create copy to muck with (must free before return) */
lpath = _pam_strdup(lpath);
lpath = _pam_strdup(clpath);
/* chop .so off copy if it exists (or other extension on other
platform...) */
end = strstr(lpath, ".so");
+2
View File
@@ -1,5 +1,6 @@
/*
* $Id: misc_conv.c,v 1.3 2001/01/20 22:29:47 agmorgan Exp $
* $FreeBSD$
*
* A generic conversation function for text based applications
*
@@ -18,6 +19,7 @@
#include <unistd.h>
#include <security/pam_appl.h>
#include <security/pam_client.h>
#include <security/pam_misc.h>
#define INPUTSIZE PAM_MAX_MSG_SIZE /* maximum length of input+1 */
+2 -8
View File
@@ -1,11 +1,5 @@
/* $Header: /home/morgan/pam/Linux-PAM-0.53/libpam_misc/RCS/xstrdup.c,v 1.4 1996/11/10 20:10:56 morgan Exp $ */
/*
* $Log: xstrdup.c,v $
* Revision 1.4 1996/11/10 20:10:56 morgan
* modification for stack paranoia
*
*/
/* $Id: xstrdup.c,v 1.1.1.1 2000/06/20 22:11:25 agmorgan Exp $ */
/* $FreeBSD$ */
#include <stdlib.h>
#include <security/pam_misc.h>
+5 -114
View File
@@ -1,125 +1,16 @@
#
# $Id: Makefile,v 1.7 1997/04/05 06:43:41 morgan Exp morgan $
# $Id: Makefile,v 1.2 2000/11/19 23:54:03 agmorgan 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!).
#
# $Log: Makefile,v $
# Revision 1.7 1997/04/05 06:43:41 morgan
# full-source-tree and fakeroot
#
# Revision 1.6 1997/02/15 19:04:27 morgan
# fixed email
#
# Revision 1.5 1996/11/10 20:11:48 morgan
# crossplatform support
#
# Revision 1.4 1996/09/05 06:50:12 morgan
# ld --> gcc
#
# Revision 1.3 1996/05/26 15:48:38 morgan
# make dynamic and static dirs
#
# Revision 1.2 1996/05/26 04:00:16 morgan
# changes for automated static/dynamic modules
#
# Revision 1.1 1996/03/16 17:47:36 morgan
# Initial revision
#
#
# Created by Andrew Morgan <morgan@parc.power.net> 1996/3/11
# Created by Andrew Morgan <morgan@linux.kernel.org> 2000/08/27
# $FreeBSD$
#
# Convenient defaults for compiling independently of the full source
# tree.
ifndef FULL_LINUX_PAM_SOURCE_TREE
export DYNAMIC=-DPAM_DYNAMIC
export CC=gcc
export CFLAGS=-O2 -Dlinux -DLINUX_PAM \
-ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
-Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional \
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline \
-Wshadow -pedantic -fPIC
export MKDIR=mkdir -p
export LD_D=gcc -shared -Xlinker -x
endif
#
include ../../Make.Rules
TITLE=pam_deny
#
LIBSRC = $(TITLE).c
LIBOBJ = $(TITLE).o
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
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)
endif
ifdef STATIC
$(LIBOBJS): $(LIBSRC)
$(LIBSTATIC): $(LIBOBJS)
$(LD) -r -o $@ $(LIBOBJS)
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
.c.o:
$(CC) $(CFLAGS) -c $<
include ../Simple.Rules
+2 -14
View File
@@ -1,23 +1,11 @@
/* pam_deny module */
/*
* $Id: pam_deny.c,v 1.4 1997/02/15 19:05:15 morgan Exp $
* $Id: pam_deny.c,v 1.2 2000/12/04 19:02:34 baggins Exp $
* $FreeBSD$
*
* Written by Andrew Morgan <morgan@parc.power.net> 1996/3/11
*
* $Log: pam_deny.c,v $
* Revision 1.4 1997/02/15 19:05:15 morgan
* fixed email
*
* Revision 1.3 1996/06/02 08:06:19 morgan
* changes for new static protocol
*
* Revision 1.2 1996/05/26 04:01:12 morgan
* added static support
*
* Revision 1.1 1996/03/16 17:47:36 morgan
* Initial revision
*
*/
/*
+5 -115
View File
@@ -1,126 +1,16 @@
#
# $Id: Makefile,v 1.8 1997/04/05 06:33:25 morgan Exp morgan $
# $Id: Makefile,v 1.2 2000/11/19 23:54:04 agmorgan Exp $
# $FreeBSD$
#
# 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!).
#
# $Log: Makefile,v $
# Revision 1.8 1997/04/05 06:33:25 morgan
# fakeroot
#
# Revision 1.7 1997/02/15 19:02:27 morgan
# updated email address
#
# Revision 1.6 1996/11/10 20:14:34 morgan
# cross platform support
#
# Revision 1.5 1996/09/05 06:32:45 morgan
# ld --> gcc
#
# Revision 1.4 1996/05/26 15:49:25 morgan
# make dynamic and static dirs
#
# Revision 1.3 1996/05/26 04:04:26 morgan
# automated static support
#
# Revision 1.2 1996/03/16 17:56:38 morgan
# tidied up
#
#
# Created by Andrew Morgan <morgan@parc.power.net> 1996/3/11
# Created by Andrew Morgan <morgan@linux.kernel.org> 2000/08/27
#
# Convenient defaults for compiling independently of the full source
# tree.
ifndef FULL_LINUX_PAM_SOURCE_TREE
export DYNAMIC=-DPAM_DYNAMIC
export CC=gcc
export CFLAGS=-O2 -Dlinux -DLINUX_PAM \
-ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
-Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional \
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline \
-Wshadow -pedantic -fPIC
export MKDIR=mkdir -p
export LD_D=gcc -shared -Xlinker -x
endif
#
#
include ../../Make.Rules
TITLE=pam_permit
#
LIBSRC = $(TITLE).c
LIBOBJ = $(TITLE).o
LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
LIBOBJS = $(addprefix static/,$(LIBOBJ))
ifdef DYNAMIC
LIBSHARED = $(TITLE).so
endif
ifdef STATIC
LIBSTATIC = lib$(TITLE).o
endif
####################### don't edit below #######################
all: dirs $(LIBSHARED) $(LIBSTATIC) register
dynamic/%.o : %.c
$(CC) $(CFLAGS) $(DYNAMIC) $(TARGET_ARCH) -c $< -o $@
static/%.o : %.c
$(CC) $(CFLAGS) $(STATIC) $(TARGET_ARCH) -c $< -o $@
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)
endif
ifdef DYNAMIC
$(LIBSHARED): $(LIBOBJD)
$(LD_D) -o $@ $(LIBOBJD)
endif
ifdef STATIC
$(LIBOBJS): $(LIBSRC)
endif
ifdef STATIC
$(LIBSTATIC): $(LIBOBJS)
$(LD) -r -o $@ $(LIBOBJS)
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
.c.o:
$(CC) $(CFLAGS) -c $<
include ../Simple.Rules
+2 -11
View File
@@ -1,20 +1,11 @@
/* pam_permit module */
/*
* $Id: pam_permit.c,v 1.5 1997/02/15 19:03:15 morgan Exp $
* $Id: pam_permit.c,v 1.2 2000/12/04 19:02:34 baggins Exp $
* $FreeBSD$
*
* Written by Andrew Morgan <morgan@parc.power.net> 1996/3/11
*
* $Log: pam_permit.c,v $
* Revision 1.5 1997/02/15 19:03:15 morgan
* fixed email address
*
* Revision 1.4 1997/02/15 16:03:10 morgan
* force a name for user
*
* Revision 1.3 1996/06/02 08:10:14 morgan
* updated for new static protocol
*
*/
#define DEFAULT_USER "nobody"