freebsd-skq/lib/libc/posix1e
Robert Watson 738824ad6c As new objects begin to support new labels, start to generalize
the default label support in /etc/mac.conf.  Rather than maintain
each default label type in an explicit global variable in mac.c,
keep a list of defaults loaded from the configuration file.
Generalize the parsing so that we support both the older:

        default_file_labels foo
        default_ifnet_labels foo
        default_process_labels foo

And also a new:

        default_labels file foo
        default_labels ifnet foo
        default_labels process foo

We now accept arbitrary object classes in the first argument.  If
the same object is specified more than once, we discard the
earlier definition in favor of the later one.

Add a new API, mac_prepare_type(), which accepts a mac_t to
prepare, as well as an object name in the second argument, which
will pull a default label set for the object out of the
configuration loaded by mac_init_internal().  This permits the libc
to adapt to new objects known about by applications but not by libc
at compile-time.

Also liberalize the error handling a bit: if we're using implicit
initialization (i.e., the application didn't explicitly initialize
the MAC code), ignore syntax errors and only use valid lines.  In
the future, we may want to add explicit warnings and do this a
bit more consistently.

While here, add support for a MAC_CONFFILE environmental variable,
which may be used to specify an alternative mac.conf configuration
file if the application isn't running with modified privilege
(issetugid()).

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-08-22 17:36:23 +00:00
..
acl_add_perm.3 mdoc(7) police: "The .Fn function". 2002-12-18 12:45:11 +00:00
acl_calc_mask.3 mdoc(7) police: "The .Fn function". 2002-12-18 12:45:11 +00:00
acl_calc_mask.c Fix the style of the SCM ID's. 2002-03-22 21:53:29 +00:00
acl_clear_perms.3 mdoc(7) police: "The .Fn function". 2002-12-18 12:45:11 +00:00
acl_copy_entry.3 mdoc(7) police: "The .Fn function". 2002-12-18 12:45:11 +00:00
acl_copy.c Fix the style of the SCM ID's. 2002-03-22 21:53:29 +00:00
acl_create_entry.3 mdoc(7) police: "The .Fn function". 2002-12-18 12:45:11 +00:00
acl_delete_entry.3 mdoc(7) police: "The .Fn function". 2002-12-18 12:45:11 +00:00
acl_delete_entry.c Fix the style of the SCM ID's. 2002-03-22 21:53:29 +00:00
acl_delete_perm.3 mdoc(7) police: "The .Fn function". 2002-12-18 12:45:11 +00:00
acl_delete.3 Typo. 2003-02-23 01:44:37 +00:00
acl_delete.c Update libc POSIX.1e code and documentation to reflect: 2002-12-29 20:47:05 +00:00
acl_dup.3 Remove BUGS section indicating that these calls are unimplemented. 2002-12-29 20:52:42 +00:00
acl_entry.c Fix the style of the SCM ID's. 2002-03-22 21:53:29 +00:00
acl_free.3 Remove BUGS section indicating that these calls are unimplemented. 2002-12-29 20:52:42 +00:00
acl_free.c Fix the style of the SCM ID's. 2002-03-22 21:53:29 +00:00
acl_from_text.3 Remove BUGS section indicating that these calls are unimplemented. 2002-12-29 20:52:42 +00:00
acl_from_text.c Fix the style of the SCM ID's. 2002-03-22 21:53:29 +00:00
acl_get_entry.3 mdoc(7) police: "The .Fn function". 2002-12-18 12:45:11 +00:00
acl_get_perm_np.3 mdoc(7) police: "The .Fn function". 2002-12-18 12:45:11 +00:00
acl_get_permset.3 mdoc(7) police: "The .Fn function". 2002-12-18 12:45:11 +00:00
acl_get_qualifier.3 english(4) police. 2002-12-27 12:15:40 +00:00
acl_get_tag_type.3 english(4) police. 2002-12-27 12:15:40 +00:00
acl_get.3 Grammar. 2003-02-23 01:43:45 +00:00
acl_get.c Update libc POSIX.1e code and documentation to reflect: 2002-12-29 20:47:05 +00:00
acl_init.3 Remove BUGS section indicating that these calls are unimplemented. 2002-12-29 20:52:42 +00:00
acl_init.c Fix the style of the SCM ID's. 2002-03-22 21:53:29 +00:00
acl_perm.c Fix the style of the SCM ID's. 2002-03-22 21:53:29 +00:00
acl_set_permset.3 mdoc(7) police: "The .Fn function". 2002-12-18 12:45:11 +00:00
acl_set_qualifier.3 mdoc(7) police: "The .Fn function". 2002-12-18 12:45:11 +00:00
acl_set_tag_type.3 mdoc(7) police: "The .Fn function". 2002-12-18 12:45:11 +00:00
acl_set.3 Punctuation. 2003-02-23 01:44:59 +00:00
acl_set.c Update libc POSIX.1e code and documentation to reflect: 2002-12-29 20:47:05 +00:00
acl_size.c Fix the style of the SCM ID's. 2002-03-22 21:53:29 +00:00
acl_support.c Fix the style of the SCM ID's. 2002-03-22 21:53:29 +00:00
acl_support.h o Separate acl_t into internal and external representations as 2001-04-24 22:45:41 +00:00
acl_to_text.3 Remove BUGS section indicating that these calls are unimplemented. 2002-12-29 20:52:42 +00:00
acl_to_text.c Print group name in getfacl output when calculating an effective 2003-07-24 23:33:25 +00:00
acl_valid.3 Update libc POSIX.1e code and documentation to reflect: 2002-12-29 20:47:05 +00:00
acl_valid.c Update libc POSIX.1e code and documentation to reflect: 2002-12-29 20:47:05 +00:00
acl.3 The .Fn function 2003-02-06 11:04:47 +00:00
extattr.3 Uniformly refer to a file system as "file system". 2002-12-12 17:26:04 +00:00
extattr.c Fix the style of the SCM ID's. 2002-03-22 21:53:29 +00:00
mac_exec.c Eliminate 61 warnings emitted at WARNS=2 (leaving 53 to go). 2003-02-16 17:29:11 +00:00
mac_free.3 Cross-reference mac(4) 2003-01-15 03:03:05 +00:00
mac_get.3 Cross-reference mac(4) 2003-01-15 03:03:05 +00:00
mac_get.c Eliminate 61 warnings emitted at WARNS=2 (leaving 53 to go). 2003-02-16 17:29:11 +00:00
mac_is_present_np.3 Cross-reference mac(4) 2003-01-15 03:03:05 +00:00
mac_is_present.3 Cross-reference mac(4) 2003-01-15 03:03:05 +00:00
mac_prepare.3 Add FILES section to mac.3 and mac.conf.5. Properly Xref mac.conf.5 2003-04-20 04:43:56 +00:00
mac_set.3 s/SEE_ALSO/SEE ALSO/ 2003-01-15 03:02:30 +00:00
mac_set.c Eliminate 19 warnings in libc (at level WARNS=2) of the 2003-02-27 13:40:01 +00:00
mac_text.3 s/SEE_ALSO/SEE ALSO/ 2003-01-15 03:02:30 +00:00
mac.3 Assorted mdoc(7) fixes. 2003-05-22 13:02:28 +00:00
mac.c As new objects begin to support new labels, start to generalize 2003-08-22 17:36:23 +00:00
mac.conf.5 mdoc(7) fixes. 2003-05-24 19:53:08 +00:00
Makefile.inc Add a man page for the mac.conf MAC library configuration file. 2003-04-20 03:18:44 +00:00
posix1e.3 mdoc(7) police: sort xrefs in SEE ALSO. 2002-12-13 16:53:51 +00:00