Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Aug 2003 12:51:55 -0700 (PDT)
From:      Chris Vance <cvance@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 37033 for review
Message-ID:  <200308271951.h7RJptFT018898@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=37033

Change 37033 by cvance@cvance_release on 2003/08/27 12:51:09

	Add support for the get_default_type call, when provided with a
	user role, it will attempt to find a corresponding type.  This 
	source was "ported" from SELinux; essentially no changes were made.

Affected files ...

.. //depot/projects/trustedbsd/sebsd/lib/libsebsd/Makefile#4 edit
.. //depot/projects/trustedbsd/sebsd/lib/libsebsd/get_default_type.c#1 add
.. //depot/projects/trustedbsd/sebsd/lib/libsebsd/sebsd.h#3 edit

Differences ...

==== //depot/projects/trustedbsd/sebsd/lib/libsebsd/Makefile#4 (text+ko) ====

@@ -14,7 +14,8 @@
 
 SRCS=	system.c security_get_user_contexts.c get_ordered_context_list.c \
 	getseccontext.c query_user_context.c security_change_context.c \
-	string_to_security_class.c security_compute_av.c context.c
+	string_to_security_class.c security_compute_av.c context.c \
+	get_default_type.c
 INCS=	sebsd_context.h sebsd_ss.h sebsd_proc.h sebsd_fs.h sebsd.h \
 	sebsd_syscalls.h flask_types.h
 

==== //depot/projects/trustedbsd/sebsd/lib/libsebsd/sebsd.h#3 (text+ko) ====

@@ -70,4 +70,14 @@
 int security_compute_av(struct security_query *query, 
 	    struct security_response *response);
 
+
+
+/* 
+ * Get the default type (domain) for 'role' and set 'type' to refer to it.
+ * Caller must free via free().
+ * Return 0 on success or -1 otherwise. 
+ */
+#define _DEFTYPE_PATH "/etc/security/sebsd/default_type"
+int get_default_type (const char* role, char** type);
+
 #endif /* _SEBSD_H */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200308271951.h7RJptFT018898>