PERFORCE change 72237 for review

Robert Watson rwatson at FreeBSD.org
Tue Mar 1 14:05:46 GMT 2005


http://perforce.freebsd.org/chv.cgi?CH=72237

Change 72237 by rwatson at rwatson_paprika on 2005/03/01 14:04:59

	Rename check_posix_sem_openexisting MAC Framework entry points and
	policy entry points to check_posix_sem_open, which while less
	specific may be more clear.

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/kern/uipc_sem.c#20 edit
.. //depot/projects/trustedbsd/mac/sys/security/mac/mac_posix_sem.c#10 edit
.. //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#249 edit
.. //depot/projects/trustedbsd/mac/sys/security/mac_lomac/mac_lomac.c#89 edit
.. //depot/projects/trustedbsd/mac/sys/security/mac_mls/mac_mls.c#202 edit
.. //depot/projects/trustedbsd/mac/sys/security/mac_stub/mac_stub.c#26 edit
.. //depot/projects/trustedbsd/mac/sys/security/mac_test/mac_test.c#141 edit
.. //depot/projects/trustedbsd/mac/sys/sys/mac.h#266 edit
.. //depot/projects/trustedbsd/mac/sys/sys/mac_policy.h#223 edit

Differences ...

==== //depot/projects/trustedbsd/mac/sys/kern/uipc_sem.c#20 (text+ko) ====

@@ -378,8 +378,8 @@
 	mtx_unlock(&sem_lock);
 #ifdef MAC
 	mtx_lock(&ks->ks_mtx);
-	if((error = mac_check_posix_sem_openexisting(td->td_ucred, ks))) {
-	    DP(("MAC Framework: mac_check_posix_sem_openexisting access denied\n"));
+	if((error = mac_check_posix_sem_open(td->td_ucred, ks))) {
+	    DP(("MAC Framework: mac_check_posix_sem_open access denied\n"));
 	    mtx_unlock(&ks->ks_mtx);
 	    goto err_open_existing;
 	}

==== //depot/projects/trustedbsd/mac/sys/security/mac/mac_posix_sem.c#10 (text+ko) ====

@@ -128,15 +128,14 @@
 }
 
 int
-mac_check_posix_sem_openexisting(struct ucred *cred, struct ksem *ksemptr)
+mac_check_posix_sem_open(struct ucred *cred, struct ksem *ksemptr)
 {
 	int error;
 
 	if (!mac_enforce_posix_sem)
 		return (0);
 
-	MAC_CHECK(check_posix_sem_openexisting, cred, ksemptr,
-	    ksemptr->ks_label);
+	MAC_CHECK(check_posix_sem_open, cred, ksemptr, ksemptr->ks_label);
 
 	return(error);
 }

==== //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#249 (text+ko) ====

@@ -3277,7 +3277,7 @@
 	.mpo_check_posix_sem_close = mac_biba_check_posix_sem_write,
 	.mpo_check_posix_sem_destroy = mac_biba_check_posix_sem_write,
 	.mpo_check_posix_sem_getvalue = mac_biba_check_posix_sem_rdonly,
-	.mpo_check_posix_sem_openexisting = mac_biba_check_posix_sem_write,
+	.mpo_check_posix_sem_open = mac_biba_check_posix_sem_write,
 	.mpo_check_posix_sem_post = mac_biba_check_posix_sem_write,
 	.mpo_check_posix_sem_unlink = mac_biba_check_posix_sem_write,
 	.mpo_check_posix_sem_wait = mac_biba_check_posix_sem_write,

==== //depot/projects/trustedbsd/mac/sys/security/mac_lomac/mac_lomac.c#89 (text+ko) ====

@@ -3207,7 +3207,7 @@
 	.mpo_check_posix_sem_close = mac_lomac_check_posix_sem_write,
 	.mpo_check_posix_sem_destroy = mac_lomac_check_posix_sem_write,
 	.mpo_check_posix_sem_getvalue = mac_lomac_check_posix_sem_rdonly,
-	.mpo_check_posix_sem_openexisting = mac_lomac_check_posix_sem_write,
+	.mpo_check_posix_sem_open = mac_lomac_check_posix_sem_write,
 	.mpo_check_posix_sem_post = mac_lomac_check_posix_sem_write,
 	.mpo_check_posix_sem_unlink = mac_lomac_check_posix_sem_write,
 	.mpo_check_posix_sem_wait = mac_lomac_check_posix_sem_write,

