Commit Graph

29 Commits

Author SHA1 Message Date
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
christos b093a7796c split LOGIN_SETGROUP -> LOGIN_SETGID|LOGIN_SETGROUPS 2007-10-06 21:51:21 +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
christos af4b090320 From Anon Ymous:
- add __unused
- remove __GNUC__ hack
2006-12-20 16:47:13 +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
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 232f61fabb Lint warnings. 2005-08-27 16:55:59 +00:00
drochner 1a771b22ec Allow for a login.conf file without an explicite "default" class
definition.
The login.conf(5) manpage states that the "default" class is used
*if it exists*.
2005-04-13 20:32:42 +00:00
christos f1a325d103 Unbreak setuserpath(); from Nick Hudson. 2004-12-20 18:42:03 +00:00
christos 70756f97e8 Constify; the api was completely broken before. 2004-12-11 06:40:42 +00:00
lukem 2ebcc58148 sbsize should be parsed as R_CSIZE so that suffixes work correctly.
Fix from Christian Biere in PR [lib/25504].

(XXX: the R_CSIZE parsing should be changed to using strsuftollx(3))
2004-05-09 23:28:11 +00:00
christos dea77b1806 sprinkle const 2004-04-23 15:23:26 +00:00
matt d07ed6425d Add sbsize login capability. 2004-04-18 18:21:43 +00:00
christos 5028fe3e04 delint pointer casts. 2003-10-25 07:31:27 +00:00
fvdl bada5458de Don't use NULL to compare against an int. 2003-10-21 00:55:05 +00:00
itojun c469f0373f initialize 'res' to NULL 2003-09-08 20:54:48 +00:00
itojun 0676396691 plug possible memory leak. from openbsd 2003-09-08 16:19:40 +00:00
wiz a9356936b4 seperate -> separate 2001-07-22 13:33:58 +00:00
lukem d06a762ab2 sprinkle in _DIAGASSERT() as appropriate 2001-01-03 15:41:19 +00:00
itojun 4c0a48380a /etc/login.conf is optional, so don't return NULL even if
there's none found.  addresses part of PR 11150.  sync with openbsd.
2000-10-12 00:28:33 +00:00
itojun 11ede04dd7 cosmetic; indentation 2000-10-12 00:19:57 +00:00
ad 88ec60f200 - Pull in <util.h> to get secure_path() declared.
- Resolve preprocessor symbol clash.
2000-09-21 10:15:32 +00:00
ad fce98185a9 - __RCSID() police.
- ANSIfy.
- Miscellaneous style changes.
- Shutup lint(1) in one or two cases.
2000-07-05 11:46:40 +00:00
mjl b562264ae1 Add a missing free() of a temporary buffer.
Add "unlimited" as synonym for "inf" and "infinity" for the
benefit of FreeBSD users.
Factor out the comparison w/ "infinity" in a isinfinite() function.
2000-02-10 20:52:54 +00:00
mjl b3204d536b Add login_getpwclass to libutil as convenience function for
programs originally for FreeBSD.
Add parsing of "setenv" parameter which can be used to set
up an initial environment on login.
2000-02-04 02:17:14 +00:00
mjl 633ab39a92 Make setusercontext() resilient against missing login.conf too. 2000-01-14 02:14:42 +00:00
mjl 923f186481 Make login_cap routines resilient to non-existant conf file, and
secure_path() less noisy.
2000-01-13 06:48:14 +00:00
mjl 142f369443 Add necessary support routines for login.conf. 2000-01-12 05:02:10 +00:00