Commit Graph

312 Commits

Author SHA1 Message Date
des
1f26428646 Maybe I was a little too fast? Remove debugging code, and commit the
Makefile and man page which I'd forgotten to 'cvs add'.

Sponsored by:	DARPA, NAI Labs
2003-02-06 14:27:48 +00:00
des
adcc3ecbe9 Replace pam_wheel(8) with pam_group(8) which has a cleaner interface. The
pam_wheel(8) module was written to work in spite of a broken libpam, and
has grown organically since its inception, which is reflected in both its
functionality and implementation.  Rather than clean up pam_wheel(8) and
break backward compatibility, I've chosen to reimplement it under a new,
more generic name.

Sponsored by:	DARPA, NAI Labs
2003-02-06 14:24:14 +00:00
des
3e6b9e7efc Make sure the message is only printed once. 2003-02-06 14:19:50 +00:00
des
ea5370a075 Don't blame markm for what he didn't do - writing these man pages, for
instance.  Also bump the date since I made substantial modifications
earlier today.
2003-02-06 13:47:21 +00:00
des
8e490a4ac5 Update copyright. 2003-02-06 12:56:51 +00:00
des
1859534a54 Add support for escape sequences in the arguments (e.g. %u for user name)
Sponsored by:	DARPA, NAI Labs
2003-02-06 12:56:39 +00:00
des
18387ab2eb Export the PAM environment to the child process instead of the "normal"
environment list, which may be unsafe and / or sensitive.

Sponsored by:	DARPA, NAI Labs
2003-02-06 12:40:58 +00:00
des
7587cbe3ba Minimal manual page for pam_kerberosIV(8).
Sponsored by:	DARPA, NAI Labs
2003-02-06 10:55:11 +00:00
des
2f3f171cbe In pam_sm_acct_mgmt(), retrieve the cached credentials before trying to
initialize the context.  This way, a failure to initialize the context is
not fatal unless we actually have work to do - because if we don't, we
return PAM_SUCCESS without even trying to initialize the context.
2003-02-03 09:45:41 +00:00
des
4e2d7720df Whitespace cleanup 2003-02-03 09:43:28 +00:00
des
43d52f88dc OpenPAMify. 2003-02-02 18:43:58 +00:00
nectar
7ecaf1e74b Do not return inappropriate error codes in pam_sm_setcred. 2003-01-29 21:20:38 +00:00
nectar
44a92fbc06 About September 2001, I consulted with all the previous authors of
pam_krb5 to consolidate the copyright texts.  The semi-official
pam_krb5 module has been distributed with this new license text ever
since, but I'm just now getting around to updating the text here.
2003-01-10 13:38:44 +00:00
schweikh
fec6546e12 english(4) police. 2002-12-27 12:15:40 +00:00
ru
30f31561da mdoc(7) police: removed gratuitous .Pp call. 2002-12-23 15:21:57 +00:00
des
7966ff24b5 Merge in most non-style differences from Andrew Korty's pam_ssh 1.7. 2002-12-16 14:33:18 +00:00
ru
ea54687b0d mdoc(7) police: .Dt is ALL UPPERCASE.
Approved by:	re
2002-12-12 08:19:47 +00:00
ru
3f859aa2ab mdoc(7) police: formatting nits.
Approved by:	re
2002-11-29 15:57:50 +00:00
des
c88eb4583e Whitespace nits.
Approved by:	re (bmah)
2002-11-28 20:11:31 +00:00
des
29b2e3446c Add a PAM_MODULE_ENTRY to this module so it'll actually do something.
Approved by:	re (bmah)
2002-11-28 20:05:42 +00:00
peter
97526c738c utmp.ut_time and lastlog.ll_time are explicitly int32_t rather than
time_t.  Deal with the possibility that time_t != int32_t.  This boils
down to this sort of thing:
 -   time(&ut.ut_time);
 +   ut.ut_time = time(NULL);
and similar for ctime(3) etc.  I've kept it minimal for the stuff
that may need to be portable (or 3rd party code), but used Matt's time32
stuff for cases where that isn't as much of a concern.

Approved by: re (jhb)
2002-11-15 22:42:00 +00:00
ru
6db7cbc3e1 Make dynamic PAM modules depend on dynamic PAM library.
Requested by:	des, markm
2002-11-14 19:24:51 +00:00
nectar
96e5cda4e0 The pam_krb5 module stored a reference to a krb5_ccache structure as
PAM module state (created in pam_sm_authenticate and referenced later
in pam_sm_setcred and pam_sm_acct_mgmt).  However, the krb5_ccache
structure shares some data members with the krb5_context structure
that was used in its creation.  Since a new krb5_context is created
and destroyed at each PAM entry point, this inevitably caused the
krb5_ccache structure to reference free'd memory.

