aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/login
Commit message (Collapse)AuthorAgeFilesLines
* login(1): when exporting variables check the result of setenv(3)Pedro F. Giffuni2020-12-191-1/+4
| | | | | | | | | | | | | | | When exporting a variable we correctly check all the preconditions that could make setenv(3) fail. Checking the setenv(3) return value seems redundant, but given that login(1) is critical, it doesn't hurt to have a post-check. This change is based on the "Principles of Secure Coding" course by Matthew Bishop, PhD., which specifically discusses this code in FreeBSD. (This change redoes r368776 due to a silly mistake) Notes: svn path=/head/; revision=368778
* Revert r368776:Pedro F. Giffuni2020-12-191-4/+1
| | | | | | | | | | login(1): when exporting variables check the result of setenv(3) mismatch: the return value upon error is -1, so the code was not doing nothing. Notes: svn path=/head/; revision=368777
* login(1): when exporting variables check the result of setenv(3)Pedro F. Giffuni2020-12-191-1/+4
| | | | | | | | | | | | | | | When exporting a variable we correctly check all the preconditions that could make setenv(3) fail. Checking the setenv(3) return value seems redundant, but given that login(1) is critical, it doesn't hurt to have a post-check. This change is based on the "Principles of Secure Coding" course by Matthew Bishop, PhD., which specifically discusses this code in FreeBSD. Differential Revision: https://reviews.freebsd.org/D26966 Notes: svn path=/head/; revision=368776
* Change the default locale to C.UTF-8Baptiste Daroussin2020-11-141-2/+3
| | | | | | | | | | | | | The C.UTF-8 locales is the same as the actual C locale except it does support the unicode character set. But the collation etc are still the same as the C locale one. Reviewed by: many Approved by: many Differential Revision: https://reviews.freebsd.org/D26973 Notes: svn path=/head/; revision=367690
* Add more explicit instructions about updating motdWarner Losh2020-10-191-1/+1
| | | | | | | | | | | | | Not that you can regenerate the motd by editing motd.template and running 'service motd restart' rather than rebooting. Small wordsmithing by me, and updated the example from FreeBSD 2.1.6.1 release to 12.1 release. Submitted by: Dan Mack Notes: svn path=/head/; revision=366822
* Normalize deployment tools usage and definitions by putting into one placeMaxim Sobolev2020-04-071-1/+1
| | | | | | | | | | | | instead of sprinkling them out over many disjoint files. This is a follow-up to achieve the same goal in an incomplete rev.348521. Approved by: imp MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D20520 Notes: svn path=/head/; revision=359685
* login.conf(5): update commented-out standard, tooKyle Evans2020-02-091-1/+2
| | | | | | | MAIL now has a mail capability, instead, as of r357560. Notes: svn path=/head/; revision=357707
* login.conf(5): set a default PATH for the daemon classKyle Evans2020-02-051-0/+6
| | | | | | | | | | | | This is a sensible default used by, e.g., cron(8), and useful if one wanted to honor it. This is a part of D21481. Submitted by: Andrew Gierth <andrew_tao173.riddles.org.uk> Notes: svn path=/head/; revision=357561
* login.conf(5): split MAIL env var out into a "mail" capabilityKyle Evans2020-02-051-1/+3
| | | | | | | | | | | | This allows it to be easily suppressed in, e.g., the "daemon" class where it will not be properly expanded. This is a part of D21481. Submitted by: Andrew Gierth <andrew_tao173.riddles.org.uk> Notes: svn path=/head/; revision=357560
* Update Makefile.depend filesSimon J. Gerraty2019-12-111-2/+0
| | | | | | | | | | | | | Update a bunch of Makefile.depend files as a result of adding Makefile.depend.options files Reviewed by: bdrewery MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22494 Notes: svn path=/head/; revision=355617
* Add Makefile.depend.optionsSimon J. Gerraty2019-12-111-0/+6
| | | | | | | | | | | | | | | | | | | | Leaf directories that have dependencies impacted by options need a Makefile.depend.options file to avoid churn in Makefile.depend DIRDEPS for cases such as OPENSSL, TCP_WRAPPERS etc can be set in local.dirdeps-options.mk which can add to those set in Makefile.depend.options See share/mk/dirdeps-options.mk Reviewed by: bdrewery MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22469 Notes: svn path=/head/; revision=355616
* motd: Generate from template to /var/runConrad Meyer2019-07-205-8/+7
| | | | | | | | | | | | Update login(1), its manual pages, similar utilities, and motd.5 to refer to the new location. Suggested by: delphij@ (re: r349256) Reviewed by: bcr (manpages), delphij Differential Revision: https://reviews.freebsd.org/D20721 Notes: svn path=/head/; revision=350184
* Fix several places where tool name has been hardcoded:Maxim Sobolev2019-06-021-1/+2
| | | | | | | | | | | | | | | | | install -> ${INSTALL} mtree -> ${MTREE_CMD} services_mkdb -> ${SERVICES_MKDB_CMD} cap_mkdb -> ${CAP_MKDB_CMD} pwd_mkdb -> ${PWD_MKDB_CMD} kldxref -> ${KLDXREF_CMD} If you do custom FreeBSD builds you may want to override those in some cases. Sponsored by: Sippy Software, Inc. Notes: svn path=/head/; revision=348521
* pkgbase: Really move login.accessEmmanuel Vadot2019-05-221-0/+46
| | | | | | | Messed up with git->svn r348102 Notes: svn path=/head/; revision=348107
* pkgbase: Move login.access to usb.bin/loginEmmanuel Vadot2019-05-221-1/+1
| | | | | | | | | | Also remove the etc-examples target as we don't have any files to handle here. Reviewed by: bapt Notes: svn path=/head/; revision=348102
* Move fbtab, login.conf, and motd to usr.bin/login/Brad Davis2018-08-304-0/+356
| | | | | | | | Approved by: Approved by: re (gjb), bapt (mentor), will (mentor) Differential Revision: https://reviews.freebsd.org/D16947 Notes: svn path=/head/; revision=338399
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-202-1/+5
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* spdx: initial adoption of licensing ID tags.Pedro F. Giffuni2017-11-181-0/+2
| | | | | | | | | | | | | | | | | | | | The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Initially, only tag files that use BSD 4-Clause "Original" license. RelNotes: yes Differential Revision: https://reviews.freebsd.org/D13133 Notes: svn path=/head/; revision=325966
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Renumber copyright clause 4Warner Losh2017-02-282-2/+2
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Clarify warning message when failing to configure audit on user login:Robert Watson2016-11-301-1/+1
| | | | | | | | | | | | when au_user_mask() fails, it's not a failure to set the audit mask, but to calculate the audit mask -- and hence a condfiguration-file issue (of some sort). MFC after: 3 days Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=309326
* login: fix capitalization in errx messagesEd Maste2016-10-061-18/+18
| | | | | | | Reported by: bde Notes: svn path=/head/; revision=306757
* login: clean up errx stringsEd Maste2016-09-151-19/+19
| | | | | | | | | | errx() prefixes the error string with argv[0] so including "login: " in the string is redundant. Also remove a superfluous newline. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=305821
* Use NULL instead of 0.Marcelo Araujo2016-04-181-3/+3
| | | | | | | | | strtok(3) will return NULL when no more tokens remain. MFC after: 2 weeks. Notes: svn path=/head/; revision=298181
* login.c doesn't really need libutil.h, don't include it.Xin LI2015-09-102-3/+1
| | | | | | | | | | login_fbtab.c includes paths.h and pathnames.h, and pathnames.h includes paths.h. Eliminate the paths.h inclusion in login_fbtab.c. MFC after: 2 weeks Notes: svn path=/head/; revision=287634
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-271-4/+2
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge from head@274682Simon J. Gerraty2014-11-191-1/+1
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | Merge from headSimon J. Gerraty2014-05-081-1/+1
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265720
| * \ \ Merge headSimon J. Gerraty2014-04-281-34/+85
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * | | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | | Sync from headSimon J. Gerraty2012-11-041-2/+0
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | | Convert to usr.bin/ to LIBADDBaptiste Daroussin2014-11-251-4/+2
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275042
* | | | | Remove LOG_ODELAY because it does nothing.Neel Natu2014-08-171-1/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: jilles CR: https://reviews.freebsd.org/D611 Notes: svn path=/head/; revision=270111
* | | | Use src.opts.mk in preference to bsd.own.mk except where we need stuffWarner Losh2014-05-061-1/+1
| |_|/ |/| | | | | | | | | | | | | | | | | from the latter. Notes: svn path=/head/; revision=265420
* | | login: Remove broken dialup log message.Jilles Tjoelker2014-04-191-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For 10 years, the "DIALUP <tty>, <user>" message has required having a hostname (-h) instead of not having a hostname; therefore, it is never logged. Given that dialup is obsolete and this has not been fixed, remove the log message. Note that LOGALL, which is defined by default, logs a message for all logins, including dialup logins. Notes: svn path=/head/; revision=264677
* | | login: Clean up PAM and audit, then exit, on SIGHUP and SIGTERM.Jilles Tjoelker2014-01-261-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 Reviewed by: ed Notes: svn path=/head/; revision=261193
* | | Fix whitespace.Ed Schouten2013-11-131-8/+8
| |/ |/| | | | | Notes: svn path=/head/; revision=258105
* | None of these programs actually use auth.conf.Dag-Erling Smørgrav2012-06-111-2/+0
|/ | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=236892
* Remove unnecessary castKevin Lo2012-02-141-3/+3
| | | | Notes: svn path=/head/; revision=231651
* Spelling fixes for usr.bin/Ulrich Spörlein2011-12-301-1/+1
| | | | Notes: svn path=/head/; revision=228992
* Call pam_setcred() before login_getpwclass to support home directoriesDoug Rabson2011-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. Notes: svn path=/head/; revision=221374
* Remove the advertising clause from UCB copyrighted files in usr.bin. ThisJoel Dahl2010-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 Notes: svn path=/head/; revision=216370
* Get rid of hand-rolled closefrom(3).Ed Schouten2010-10-201-2/+1
| | | | Notes: svn path=/head/; revision=214115