Commit Graph

384 Commits

Author SHA1 Message Date
des
31f8a355e2 Make sure rhostip is always initialized.
PR:		bin/51508
Submitted by:	Peter Grimshaw <peter@tesseract.demon.co.uk>
2003-04-30 00:49:42 +00:00
des
4f251ebb97 Treat an empty PAM_RHOST the same as a NULL one.
PR:		bin/51508
2003-04-30 00:44:05 +00:00
des
c3c465c42c Set $HOME to the correct directory (within the chroot tree). 2003-04-30 00:40:24 +00:00
des
9bee0a595d Remove a bogus null password check which assumed that a user with an empty
password must necessarily have an empty pwd->pw_passwd.  Also add a check
that prevents users from setting a blank password unless the nullok option
was specified.  Root is still allowed to give anyone a blank password.
2003-04-24 12:26:25 +00:00
des
0275c44b31 Connect the pam_chroot(8) module to the build. 2003-04-08 16:52:34 +00:00
des
633999b852 Add a cwd option which specifies where to chdir(2) after the chroot(2).
When using the /home/./foo scheme, this defaults to the rhs (/foo);
otherwise it defaults to /.
2003-04-08 16:52:18 +00:00
des
5a582e1e30 Experimental pam_chroot module (not connected to the build) 2003-03-30 22:58:23 +00:00
des
ccfd2047be This module is not WARNS-clean, due to brokenness in OpenSSL headers. 2003-03-10 09:19:08 +00:00
des
f30606f0ce Somewhat better wording. 2003-03-10 09:15:26 +00:00
des
3e06ef8dee Silence warning caused by OPIE brokenness. 2003-03-10 09:15:08 +00:00
obrien
e70feef239 style.Makefile(5) police
(I've tried to keep to the spirit of the original formatting)

Reviewed by:	des
2003-03-09 20:06:38 +00:00
markm
9981c003b1 KerberosIV de-orbit burn continues. Remove the KerberosIV PAM module. 2003-03-08 10:33:20 +00:00
markm
171598b312 Comment-only assistance to lint to kill warnings. 2003-03-08 10:30:49 +00:00
ru
779559752b mdoc(7) police: Nits. 2003-03-03 11:45:18 +00:00
ru
8b5b8ec6a7 mdoc(7) police: markup laundry. 2003-02-23 01:47:49 +00:00
des
d1e778062c Add an "allow_local" option which forces historical behaviour. 2003-02-16 13:01:03 +00:00
des
af39bbe733 Assume "localhost" if no remote host was specified. This is safe from a
POLA point of view since the stock /etc/opieaccess now allows localhost.
2003-02-15 23:26:49 +00:00
des
f91e91de52 Use pam_get_user(3) instead of pam_get_item(3) where appropriate. 2003-02-10 18:59:20 +00:00
des
3dcafca132 Complete rewrite of pam_ssh(8). The previous version was becoming hard
to maintain, and had security issues which would have required a major
rewrite to address anyway.

This implementation currently starts a separate agent for each session
instead of connecting each new session to the agent started by the first
one.  While this would be a Good Thing (and the old pam_ssh(8) tried to
do it), it's hard to get right.  I'll revisit this issue when I've had a
chance to test some modifications to ssh-agent(1).
2003-02-09 21:20:44 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
des
863a49b908 This file needs <syslog.h>.
Sponsored by:	DARPA, NAI Labs
2002-02-09 14:12:09 +00:00
ru
b2c3dc0715 Now that cross-tools ld(1) has been fixed to look for dynamic
dependencies in the correct place, record the fact that -lssh
depends on -lcrypto and -lz.

Removed false dependencies on -lz (except ssh(1) and sshd(8)).
Removed false dependencies on -lcrypto and -lutil for scp(1).

Reviewed by:	markm
2002-02-08 13:42:58 +00:00
markm
b090adde5f Remove NO_WERROR, now that WARNS=n is gone. 2002-02-06 18:46:48 +00:00
des
de2b43dc4e Three times lucky: <stddef.h>, not <sys/param.h> 2002-02-05 08:01:32 +00:00
des
d6eb982a3b Oops, the correct header to include for NULL is <sys/param.h>. 2002-02-05 07:53:00 +00:00
des
71559bdb87 #include <sys/types.h> for NULL (hidden by Linux-PAM header pollution)
Sponsored by:	DARPA, NAI Labs
2002-02-05 06:20:27 +00:00
des
4bbf527773 #include cleanup.
Sponsored by:	DARPA, NAI Labs
2002-02-05 06:08:26 +00:00
des
0b3772b62a ssh_get_authentication_connection() gets its parameters from environment
variables, so temporarily switch to the PAM environment before calling it.

Submitted by:	Takanori Saneto <sanewo@ba2.so-net.ne.jp>
2002-02-04 17:15:44 +00:00
markm
4e3ec91692 Protect "make buildworld" against -Werror, as this module does not
build cleanly.
2002-02-04 16:09:25 +00:00
markm
01ec73592a Add the other half of the salt-generating code. No functional
difference except that the salt is slightly harder to build
dictionaries against, and the code does not use srandom[dev]().
2002-02-04 00:28:54 +00:00
markm
01a4236106 WARNS=n fixes (and some stylistic issues). 2002-02-03 15:17:57 +00:00
des
2ee63fa6aa Remove an unnecessary #include that trips up OpenPAM. The header in question
is an internal Linux-PAM header which shouldn't be used outside Linux-PAM
itself, and has absolutely zero effect on pam_ftp.

Sponsored by:	DARPA, NAI Labs
MFC after:	1 week
2002-02-02 17:51:39 +00:00
des
2bbcd38b91 Post-repocopy cleanup.
Sponsored by:	DARPA, NAI Labs
2002-02-01 22:25:07 +00:00
des
73dcd2da5c Connect the pam_lastlog(8) and pam_login_access(8) modules to the build.
Sponsored by:	DARPA, NAI Labs
2002-02-01 08:49:53 +00:00
des
55cd9bb2e3 Still with asbestos longjohns on, completely PAMify login(1) and remove
code made redundant by various PAM modules (primarily pam_unix(8)).

Sponsored by:	DARPA, NAI Labs
2002-01-30 19:10:21 +00:00
des
1caa7bdd9e With asbestos longjohns on, integrate most of the checks normally done by
login(1) (password & account expiry, hosts.access etc.) into pam_unix(8).

Sponsored by:	DARPA, NAI Labs
2002-01-30 19:09:11 +00:00
des
246b0c7094 Move the code from pam_sm_authenticate() to pam_sm_acct_mgmt(). Simplify
it a little and try to make it more resilient to various possible failure
conditions.  Change the man page accordingly, and take advantage of this
opportunity to simplify its language.

Sponsored by:	DARPA, NAI Labs
2002-01-30 19:03:16 +00:00
markm
b63d9c7a6d WARNS=4 fixes. Protect with NO_WERROR for the modules that have
warnings that are hard to fix or that I've been asked to leave alone.
2002-01-24 18:37:17 +00:00
des
89b0bbd187 PAM modules shouldn't call putenv(); pam_putenv() is sufficient. The
caller is supposed to check the PAM envlist and export the variables it
contains; if it doesn't, it's broken.

Sponsored by:	DARPA, NAI Labs
2002-01-24 17:26:27 +00:00
des
30cd8777d2 Change the order in which pam_sm_open_session() updates the logs. This
doesn't really make any difference, except it matches wtmp(5) better.

Don't do anything in pam_sm_close_session(); init(8) will take care of
utmp and wtmp when the tty is released.  Clearing them here would make it
possible to create a ghost session by logging in, running 'login -f $USER'
and exiting the subshell.

Sponsored by:	DARPA, NAI Labs (but the bugs are all mine)
2002-01-24 17:15:04 +00:00
des
37b85e4ec4 Correctly interpret PAM_RHOST being unset as an indicator of a local
login.

Sponsored by:	DARPA, NAI Labs
2002-01-24 16:18:43 +00:00
des
0d0aa3b389 Correctly interpret PAM_RHOST being unset as an indicator of a local
login.
2002-01-24 16:16:01 +00:00
des
aba6f8182e Style nits.
Sponsored by:	DARPA, NAI Labs
2002-01-24 16:14:56 +00:00
des
0a9534cc78 Document the even_root option.
Sponsored by:	DARPA, NAI Labs
2002-01-24 13:35:06 +00:00
des
305ac9f47f Don't let root through unless the "even_root" option was specified.
Sponsored by:	DARPA, NAI Labs
2002-01-24 12:47:42 +00:00
des
77b808fd9a Add a PAM module that records sessions in utmp/wtmp/lastlog.
Sponsored by:	DARPA, NAI Labs
2002-01-24 09:45:17 +00:00
des
215400cfce Fix some pastos. Rather shoddy of me...
Sponsored by:	DARPA, NAI Labs
2002-01-24 09:44:22 +00:00
des
452f2b5db1 Add a PAM module that provides an account management component for checking
either PAM_RHOST or PAM_TTY against /etc/login.access.o

This uncovers a problem with PAM_RHOST, in that if we always set it, there
is no way to distinguish between a user logging in locally and a user
logging in using 'ssh localhost'.  This will be fixed by first making sure
that all PAM modules can handle PAM_RHOST being unset (which is currently
not the case), and then modifying su(1) and login(1) to not set it for
local logins.

Sponsored by:	DARPA, NAI Labs
2002-01-23 17:42:16 +00:00
des
b917ad33e0 Add an AUTHORS section crediting ThinkSec, DARPA and NAI Labs.
Sponsored by:	DARPA, NAI Labs
2002-01-23 17:16:00 +00:00
ru
c9d8bf8608 Add pam_ssh support to the static PAM library, libpam.a:
- Spam /usr/lib some more by making libssh a standard library.
- Tweak ${LIBPAM} and ${MINUSLPAM}.
- Garbage collect unused libssh_pic.a.
- Add fake -lz dependency to secure/ makefiles needed for
  dynamic linkage with -lssh.

Reviewed by:	des, markm
Approved by:	markm
2002-01-23 15:54:17 +00:00
des
e64688fcfb Base the comparison on UIDs, not on user names.
Sponsored by:	DARPA, NAI Labs
2002-01-23 15:16:01 +00:00
ru
5307ecb83c Make libssh.so useable (undefined reference to IPv4or6).
Reviewed by:	des, markm
Approved by:	markm
2002-01-23 15:06:47 +00:00
des
ac843e8b75 On second thought, getpwnam() failure should be treated just as if the user
existed, but had no OPIE key, i.e. PAM_IGNORE.

Pointed out by:	ache
Sponsored by:	DARPA, NAI Labs
2002-01-21 19:05:45 +00:00
des
aeaf48654b Return PAM_SERVICE_ERR rather than PAM_USER_UNKNOWN if getpwnam() fails, as
PAM_USER_UNKNOWN will break the chain, revealing to an attacker that the
user does not exist.

Sponsored by:	DARPA, NAI Labs
2002-01-21 18:53:03 +00:00
des
bc31e1293b Further changes to allow enabling pam_opie(8) by default:
- Ignore the {try,use}_first_pass options by clearing PAM_AUTHTOK before
   challenging the user.  These options are meaningless for pam_opie(8)
   since the user can't possibly know the right response before she sees
   the challenge.

 - Introduce the no_fake_prompts option.  If this option is set, pam_opie(8)
   will fail - rather than present a bogus challenge - if the target user
   does not have an OPIE key.  With this option, users who haven't set up
   OPIE won't have to wonder what that "weird otp-md5 s**t" means :)

Reviewed by:	ache, markm
Sponsored by:	DARPA, NAI Labs
2002-01-21 18:46:25 +00:00