From 91724dbe23315b73169b79a304a026a2623260d0 Mon Sep 17 00:00:00 2001 From: rwatson Date: Tue, 26 Aug 2003 17:29:02 +0000 Subject: [PATCH] Fix a mac_policy_list reference to be a mac_static_policy_list reference: this fixes mac_syscall() for static policies when using optimized locking. Obtained from: TrustedBSD Project Sponosred by: DARPA, Network Associates Laboratories --- sys/kern/kern_mac.c | 2 +- sys/security/mac/mac_framework.c | 2 +- sys/security/mac/mac_internal.h | 2 +- sys/security/mac/mac_net.c | 2 +- sys/security/mac/mac_pipe.c | 2 +- sys/security/mac/mac_process.c | 2 +- sys/security/mac/mac_syscalls.c | 2 +- sys/security/mac/mac_system.c | 2 +- sys/security/mac/mac_vfs.c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/kern/kern_mac.c b/sys/kern/kern_mac.c index 490b492f1b86..700b0291ce03 100644 --- a/sys/kern/kern_mac.c +++ b/sys/kern/kern_mac.c @@ -3855,7 +3855,7 @@ mac_syscall(struct thread *td, struct mac_syscall_args *uap) return (error); error = ENOSYS; - LIST_FOREACH(mpc, &mac_policy_list, mpc_list) { + LIST_FOREACH(mpc, &mac_static_policy_list, mpc_list) { if (strcmp(mpc->mpc_name, target) == 0 && mpc->mpc_ops->mpo_syscall != NULL) { error = mpc->mpc_ops->mpo_syscall(td, diff --git a/sys/security/mac/mac_framework.c b/sys/security/mac/mac_framework.c index 490b492f1b86..700b0291ce03 100644 --- a/sys/security/mac/mac_framework.c +++ b/sys/security/mac/mac_framework.c @@ -3855,7 +3855,7 @@ mac_syscall(struct thread *td, struct mac_syscall_args *uap) return (error); error = ENOSYS; - LIST_FOREACH(mpc, &mac_policy_list, mpc_list) { + LIST_FOREACH(mpc, &mac_static_policy_list, mpc_list) { if (strcmp(mpc->mpc_name, target) == 0 && mpc->mpc_ops->mpo_syscall != NULL) { error = mpc->mpc_ops->mpo_syscall(td, diff --git a/sys/security/mac/mac_internal.h b/sys/security/mac/mac_internal.h index 490b492f1b86..700b0291ce03 100644 --- a/sys/security/mac/mac_internal.h +++ b/sys/security/mac/mac_internal.h @@ -3855,7 +3855,7 @@ mac_syscall(struct thread *td, struct mac_syscall_args *uap) return (error); error = ENOSYS; - LIST_FOREACH(mpc, &mac_policy_list, mpc_list) { + LIST_FOREACH(mpc, &mac_static_policy_list, mpc_list) { if (strcmp(mpc->mpc_name, target) == 0 && mpc->mpc_ops->mpo_syscall != NULL) { error = mpc->mpc_ops->mpo_syscall(td, diff --git a/sys/security/mac/mac_net.c b/sys/security/mac/mac_net.c index 490b492f1b86..700b0291ce03 100644 --- a/sys/security/mac/mac_net.c +++ b/sys/security/mac/mac_net.c @@ -3855,7 +3855,7 @@ mac_syscall(struct thread *td, struct mac_syscall_args *uap) return (error); error = ENOSYS; - LIST_FOREACH(mpc, &mac_policy_list, mpc_list) { + LIST_FOREACH(mpc, &mac_static_policy_list, mpc_list) { if (strcmp(mpc->mpc_name, target) == 0 && mpc->mpc_ops->mpo_syscall != NULL) { error = mpc->mpc_ops->mpo_syscall(td, diff --git a/sys/security/mac/mac_pipe.c b/sys/security/mac/mac_pipe.c index 490b492f1b86..700b0291ce03 100644 --- a/sys/security/mac/mac_pipe.c +++ b/sys/security/mac/mac_pipe.c @@ -3855,7 +3855,7 @@ mac_syscall(struct thread *td, struct mac_syscall_args *uap) return (error); error = ENOSYS; - LIST_FOREACH(mpc, &mac_policy_list, mpc_list) { + LIST_FOREACH(mpc, &mac_static_policy_list, mpc_list) { if (strcmp(mpc->mpc_name, target) == 0 && mpc->mpc_ops->mpo_syscall != NULL) { error = mpc->mpc_ops->mpo_syscall(td, diff --git a/sys/security/mac/mac_process.c b/sys/security/mac/mac_process.c index 490b492f1b86..700b0291ce03 100644 --- a/sys/security/mac/mac_process.c +++ b/sys/security/mac/mac_process.c @@ -3855,7 +3855,7 @@ mac_syscall(struct thread *td, struct mac_syscall_args *uap) return (error); error = ENOSYS; - LIST_FOREACH(mpc, &mac_policy_list, mpc_list) { + LIST_FOREACH(mpc, &mac_static_policy_list, mpc_list) { if (strcmp(mpc->mpc_name, target) == 0 && mpc->mpc_ops->mpo_syscall != NULL) { error = mpc->mpc_ops->mpo_syscall(td, diff --git a/sys/security/mac/mac_syscalls.c b/sys/security/mac/mac_syscalls.c index 490b492f1b86..700b0291ce03 100644 --- a/sys/security/mac/mac_syscalls.c +++ b/sys/security/mac/mac_syscalls.c @@ -3855,7 +3855,7 @@ mac_syscall(struct thread *td, struct mac_syscall_args *uap) return (error); error = ENOSYS; - LIST_FOREACH(mpc, &mac_policy_list, mpc_list) { + LIST_FOREACH(mpc, &mac_static_policy_list, mpc_list) { if (strcmp(mpc->mpc_name, target) == 0 && mpc->mpc_ops->mpo_syscall != NULL) { error = mpc->mpc_ops->mpo_syscall(td, diff --git a/sys/security/mac/mac_system.c b/sys/security/mac/mac_system.c index 490b492f1b86..700b0291ce03 100644 --- a/sys/security/mac/mac_system.c +++ b/sys/security/mac/mac_system.c @@ -3855,7 +3855,7 @@ mac_syscall(struct thread *td, struct mac_syscall_args *uap) return (error); error = ENOSYS; - LIST_FOREACH(mpc, &mac_policy_list, mpc_list) { + LIST_FOREACH(mpc, &mac_static_policy_list, mpc_list) { if (strcmp(mpc->mpc_name, target) == 0 && mpc->mpc_ops->mpo_syscall != NULL) { error = mpc->mpc_ops->mpo_syscall(td, diff --git a/sys/security/mac/mac_vfs.c b/sys/security/mac/mac_vfs.c index 490b492f1b86..700b0291ce03 100644 --- a/sys/security/mac/mac_vfs.c +++ b/sys/security/mac/mac_vfs.c @@ -3855,7 +3855,7 @@ mac_syscall(struct thread *td, struct mac_syscall_args *uap) return (error); error = ENOSYS; - LIST_FOREACH(mpc, &mac_policy_list, mpc_list) { + LIST_FOREACH(mpc, &mac_static_policy_list, mpc_list) { if (strcmp(mpc->mpc_name, target) == 0 && mpc->mpc_ops->mpo_syscall != NULL) { error = mpc->mpc_ops->mpo_syscall(td,