Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Oct 2006 19:22:30 GMT
From:      Todd Miller <millert@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 108508 for review
Message-ID:  <200610261922.k9QJMUXE077972@repoman.freebsd.org>

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

Change 108508 by millert@millert_macbook on 2006/10/26 19:21:52

	Rename mac_find_module_data() to mac_find_policy_data().

Affected files ...

.. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/config/MACFramework.exports#8 edit
.. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_data.c#3 edit
.. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_data.h#3 edit
.. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#28 edit

Differences ...

==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/config/MACFramework.exports#8 (text+ko) ====

@@ -38,6 +38,7 @@
 _mac_zfree
 
 _mac_find_module_data
+_mac_find_policy_data
 
 _mac_iokit_check_device
 

==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_data.c#3 (text+ko) ====

@@ -29,16 +29,26 @@
 #include "mac_internal.h"
 
 int
-mac_find_module_data(const mac_policy_handle_t handle, const char *key,
+mac_find_policy_data(const mac_policy_handle_t handle, const char *key,
     void **valp, size_t *sizep)
 {
 	struct mac_policy_conf *mpc;
-	struct mac_module_data *mmd;
+	int error = ENOENT;
+	unsigned int i;
+
+	if ((mpc = mac_get_mpc(handle)) != NULL)
+		error = mac_find_module_data(mpc->mpc_data, key, valp, sizep);
+	return (error);
+}
+
+int
+mac_find_module_data(struct mac_module_data *mmd, const char *key,
+    void **valp, size_t *sizep)
+{
 	int error = ENOENT;
 	unsigned int i;
 
-	if ((mpc = mac_get_mpc(handle)) != NULL &&
-	    (mmd = mpc->mpc_data) != NULL) {
+	if (mmd != NULL) {
 		for (i = 0; i < mmd->count; i++) {
 			if (strcmp(key, mmd->data[i].key) == 0) {
 				*valp = mmd->data[i].value;

==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_data.h#3 (text+ko) ====

@@ -61,7 +61,9 @@
 
 #ifdef _SECURITY_MAC_POLICY_H_
 /* XXX mac_policy_handle_t is defined in mac_policy.h, move prototype there? */
-int mac_find_module_data(const mac_policy_handle_t, const char *key,
+int mac_find_policy_data(const mac_policy_handle_t, const char *key,
+    void **valp, size_t *sizep);
+int mac_find_module_data(struct mac_module_data *mmd, const char *key,
     void **valp, size_t *sizep);
 #endif
 

==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#28 (text+ko) ====

@@ -110,7 +110,7 @@
 int
 sebsd_find_data(const char *key, void **valp, size_t *sizep)
 {
-	return (mac_find_module_data(sebsd_handle, key, valp, sizep));
+	return (mac_find_policy_data(sebsd_handle, key, valp, sizep));
 }
 
 extern int ss_initialized;



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