summaryrefslogtreecommitdiffstats
path: root/libutil
Commit message (Collapse)AuthorAgeFilesLines
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
|
* $Id$ -> $FreeBSD$Peter Wemm1999-08-284-4/+4
|
* Move call to umask(0) back into pw_util(), because the latterPierre Beyssac1999-06-291-1/+4
| | | | function is also used by chpass(1) and passwd(1).
* Force umask to 077 (instead of 000) during the edit phase, to getPierre Beyssac1999-06-261-4/+1
| | | | | | | | | | secure permissions in case the user attempts to save something to a file of his own. Move umask stuff out of pw_init() into main() for better visibility of overall umask tweaking logic. PR: misc/11797
* Add -d option to vipw(8) to allow selection of an alternative directorySheldon Hearn1999-06-261-8/+14
| | | | | | | for the password files. PR: 2703 Submitted by: jmg
* oops, add pwd!=NULL check to previous fixAndrey A. Chernov1999-04-241-11/+17
|
* Switch to user UID/GID before checking/reading its ~/.login_confAndrey A. Chernov1999-04-241-1/+14
| | | | - some NFSes have root read access disabled
* Add realhostname() - a function to correctly lookupBrian Somers1999-04-061-1/+9
| | | | | a name by address and ensure that the name resolves back to the original address.
* Declare setproctitle() as printf0-like.Bruce Evans1998-12-161-2/+2
|
* oops. Fix indentation of the 'for' loop I just added.Matthew Dillon1998-12-131-18/+18
|
* Handle the race condition where vipw may lock a password file which hasMatthew Dillon1998-12-131-6/+22
| | | | | just been replaced. After our lock succeeds we check if st_nlink is 0 and if it is we close the descriptor and retry our open/lock sequence.
* Since vfork() was changed to fork(), we have to pass errno back from theDag-Erling Smørgrav1998-10-201-3/+6
| | | | | | | child to the parent somehow. PR: 8353 Submitted by: Andrew J. Korty <ajk@purdue.edu>
* Calls one or more of malloc(), warn(), err(), syslog(), execlp() orDag-Erling Smørgrav1998-10-131-3/+3
| | | | | | | | | | | execvp() in the child branch of a vfork(). Changed to use fork() instead. Some of these (mv, find, apply, xargs) might benefit greatly from being rewritten to use vfork() properly. PR: Loosely related to bin/8252 Approved by: jkh and bde
* Now take stdio.h out of files that don't require it.Jordan K. Hubbard1998-10-091-2/+1
|
* o move path in libutil.h to paths.hJordan K. Hubbard1998-10-091-2/+2
| | | | | o make property_read() take a fd instead to avoid stdio.h mess o update auth to new interface.
* Take the path spec back out.Jordan K. Hubbard1998-10-091-4/+1
|
* All these have to include stdio.h now.Jordan K. Hubbard1998-10-091-1/+2
|
* remove stdio.h include; I forgot Bruce's cardinal rule that header filesJordan K. Hubbard1998-10-081-2/+1
| | | | | | shouldn't include other ones (which, unfortunately, is also a hellish rule since he broke interfaces like sysctl this way by requiring undocumented header files to be included just in order to be able to use them now - SIGH!).
* Add a simple mechanism for reading property lists from files (whichJordan K. Hubbard1998-10-071-1/+16
| | | | | | | I'll convert sysinstall to use shortly) and a simple call which uses this mechanism to implement an /etc/auth.conf file. I'll let Mark Murray handle the format and checkin of the sample auth.conf file. Reviewed by: markm
* Add missing uu_lock_txfr() prototypeAndrey A. Chernov1998-06-051-1/+2
|
* Trim a domain part for wtmp as same as showed by "netstat -r".Atsushi Murai1998-06-011-2/+2
| | | | | | | | | | | | | 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>
* Add uu_lock_txfr() to transfer ownership of a successfulBrian Somers1998-05-281-1/+3
| | | | uu_lock() to another process.
* Statisize usage().Philippe Charnier1997-10-271-1/+4
|
* Changes to support full make parallelism (-j<n>) in the worldJordan K. Hubbard1997-10-051-3/+3
| | | | | | target. Reviewed by: <many different folks> Submitted by: Nickolay N. Dudorov" <nnd@nnd.itfs.nsk.su>
* Endless loop.Wolfram Schneider1997-09-291-5/+5
| | | | | | | | | | | $ vipw [corrupt a line in editor, exit editor] pwd_mkdb: corrupted entry pwd_mkdb: at line #2 pwd_mkdb: /etc/pw.012585: Inappropriate file type or format re-edit the password file? [y]: n^D^D [hang]
* The parameters to logwtmp should be const char'sPaul Traina1997-09-041-2/+2
|
* Remove login_progok()Brian Somers1997-08-311-2/+1
| | | | Suggested by: guido
* Add full support for determining if a userBrian Somers1997-08-271-1/+2
| | | | is restricted from running a given program.
* Cosmetic: distinguish in diag message between rebuilding and updatingJoerg Wunsch1997-08-241-1/+2
| | | | | | | the database. PR: 3397 Submitted by: taob@risc.org (Brian Tao)
* Implement canonical locking protocolAndrey A. Chernov1997-08-101-2/+4
| | | | Suggested by: joerg
* Add "break" inadvertently removed in previous update.David Nugent1997-06-131-1/+3
| | | | | PR: 3820 Submitted by: Joseph Stein <joes@spiritone.com>
* Now I really understand the reason for the style.9 rule about not havingPeter Wemm1997-05-191-14/+14
| | | | | | | visible type names in prototypes in user space headers. libutil.h generates warnings with -Wall over the use of "const char *ttyname". It's lucky it wasn't a #define conflict. Is a single '_' prefix acceptable? or does it need to be two?
* For non-root uids, consider root-owned files also 'secure' unless otherwiseDavid Nugent1997-05-151-2/+2
| | | | disqualified.
* Make uu_* const correct.Brian Somers1997-05-121-4/+4
| | | | Suggested by: joerg
* MF2.2: bugfix in arrayize().David Nugent1997-05-111-2/+2
|
* Summary of login.conf support changes:David Nugent1997-05-104-362/+656
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Incorporated BSDI code and enhancements, better logging for error checking (which has been shown to be a problem, and is therefore justified, imho); also some minor things we were missing, including better quad_t math, which checks for under/overflows. o setusercontext() now allows user resource limit overrides, but does this AFTER dropping root privs, to restrict the user to droping hard limits and set soft limits within the kernel's allowed user limits. o umask() only set once, and only if requested. o add _secure_path(), and use in login.conf to guard against symlinks etc. and non-root owned or non-user owned files being used. Derived from BSDI contributed code. o revamped authentication code to BSDI's latest api, which includes deleting authenticate() and adding auth_check() and a few other functions. This is still marked as depecated in BSDI, but is included for completeness. No other source in the tree uses this anyway, so it is now bracketed with #ifdef LOGIN_CAP_AUTH which is by default not defined. Only auth_checknologin() and auth_cat() are actually used in module login_auth.c. o AUTH_NONE definition removed (collided with other includes in the tree). [bde] o BSDI's login_getclass() now accepts a char *classname parameter rather than struct passwd *pwd. We now do likewise, but added login_getpwclass() for (sort of) backwards compatiblity, namely because we handle root as a special case for the default class. This will require quite a few changes elsewhere in the source tree. o We no longer pretend to support rlim_t as a long type. o Revised code formatting to be more bsd-ish style.
* Move login_cap.h from src/include for easier maintenance withDavid Nugent1997-05-101-0/+141
| | | | related files.
* Remove the syslog stuff, and allow various return valuesBrian Somers1997-03-311-1/+9
| | | | | | | | | in uu_lock(). Add uu_lockerr() for turning the results of uu_lock into something printable. Remove bogus section in man page about race conditions allowing both processes to get the lock. Include libutil.h and use uu_lock() correctly where it should. Suggested by: ache@freebsd.org
* Move uucplock into libutil and create a manual page.Brian Somers1997-03-301-1/+3
|
* "infinity" check was missed from login_getcapsize(), add itAndrey A. Chernov1997-02-271-1/+7
| | | | One manifestation of this bug: all networking users have coredumpsize=0
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-222-2/+2
|
* Fix free()ing block twice, remove unused function.David Nugent1997-01-301-15/+1
|
* Fix typo .->, for default separators in login_getcaplist().David Nugent1997-01-291-1/+2
|
* Completed fixes with login_getcapsize().David Nugent1997-01-291-1/+2
|
* 1) Fixed bug in free()ing internal string/array whereDavid Nugent1997-01-291-24/+32
| | | | | | | allocated size not reset to 0 causing NULL dereference on call after login_close(). 2) Modify login_capsize() behaviour to match manpage, allow concatenated sizes; ie. 10m500k
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-142-2/+2
| | | | | | | | 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.
* Various bugfixes.David Nugent1997-01-071-7/+11
|
* Commit the right version this time. :-)David Nugent1997-01-071-2/+2
|
* Fix for login_getclass(NULL) case.David Nugent1997-01-071-4/+6
|
* Library functions relating to the login class capabilities database,David Nugent1997-01-041-0/+564
| | | | | including manpages. See also login_cap.h.