summaryrefslogtreecommitdiffstats
path: root/lib/libc/posix1e/mac.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused variables and function declarations. Add missing headers.nectar2004-01-061-1/+2
|
* Staticize label_default_head to prevent it from leaking out of mac.c.rwatson2003-11-171-1/+1
| | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Remove debugging printf that crept into the last commit.rwatson2003-11-151-1/+0
|
* /etc/mac.conf is implicitly read and parsed when the MAC configurationrwatson2003-11-151-20/+6
| | | | | | | | | | | is accessed for the first time as a result of an application looking up label configuration information. Previously, the check and read were kicked off by mac_prepare_(typename)() functions; since mac_prepare_type() may now be directly employed by a user process, push the check and initialization into that function. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Return (-1) not (ENOENT) for mac_prepare_type(), and set errno torwatson2003-08-301-1/+2
| | | | | | | ENOENT instead. Reported by: "Kenneth D. Merry" <ken@kdm.org> Submitted by: Bryan Liesner <bleez@comcast.net>
* Make the elements argument to mac_prepare() be const.rwatson2003-08-221-1/+1
| | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* As new objects begin to support new labels, start to generalizerwatson2003-08-221-86/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Whack 28 unused variables.nectar2003-02-181-8/+1
|
* License update authorized by NAI: remove clause 3.rwatson2002-11-051-7/+4
|
* Do not include <sys/syslimits.h> directly; it is not intended for generalwollman2002-10-271-1/+1
| | | | consumption.
* Place mac_prepare() with the other mac_prepare*() functions.chris2002-10-241-10/+10
|
* Reflect MAC kernel/user API changes into the libc MAC implementation.rwatson2002-10-221-0/+365
This removes a lot of complexity, since we basically just reserve space on a retrieval of a label, and pass around strings. Two new elements: (1) consumers of the API must now declare what label elements they are interested in retrieving, or (2) rely on the default provided in a new configuration file, mac.conf. Approved by: re Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
OpenPOWER on IntegriCloud