Date: Mon, 22 Sep 2003 08:20:04 -0700 (PDT) From: Andrew Reisse <areisse@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 38418 for review Message-ID: <200309221520.h8MFK4FA000984@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=38418 Change 38418 by areisse@areisse_tislabs on 2003/09/22 08:19:32 remove avc_enforcing and avc_toggle syscalls also, it should build again... Affected files ... .. //depot/projects/trustedbsd/sebsd/lib/libsebsd/sebsd_ss.h#2 edit .. //depot/projects/trustedbsd/sebsd/lib/libsebsd/system.c#2 edit Differences ... ==== //depot/projects/trustedbsd/sebsd/lib/libsebsd/sebsd_ss.h#2 (text+ko) ==== @@ -36,13 +36,6 @@ #ifndef _SELINUX_SS_H_ #define _SELINUX_SS_H_ - -/* Individual AVC calls. */ - -extern int avc_toggle(void); - -extern int avc_enforcing(void); - /* Individual security server calls. */ extern int security_compute_av(struct security_query *query, @@ -70,16 +63,16 @@ extern int security_sid_to_context(security_id_t sid, security_context_t scontext, - __u32 *scontext_len); + u32 *scontext_len); extern int security_context_to_sid(const security_context_t scontext, - __u32 scontext_len, + u32 scontext_len, security_id_t *out_sid); extern int security_load_policy(const char *path); extern int security_get_sids(security_id_t *sids, - __u32 *nel); + u32 *nel); extern int security_mls(void); ==== //depot/projects/trustedbsd/sebsd/lib/libsebsd/system.c#2 (text+ko) ==== @@ -40,21 +40,21 @@ int sebsd_enabled() { - int error; - error = mac_syscall(SEBSD_ID_STRING, SEBSDCALL_AVC_ENFORCING , NULL); - return (error != ENOSYS); + int error, i; + error = sysctlbyname ("security.mac.sebsd.enforcing", + &i, sizeof(int), NULL, 0); + return (error != ENOENT); } int sebsd_enforcing() { - return mac_syscall(SEBSD_ID_STRING, SEBSDCALL_AVC_ENFORCING , NULL); -} - -int -sebsd_avc_toggle() -{ - return mac_syscall(SEBSD_ID_STRING, SEBSDCALL_AVC_TOGGLE , NULL); + int i, error; + error = sysctlbyname ("security.mac.sebsd.enforcing", + &i, sizeof (int), NULL, 0); + if (error) + return 0; + return i; } int
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309221520.h8MFK4FA000984>