From owner-p4-projects@FreeBSD.ORG Tue Mar 1 14:05:47 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0779E16A4EA; Tue, 1 Mar 2005 14:05:47 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D4DBA16A4DB for ; Tue, 1 Mar 2005 14:05:46 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7DD5643D48 for ; Tue, 1 Mar 2005 14:05:46 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j21E5k3W056091 for ; Tue, 1 Mar 2005 14:05:46 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j21E5kX9056088 for perforce@freebsd.org; Tue, 1 Mar 2005 14:05:46 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 1 Mar 2005 14:05:46 GMT Message-Id: <200503011405.j21E5kX9056088@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 72237 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2005 14:05:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=72237 Change 72237 by rwatson@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);