Commit Graph

409 Commits

Author SHA1 Message Date
des
677443f91f MFC: (1.6) childerr needs to be volatile.
PR:		bin/85830
2007-09-28 07:04:35 +00:00
yar
f321b352ce MFC with compatibility shims:
pam_nologin(8) starts to provide an account management function in
addition to the existing authentication function so that sshd(8) can
respect nologin(5) while the rest of PAM consumers work as earlier.
In turn, sshd(8) starts to use the new account management function
in pam_nologin(8) and thus respect nologin(5) even when doing public
key authentication with sshd's internal routines (PAM authentication
isn't called at all in that case).

Based on:

  1.12      +2 -10     src/lib/libpam/modules/pam_nologin/pam_nologin.c
  1.6       +10 -11    src/lib/libpam/modules/pam_nologin/pam_nologin.8
  1.16      +1 -1      src/etc/pam.d/sshd

Approved by:	des
PR:		bin/112574
2007-08-17 11:28:25 +00:00
yar
fa260264c0 MFC:
Use the current user's login class for the decisions about where
  the nologin(5) file is located and whether the user may bypass its
  restriction.

  Add some error checks.

  Revision  Changes    Path
  1.7       +16 -15    src/lib/libpam/modules/pam_nologin/pam_nologin.8
  1.13      +42 -29    src/lib/libpam/modules/pam_nologin/pam_nologin.c

Note: To avoid POLA violation, the merged module still lets root
in irrespective of login.conf settings.  In HEAD, root has to have
an explicit "ignorenologin" capability to bypass nologin(5).

PR:	bin/107612
2007-07-12 14:11:57 +00:00
yar
3cb34a2f46 MFC:
pam_unix.c	1.52
	pam_unix.8	1.13

  In account management, verify whether the account has been locked
  with `pw lock', so that it's impossible to log into a locked account
  using an alternative authentication mechanism, such as an ssh key.
  This change affects only accounts locked with pw(8), i.e., having a
  `*LOCKED*' prefix in their password hash field, so people still can
  use a different pattern to disable password authentication only.

  Mention all account management criteria in the manpage.

PR:		bin/71147
2007-04-26 06:39:01 +00:00
ru
9d0ace7e37 MFC: 1.12: The pam_unix module also provides password management.
PR:		docs/93491
Approved by:	re (hrs)
2006-10-16 12:02:15 +00:00
des
7b3ab265ce MFC: OpenSSH 4.4p1.
Approved by:	re (kensmith)
2006-10-06 14:07:23 +00:00
des
97272cbdd9 MFC: (1.26) reject usernames that are longer than OPIE can handle.
Approved by:	re (kensmith)
2006-09-30 11:07:10 +00:00
ru
26a1662369 Fix build by making this look like rev. 1.25. 2006-07-14 16:48:52 +00:00
des
7d6376ba9e MFC: include ssh_namespace.h 2006-07-14 06:36:13 +00:00
yar
8c3ef7986c MFC:
Some years ago handling login.access(5) was moved from login(1) to
pam_login_access(8) completely and unconditionally.  This patch is
to finalize the move by deleting unused files and defines, and by
updating the manpages.  In addition, login.access.5 will be installed
from the pam_login_access src directory, to where it belongs and
where it has lived for quite a while, too.

Besides satisfying general purism, this patch should stop ongoing
attempts to fix the dead code.

Approved by:	re (mux)
2006-03-09 22:18:07 +00:00
des
b0f5f61587 MFC: don't take unprotected keys into account for authentication.
PR:		bin/81231
Approved by:	re (kensmith)
2005-09-30 14:02:29 +00:00
cperciva
e59c7653ea MFC revision 1.5:
When (re)allocating space for an array of pointers to char, use
  sizeof(*list), not sizeof(**list).  (i.e., sizeof(pointer) rather than
  sizeof(char)).

Approved by:	re (scottl)
2005-09-19 20:56:10 +00:00
kensmith
1f1979ea2c Insta-MFC of the shared library version bump. All shared libraries
whose version has not already been bumped since RELENG_5 are being
bumped.

Revisions of files being MFC-ed:

> Path						Revision
> src/gnu/lib/libdialog/Makefile		1.43
> src/gnu/lib/libg2c/Makefile			1.16
> src/gnu/lib/libobjc/Makefile			1.27
> src/gnu/lib/libreadline/Makefile.inc		1.12
> src/gnu/lib/libregex/Makefile			1.32
> src/gnu/lib/libstdc++/Makefile		1.56
> src/kerberos5/lib/Makefile.inc		1.7
> src/lib/Makefile.inc				1.3
> src/lib/libalias/Makefile			1.31
> src/lib/libarchive/Makefile			1.37
> src/lib/libbegemot/Makefile			1.3
> src/lib/libbluetooth/Makefile			1.2
> src/lib/libbsnmp/Makefile.inc			1.6
> src/lib/libbz2/Makefile			1.6
> src/lib/libc_r/Makefile			1.42
> src/lib/libcrypt/Makefile			1.36
> src/lib/libdevstat/Makefile			1.15
> src/lib/libdevstat/devstat.h			1.11
> src/lib/libedit/Makefile			1.29
> src/lib/libexpat/Makefile			1.5
> src/lib/libfetch/Makefile			1.45
> src/lib/libftpio/Makefile			1.14
> src/lib/libgpib/Makefile			1.2
> src/lib/libipsec/Makefile			1.17
> src/lib/libkiconv/Makefile			1.3
> src/lib/libmagic/Makefile			1.7
> src/lib/libmp/Makefile			1.10
> src/lib/libncp/Makefile			1.6
> src/lib/libncurses/Makefile			1.79
> src/lib/libnetgraph/Makefile			1.11
> src/lib/libngatm/Makefile			1.6
> src/lib/libopie/Makefile			1.21
> src/lib/libpam/Makefile.inc			1.17
> src/lib/libpthread/Makefile			1.54
> src/lib/libradius/Makefile			1.12
> src/lib/libsdp/Makefile			1.4
> src/lib/libsmb/Makefile			1.8
> src/lib/libtacplus/Makefile			1.7
> src/lib/libthr/Makefile			1.14
> src/lib/libthread_db/Makefile			1.6
> src/lib/libugidfw/Makefile			1.7
> src/lib/libusbhid/Makefile			1.10
> src/lib/libutil/Makefile			1.57
> src/lib/libvgl/Makefile			1.11
> src/lib/libwrap/Makefile			1.17
> src/lib/libypclnt/Makefile			1.13
> src/lib/msun/Makefile				1.72
> src/secure/lib/libcrypto/Makefile		1.74
> src/secure/lib/libssh/Makefile		1.35
> src/secure/lib/libssl/Makefile		1.22
> src/usr.sbin/bsnmpd/modules/Makefile.inc	1.10

Reviewed by:	ru
Approved by:	re (scottl)
2005-07-22 17:29:10 +00:00
kensmith
174219188d Missed one piece of the cluster's quirk. Need to override WARNS because
if _FREEFALL_CONFIG is set gcc bails since pam_sm_setcred() in pam_krb5.c
no longer uses any of its parameters.

Pointy hat:	kensmith
Approved by:	re (scottl)
2005-07-08 14:53:45 +00:00
kensmith
28b7f562fc This is sort of an MFS. Peter made these changes to the RELENG_*
branches but missed HEAD.  This patch extends his a little bit,
setting it up via the Makefiles so that adding _FREEFALL_CONFIG
to /etc/make.conf is the only thing needed to cluster-ize things
(current setup also requires overriding CFLAGS).

From Peter's commit to the RELENG_* branches:
> Add the freebsd.org custer's source modifications under #ifdefs to aid
> keeping things in sync.  For ksu:
> * install suid-root by default
> * don't fall back to asking for a unix password (ie: be pure kerberos)
> * allow custom user instances for things like www and not just root

The Makefile tweaks will be MFC-ed, the rest is already done.

MFC after:      3 days
Approved by:    re (dwhite)
2005-07-07 14:16:38 +00:00
des
09a62d7510 Use the correct login class when setting a new password.
PR:		65557, 72949
Submitted by:	Stephen P. Cravey <clists@gotbrains.org>
Approved by:	re (scottl)
MFC after:	2 weeks
2005-07-05 18:42:18 +00:00
des
4b2f009799 Update for OpenPAM Figwort.
Approved by:	re (kensmith)
2005-06-17 08:14:42 +00:00
ru
38fc91ca96 Assorted markup fixes.
Approved by:	re
2005-06-15 19:04:04 +00:00
des
2b425cf5e2 Don't use a cast as an lvalue.
Add a redundant test to make it painfully obvious to the reader that this
code does not support IPv6.

Approved by:	re (dwhite)
MFC after:	1 week
2005-06-13 21:18:52 +00:00
des
060c66b4a3 Use appropriate error codes for each facility instead of just PAM_AUTH_ERR.
Noticed by:	pjd
2005-06-10 06:16:13 +00:00
des
d78c118916 Revert the commits that made libssh an INTERNALLIB; they caused too much
trouble, especially on amd64.

Requested by:	ru
2005-06-07 09:31:28 +00:00
des
741e51c695 Fix libssh dependency. 2005-06-06 19:01:01 +00:00
ume
a3047efe51 NI_WITHSCOPEID cleanup
Reviewed by:	des
2005-05-13 20:51:09 +00:00
ru
1541af42f1 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
des
b0d098fb3c In addition to the PAM environment, export a handful of useful PAM items.
Suggested by:	Ed Maste <emaste@phaedrus.sandvine.ca>
2005-02-01 10:37:07 +00:00
des
23d6a7f7bd Add openpam_free_envlist(3). 2005-02-01 10:21:07 +00:00
rwatson
3441ac65f8 When "no_ccache" is set as an argument to the pam_krb5 module, don't
copy the acquired TGT from the in-memory cache to the on-disk cache
at login.  This was documented but un-implemented behavior.