Now instead of storing a pointer to the krb5_ccache structure,
we store the name of the cache (e.g. `MEMORY:0x123CACHE') in
pam_sm_authenticate, and resolve the name in the other entry points.

This bug was uncovered by phkmalloc's free'd memory scrubbing.

Approved by:	re (jhb)
2002-11-13 17:46:15 +00:00
nectar
04eec5ce47 Use krb5_get_err_text' instead of error_message' so that instead of
e.g.

   Unknown error: -1765328378

we get

   Client not found in Kerberos database

Another way to accomplish this would have been to leave
`error_message' alone, but to explicitly load the Kerberos com_err
error tables.  However, I don't really like the idea of a PAM module
dorking with global tables.

Approved by:	re (jhb)
2002-11-13 17:44:29 +00:00
des
0ff879bc38 Allow the admin to specify a different NAS identifier than the hostname.
Submitted by:	Boris Kovalenko <boris@ntmk.ru>
2002-10-28 10:28:46 +00:00
rwatson
8601e0f680 Introduce 'exempt_if_empty' option to pam_wheel(8), which bypasses the
group membership requirement if the group has no explicit members listed
in /etc/group.  By default, this group is the wheel group; setting this
flag restores the default BSD behavior from 4.x.

Reviewed by:	markm
Requested by:	various
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-18 02:37:29 +00:00
ru
b3c0f70717 Build kerberized versions of the PAM library, and install them
into corresponding distributions during "make release".  (This
also cleans the "slib" distribution up from the .o files.)

PR:		misc/43825 (inspired by)
2002-10-11 14:17:09 +00:00
peter
0a7f0ba37e Zap now-unused SHLIB_MINOR 2002-09-28 00:25:32 +00:00
peter
a51c9b6627 Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports.  As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL.  It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha
2002-09-17 01:49:00 +00:00
des
98c860bfbd Since pam_get_authtok(3) doesn't know about our options structure, setting
the PAM_ECHO_PASS option on-the-fly is a NOP (though it wasn't with the
old pam_get_pass(3) code).  Instead, call pam_prompt(3) directly.  This
actually simplifies the code a bit.

MFC after:	3 days
2002-07-30 08:32:03 +00:00
des
e3e6667313 Install more man pages - I thought I'd committed this ages ago... 2002-07-23 17:59:46 +00:00
ru
eac60c3d5c Tidy up. 2002-06-06 13:55:01 +00:00
des
da6b7e20d7 Missed one in previous commit.
Pointed out by:	nectar
2002-05-30 20:48:59 +00:00
ru
e540238573 mdoc(7) police: kill whitespace at EOL. 2002-05-30 14:52:00 +00:00
ru
8a216468eb mdoc(7) police: polish markup. 2002-05-30 14:49:57 +00:00
ru
0be8bf82ae mdoc(7) police: tidy up the markup. 2002-05-30 14:32:48 +00:00
nectar
e9b88414b4 Add pam_ksu(8), a module to do Kerberos 5 authentication and
$HOME/.k5login authorization for su(1).

Reviewed by:	des (earlier version)
2002-05-28 20:52:31 +00:00
des
2de71ade06 Add openpam_nullconv.3. 2002-05-24 13:22:15 +00:00
des
418fa5ac12 Add missing include. 2002-05-24 13:20:40 +00:00
des
617cfa745a Just to show that PAM can do almost anything from the ridiculous to the
obscene, or - as they say in New York - sophisticated, add pam_echo(8) and
pam_exec(8) to our ever-lengthening roster of PAM modules.

Sponsored by:	DARPA, NAI Labs.
2002-05-23 22:03:06 +00:00
des
33ce52c25a Hide a couple of unguarded error returns behind the no_fail test. 2002-05-23 00:02:59 +00:00
jmallett
f49de03759 Free old_pwd only in the code path where it has been allocated.
Reviewed by:	des
2002-05-22 23:18:25 +00:00
obrien
1250c0d8e3 Do not build pam_ssh if NOSECURE is set (NO_OPENSSL is on a subset of NOSECURE) 2002-05-15 20:25:32 +00:00
ru
dc9ee40833 Major cleanup of bsd.lib.mk.
Get rid of the INTERNALSTATICLIB knob and just use plain INTERNALLIB.
INTERNALLIB now means to build static library only and don't install
anything.  Added a NOINSTALLLIB knob for libpam/modules.  To not
build any library at all, just do not set LIB.
2002-05-13 10:53:24 +00:00
ru
59049318b6 Added new bsd.incs.mk which handles installing of header files
via INCS.  Implemented INCSLINKS (equivalent to SYMLINKS) to
handle symlinking include files.  Allow for multiple groups of
include files to be installed, with the powerful INCSGROUPS knob.
Documentation to follow.

Added standard `includes' and `incsinstall' targets, use them
in Makefile.inc1.  Headers from the following makefiles were
not installed before (during `includes' in Makefile.inc1):

	kerberos5/lib/libtelnet/Makefile
	lib/libbz2/Makefile
	lib/libdevinfo/Makefile
	lib/libform/Makefile
	lib/libisc/Makefile
	lib/libmenu/Makefile
	lib/libmilter/Makefile
	lib/libpanel/Makefile

Replaced all `beforeinstall' targets for installing includes
with the INCS stuff.

Renamed INCDIR to INCSDIR, for consistency with FILES and SCRIPTS,
and for compatibility with NetBSD.  Similarly for INCOWN, INCGRP,
and INCMODE.

Consistently use INCLUDEDIR instead of /usr/include.

gnu/lib/libstdc++/Makefile and gnu/lib/libsupc++/Makefile changes
were only lightly tested due to the missing contrib/libstdc++-v3.
I fully tested the pre-WIP_GCC31 version of this patch with the
contrib/libstdc++.295 stuff.

These changes have been tested on i386 with the -DNO_WERROR "make
world" and "make release".
2002-05-12 16:01:00 +00:00
des
35b06c061e Don't declare krb5_mcc_ops, it's already declared in <krb5.h> 2002-05-12 07:06:27 +00:00
des
abc14dea11 Use libutil and libypclnt for all passwd manipulation and NIS needs.
Sponsored by:	DARPA, NAI Labs
2002-05-08 00:54:29 +00:00
des
8bc66e6368 Add a no_fail option.
Sponsored by:	DARPA, NAI Labs
2002-05-08 00:31:45 +00:00
des
d70ae92570 Add pam_ftpusers(8), which enforces /etc/ftpusers.
Sponsored by:	DARPA, NAI Labs
2002-05-08 00:30:10 +00:00
des
c135cf25dc Add openpam_nullconv.c to SRCS. 2002-05-02 04:42:59 +00:00