Commit Graph

250 Commits

Author SHA1 Message Date
Dag-Erling Smørgrav
fea1e414df Use waitpid() instead of wait() since we know the pid of the process we
are waiting for, and we don't want to reap the wrong process.
2003-02-08 16:11:20 +00:00
Dag-Erling Smørgrav
2517862ed9 Change the process title as soon as possible to mask information passed on
the command line by getty(8).  This is not a perfect fix, but drastically
reduces the window of exposure.

Approved by:	re (rwatson)
MFC after:	1 week
2002-12-04 15:00:10 +00:00
Philippe Charnier
e72bbdf42e Do not reuse flag name in its definition. Remove inadequate sentence. 2002-10-16 15:17:38 +00:00
Poul-Henning Kamp
0845b8fa43 Be consistent about functions being static.
Spotted by:	FlexeLint
2002-10-15 18:24:31 +00:00
Warner Losh
84bbb6cab3 When login tries to do the chmod/chflags on a read only file system,
it complains that it can't do it because the filesystem is readonly.
Assume that when the user has a readonly /dev that they don't care if
login can't change the permissions/flags.  While this does break a few
things like msgs, we'll assume that the user setting up the read only
system knows what they are doing.

All this change does is to stop the complaint when the file system is
read only.  It also adds comments as to why EROFS and EOPNOTSUPP are
ignored.

This allows one to have a read-only / w/o a /dev MFS and have a
relatively warning-free existence.  /etc/rc still complains when it
can't chown/chflags/chmod things, but that's easy to ignore/tweak.

Reviewed by: roberto, phk
Sponsored by: Timing Solutions
2002-08-19 20:54:00 +00:00
David Malone
81b4504baa Don't reuse a const char * when we really want a char *. 2002-07-28 16:17:38 +00:00
Andrey A. Chernov
55f0377c44 Simplify TERM handling since now libutil not overwrites existen TERM for "term" 2002-06-28 22:56:31 +00:00
Andrey A. Chernov
79a20d3b58 Overwrite "term" from login.conf(5) for any known TERM 2002-06-28 04:59:39 +00:00
Dag-Erling Smørgrav
c51edfb77d Drive-by whitespace cleanup. 2002-05-28 06:46:37 +00:00
Dag-Erling Smørgrav
05da55ee50 Don't use PAM_SILENT unless hushlogin is set (perforce change 10123)
Sponsored by:	DARPA, NAI Labs
2002-04-22 06:27:16 +00:00
Bruce Evans
85549fe96b Fixed some style bugs ("From:" in vendor id line, disordered MAN line, and
blank lines).

