Commit Graph

347 Commits

Author SHA1 Message Date
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
des
a6e173ee33 Don't ask root for the old password, except in the NIS case.
Sponsored by:	DARPA, NAI Labs
2002-04-26 19:28:17 +00:00
des
522debf4fd Fix a really dumb bug (missing curly braces around the body of an if
statement) that caused pam_sm_chauthtok() to always fail silently.
2002-04-26 01:47:48 +00:00
des
13a8751373 Oops, fix an inverted if test. 2002-04-20 16:52:41 +00:00
des
dc33f36d34 Strip /dev/ from tty name, and clean up the "last login" printout.
Sponsored by:	DARPA, NAI Labs
2002-04-20 16:44:32 +00:00
ru
67f99d8b8c Revert previous change. bsd.dep.mk,v 1.31 had a bug that was fixed
in revision 1.32 and made this change OBE.
2002-04-17 05:46:41 +00:00
des
283ac5768b Add a missing .El and fix a typo.
Spotted by:	Solar Designer <solar@openwall.com>
Sponsored by:	DARPA, NAI Labs
2002-04-16 22:38:47 +00:00
ru
bc595cdde6 Reflect change in share/mk/bsd.dep.mk,v 1.31. 2002-04-16 12:52:22 +00:00
des
b41d43d579 Revert previous commit, it is incorrect. 2002-04-15 22:51:31 +00:00
obrien
f46bf6f79a Properly spell rpcsvc/ypclnt.h and fix the build. 2002-04-15 22:47:28 +00:00
des
1a41b2c911 Throw in NO_WERROR to please the peanut gallery. 2002-04-15 13:10:28 +00:00
des
ade0386724 Use PAM_SUCCESS instead of PAM_IGNORE. 2002-04-15 06:26:32 +00:00
des
2eefb07eae Whitespace nits. 2002-04-15 03:52:22 +00:00
des
60c7199162 Add a manual page based on Solar Designer's README.
Sponsored by:	DARPA, NAI Labs
2002-04-15 03:45:14 +00:00
des
8ac6182da3 pam_passwdqc depends on libcrypt. 2002-04-15 03:44:42 +00:00
des
887c2ed009 Prompt for new password during update phase, not during preliminary phase.
Sponsored by:	DARPA, NAI Labs
2002-04-15 03:00:14 +00:00
des
ee50be8376 Dike out most of the NIS code and replace it with calls to libypclnt.
Rework pam_sm_chauthtok() so it (mostly?) works.
The standard pw stuff still needs to move into a library somewhere.

Sponsored by:	DARPA, NAI Labs
2002-04-15 02:34:43 +00:00
des
934fb9469d pam_passwdqc builds now. 2002-04-14 22:31:36 +00:00
des
de25faf452 More recent versions of pam_passwdqc (not yet released) build with very
few warnings.
2002-04-14 18:48:57 +00:00
des
8a86f9fc45 New files in OpenPAM Cineraria.
Sponsored by:	DARPA, NAI Labs
2002-04-14 18:30:27 +00:00
des
3850ee9d70 Cosmetic nit. 2002-04-14 18:30:03 +00:00
des
0559ebe0fd Cast a ptrdiff_t to int before using it as a printf field width. 2002-04-14 16:44:04 +00:00
des
ec61ca3f2c Change || into && (braino in previous commit). Also append \n to the
error message.
2002-04-13 06:14:30 +00:00
des
a8ed917937 Major cleanup:
- add __unused where appropriate
  - PAM_RETURN -> return since OpenPAM already logs the return value.
  - make PAM_LOG use openpam_log()
  - make PAM_VERBOSE_ERROR use openpam_get_option() and check flags
    for PAM_SILENT
  - remove dummy functions since OpenPAM handles missing service
    functions
  - fix various warnings

Sponsored by:	DARPA, NAI Labs
2002-04-12 22:27:25 +00:00
des
bee5210d96 Add a pam_rhosts module, loosely based on code submitted by Danny Braniss.
Submitted by:	Danny Braniss <danny@cs.huji.ac.il>
Sponsored by:	DARPA, NAI Labs
2002-04-12 20:10:18 +00:00
des
ca8afeff70 Rename the even_root option to allow_root.
Sponsored by:	DARPA, NAI Labs
2002-04-12 20:05:27 +00:00
ru
79d726fd79 Reimplement the hack to put pam_static.o into .depend with some magic. 2002-04-11 12:21:16 +00:00
ru
aab0c4649e Moved SHLIB_NAME definition into one place.
Approved by:	des
2002-04-10 18:07:05 +00:00
ru
fe715089ee Fixed broken "make depend; make clean; make all" sequence.
I've looked for this example for a long time, to demonstrate
some people why it's a really BAD idea to use ${.OBJDIR}
instead of ".".  I hope these people are reading this.  :-)

