summaryrefslogtreecommitdiffstats
path: root/lib/libutil
Commit message (Collapse)AuthorAgeFilesLines
* Bump up the number of ttys supported by pty(4) to 512 by making use ofjhb2007-11-191-1/+1
| | | | | | | [pt]ty[lmnoLMNO][0-9a-v]. MFC after: 3 days Reviewed by: rwatson
* Constify the first argument to expand_number() so that it canjb2007-11-183-3/+3
| | | | be called with a const without the compiler grisling.
* Minor mdoc cleanup: Every sentence should start on its own line.simon2007-10-131-1/+2
|
* When pidfile is already locked and has zero length, do not returnkib2007-10-122-1/+19
| | | | | | | | | | | | | | success and zero pid from pidfile_read(). Return EAGAIN instead. Sleep up to three times for 5 ms while waiting for pidfile to be written. mount(8) does the kill(mountpid, SIGHUP). If mountd pidfile is truncated, that would result in the SIGHUP delivered to the mount' process group instead of the mountd. Found and analyzed by: Peter Holm Tested by: Peter Holm, kris Reviewed by: pjd MFC after: 1 week
* Adjust history.obrien2007-09-284-4/+11
| | | | Approved by: re(ken)
* - Fix strange for loop.pjd2007-09-051-6/+16
| | | | | | | | | Reported by: phk - While here, check the unit before calculating the actually number. This way we can return EINVAL for invalid unit instead of ERANGE. Approved by: re (kensmith)
* Point expand_number(3) at humanize_number(3) and nive versa.pjd2007-09-052-0/+4
| | | | | Suggested by: trhodes Approved by: re (kensmith)
* Implement expand_number(3), which is the opposite of humanize_number(3), ie.pjd2007-09-014-3/+177
| | | | | | | | | | a number in human-readable form is converted to int64_t, for example: 123b -> 123 10k -> 10240 16G -> 17179869184 First version submitted by: Eric Anderson <anderson@freebsd.org> Approved by: re (bmah)
* Back out previous commit until I figure out why my regression test fails.des2007-08-033-23/+17
| | | | Approved by: re (kensmith)
* Use fcntl(2)-style locks instead of less-portable flock(2)-style locks.des2007-08-033-17/+23
| | | | Approved by: re (kensmith)
* Document the quirks of ~/.login_conf and LOGIN_MECLASS.yar2007-06-141-57/+80
|
* Improve mdoc(7) markup.yar2007-06-141-76/+190
|
* Update some comments, mostly regarding LOGIN_MECLASS and ~/.login_conf.yar2007-06-141-8/+18
|
* Nit: avoid shadowing truncate(2) with a local variable.des2007-05-231-3/+3
|
* Fix stupid braino in previous commit.des2007-05-231-1/+1
|
* If (flags & O_TRUNC), don't truncate the file until we've successfullydes2007-05-231-1/+11
| | | | | | locked it. MFC after: 3 weeks
* Bump library versions in preparation for 7.0.deischen2007-05-211-1/+1
| | | | Ok'd by: kan
* strlcpy() may be faster than snprintf(), but it is less portable, and thisdes2007-05-111-8/+8
| | | | | | | is not performance critical code anyway. Also, avoid using strlen() to obtain information which we already have. MFC after: 3 weeks
* Fix typo.des2007-05-101-1/+1
| | | | Submitted by: Bård Skaflestad <bardsk@math.ntnu.no>
* Well gag me with a spoon... I'm so used to working at high WARNS levelsdes2007-05-102-1/+5
| | | | that I make stupid fundamental mistakes like this when I don't.
* Remove superfluous unexpanded RCS tag.des2007-05-101-2/+0
|
* Use flopen(3).des2007-05-101-2/+2
| | | | MFC after: 3 weeks
* DTRT when O_NONBLOCK is specified.des2007-05-102-4/+29
| | | | MFC after: 3 weeks
* I'm tired of seeing this done incorrectly and non-portably, so add ades2007-05-104-6/+177
| | | | | | flopen(3) function which reliably opens and locks a file. MFC after: 3 weeks
* Fix one kind of style(9) bug and a typo in a comment.yar2007-05-011-5/+5
| | | | Tested with: md5(1)
* Remove California Regent's clause 3, per letterimp2007-01-097-28/+0
|
* Fix a typo: "the give login class" to "the given login class."trhodes2006-11-051-1/+1
| | | | | PR: 75577 Submitted by: Nobuyuki Koganemaru
* Fix markup in previous revision.ru2006-10-101-2/+5
|
* Add information on how to escape a literal colon in a value or name.trhodes2006-10-091-1/+5
| | | | PR: 101262
* Revise markup in recently added manpages.ru2006-09-301-10/+4
|
* Markup fixes.ru2006-09-171-1/+3
|
* Minor comment fix.thomas2006-09-081-1/+1
|
* (pw_copy): Handle the case of a malformed line in master.passwdthomas2006-09-041-2/+11
| | | | | | | | (copy it silently, do not dereference NULL pointer). PR: bin/102848 Reviewed by: security-officer (cperciva) MFC after: 1 week
* Recognize the existence of `auth' and `auth-type'yar2006-08-231-1/+6
| | | | | | | | | | capabilities but tell they do nothing in the base system. This is a late responce to http://docs.freebsd.org/cgi/mid.cgi?ED759F1DC5ADD74592DD063B1EDEDAF803ACD2B5 . Obtained from: OpenBSD (wording; with minor corrections)
* style.Makefile(5) is good for our eyes.yar2006-07-271-4/+8
|
* Note the convention that humanize_number follows.imp2006-07-151-8/+11
| | | | Add 'engineering' numbers to table.
* o Add missed comma, xref kld(4).maxim2006-07-121-2/+3
|
* Remove some unused variablesbrian2006-06-231-2/+0
|
* o Typo: ownship -> ownership.maxim2006-06-171-1/+1
| | | | Obtained from: DragonFlyBSD
* Specify default path for SHLIBDIR before bsd.own.mk does.akiyama2006-06-111-1/+3
| | | | This fix shared library installed correct place.
* Don't build IPv6 support if we have choosen not to have it.delphij2006-06-091-0/+4
|
* - Add include for libutil.h and string.h for prototype.delphij2006-05-251-1/+3
| | | | | - Cast the rvalue to be compared with the result of strlen() to size_t.
* Bump library majro version for gethostbyaddr(3).ume2006-05-211-1/+1
|
* Document how the backoff delay is calculated.brueffer2006-04-191-1/+4
| | | | | Submitted by: markus MFC after: 3 days
* use pwrite to always write at the begining of the file.. If multiple callsjmg2006-04-111-1/+1
| | | | | | | | to pidfile_write happen, the pidfile will have nul characters prepended due to the cached file descriptor offset... Reviewed by: scottl MFC after: 3 days
* Use `intmax_t' instead of plain `int' for pid_t casts.keramida2006-03-041-3/+3
| | | | | | Useful tips from: ru, bde Approved by: pjd MFC after: 3 days
* Add utility functions for checking if a given kernel module is loaded,des2006-02-184-2/+180
| | | | and loading it.
* - Add a note that passing NULL to pidfile_write(), pidfile_remove() andpjd2006-01-281-3/+13
| | | | | | | pidfile_close() functions is safe. This possibility is used in example code. - Cast pid_t to int. Requested by: yar
* Teach openpty() how to deal with pts.cognet2006-01-261-0/+45
|
* Restore use of strncpy(), as there is later unconditional terminationrwatson2006-01-161-1/+1
| | | | | | of the string, and reliance on the returned pointer. Found by: bde (tm)
OpenPOWER on IntegriCloud