==== //depot/projects/trustedbsd/mac/sys/security/mac_mls/mac_mls.c#202 (text+ko) ====

@@ -3056,7 +3056,7 @@
 	.mpo_check_posix_sem_close = mac_mls_check_posix_sem_write,
 	.mpo_check_posix_sem_destroy = mac_mls_check_posix_sem_write,
 	.mpo_check_posix_sem_getvalue = mac_mls_check_posix_sem_rdonly,
-	.mpo_check_posix_sem_openexisting = mac_mls_check_posix_sem_write,
+	.mpo_check_posix_sem_open = mac_mls_check_posix_sem_write,
 	.mpo_check_posix_sem_post = mac_mls_check_posix_sem_write,
 	.mpo_check_posix_sem_unlink = mac_mls_check_posix_sem_write,
 	.mpo_check_posix_sem_wait = mac_mls_check_posix_sem_write,

==== //depot/projects/trustedbsd/mac/sys/security/mac_stub/mac_stub.c#26 (text+ko) ====

@@ -864,7 +864,7 @@
 }
 
 static int
-stub_check_posix_sem_openexisting(struct ucred *cred, struct ksem *ksemptr,
+stub_check_posix_sem_open(struct ucred *cred, struct ksem *ksemptr,
     struct label *ks_label)
 {
 
@@ -1502,7 +1502,7 @@
 	.mpo_check_posix_sem_close = stub_check_posix_sem_close,
 	.mpo_check_posix_sem_destroy = stub_check_posix_sem_destroy,
 	.mpo_check_posix_sem_getvalue = stub_check_posix_sem_getvalue,
-	.mpo_check_posix_sem_openexisting = stub_check_posix_sem_openexisting,
+	.mpo_check_posix_sem_open = stub_check_posix_sem_open,
 	.mpo_check_posix_sem_post = stub_check_posix_sem_post,
 	.mpo_check_posix_sem_unlink = stub_check_posix_sem_unlink,
 	.mpo_check_posix_sem_wait = stub_check_posix_sem_wait,

==== //depot/projects/trustedbsd/mac/sys/security/mac_test/mac_test.c#141 (text+ko) ====

@@ -2546,7 +2546,7 @@
 	.mpo_check_posix_sem_close = mac_test_check_posix_sem,
 	.mpo_check_posix_sem_destroy = mac_test_check_posix_sem,
 	.mpo_check_posix_sem_getvalue = mac_test_check_posix_sem,
-	.mpo_check_posix_sem_openexisting = mac_test_check_posix_sem,
+	.mpo_check_posix_sem_open = mac_test_check_posix_sem,
 	.mpo_check_posix_sem_post = mac_test_check_posix_sem,
 	.mpo_check_posix_sem_unlink = mac_test_check_posix_sem,
 	.mpo_check_posix_sem_wait = mac_test_check_posix_sem,

==== //depot/projects/trustedbsd/mac/sys/sys/mac.h#266 (text+ko) ====

@@ -343,8 +343,7 @@
 int	mac_check_posix_sem_close(struct ucred *cred, struct ksem *ksemptr);
 int	mac_check_posix_sem_destroy(struct ucred *cred, struct ksem *ksemptr);
 int	mac_check_posix_sem_getvalue(struct ucred *cred,struct ksem *ksemptr);
-int	mac_check_posix_sem_openexisting(struct ucred *cred, 
-	    struct ksem *ksemptr);
+int	mac_check_posix_sem_open(struct ucred *cred, struct ksem *ksemptr);
 int	mac_check_posix_sem_post(struct ucred *cred, struct ksem *ksemptr);
 int	mac_check_posix_sem_unlink(struct ucred *cred, struct ksem *ksemptr);
 int	mac_check_posix_sem_wait(struct ucred *cred, struct ksem *ksemptr);

==== //depot/projects/trustedbsd/mac/sys/sys/mac_policy.h#223 (text+ko) ====

@@ -423,7 +423,7 @@
 		    struct ksem *ksemptr, struct label *ks_label);
 	int	(*mpo_check_posix_sem_getvalue)(struct ucred *cred,
 		    struct ksem *ksemptr, struct label *ks_label);
-	int	(*mpo_check_posix_sem_openexisting)(struct ucred *cred,
+	int	(*mpo_check_posix_sem_open)(struct ucred *cred,
 		    struct ksem *ksemptr, struct label *ks_label);
 	int	(*mpo_check_posix_sem_post)(struct ucred *cred,
 		    struct ksem *ksemptr, struct label *ks_label);
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list