summaryrefslogtreecommitdiffstats
path: root/sys/security/mac/mac_framework.h
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2003-11-16 20:18:24 +0000
committerrwatson <rwatson@FreeBSD.org>2003-11-16 20:18:24 +0000
commit67feac6f9ad43474c93da3a1ac46a927a747ca88 (patch)
tree7f7deb71cce11b30af6b9ae2755276e0907b9c00 /sys/security/mac/mac_framework.h
parent80614c45b2018b87aa68ee3eac41b6934d04826b (diff)
downloadFreeBSD-src-67feac6f9ad43474c93da3a1ac46a927a747ca88.zip
FreeBSD-src-67feac6f9ad43474c93da3a1ac46a927a747ca88.tar.gz
Implement mac_get_peer(3) using getsockopt() with SOL_SOCKET and
SO_PEERLABEL. This provides an interface to query the label of a socket peer without embedding implementation details of mac_t in the application. Previously, sizeof(*mac_t) had to be specified by an application when performing getsockopt(). Document mac_get_peer(3), and expand documentation of the other mac_get(3) functions. Note that it's possible to get EINVAL back from mac_get_fd(3) when pointing it at an inappropriate object. NOTE: mac_get_fd() and mac_set_fd() support for sockets will follow shortly, so the documentation is slightly ahead of the code. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'sys/security/mac/mac_framework.h')
-rw-r--r--sys/security/mac/mac_framework.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/security/mac/mac_framework.h b/sys/security/mac/mac_framework.h
index ff7ed95..8cb20ad 100644
--- a/sys/security/mac/mac_framework.h
+++ b/sys/security/mac/mac_framework.h
@@ -83,6 +83,7 @@ int mac_from_text(mac_t *_label, const char *_text);
int mac_get_fd(int _fd, mac_t _label);
int mac_get_file(const char *_path, mac_t _label);
int mac_get_link(const char *_path, mac_t _label);
+int mac_get_peer(int _fd, mac_t _label);
int mac_get_pid(pid_t _pid, mac_t _label);
int mac_get_proc(mac_t _label);
int mac_is_present(const char *_policyname);
OpenPOWER on IntegriCloud