diff options
author | trhodes <trhodes@FreeBSD.org> | 2005-07-28 13:55:12 +0000 |
---|---|---|
committer | trhodes <trhodes@FreeBSD.org> | 2005-07-28 13:55:12 +0000 |
commit | 0336212d3405ba3060201ff384db19d4ef5ee59a (patch) | |
tree | 1cbfba3b2787b88438374379d57c11193d7f4efe /sys | |
parent | e19c1e09f5fa9b112481139aa0e8e31e9f87da63 (diff) | |
download | FreeBSD-src-0336212d3405ba3060201ff384db19d4ef5ee59a.zip FreeBSD-src-0336212d3405ba3060201ff384db19d4ef5ee59a.tar.gz |
If a "hole" opens up in the ruleset (i.e.: remove 5), do not return
unknown error. Instead, just return error.
Submitted by: avatar
Tested by: trhodes
Diffstat (limited to 'sys')
-rw-r--r-- | sys/security/mac_bsdextended/mac_bsdextended.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/security/mac_bsdextended/mac_bsdextended.c b/sys/security/mac_bsdextended/mac_bsdextended.c index 13eae32..39b3a59 100644 --- a/sys/security/mac_bsdextended/mac_bsdextended.c +++ b/sys/security/mac_bsdextended/mac_bsdextended.c @@ -209,13 +209,10 @@ out: mtx_unlock(&mac_bsdextended_mtx); if (ruleptr != NULL) FREE(ruleptr, M_MACBSDEXTENDED); - if (req->oldptr && error == 0) { + if (req->oldptr && error == 0) error = SYSCTL_OUT(req, &temprule, sizeof(temprule)); - if (error) - return (error); - } - return (0); + return (error); } SYSCTL_NODE(_security_mac_bsdextended, OID_AUTO, rules, |