summaryrefslogtreecommitdiff
path: root/sys/kern/subr_acl_posix1e.c
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/kern/subr_acl_posix1e.c
parent65b9a0da90567f43c1920aca7555f91c7d845107 (diff)
Notes
Diffstat (limited to 'sys/kern/subr_acl_posix1e.c')
-rw-r--r--sys/kern/subr_acl_posix1e.c5
1 files changed, 4 insertions, 1 deletions
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);