Approved by:	des
2002-04-10 18:00:32 +00:00
ru
a7461c1086 Fix broken `checkdpadd'.
-lroken is an installable library, there's no need to give an
explicit path to it.  In any case, -L paths should be specified
in LDFLAGS if needed.

Approved by:	des
2002-04-10 17:53:43 +00:00
ru
06b9707e4e Don't override standard _EXTRADEPEND actions, add to them.
Fix CLEANFILES.
Collapse openpam_static_modules.o generation.
2002-04-10 17:46:59 +00:00
des
1f9601f664 Remove debugging code that was inadvertantly brought in by previous commit. 2002-04-08 12:41:08 +00:00
des
9cd6ec4ad1 Use OpenPAM's credential switching functions.
Sponsored by:	DARPA, NAI Labs
2002-04-08 12:38:50 +00:00
des
23313aa020 Add new files and man pages from OpenPAM Cinchona.
Sponsored by:	DARPA, NAI Labs
2002-04-08 12:34:53 +00:00
des
74ba30d1ef Remove commented-out WARNS thingy. 2002-04-08 12:33:48 +00:00
ru
54bcb55671 Align for const poisoning in -lutil. 2002-04-08 11:07:51 +00:00
des
a3ac60a8cb Reorganize pam_sm_authenticate() to reduce code duplication.
Sponsored by:	DARPA, NAI Labs
2002-04-07 21:18:18 +00:00
des
71240839dd Fix bug in previous commit that passed the wrong default value to
login_getcapstr(3).  Also fix a longer-standing bug (login_close(3)
frees the string returned by login_getcapstr(3)) by reorganizing the
code a little, and use login_getpwclass(3) instead of login_getclass(3)
if we already have a struct pwd.

Sponsored by:	DARPA, NAI Labs
2002-04-07 20:43:27 +00:00
des
ffe3791d9f This one needs NO_WERROR too. 2002-04-07 12:53:58 +00:00
des
9c4d69ea42 Turn on NO_WERROR due to namespace pollution in krb5 headers. 2002-04-07 04:44:16 +00:00
des
ce173531cb Aggressive cleanup of warnings + authtok-related code in preparation for
PAMifying passwd(1).

Sponsored by:	DARPA, NAI Labs.
2002-04-06 19:30:04 +00:00
des
4172a237d2 Disconnect pam_passwdqc for now, it has some issues that need resolving. 2002-04-06 19:25:36 +00:00
des
78c249929b Fix some style issues, a const warning, and abuse of PAM_ABORT.
Sponsored by:	DARPA, NAI Labs
2002-04-06 14:25:04 +00:00
des
d34172f018 Remove some duplicate free()s and add some that were missing.
Submitted by:	tmm
2002-04-05 20:00:05 +00:00
des
b4638d93bf pam_get_pass() -> pam_get_authtok() 2002-04-05 10:49:45 +00:00
des
b57ec45f38 Upgrade to something quite close, but not identical, to version 1.6 of
Andrew Korty's pam_ssh.  The most notable difference is that this uses
commas rather than colons to separate items in the "keyfiles" option.

Sponsored by:	DARPA, NAI Labs
2002-04-04 18:45:21 +00:00
des
4189a2f933 Add pam_passwdqc to the build.
Sponsored by:	DARPA, NAI Labs
2002-04-04 16:08:28 +00:00
markm
962bcb4df1 Fix for OPIE 2.4. 2002-03-22 09:20:05 +00:00
ru
750b21097f mdoc(7) police: fix SYNOPSIS, sort xrefs, kill extra whitespace. 2002-03-18 15:59:53 +00:00
ru
9380002871 mdoc(7) police: nits. 2002-03-18 15:55:53 +00:00
ru
645af89f24 mdoc(7) police: sort xrefs, kill extra whitespace. 2002-03-18 15:52:28 +00:00
cjc
51b661db90 Fix world breakage introduced by my recent modifications to
chpass(8). The relations between libc, libpam, chpass, passwd, and
vipw are a mess and probably should be cleaned up.

Submitted by:	Peter Pentchev <roam@ringlet.net>
2002-03-18 12:55:28 +00:00
ru
e1cb7e39d6 mdoc(7) police: tiny fixes. 2002-03-15 18:09:32 +00:00
ru
1e3222d346 mdoc(7) police: expand contractions. 2002-03-15 18:06:25 +00:00
des
7f7038bdcf NAI DBA update. 2002-03-14 23:27:59 +00:00
markm
02184350e0 Remove the use of random(3), and encapsulate the salt-generation in
its own function. The use of arc4random(3) is hopeless overkill here,
but that does not hurt anything.

Requested by:	ache
2002-03-14 16:41:36 +00:00
sobomax
c3acf5c512 Don't ignore system CFLAGS. 2002-03-07 16:56:19 +00:00
markm
74f043c943 Fix build for OpenPAM. The directories needed tweeking. 2002-03-07 16:03:56 +00:00
des
2196bcec63 This file is not needed any more 2002-03-07 12:03:50 +00:00
green
ccf626b89e Now pam_alreadyloggedin lives in the ports. 2002-03-07 02:23:19 +00:00
green
846b72e968 Add the pam_alreadyloggedin(8) module, which allows for authentication
based on information that the user is already logged in.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-03-06 18:21:28 +00:00
roam
dc23c1a5c5 Unbreak the pam_krb5 build: cast a couple of const pointers
to normal char *.  A better fix might be some const'ifying
of the Heimdal code, but this will do to fix the build
for the present.

Approved by:	des
2002-03-06 16:49:02 +00:00
des
d9b8621133 Add forgotten NOPROFILE that broke world. 2002-03-06 12:11:05 +00:00
des
c0bbe50538 Switch to OpenPAM. Bump library version. Modules are now versioned, so
applications linked with Linux-PAM will still work.
Remove pam_get_pass(); OpenPAM has pam_get_authtok().
Remove pam_prompt(); OpenPAM has pam_{,v}{error,info,prompt}().
Remove pam_set_item(3) man page as OpenPAM has its own.

Sponsored by:	DARPA, NAI Labs
2002-03-05 21:56:25 +00:00
des
8daae10e98 Add missing dependency on libutil. 2002-03-05 12:52:03 +00:00
sobomax
f41a9d6db5 Create /var/log/lastlog if it doesn't exist.
Submitted by:	des
2002-02-20 07:47:06 +00:00