Not unapproved of by:	markm
2002-04-21 12:43:14 +00:00
Philippe Charnier
e8937ba009 Use `The .Nm utility' 2002-04-20 12:18:28 +00:00
Dag-Erling Smørgrav
b897c4dfe0 Remove unused #define. 2002-04-16 22:07:15 +00:00
Ruslan Ermilov
f2f306b622 Align for const poisoning in -lutil. 2002-04-08 11:07:51 +00:00
Warner Losh
f1bb2cd2aa remove __P 2002-03-22 01:22:50 +00:00
Garance A Drosehn
3be0f8f038 Simple fix so the 'LOGIN FAILURE' message send to syslog will include
the correct userid, instead of random garbage.  This bug does not
exist in -stable.

Reviewed by:	freebsd-audit
2002-03-12 19:48:32 +00:00
Dag-Erling Smørgrav
519b6a4c8f 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
Mark Murray
e35f9517d6 Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3. 2002-02-08 23:07:37 +00:00
Dag-Erling Smørgrav
c60ed00a43 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
Dag-Erling Smørgrav
554b9a6e8e Back out rev 1.78, which is incorrect now that the PAM modules have been
fixed to accept a NULL PAM_RHOST.
2002-01-29 23:27:54 +00:00
Dag-Erling Smørgrav
f2c44ccec8 When running on a local terminal, set PAM_RHOST to the local hostname.
Sponsored by:	DARPA, NAI Labs
2002-01-21 16:19:38 +00:00
Andrey A. Chernov
07977587ab Back out PAM_CRED_ERR addition 2002-01-19 18:06:05 +00:00
Andrey A. Chernov
3e4f7c7f99 Add PAM_CRED_ERR as valid failure case 2002-01-19 09:01:17 +00:00
David Malone
9f5b04e925 Style improvements recommended by Bruce as a follow up to some
of the recent WARNS commits. The idea is:

1) FreeBSD id tags should follow vendor tags.
2) Vendor tags should not be compiled (though copyrights probably should).
3) There should be no blank line between including cdefs and __FBSDIF.
2001-12-10 21:13:08 +00:00
Mark Murray
1a8b24c257 Use __FBSDID(). Also do a bit of cosmetic #if and header-order
cleaning-up.
2001-12-02 20:54:57 +00:00
Mark Murray
a9648779a5 Sort includes. 2001-12-02 00:06:22 +00:00
Mark Murray
d2f6cd8fd5 Style fixups.
Sort function declarations, includes. Make consistent WRT use of _P()
macro (ugh!)

Inspired by:	bde
2001-12-01 21:12:04 +00:00
Bruce Evans
42f9157b63 Work around world breakage in previous commit. The bug is in
<security/pam_misc.h>.  It declares a function parameter named 'send',
so nothing that includes both <unistd.h> (which declares send(2)) and
<security/pam_misc.h> be compiled with WARNS=2 unless NO_WERRROR is
set.

Fixed order of WARNS.
2001-12-01 19:48:59 +00:00
Mark Murray
e317b97026 WARNS=2 fixes.
Reviewed by:	bde (a while back)
2001-12-01 17:46:46 +00:00
Robert Watson
0e80e8b216 o Add support for a 'nocheckmail' capability, which (if true) prevents
the 'You have mail.' check.  This is useful for sites that rely on
  remote mail access, rather than a local mail spool.  Due to the
  behavior of login_getcapbool(), the negated form is required so as
  to have appropriate results.
o This behavior may have to be independently added to sshd due to
  redundant implementation.
2001-11-16 04:39:16 +00:00
Robert Watson
0cd9461353 o Restore previous inconsistent style to login_fbtab.c, following its
modification to add glob support.  The submitted patch used a degraded
  form of KNF.

Reviewed by:	bde
2001-10-28 22:54:16 +00:00
Robert Watson
4983b09404 o Modify format of /etc/fbtab to accept glob matching patterns for
target devices, not just individual devices and directories.  This
  permits activities such as:

	ttyv0		0600	/dev/dsp*

  Whereas previously that was not supported.  This change is
  backwards-compatible, except where device names included globbing
  characters, which is not the case for any devices listed in MAKEDEV.

Submitted by:	Maxime Henrion <mux@qualys.com>
MFC after:	3 weeks
2001-10-25 20:45:47 +00:00
Robert Watson
2c19b38f62 o Modify NFS rights comment to note that the early credential changes
to test for a home directory don't set up the additional groups, and
  as such may limit users conservatively.  This does not affect the
  eventual credentials selected.
2001-09-15 17:09:39 +00:00
Ruslan Ermilov
cda2a9b2f0 Set BINOWN=root explicitly for setuid root binaries.
This is not "useless", as one may have non-default
setting for BINOWN in make.conf, and we still want
these to be installed setuid root in this case.
2001-09-13 06:48:18 +00:00
Ruslan Ermilov
63462b0c3a mdoc(7) police: tighten label width. 2001-09-04 10:24:52 +00:00
Mark Murray
142277ce04 Like su(1), make PAM use mandatory. Remove parts of the authentication
logic that are handled by PAM. Fix documentation to reflect this.
2001-08-30 11:27:36 +00:00
Mike Barcroft
ede8b1c50a Fix some bogus strncpy(3) to strlcpy(3) changes I made in the previous
revision.  <utmp.h> structures don't leave room for a NUL character.
Also fix "UNKNOWN" which should have just been UNKNOWN.

Pointed out by:	bde
2001-08-13 05:56:27 +00:00
Mike Barcroft
9ab4f41231 o Replace occurrences of strncpy(3) with strlcpy(3); most of
the uses of it were wrong anyway.
o Always check for NULL returns on strdup(3).
o Fix a possible buffer overflow in strcpy(3).
o Fix a format string vulnerability.
o t->ty_type in stypeof() could be NULL and eventually cause
  a segmentation fault in setenv(3), so check for that.

Eyeballed by:	kris
Reviewed by:	murray
MFC after:	3 days
2001-08-12 17:54:49 +00:00
Mark Murray
9567ba9dda Fix the environment handling:
However, there's still a bug in login.c
because you copy the environment *before* the call to pam_open_session,
which won't set the necessary variables set by /usr/ports/security/pam_ssh.

Submitted by:	Volker Stolz <stolz@hyperion.informatik.rwth-aachen.de>
2001-07-28 19:53:10 +00:00
Dima Dorfman
f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Ruslan Ermilov
625003720a mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 14:16:33 +00:00
Brian Somers
7bc6d0158f Fix the type of the NULL arg to execl()
Idea from: Theo de Raadt <deraadt@openbsd.org>
2001-07-09 09:24:06 +00:00
Eric Melville
a37b5e8e4c Remove an accidentaly added extra blank line.
Approved by:	murray
2001-05-22 06:20:27 +00:00
Guido van Rooij
5345e89b9d Disable SIGHUP while getting the login name.
Reviewed by:	security-officer
2001-05-21 20:19:59 +00:00
David E. O'Brien
5de20e57b2 Missed a few things. 2001-05-18 05:46:40 +00:00
David E. O'Brien
91a72a92d6 In a word -- style(9). 2001-05-18 05:33:42 +00:00
David E. O'Brien
078ae588ab Add the "prompt" and "passwd_prompt" fields to /etc/login.conf,
which makes lgoin more like getty in its ability to be configured.

Submitted by:	tlambert (code only)
2001-05-18 04:55:16 +00:00
Eric Melville
40c65ba9c7 Check for the expiration of an account and its password in the proper
order.

Reviewed by:	-audit (silence)
Approved by:	murray
Obtained from:	OpenBSD
MFC after:	5 days
2001-05-17 03:10:04 +00:00
Mark Murray
31a651fa98 Clean out some cruft that has been put in a better (central) place. 2001-05-01 10:30:08 +00:00
Mark Murray
289ef82e3c Enable (optional) static linking. 2001-04-28 08:06:33 +00:00
Mark Murray
5bc9d93db3 Add full PAM support for account management and sessions.
The PAM_FAIL_CHECK and PAM_END macros in su.c came from the util-linux
package's PAM patches to the BSD login.c

Submitted by:	"David J. MacKenzie" <djm@web.us.uu.net>
2001-03-27 19:40:51 +00:00
Ruslan Ermilov
dc12be5258 MAN[1-9] -> MAN. 2001-03-27 10:52:19 +00:00
Jacques Vidrine
17ada68462 Fix login so that it exports environmental variables that are set by PAM
modules (via pam_putenv).  The following variables will never be set in
this fashion:

   SHELL, HOME, LOGNAME, MAIL, CDPATH, IFS, PATH
   any variable starting with `LD_'
