Commit Graph

368 Commits

Author SHA1 Message Date
martin 11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
oster 8b2eb1e024 Add the missing 'n' to 'correspoding'. 2008-02-23 18:35:04 +00:00
dholland c60100b138 Use STDIN_FILENO and friends instead of magic constants 0/1/2.
Suggested by the patches in PR bin/36551 from Greg A. Woods.
2008-02-09 05:07:26 +00:00
mjf d4a648c345 Implement a new magic string for magic symlinks, @ruid, which exapnds to the
real user id of the process and use this magic string for per-user tmp.
This should fix PR/35687

Kernel parts reviewed by wrstuden@
2007-12-04 22:09:01 +00:00
rillig 55bf992f36 The e* functions don't call the error handler in every case, just in
case of an error.

Mentioned the error conditions for the various functions.
2007-11-21 09:17:24 +00:00
christos b093a7796c split LOGIN_SETGROUP -> LOGIN_SETGID|LOGIN_SETGROUPS 2007-10-06 21:51:21 +00:00
lukem 2aa3c760cc support nbtool_config.h. 2007-09-28 09:07:16 +00:00
lukem e9aa053c09 Add raise_default_signal(3) -- raise the default signal handler.
Can be used by applications that have their own SIGINT (et al)
handlers and want to exit in a manner that correctly
signals to the parent that the process was terminated by a signal.
See http://www.cons.org/cracauer/sigint.html for more info.
Discussed on tech-userlevel@.
2007-09-25 01:13:54 +00:00
pooka 8ffb2866a1 * clarify error behaviour for getmntopts()
* invert getmnt_silent description (a.k.a. "fix it")
2007-08-26 22:53:01 +00:00
pooka 5cf35d2a60 Emulate behaviour described in man page and return NULL if an error occurs. 2007-08-26 22:46:15 +00:00
dyoung bfa27930cb In sockaddr_snprintf(sbuf, len, fmt, sa), do not write the terminating
null character outside of the byte region [sbuf, sbuf + len).

1) If the length of the buffer is 0, do not write a null character
   at all.  Previously, sockaddr_snprintf() may have been able to
   overwrite sbuf[-1] if len was 0.

2) If the length of the buffer, len, is greater than 0, then write
   the null at sbuf[len - 1].  Previously, sockaddr_snprintf()
   wrote the null at buf[len - 1], where `buf' was a "cursor" that
   did not necessarily equal `sbuf', the start of the buffer.  Now,
   sockaddr_snprintf() always writes the null at sbuf[len - 1].
2007-07-24 08:45:45 +00:00
pooka 060d8639e3 add estrndup() 2007-07-01 21:41:16 +00:00
wiz e7023c08af Remove pw_error prototype, the function is described in a different man page.
Bump date.

From Slava Semushin in private mail.
2007-02-17 09:37:55 +00:00
elad 5e2e282f9c Add support for per-user /tmp.
Enabled via per_user_tmp in /etc/rc.conf (default off).

See security(8) and rc.conf(5) for more details.

Lots of input from thorpej@ & christos@, thanks!
2007-02-04 08:19:26 +00:00
cbiere 13b350466e Fixed string truncation bug in flags_to_string(): SAPPEND() uses
sizeof(string) but string is a pointer to a malloc()ed buffer.
2007-01-16 17:34:02 +00:00
elad 7e90974e98 Consistent license. 2007-01-09 14:04:44 +00:00
wiz f77162e1ea Fix typo. 2006-12-23 09:55:47 +00:00
wiz 1073e35f2d Use more macros. Fix section in Xr. 2006-12-23 09:54:11 +00:00
wiz 73188ad828 Quote - when used as minus; uppercase Dt argument; remove dot at end
of SEE ALSO; new sentence, new line.
2006-12-23 07:29:10 +00:00
wiz 57551caad9 Remove trailing whitespace. 2006-12-23 07:26:09 +00:00
christos af4b090320 From Anon Ymous:
- add __unused
- remove __GNUC__ hack
2006-12-20 16:47:13 +00:00
he 0a97c3f688 Complete the move of string_to_flags() and flags_to_string() from the
bin/ls sources to libutil:
 o Bump libutil minor version number
 o Fix uses to include <util.h> to pick up the function definitions
 o Fix most uses of flags_to_string() to release the now-malloc()ed result
2006-12-14 20:09:35 +00:00
christos 33d6b113f2 moved string_to_flags and flags_to_string from ls to libutil. 2006-12-14 19:18:01 +00:00
dyoung a26b3af0e0 Render the format %% as %. 2006-12-09 20:18:43 +00:00
christos 61261c8531 rename getdate to parsedate to avoid conflict with posix function 2006-11-20 20:33:02 +00:00
christos a5486efb24 constify 2006-11-17 22:44:16 +00:00
christos ba26b607a4 add getdate. 2006-11-17 22:10:23 +00:00
christos 8c97c569de include ecalloc() from our anonymous user. 2006-10-20 17:40:39 +00:00
christos 284c960b4d typo from our anonymous user. 2006-10-20 17:40:18 +00:00
christos 40c48e4f33 prevent empty else. 2006-10-15 19:34:51 +00:00
christos ebed6f0b8c add volatile to prevent gcc clobbering. 2006-10-15 19:33:52 +00:00
christos 2979ced6e8 - Instead of wondering if to syslog an error, do so, but in the called
function.
- use snprintf instead of sprintf.
2006-10-15 19:33:03 +00:00
christos e7acb44bcf Allow escaping of the separators using a double backslash 2006-10-14 18:53:11 +00:00
pooka 34a6a097c3 add util.h to SYNOPSIS 2006-10-06 15:31:20 +00:00
christos 5863dc6ef1 Coverity CID 4159: Don't memset() needlessly. 2006-09-27 16:20:03 +00:00
wiz 8d8d8f2ebd Slight wording improvement, sort SEE ALSO, remove trailing dot in SEE ALSO. 2006-09-02 23:43:47 +00:00
christos ec0bdc9542 make this compilable as a tool. 2006-08-28 20:46:26 +00:00
christos 568f6f6f30 Only use __RCSID if we have it. 2006-08-26 23:17:43 +00:00
christos 6e90deb9cb Efun source. 2006-08-26 18:11:45 +00:00
christos e72710e561 Add efun(3) 2006-08-26 18:11:12 +00:00
drochner f5015685d4 mention error return value, like getrawpartition(3) 2006-05-26 12:36:59 +00:00
wiz cb3fc8886b \- is a minus. 2006-05-25 10:56:08 +00:00
christos dc46554fdb Document that this can fail. 2006-05-25 00:41:24 +00:00
elad 2675cb7714 Allow explicit length by checking it only if we have a length above 0. 2006-04-01 14:51:17 +00:00
elad f77bbf7c65 set all fields to -1 after allocation, this makes it easier to write
policies.
2006-03-30 18:11:17 +00:00
wiz c2cc4b2716 Consistently use .Va for errno. Quote "-" for PostScript output. 2006-03-23 19:31:37 +00:00
wiz c2f9369ee7 Remove trailing whitespace, add 'and' in enumeration. 2006-03-23 19:30:27 +00:00
elad d7e635e034 plug leaks, coverity cids 1618, 1619. 2006-03-20 17:32:17 +00:00
elad 2b9c10de57 Set errno on failure, and man-page updates. 2006-03-19 22:58:21 +00:00