MFC after:		1 week
PR:			bin/64464
Reported and tested by:	Eric van Gyzen <vangyzen at stat dot duke dot edu>
2005-01-24 16:49:50 +00:00
rwatson
8cc1e1c0d7 The final argument to verify_krb_v5_tgt() is the debug flag, not the
ticket forwardable flag, so key generation of debugging output to
"debug" rather than "forwardable".

Update copyright.

MFC after:	3 days
2005-01-23 15:57:07 +00:00
ru
3666aefb6a Fixed xref. 2005-01-21 10:48:35 +00:00
ru
f4c44b761b NOCRYPT -> NO_CRYPT 2004-12-21 10:16:04 +00:00
ru
e1caf1330c NOINSTALLLIB -> NO_INSTALLLIB 2004-12-21 09:51:09 +00:00
ru
74176cc161 NODOCCOMPRESS -> NO_DOCCOMPRESS
NOINFO -> NO_INFO
NOINFOCOMPRESS -> NO_INFOCOMPRESS
NOLINT -> NO_LINT
NOPIC -> NO_PIC
NOPROFILE -> NO_PROFILE
2004-12-21 09:33:47 +00:00
bz
4b83c5852a Add knob NO_NIS (fka NO_YP_LIBC) and make world compileable when set.
If turned on  no NIS support and related programs will be built.

Lost parts rediscovered by:	Danny Braniss <danny at cs.huji.ac.il>
PR:		bin/68303
No objections:	des, gshapiro, nectar
Reviewed by:	ru
Approved by:	rwatson (mentor)
MFC after:	2 weeks
2004-11-13 20:40:32 +00:00
ru
5db2b9d5b3 For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
cperciva
e629b37603 Join the 21st century: Cryptography is no longer an optional component
of releases.  The -DNOCRYPT build option still exists for anyone who
really wants to build non-cryptographic binaries, but the "crypto"
release distribution is now part of "base", and anyone installing from a
release will get cryptographic binaries.

Approved by:	re (scottl), markm
Discussed on:	freebsd-current, in late April 2004
2004-08-06 07:27:08 +00:00
kan
425239bf6e Downgrade WARNS level for GCC 3.4.2. 2004-07-28 05:49:15 +00:00
ru
b5e1c67f19 Markup nits. 2004-07-05 06:39:03 +00:00
ru
6651f20e0d Sort SEE ALSO references (in dictionary order, ignoring case). 2004-07-04 20:55:50 +00:00
ru
01548ace15 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
ru
5d2b66a3c7 Deal with unsafe tab characters. 2004-07-02 19:55:26 +00:00
ru
615a6a246a Markup, grammar, punctuation. 2004-07-01 18:20:57 +00:00
kan
211c1eafc9 Revert the last change. There are more 64bit platforms than amd64, and
they break due to diferent alignment restrictions.
2004-06-25 12:32:45 +00:00
kan
e14478e091 Remove the use of cast as lvalue. 2004-06-25 01:54:26 +00:00
des
950b98f1f7 Add -DDEBUG to DEBUG_FLAGS if PAM_DEBUG is defined. 2004-03-15 13:23:20 +00:00
markm
0b0ae8e16e Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)
that this provokes. "Wherever possible" means "In the kernel OR NOT
C++" (implying C).

There are places where (void *) pointers are not valid, such as for
function pointers, but in the special case of (void *)0, agreement
settles on it being OK.

Most of the fixes were NULL where an integer zero was needed; many
of the fixes were NULL where ascii <nul> ('\0') was needed, and a
few were just "other".

Tested on: i386 sparc64
2004-03-05 08:10:19 +00:00
cperciva
81f9b2b83a style cleanup: Remove duplicate $FreeBSD$ tags.
These files had tags after the copyright notice,
inside the comment block (incorrect, removed),
and outside the comment block (correct).

Approved by:	rwatson (mentor)
2004-02-10 20:42:33 +00:00
des
18879fb0df Fix numerous constness and aliasing issues. 2004-02-10 10:13:21 +00:00
ru
70146d9d56 Put libraries in the link order.
Reported by:	lorder(1) (modified to work with libraries)
2004-02-04 10:23:09 +00:00
ru
78280d4ce2 This module doesn't use libgssapi (and it looks never did). 2004-02-04 09:41:47 +00:00
des
2549da444c Implement pam_sm_close_session().
PR:		bin/61657
Submitted by:	Joe R. Doupnik <jrd@cc.usu.edu>
2004-01-26 19:28:37 +00:00