Commit Graph

173 Commits

Author SHA1 Message Date
mrg aa349aa646 s/0/NULL/ for execl*'s last argument. 2006-05-20 10:31:59 +00:00
christos 862fe20f05 GC old signal handling and merge it in 4 places:
1. Immediately ignore all the signals we want to ignore and set the alarm.
    2. Before we exit on error, restore all signals we modified
    3. Before we exec a shell, restore all signals we modified and ignore TSTP.
       Job control aware shells know how to deal with this.
    4. Temporarily handle SIGINT while we read motd.
2006-04-17 16:29:44 +00:00
simonb 372d44b647 Use TABs instead of spaces. 2006-04-06 00:48:14 +00:00
hubertf 517eb6559a Remove unused variable 'salt'
Found by code inspection in one of my classes, not via Coverity :)

OK'd by christos
2006-03-26 16:45:33 +00:00
wiz 54cd24faa5 Get rid of more Kerberos 4 code. 2006-03-23 23:33:28 +00:00
christos f88156c66b PR/33128: Martin Husemann: When login in on the console, SIGABRT is ignored
Both SIGINT and SIGABRT should be restored before executing the shell.
2006-03-22 15:36:49 +00:00
christos 85e611dd01 Goodbye KerberosIV 2006-03-20 04:03:10 +00:00
jnemeth 4be1f2c6fd Fix Coverity run 5, issue 1931 -- memory leak. This was noted as being a
bug by cgilbert.
Approved by christos@.
2006-03-19 22:52:01 +00:00
jnemeth 1a6a87b59b PR/23616: Christian Biere: login might not back-off as expected 2006-03-08 03:09:04 +00:00
jnemeth 2e3c4f59d7 PR/23616: Christian Biere: login might not back-off as expected 2006-03-08 02:49:18 +00:00
jnemeth 99089ba6f8 PR/30923: Zafer Aydogan: pam too verbose
Don't display a different message for root logins on insecure terminals.

Approved by christos@.
2006-03-06 23:06:18 +00:00
jnemeth a2645cdaf4 PR/31059: Zafer Aydogan: login too verbose
Don't display a different message for root login on insecure terminal.

Approved by christos@.
2006-03-06 22:59:27 +00:00
christos 63780e0b44 Propagate change from login.c where if getpeername succeeded, then we have
the sockaddr from the remote peer.
2006-02-20 05:05:16 +00:00
christos 539c95af37 PR/32873: Johan Veenhuizen: login(1) does not initialize lastlogx struct
properly
2006-02-19 00:48:34 +00:00
christos e551462e89 PR/32870: Johan Veenhuizen: login(1) does not obey .hushlogin 2006-02-19 00:12:36 +00:00
wiz 5cc6a637b8 Prefer mdoc markup to roff. 2005-11-08 18:54:15 +00:00
wiz 07006c8815 Remove trailing whitespace. 2005-11-08 17:59:45 +00:00
christos 4f38beeb43 Update documentation for pam, and don't accept flags that we don't support
anymore.
2005-11-01 15:47:43 +00:00
christos c9f5645213 use getgrnam_r; from Jon Nemeth 2005-09-21 12:24:11 +00:00
matt 0e46a38f38 Terminate variable argument list with NULL, not 0. 2005-04-25 01:33:03 +00:00
lukem 9830ed3053 Safety boots: don't depend upon getpwnam_r() to set pwd to NULL on all
failures, especially as we're ignoring the return result.
2005-04-19 03:40:58 +00:00
christos cc3c0f2c9c Don't report that we don't know the username. We don't want to give out
more information that we need to.
2005-04-03 06:56:39 +00:00
christos 13f609d284 - use getpwnam_r
- KNF
2005-03-30 01:30:21 +00:00
jmmv f9774bdb30 Add a colon before %m in calls to syslog(3) for consistency with other
messages in this same file and in many other tools.
2005-03-29 17:00:21 +00:00
tron f4d67200a3 Make S/Key prompt compliant with RFC 2289. Patch supplied by Dave Huang
in PR bin/23167.
2005-03-20 13:20:07 +00:00
he 8e8728c45c Introduce PAM_STATIC_LDADD and PAM_STATIC_DPADD. When compiling
with MKPIC=no, possibly because the target does not support shared
libraries, these include libraries required to resolve all symbols
which end up referenced from PAM-using applications.  The libraries
presently required are -lcrypt, -lrpcsvc and -lutil.

Add use of these variables which are currently set up to use PAM,
so that they compile when MKPIC=no.

Also, in the telnetd case, reorder the order of the libraries, so
that libtelnet.a comes before -ltermcap and -lutil, again to fix
link error when MKPIC=no.