2001-02-09 13:21:50 +00:00
Jacques Vidrine
8ad2668439 Call pam_setcred.
Reviewed by:	markm, months ago
2001-01-23 21:43:32 +00:00
David E. O'Brien
1a37aa566b Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
2000-12-09 09:35:55 +00:00
Sheldon Hearn
69f2cf17a3 Add braces to avoid ambiguity in a nested conditional (silences a gcc
warning).
2000-04-26 10:38:19 +00:00
Sheldon Hearn
508d9a5b59 Fix excessive use of parenthesis in previous commit.
Requested by:	bde
2000-04-25 08:59:51 +00:00
Sheldon Hearn
1806a85c5a Do not issue a warning when chflags() fails with EOPNOTSUPP.
PR:		17875
Submitted by:	Bjoern Fischer <bfischer@Techfak.Uni-Bielefeld.DE>
2000-04-13 09:39:29 +00:00
Sheldon Hearn
87faa07bec Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 12:20:22 +00:00
Andrey A. Chernov
5403e5e3f3 Fix diagnostic printing test condition (was always true)
Approved by:	jkh
2000-02-28 01:48:50 +00:00
Ruslan Ermilov
6861fa8643 Remove option's description that has gone with PAM. 2000-02-27 07:14:33 +00:00
Yoshinobu Inoue
6d939e82e0 Added IPv6 name resolving support for utmp logging.
Approved by: jkh
2000-02-19 15:57:52 +00:00
Chris Costello
111b70aa08 Remove the version information from `.Os FreeBSD' here. Not only
might it confuse people, but it causes a warning message with
nroff, and no version history mentions a 1.2 version of FreeBSD.

If anything, a ``HISTORY'' section should show which version this
appeared in.
2000-02-14 01:47:54 +00:00
Peter Wemm
6e2578e4c4 Revert the libcrypt/libmd stuff back to how it was. This should not have
happened as it was working around problems elsewhere (ie: binutils/ld
not doing the right thing according to the ELF design).  libcrypt has
been adjusted to not need the runtime -lmd.  It's still not quite right
(ld is supposed to work damnit) but at least it doesn't impact all the
users of libcrypt in Marcel's cross-build model.
1999-12-18 13:55:17 +00:00
Marcel Moolenaar
7c99ddf2cc Add libmd (or move it after libcrypt). We don't want the linker to be
smart because it will definitely get it wrong. This popped up during
cross-linking.
1999-12-16 10:55:45 +00:00
Sheldon Hearn
e6d3cf2648 Correct some hard sentence breaks. Only those surrounding the previous
commit and those which cause ugly nroff output have been fixed, since
the purpose of the style guideline which they contravene is to reduce
the sizes of deltas.

Reported by:	bde
1999-09-14 11:46:04 +00:00
Sheldon Hearn
c644db6aa2 Improve shell documentation:
* Consistently misspell built-in as builtin.

* Add a builtin(1) manpage and create builtin(1) MLINKS for all shell
  builtin commands for which no standalone utility exists.  These MLINKS
  replace those that were created for csh(1).

* Add appropriate xrefs for builtin(1) to the csh(1) and sh(1) manpages,
  as well as to the manpages of standalone utilities which are supported
  as shell builtin commands in at least one of the shells. In such
  manpages, explain that similar functionality may be provided as a
  shell builtin command.

* Improve sh(1)'s description of the cd builtin command. Csh(1) already
  describes it adequately. Replace the cd(1) manpage with a builtin(1)
  MLINKS link.

* Clean up some mdoc problems: use Xr instead of literal "foo(n)"; use
  Ic instead of Xr for shell builtin commands.

* Undo English contractions.

Reviewed by:	mpp, rgrimes
1999-09-08 15:40:46 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Warner Losh
a761a4653a Clear all file flags when taking ownership of devices. Do not ignore
chown failures in some places, but instead log them like we do all
other errors.
1999-08-21 18:19:49 +00:00
Nik Clayton
3be5f1f5ce Add $Id$, to make it simpler for members of the translation teams to
track.

The $Id$ line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;

     .\"    $Id$
     .\"

If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.

Approved by:            bde
1999-07-12 20:24:20 +00:00
Andrey A. Chernov
0514336d66 remove uid switching before login_getpwclass, now done inside libutil
add gid switching before chdir and comment why it needed
1999-04-24 17:26:32 +00:00
Brian Somers
3a6afd0d44 Don't perform the trimdomain() functionality twice,
trimdomain() now works as expected.
1999-04-07 14:05:03 +00:00
Wolfram Schneider
57a476899d Added xref to nologin(5) 1999-02-01 21:04:15 +00:00
John Polstra
4a05a998b2 Force <bsd.libnames.mk> to be included, regardless of the object
format.  This fixes the undefined symbols when building login for
a.out.
1999-01-22 12:44:55 +00:00
John Polstra
e40131079f Allow login to be linked statically even when PAM is used, since
there is now a static version of libpam.
1999-01-20 21:58:46 +00:00
Andrzej Bialecki
11468b741a Add a compile knob to avoid using PAM code (login will use standard Unix
authentication only). This comes handy when you're tight on space.

Submitted by:	mostly John Baldwin <jobaldwi@vt.edu>
Reviewed by:	John D. Polstra <jdp@polstra.com>
1999-01-19 22:59:37 +00:00
Satoshi Asami
16ceea1b93 Move nologin from /etc to /var/run. This means one less file that has
to be written to /etc.

The only essential change is in paths.h, so any third-party software
written correctly will pick it up in the next rebuild.

Reviewed by:	the committers list (actually an old version)
1999-01-11 09:07:42 +00:00
Eivind Eklund
b606e33cb8 Make the timeout handler log any failed logins, to make sure failed
logins get logged.
1999-01-03 23:39:33 +00:00
Matthew Dillon
4bc34f94d6 Obtained from: "Jan B. Koum " <jkb@best.com>
Add a reference to pam(8) in the login(1) and login.access(5) manual
    pages.
1998-12-01 17:05:08 +00:00
John Polstra
cc4b11542b Work around the problem that login won't link if NOSHARED=yes,
because libpam is built shared only.  There is a way to build PAM
into a static library that contains all (or a selected subset) of
the modules.  But our Makefiles don't support that yet.  Until I get
that working, just force NOSHARED=no in login's Makefile.  Of
course, it still won't work if NOPIC is set.

Submitted by:	bde
1998-11-21 18:27:15 +00:00
John Polstra
e83348169b ATTENTION: INSTALL "/etc/pam.conf" FROM "src/etc"!!!
Change login to use PAM for authentication.  I kept the built-in
passwd/NIS authentication support, to handle cases where the system
is missing its "/etc/pam.conf" file.  S/Key and KerberosIV
authentication methods are removed from the login program, but
still available in PAM modules.
1998-11-21 02:22:14 +00:00
John Polstra
6717b4a8dd unifdef -DLOGIN_CAP. After almost 2 years, I think we can assume
it's here to stay.

This code is starting to look almost reasonable again.
1998-11-11 05:47:45 +00:00
John Polstra
8e32ad3bde Remove support for LOGIN_CAP_AUTH. It was never enabled, it was
not complete, and it hasn't been touched for 18 months.  All the
ifdefs obfuscate the code.  I discussed the LOGIN_CAP_AUTH support
with its author and he agreed that it is a dead end.  I am bringing
PAM into the tree within the next two weeks.  It is much more
flexible than LOGIN_CAP_AUTH, and will serve as a superior replacement
for it.
1998-11-11 02:16:01 +00:00
John Polstra
069b715f73 Fix a const-related compiler warning. 1998-11-11 01:53:12 +00:00
Mark Murray
8f176b4353 Use KJH's auth.conf parser to turn on/off Kerberos in userland. 1998-10-09 06:38:33 +00:00
David E. O'Brien
be0cde6f10 Remove useless `BINOWN=root' now that it is the default. 1998-09-19 22:42:06 +00:00
Joseph Koshy
580367f264 Remove hardcoded constant in favour of login.conf value.
PR: 	6529
Submitted by:	Dan Lukes <dan@obluda.cz>
1998-08-17 03:25:07 +00:00
Mark Murray
448bbb5805 Fix LIBDIR (for aout/ELF). 1998-08-06 21:41:13 +00:00
Bruce Evans
e662741c24 Backed out rev.1.31. It was a workaround for bugs in rev.1.4 of
libc/gen/getpass.c.  The old behaviour of blocking SIGINT and not
changing SIGQUIT was restored in rev.1.5 of getpass.c.  The change
here completely restores the old behaviour of not supporting killing
login with keyboard signals (only) at the password prompt.  There
is no reason to support this, since login can be exited normally
by typing a couple of ^D's.  Login certainly shouldn't dump core
in response to user input.  Previously, SIGQUIT killed login
immediately but SIGINT killed it only after the password was
entered.

