diff options
author | trasz <trasz@FreeBSD.org> | 2011-10-05 17:29:49 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2011-10-05 17:29:49 +0000 |
commit | 2276ee273397e0ccd5c7911848e3de9bd91fb1c2 (patch) | |
tree | 3dd5dafea2063259c65aca3dd58de40deb059690 /sys/kern | |
parent | 87f923aeea5b3c0d34da4ce543dcc1600e666a71 (diff) | |
download | FreeBSD-src-2276ee273397e0ccd5c7911848e3de9bd91fb1c2.zip FreeBSD-src-2276ee273397e0ccd5c7911848e3de9bd91fb1c2.tar.gz |
Remove assertion against empty NFSv4 ACLs. An empty ACL is not exactly
valid - we don't allow for setting it on a file, for example - but it's
not something we should assert on.
For STABLE kernel, it changes nothing, because it's not compiled with
INVARIANTS. If it was, it would fix crashes. It also fixes an assert
in libc encountered with NFSv4 without nfsuserd(8) running.
Submitted by: Yuri Pankov (earlier version)
MFC after: 1 month
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/subr_acl_nfs4.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/sys/kern/subr_acl_nfs4.c b/sys/kern/subr_acl_nfs4.c index ed1f255..0fd2195 100644 --- a/sys/kern/subr_acl_nfs4.c +++ b/sys/kern/subr_acl_nfs4.c @@ -114,7 +114,6 @@ _acl_denies(const struct acl *aclp, int access_mask, struct ucred *cred, if (denied_explicitly != NULL) *denied_explicitly = 0; - KASSERT(aclp->acl_cnt > 0, ("aclp->acl_cnt > 0")); KASSERT(aclp->acl_cnt <= ACL_MAX_ENTRIES, ("aclp->acl_cnt <= ACL_MAX_ENTRIES")); @@ -723,7 +722,6 @@ acl_nfs4_sync_mode_from_acl(mode_t *_mode, const struct acl *aclp) mode_t old_mode = *_mode, mode = 0, seen = 0; const struct acl_entry *entry; - KASSERT(aclp->acl_cnt > 0, ("aclp->acl_cnt > 0")); KASSERT(aclp->acl_cnt <= ACL_MAX_ENTRIES, ("aclp->acl_cnt <= ACL_MAX_ENTRIES")); @@ -854,7 +852,6 @@ acl_nfs4_compute_inherited_acl_draft(const struct acl *parent_aclp, struct acl_entry *entry, *copy; KASSERT(child_aclp->acl_cnt == 0, ("child_aclp->acl_cnt == 0")); - KASSERT(parent_aclp->acl_cnt > 0, ("parent_aclp->acl_cnt > 0")); KASSERT(parent_aclp->acl_cnt <= ACL_MAX_ENTRIES, ("parent_aclp->acl_cnt <= ACL_MAX_ENTRIES")); @@ -1017,7 +1014,6 @@ acl_nfs4_inherit_entries(const struct acl *parent_aclp, const struct acl_entry *parent_entry; struct acl_entry *entry; - KASSERT(parent_aclp->acl_cnt > 0, ("parent_aclp->acl_cnt > 0")); KASSERT(parent_aclp->acl_cnt <= ACL_MAX_ENTRIES, ("parent_aclp->acl_cnt <= ACL_MAX_ENTRIES")); |