Commit Graph

355 Commits

Author SHA1 Message Date
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
christos a3f80bb48f - Don't trash error number returned by the handler; return it instead.
- Add default cases and return EINVAL
- Don't check for NULL arguments and return EFAULT. Let it core-dump instead.
  (or add DIAGASSERT)
- Coverity CID 799: Don't dereference m and n if they are known to be NULL.
  Bail out sooner with EINVAL.
2006-03-19 22:18:25 +00:00
christos b3044379df Clarify errno's returned by those functions. 2006-03-19 21:56:04 +00:00
christos 6b99850ef0 Coverity CID 1209: Avoid negative close. While I am there fix bugs (open
returning 0 is ok). Reorganize code to factor out common parts, cleanup
syscall checking and error code return.
2006-03-19 21:55:37 +00:00
wiz bade1adbc5 Fix typo. 2006-02-24 21:07:29 +00:00
wiz 8b9018d2d9 Mark up NULL (with Dv). 2006-02-24 21:06:50 +00:00
elad bca69c49bf needs assert.h to compile. 2006-02-19 23:13:14 +00:00
elad f0dd749f9b add _DIAGASSERT as requested by mrg@. 2006-02-19 20:46:29 +00:00
elad 5cd336ae07 When loading a policy with an "nclasses" option, always set the min/max
values for the various character classes to allow any number, just in
case. Also note about that in the man-page.

This makes it easier to use the "nclasses" option.

Note that alternatively we could just memset() to 0xff when doing the
load, but that might lead to more unexpected behavior.
2006-02-18 16:45:01 +00:00
elad cf6eceb4e7 Don't expose struct pw_policy and use pw_policy_t, use malloc, man-page
fixups.

As discussed on source-changes@.

Okay yamt@, thorpej@.
2006-02-18 16:32:45 +00:00
elad 378a5a27de Some stuff that's been sitting in my tree for too long...
Improve the pw_policy(3) API by splitting it to two functions, one to load
the policy from /etc/passwd.conf and another to test passwords against the
policy.

Some bug fixes, more consistent code, and man-page updates.

Minor for libutil bumped.
2006-02-18 10:52:48 +00:00
christos 349633b5fa make setuserenv and setuserpath take an environment setting function and
an environment pointer and expose them.
bump version.
2005-12-20 21:32:20 +00:00
elad 02197be174 Lint warnings. 2005-09-17 01:51:21 +00:00
elad 769541972d Rename struct pw_policy -> struct pw_policy_handler. 2005-09-16 22:38:48 +00:00