PR:		7444
1998-07-31 07:22:31 +00:00
John Polstra
79bdd98bf7 Fix a couple of little bugs that prevented login.c from compiling
if LOGIN_CAP_AUTH was defined.  This is kind of silly, because
LOGIN_CAP_AUTH doesn't work anyway, is not defined currently,
probably will never be defined, and IMHO should not be defined.
But I'm sure you'll sleep better tonight, knowing that these bugs
are gone.
1998-07-22 04:33:12 +00:00
Atsushi Murai
89caae2932 Trim a domain part for wtmp as same as showed by "netstat -r".
Here is a some example for avoiding a confusion.

 It asssumes a logged host domain is "spec.co.jp". All
example is longer than UT_HOSTNAMELEN value.

   1) turbo.tama.spec.co.jp: 192.19.0.2  -> trubo.tama
   2) turbo.tama.foo.co.jp : 192.19.0.2  -> 192.19.0.2
   3) specgw.spec.co.jp    : 202.32.13.1 -> specgw

Submitted by:	Atsushi Murai <amurai@spec.co.jp>
1998-06-01 08:47:04 +00:00
Peter Wemm
c8ff18082f *blush*, typo during last minute editing.. 1998-04-30 16:50:07 +00:00
Peter Wemm
159da44105 Change euid while reading the user's .login_cap file in case the homedir
is on a NFS partion without root read access.  Also, flip euid again for
the duration of the chdir() to the homedir for the same reason.

