summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2000-09-21 18:43:32 +0000
committerRobert Watson <rwatson@FreeBSD.org>2000-09-21 18:43:32 +0000
commit988ee790d4e9e65ca1df196629bc69d1b9d42ddf (patch)
treec513972f39033ce67703f1b2900c4fb400871d8f /sys
parent65b9a0da90567f43c1920aca7555f91c7d845107 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_acl.c5
-rw-r--r--sys/kern/subr_acl_posix1e.c5
-rw-r--r--sys/kern/vfs_acl.c5
-rw-r--r--sys/kern/vnode_if.src2
4 files changed, 13 insertions, 4 deletions
diff --git a/sys/kern/kern_acl.c b/sys/kern/kern_acl.c
index 882d47b5fece..3c9eb6e4a37e 100644
--- a/sys/kern/kern_acl.c
+++ b/sys/kern/kern_acl.c
@@ -46,7 +46,7 @@
#include <sys/stat.h>
#include <sys/acl.h>
-static MALLOC_DEFINE(M_ACL, "acl", "access control list");
+MALLOC_DEFINE(M_ACL, "acl", "access control list");
static int vacl_set_acl(struct proc *p, struct vnode *vp, acl_type_t type,
struct acl *aclp);
@@ -94,7 +94,10 @@ vacl_get_acl(struct proc *p, struct vnode *vp, acl_type_t type,
struct acl inkernelacl;
int error;
+ VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
error = VOP_GETACL(vp, type, &inkernelacl, p->p_ucred, p);
+ VOP_UNLOCK(vp, 0, p);
if (error == 0)
error = copyout(&inkernelacl, aclp, sizeof(struct acl));
return (error);
diff --git a/sys/kern/subr_acl_posix1e.c b/sys/kern/subr_acl_posix1e.c
index 882d47b5fece..3c9eb6e4a37e 100644
--- a/sys/kern/subr_acl_posix1e.c
+++ b/sys/kern/subr_acl_posix1e.c
@@ -46,7 +46,7 @@
#include <sys/stat.h>
#include <sys/acl.h>
-static MALLOC_DEFINE(M_ACL, "acl", "access control list");
+MALLOC_DEFINE(M_ACL, "acl", "access control list");
static int vacl_set_acl(struct proc *p, struct vnode *vp, acl_type_t type,
struct acl *aclp);
@@ -94,7 +94,10 @@ vacl_get_acl(struct proc *p, struct vnode *vp, acl_type_t type,
struct acl inkernelacl;
int error;
+ VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
error = VOP_GETACL(vp, type, &inkernelacl, p->p_ucred, p);
+ VOP_UNLOCK(vp, 0, p);
if (error == 0)
error = copyout(&inkernelacl, aclp, sizeof(struct acl));
return (error);
diff --git a/sys/kern/vfs_acl.c b/sys/kern/vfs_acl.c
index 882d47b5fece..3c9eb6e4a37e 100644
--- a/sys/kern/vfs_acl.c
+++ b/sys/kern/vfs_acl.c
@@ -46,7 +46,7 @@
#include <sys/stat.h>
#include <sys/acl.h>
-static MALLOC_DEFINE(M_ACL, "acl", "access control list");
+MALLOC_DEFINE(M_ACL, "acl", "access control list");
static int vacl_set_acl(struct proc *p, struct vnode *vp, acl_type_t type,
struct acl *aclp);
@@ -94,7 +94,10 @@ vacl_get_acl(struct proc *p, struct vnode *vp, acl_type_t type,
struct acl inkernelacl;
int error;
+ VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
error = VOP_GETACL(vp, type, &inkernelacl, p->p_ucred, p);
+ VOP_UNLOCK(vp, 0, p);
if (error == 0)
error = copyout(&inkernelacl, aclp, sizeof(struct acl));
return (error);
diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src
index 7a6d8ae71766..36911fb070ed 100644
--- a/sys/kern/vnode_if.src
+++ b/sys/kern/vnode_if.src
@@ -502,7 +502,7 @@ vop_bwrite {
};
#
-#% getacl vp = = =
+#% getacl vp L L L
#
vop_getacl {
IN struct vnode *vp;