Discussed with thorpej and christos.
2005-03-04 20:41:08 +00:00
christos 3f0344e8e8 1. Restore missing tty action.
2. Pass the nested user name to pam.
3. always try to fill in sockaddr.
2005-03-03 02:06:16 +00:00
christos 10cd3dcdb4 - use F_CLOSEM instead of walking the fd list
- determine pty name properly for ptyfs ptys
- use setproctitle(NULL) to kill our args
2005-02-28 16:13:02 +00:00
christos 70a8501f05 - deal with ptyfs pty names.
- put back chown pty code.
- use setproctitle(NULL) to kill our argument display.
- don't wait for any pid, just the one we forked.
2005-02-28 16:11:36 +00:00
christos c641ee7f72 Add setting of PAM_SOCKADDR. 2005-02-01 17:57:16 +00:00
manu 3113fa979d Add PAM support to login(8) 2005-01-23 09:47:43 +00:00
xtraeme a35b6d287f Kill __P(), ANSIfy, remove main() prototype, whitespace; WARNS=2 2005-01-20 15:41:14 +00:00
xtraeme 61ae8d8c7b Kill __P() and ANSIfy, ok christos. 2005-01-12 05:34:23 +00:00
lha c2e518e56e Only include Kerberos 4 headers when compiling in a Kerberos enviroment
From Jukka Salmi in NetBSD PR misc/28727
2004-12-22 01:28:56 +00:00
wiz a65671d259 Remove some whitespace. 2004-11-19 18:41:00 +00:00
christos 4a9bb0c8f3 Add a -a option to pass the host address of the host we logged in from in
addition to the host name. This option is needed by programs suchs as
telnetd, because at the point they invoke login, they already have opened
a pty, and the stdin of login is no longer the socket connected to the
remote host. In addition don't chop the hostname up to the first dot if
the domain matches. These practices are 70's fashion and they only serve
to lose information. These days we have long enough fields in utmpx and
wtmpx to store the full names.
2004-11-14 18:01:21 +00:00
wiz 3408fd1acc Use getprogname(); add -F to usage. From Kouichirou Hiratsuka in PR 26222. 2004-07-13 11:56:24 +00:00
lukem 32e6b841fb Generate the copyright string from sys/conf/copyright rather than
replicating it here.  Idea from Simon Burge.
2004-01-05 03:53:10 +00:00
mycroft a9866938b5 Welcome to 2004! 2004-01-01 00:00:05 +00:00
dyoung 4758291178 Fix the checkflist for builds without Kerberos 4 (MKKERBEROS4=no)
and without Kerberos 4 & 5 (MKKERBEROS=no). Previously checkflist
complained of missing files.

* move kerberos- and kerberos 4-only files into new flists,
  distrib/sets/lists/*/krb.*

* make the flist generators grok MKKERBEROS{,4} variables

* fix Makefiles which treat MKKERBEROS=no as MKKERBEROS5=no.
  9 out of 10 experts agree that it is ludicrous to build w/
  KERBEROS4 and w/o KERBEROS5.

* fix header files, also, which treat MKKERBEROS=no as MKKERBEROS5=no.

* omit some Kerberos-only subdirectories from the build as
  MKKERBEROS{,4} indicate

(I acknowledge the sentiment that flists are the wrong way to go,
and that the makefiles should produce the metalog directly.  That
sounds to me like the right way to go, but I am not prepared to do
revamp all the makefiles.  While my approach is expedient, it fits
painlessly within the current build architecture until we are
delivered from flist purgatory, and it does not postpone our
delivery. Fair enough?)
2003-12-11 09:46:26 +00:00
itojun 53284b73d0 snprintf() terminates string with \0, so there's no need for "sizeof(x)-1". 2003-10-16 05:31:47 +00:00
wiz 31fd31ccf7 Make getlastlogx have the pathname to the lastlogx database as first
argument, to be consistent with updlastlogx.

Approved by christos, reviewed by kleink.

[The lastlogxname function should not be used any longer.]
2003-08-26 16:48:32 +00:00
lha afad8d1f7c libkrb depends on libdes, patch in private mail from
Harold Gutch logix at foobar franken de
2003-08-23 23:03:42 +00:00
agc 89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
itojun adeab29eca include des.h, not kerberosIV/des.h 2003-07-23 20:31:18 +00:00
itojun e63468d8cc split MKKERBEROS4 from MKKERBEROS. based on work by lha at stacken.kth.se
(build confirmed with both MKKERBEROS4=yes and MKKERBEROS4=no)
2003-07-23 08:01:24 +00:00
itojun 01b2c2d070 simplify by asprintf/strdup 2003-05-15 00:52:53 +00:00
perry a3acb5bc30 facilty->facility, from Igor Sobrado in PR 19670 2003-03-29 18:05:29 +00:00
mycroft d73e77b28c Update copyright notice. 2003-01-01 00:00:13 +00:00
itojun 9593086444 use strlcpy 2002-11-16 04:34:13 +00:00