summaryrefslogtreecommitdiffstats
path: root/usr.bin/login
Commit message (Collapse)AuthorAgeFilesLines
* MFC r287634:delphij2015-09-242-3/+1
| | | | | | | login.c doesn't really need libutil.h, don't include it. login_fbtab.c includes paths.h and pathnames.h, and pathnames.h includes paths.h. Eliminate the paths.h inclusion in login_fbtab.c.
* login: Clean up PAM and audit, then exit, on SIGHUP and SIGTERM.jilles2014-04-061-18/+77
| | | | | | | | | | | | | | | | This avoids leaving stale entries in utmpx after the connection is closed on an open login session. It also allows a clean way (SIGTERM) to forcibly terminate a user's terminal session. This does not affect the situation for "hung" processes after the connection is closed. The foreground process group receives SIGHUP and the tty becomes inaccessible. Also replace all use of the obsolete signal() function with sigaction() (not only the part where it is actually required: SIGHUP and SIGTERM must mask the other as well when caught). PR: misc/183495
* None of these programs actually use auth.conf.des2012-06-111-2/+0
| | | | MFC after: 1 week
* Remove unnecessary castkevlo2012-02-141-3/+3
|
* Spelling fixes for usr.bin/uqs2011-12-301-1/+1
|
* Call pam_setcred() before login_getpwclass to support home directoriesdfr2011-05-031-2/+14
| | | | | on GSS-API authenticated NFS where the kerberos credentials need to be saved so that the kernel can authenticate to the NFS server.
* Remove the advertising clause from UCB copyrighted files in usr.bin. Thisjoel2010-12-112-8/+0
| | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson
* Get rid of hand-rolled closefrom(3).ed2010-10-201-2/+1
|
* Remove copyright strings printed at login time via login(1) or sshd(8).emaste2010-09-281-7/+0
| | | | | | | | | | It is not clear to what this copyright should apply, and this is in line with what other operating systems do. For ssh specifically, printing of the copyright string is not in the upstream version so this reduces our FreeBSD-local diffs. Approved by: core, des (ssh)
* Build usr.bin/ with WARNS=6 by default.ed2010-01-021-0/+2
| | | | Also add some missing $FreeBSD$ to keep svn happy.
* ANSIfy various tools in usr.bin/.ed2010-01-022-14/+6
| | | | | Most of these tools properly build at WARNS=6, except for their K&R function declarations. Fix this, so we can bump WARNS as well.
* Revert most part of 200420 as requested, as more review and polish isdelphij2009-12-133-1/+4
| | | | needed.
* Remove unneeded header includes from usr.bin/ except contributed code.delphij2009-12-113-4/+1
| | | | Tested with: make universe
* Pass int arguments to auditon(2)'s A_GETCOND API rather than longrwatson2009-04-191-6/+6
| | | | | | | | | arguments. This change should be MFC'd with OpenBSM 1.1 since they are interdependent. MFC after: 2 weeks Obtained from: TrustedBSD Project Sponsored by: Apple, Inc.
* Don't strip TTY device name to the last '/'.ed2009-03-271-2/+2
| | | | | | | | | | | | | We've seen this bug in other applications before: we have some applications that use strrchr(tty, '/') on the TTY device name. This isn't valid when using pts(4), because the device name will be stripped to "0" instead of "pts/0". This fixes issues with login(1) ignoring /etc/ttys and missing utmp records. Reported by: Barney Cordoba <barney_cordoba yahoo com> Reviewed by: rwatson
* Add a cross-reference to newgrp(1).philip2007-11-301-0/+1
| | | | | | | Every time I need newgrp, I forget its name but I remember it's like login for groups - newgrp(1) already cross-references login(1). MFC after: 2 days
* Use NULL instead of 0 for the return value of fopen().kevlo2007-09-211-2/+2
| | | | Approved by: re (kensmith)
* Significantly reduce the memory leak as noted in BUGS section forscf2007-07-041-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | setenv(3) by tracking the size of the memory allocated instead of using strlen() on the current value. Convert all calls to POSIX from historic BSD API: - unsetenv returns an int. - putenv takes a char * instead of const char *. - putenv no longer makes a copy of the input string. - errno is set appropriately for POSIX. Exceptions involve bad environ variable and internal initialization code. These both set errno to EFAULT. Several patches to base utilities to handle the POSIX changes from Andrey Chernov's previous commit. A few I re-wrote to use setenv() instead of putenv(). New regression module for tools/regression/environ to test these functions. It also can be used to test the performance. Bump __FreeBSD_version to 700050 due to API change. PR: kern/99826 Approved by: wes Approved by: re (kensmith)
* Fix some warnings by making things const, adding missing headers,dwmalone2007-05-073-5/+6
| | | | | | removing some unused variables and making a variable unsigned. MFC after: 3 weeks
* Back out all POSIXified *env() changes.ache2007-05-011-2/+2
| | | | | | | | | Not because I admit they are technically wrong and not because of bug reports (I receive nothing). But because I surprisingly meets so strong opposition and resistance so lost any desire to continue that. Anyone who interested in POSIX can dig out what changes and how through cvs diffs.
* Slightly tune previous fix: free memory if !exportache2007-04-301-2/+2
|
* Prepare for upcoming POSIXed putenv() rewrite:ache2007-04-301-1/+1
| | | | don't free memory after putenv()
* Teach login(1) about the make.conf NO_AUDIT variable. This allows us tocsjp2006-12-133-3/+28
| | | | | | | conditionally build in audit support. Submitted by: bz MFC after: 1 week
* Markup fixes.ru2006-09-291-2/+2
|
* Remove references to the pam(8) manual page. It does not exist.joel2006-09-131-3/+2
| | | | | Requested by: novel Discussed with: brueffer, simon
* Add missing library dependencies.ru2006-04-131-1/+1
|
* Don't call audit_logout() if pwd is NULL, as audit_logout() attempts tocognet2006-03-281-1/+4
| | | | | | | | | | dereference it. This will happen if we ^D at the Login: prompt without having provided a valid login before. Set pwd to NULL on bad login attempts to prevent audit_logout() from being called for a user which didn't actually log on. Reported by: Jerome Magnin jethro at docisland dot org
* Reimplementation of world/kernel build options. For details, see:ru2006-03-171-1/+3
| | | | | | | | http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html The src.conf(5) manpage is to follow in a few days. Brought to you by: imp, jhb, kris, phk, ru (all bugs are mine)
* Managing login.access is no longer a responsibility of login(1).yar2006-03-061-10/+6
| | | | | | Therefore give a xref, not details. MFC after: 3 days
* Remove the last reference to LOGIN_ACCESS from login(1).yar2006-03-061-2/+3
| | | | MFC after: 3 days
* login.access.5 and login_access.c are no longer usedyar2006-03-062-296/+0
| | | | | | | | | | | | | | | in usr.bin/login because the login.access feature has moved to PAM completely. Their counterparts in lib/libpam/modules/pam_login_access have been found to be in sync with, and even in better shape than, login.access.5 and login_access.c here. Therefore cvs rm login.access.5 and login_access.c from usr.bin/login so that nobody will waste their time on fixing or developing the files here. MFC after: 3 days
* login(1) no longer handles /etc/login.access by itself,yar2006-03-061-1/+0
| | | | | | it's PAM's job. MFC after: 3 days
* Since the whole login.access feature has moved to PAM,yar2006-03-061-1/+1
| | | | | | | login.access.5 will be installed from the respective PAM module's src directory. MFC after: 3 days
* Make login audit-enabled, submitting audit records for the login and logoutwsalamon2006-02-045-3/+238
| | | | | | | | | events. The specifics of submitting the records is contained within login_audit.c. Document the auditing behavior in the man page. Obtained from: TrustedBSD Project, Apple Computer, Inc. Approved by: rwatson (mentor)
* o Teach login(1) to respect "hushlogin" and "nocheckmail" attributesmaxim2005-06-011-2/+7
| | | | | | | | defined in user's $HOME/.login_conf. PR: bin/75001 Submitted by: Rostislav Krasny MFC after: 2 weeks
* Introduce the PRECIOUSPROG knob in bsd.prog.mk, similarru2004-11-031-1/+1
| | | | | | | | to PRECIOUSLIB from bsd.lib.mk. The side effect of this is making installing the world under jail(8) possible by using another knob, NOFSCHG. Reviewed by: oliver
* Bump document datebrueffer2004-10-161-1/+1
| | | | Reminded by: simon in ru-mode
* We use /etc/pam.d/login nowadaysbrueffer2004-10-151-6/+3
|
* Deal with double whitespace.ru2004-07-031-1/+1
|
* Mechanically kill hard sentence breaks.ru2004-07-021-3/+6
|
* Deal with unsafe tab characters.ru2004-07-021-1/+3
|
* Fixed style bugs in previous commit (.ifndef instead of .if defined(),bde2004-02-291-3/+2
| | | | | | and tab lossage). Garbage-collected NEED_LIBNAMES.
* I am a moron.des2004-02-271-1/+1
|
* Re-add the setuid bit, conditional on NO_SETUID_LOGIN being undefined.des2004-02-271-0/+5
|
* Cut through the bikeshed and remove login(1)'s setuid bit. It has nodes2004-02-271-3/+0
| | | | | business trying to impersonate su(1), and it does not need to be setuid to function properly when invoked by getty(8) or telnetd(8).
* GC (now unused here) -lcrypt.ru2004-02-021-2/+2
|
* Fix ~/.hushlogin handling.fjoe2004-01-261-3/+4
| | | | | PR: 61354 Submitted by: Eugeny Grosbein <eugen (at) kuzbass.ru>
* Remove utmp references, no longer done by login(1) in 5.x.dannyboy2003-07-081-15/+3
| | | | | PR: 54201 Submitted by: mdg <mdg@secureworks.net>
* When the tty chown() fails, report a chown() failure rather than arwatson2003-04-261-1/+1
| | | | chmod() failure.
* The documented login.conf variable for setting the login prompt isdes2003-04-251-1/+1
| | | | | | | | "login_prompt". This makes more sense than "prompt" which is what login actually used, so change the code to match the documentation. PR: docs/51396 MFC in: 3 days
OpenPOWER on IntegriCloud