PR: 5145
Submitted by: Joel.Faedi@esial.u-nancy.fr
Also tested by: A Joseph Koshy <koshy@india.hp.com>
1998-04-30 16:48:20 +00:00
Philippe Charnier
306005e78c .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq. 1998-03-23 07:48:45 +00:00
John Birrell
90836d4e24 gcc on alpha complains about nested comments. A comment in this
file referred to a path ending in "/*" which was reasonable to me,
but gcc wasn't so sure. So now the comment refers to a path ending in
"*".
1998-02-15 04:09:48 +00:00
Andrey A. Chernov
c8b701a4af Fix very rare but dangerous bug:
for some DES passwords
	crypt(real_password, salt)
is equal to
	crypt("", salt);
It means that this user (and not only he) can login without
entering password at all, just pressing Return.
So if empty password entered and crypted password is not empty,
invalidate any crypt result by assigning ":"
1998-02-13 21:02:53 +00:00
Guido van Rooij
e28be89140 Reset SGINT and SIGQUIT handling to default when asking for passwords.
Otherwise, when pressing the INT ke at the password prompt, the password
will be displayed. Now login will be killed.

Probably the same will have to be done for the LOGIN_CAP_AUTH case.
I have not done that.
Reviewed by:	Joerg Wunsch
1998-02-05 18:37:02 +00:00
David E. O'Brien
0cd829f2f9 Mention S/key and the skey /etc files. 1998-01-07 10:42:57 +00:00
Joerg Wunsch
f87ea4059a Fix a fatal typo.
PR:		bin/4801
Submitted by:	mishania@demos.su (Mikhail A. Sokolov)
1997-10-19 09:34:06 +00:00
Mark Murray
7f80a02080 Changes for KTH KerberosIV.
Also quieten -Wall a bit.
1997-09-28 08:57:24 +00:00
Nate Williams
b82359df88 "lmd" -> "-lmd"
Submitted by:	Vincent Poy <vince@venus.gaianet.net>
1997-09-05 18:15:29 +00:00
Peter Wemm
10da1efd82 If building elf, don't link in libmd.a just for libskey.so to use. Under
elf, libskey.so will not expose it's implementation on it's caller.
1997-09-05 12:00:01 +00:00
Philippe Charnier
9c9cb2bffe = -> ==, strcpy -> strncpy from OpenBSD.
update man page. Add usage().
Obtained from: OpenBSD
1997-07-22 07:39:43 +00:00
Masafumi Max NAKANE
d778c2c01b Fix the man page's title (.Dt).
(It has been ``SKEY.ACCESS''.)
1997-06-02 17:24:36 +00:00
Paul Traina
4b2fab7504 Restore backwards compatible default behavior for requirehome 1997-05-23 00:14:27 +00:00
David Nugent
a317d49b93 login_getclass() -> login_getpwclass().
auth_rmfiles() was being called in error without LOGIN_CAP_AUTH defined.
1997-05-10 18:57:16 +00:00
David Nugent
3169e0f139 Use isdialuptty() rather than hard-coded heuristic. 1997-04-13 15:26:04 +00:00
David Nugent
f72b1ff3be Submitted by: Sergei Chechetkin <csl@whale.sunbay.crimea.ua>
Fix incorrect bracket nesting. Closes PR#3144.
1997-04-01 11:54:06 +00:00
Warner Losh
1c8af87873 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 04:34:07 +00:00
David Nugent
1f5367caee Fix for logic in no-password accounts. 1997-03-27 10:09:09 +00:00
David Nugent
4a028a883d Don't bypass password prompt for root logins on insecure tty if
the root password is empty.
1997-03-25 05:15:04 +00:00
David Nugent
d8a7b3477f strdup() value of term to correctly preserve contents.
Rearrange validation logic so that it works correctly when
compiled with kerberos support. Closes PR#3056.
1997-03-24 21:22:12 +00:00
David Nugent
a52c1be6ff Submitted by: Paul Traina <root@shockwave.com> (partially)
Cleanup of #ifdef's for LOGIN_CAP.

  Fixed bug in empty shell (closes PR#2550).

  Refused root logins now displays standard "Login incorrect" and
	exhibits identical backoff behaviour to a failed login.

  Cleaned up logging of refused logins.

  Use #defines for login retries and backoff. Also implemented
	definable variables if LOGIN_CAP is defined, with
	"login-retries" and  "login-backoff" as capabilities
	in the default class (closes PR#2805).

  TERM from previous environment is no longer truncated.
1997-03-18 16:27:12 +00:00
Wolfram Schneider
67022bfc9f Include copyright message from <sys/copyright.h> 1997-03-01 18:02:44 +00:00
Andrey A. Chernov
7adec20804 Back out "shell" / pw_shell change, I was confused by the same
variable name (with different functionality)
1997-02-27 05:09:58 +00:00
Andrey A. Chernov
60797e8797 Fix few bogons with pw_shell / shell variables values mismatch
introduced by LOGIN_CAP
1997-02-27 03:52:22 +00:00
Peter Wemm
c115df18cd Revert $FreeBSD$ to $Id$ 1997-02-22 19:58:13 +00:00
Paul Traina
2ed98aa017 Cruft cleanup to eliminate useless warnings 1997-02-02 21:33:37 +00:00
Jordan K. Hubbard
d87e2a2cc5 Don't dereference NULL pwd on non-existant username (I wonder how long
THAT has been in here!).
1997-01-22 18:36:27 +00:00
David Nugent
5217f56ec6 Fix handling of empty shell field in passwd file (use /bin/sh); problem
was caused by introduction of login classes. Closes PR bin/2550.
Added references to login.conf to manpage, crossreference to login.conf(5).
1997-01-22 02:45:16 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
David Nugent
6acc486b3f Makes login login_cap-savvy.
Note that LOGIN_CAP_AUTH code (login authentication) is not (yet) enabled
and requires /usr/libexec/login_<style> authentication program support to
be added at a later date. The Makefile contains a macro LC_AUTH to turn
it on and prevent unnecessarily linking against skey/krb libs and the
addition of klogin.c module.

All other aspects of login_cap support are fully functional.
1997-01-11 07:16:35 +00:00
Wolfram Schneider
13608f6661 comma typos 1996-12-23 23:09:55 +00:00
Paul Traina
39ea627d62 Fix some compilation warnings. 1996-09-21 18:01:23 +00:00
Mike Pritchard
e830e7f5fe Document login's use of /etc/login.access.
Submitted by:	David E. O'Brien
1996-07-03 01:20:09 +00:00
Andrey A. Chernov
16ac215c11 Write numerical address instead of hostname for hostnames > UT_HOSTSIZE
to keep valid information in utmp and lastlog
1996-06-17 12:27:55 +00:00
Mark Murray
bbff7ca556 #include <kerberosIV/des.h> -> #include <des.h> 1996-02-11 09:18:18 +00:00
Mike Pritchard
4a8d02835c Fix a bunch of spelling errors in a bunch of man pages. 1996-01-30 13:52:50 +00:00
Peter Wemm
a5b996a7ec recording cvs-1.6 file death 1995-12-30 19:02:48 +00:00
Garrett Wollman
656dcd4316 Delete bogus referneces to timezone code internal header file `tzfile.h',
which is no longer bogusly installed in /usr/include.
1995-08-07 19:17:46 +00:00
Rodney W. Grimes
7799f52a32 Remove trailing whitespace. 1995-05-30 06:41:30 +00:00
Guido van Rooij
c8945315ef Set copyright so we can actually distribute and use it.
Reviewed by:	David Greenman
Submitted by:	Wietse Venema
Obtained from:
1995-05-19 09:53:51 +00:00
Rodney W. Grimes
a164d484cd Fix spelling error that keeps this from compiling with KERBEROS & SKEY
defined.

Submitted by:	Mark Murray <mark@grondar.za>
1995-04-16 20:00:21 +00:00
Garrett Wollman
ed8be72c29 Disallow Kerberos when S/Key is required. Fixes PR #339.
Submitted by: Paul Traina <pst@Shockwave.com>
1995-04-13 15:20:35 +00:00
Nate Williams
c36c788214 Change the library order so libcrypt is the last library in the list.
libskey contains references to _crypt and can't resolve it unless
-lcrypt occurs after it in the link command.  This only occurs when
linking statically.
1995-03-18 17:18:15 +00:00
Garrett Wollman
2ade60ce3c In the non-PARANOID case, make sure to set `notickets' to 0 sothat login.c
doesn't complain.
1995-01-20 23:07:10 +00:00
Garrett Wollman
758f3a64bd Modify klogin to:
1) Don't spit out an error message if Kerberos is installed but not yet
   set up.

2) Don't attempt to verify the ticket you got back, as workstations
   are not intended to have srvtab files of their own.

Both behaviors can be re-enabled with KLOGIN_PARANOID.
1995-01-14 22:57:41 +00:00
Ugen J.S. Antsilevich
57476d2f22 Sorry..forgot something for yesterdays login patch..
(Umm..i hope nobody "make world" this time:)
1994-12-01 12:35:54 +00:00
Ugen J.S. Antsilevich
6dc4937281 Patch of password expired bug.
Now password changed for right user and
no longer possible to skip password change.
I hope it will be ok....
1994-11-30 15:40:09 +00:00
Garrett Wollman
a38c3127e1 Add distribution=krb for P-HK 1994-11-20 23:23:28 +00:00
Paul Traina
2ddadf840c Include most of the logdaemon v4.4 S/key changes 1994-10-19 00:03:45 +00:00
Geoff Rehmet
3c6459e594 Undo damage done between revisions 1.6 and 1.7
(Guys, please don't DAMAGE commits that have just gone in.)
1994-09-30 13:26:15 +00:00
Paul Traina
c9bdc15213 Install support for skey and login.access 1994-09-29 18:59:15 +00:00
Geoff Rehmet
c368d11dd2 First level of changes for bringing in eBones (kerberos).
- Get rid of inverse logic (NOKERBEROS and NOEBONES) in src/makefile,
and replace with MAKE_KERBEROS and MAKE_EBONES.  (Far fewer contortions,
and both default to off.)  IF YOU WANT KERBEROS, YOU HAVE TO EXPLICITLY
DEFINE ONE OF THESE.
- Make Makefiles kerberos-aware.
1994-09-29 13:06:54 +00:00
Jordan K. Hubbard
83274713b2 Problem:
Accounts that have "pw_change" set, are supposed to change their passwords
by the date specified in "pw_change".  If they have not changed their passwords
by that date, currently they get "LOCKED OUT" of the system.  This is not the
correct behavior, the user should be prompt (forced?) to change their password
at this time.  If the behavior of "pw_change" was meant to be a LOCKOUT,
then you should use "pw_expire".

Solution:
     Instead of locking out the user, prompt them to change their password.

Reviewed by:	jkh
Submitted by:	rls
1994-09-07 01:42:29 +00:00
Guido van Rooij
f88fe8675b Implemnet fbtab ala SunOS (thanks to WZV, see login_fbtab.c)
Reviewed by:
Submitted by:	guido
1994-08-22 19:56:14 +00:00
Guido van Rooij
7c4c6e58ba Add skey supprot
Reviewed by:
Submitted by:	guido
1994-08-21 19:26:22 +00:00
Geoff Rehmet
4714bb15be LDADD= -lcrypt
Submitted by:	Geoff
1994-08-20 21:19:46 +00:00
Garrett Wollman
b4e99cd8d6 Don't compile with kerberos yet, we aren't ready. 1994-08-05 20:32:22 +00:00
Rodney W. Grimes
9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00