Skip to contentSkip to conversation

Introduce capable_noaudit

RFC PATCH In review [email protected] 6 participants 25 messages Jun 26 – Jul 24

Subsystems (5)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

cover Introduce capable_noaudit

From: Carlos Maiolino <[email protected]>

In some cases - filesystems quota specifically here - we'd like to check for effective capabilities without issuing spurious audit messages and without the need to specify a namespace for that.

This series introduce capable_noaudit() which has the same goal as capable() but without firing audit messages.

Also, this updates both generic quota and xfs quota code to use that.

The last patch unexports has_capability_noaudit() which was originally exported to be used in xfs but turns out it does not meet our needs.

Note this is based on top of a current series I have to remove has_capability_noaudit() calls from xfs so the xfs patch won't apply cleanly without that series.

If adding this helper is acceptable, I'll turn this into a non-rfc series with the required changes to apply properly.

Comments? Flames?
Cheers

Carlos Maiolino (4):
capabily: Add new capable_noaudit
quota: Don't issue audit messages on quota enforcing
xfs: replace ns_capable_noaudit()
capability: unexport has_capability_noaudit

 fs/quota/dquot.c           |  2 +-
 fs/xfs/xfs_trans_dquot.c   |  2 +-
 include/linux/capability.h |  5 +++++
 kernel/capability.c        | 18 +++++++++++++++++-
 4 files changed, 24 insertions(+), 3 deletions(-)
Signature · 1 line
2.54.0
author maintainer
#1 lore raw

RFC PATCH 1/4 capabily: Add new capable_noaudit

From: Carlos Maiolino <[email protected]>

In some situations (quota enforcement bypass in this case) we'd like to check for a specific capability without triggering spurious audit messages from security modules like selinux.

Add a new helper so we don't need to use ns_capable_noaudit() directly.

---
 include/linux/capability.h |  5 +++++
 kernel/capability.c        | 17 +++++++++++++++++
 2 files changed, 22 insertions(+)
include/linux/capability.h +5 -0
index 37db92b3d6f8..873416ba884c 100644
@@ -145,6 +145,7 @@ extern bool has_capability_noaudit(struct task_struct *t, int cap);
 extern bool has_ns_capability_noaudit(struct task_struct *t,
 				      struct user_namespace *ns, int cap);
 extern bool capable(int cap);
+extern bool capable_noaudit(int cap);
 extern bool ns_capable(struct user_namespace *ns, int cap);
 extern bool ns_capable_noaudit(struct user_namespace *ns, int cap);
 extern bool ns_capable_setid(struct user_namespace *ns, int cap);
@@ -167,6 +168,10 @@ static inline bool capable(int cap)
 {
 	return true;
 }
+static inline bool capable_noaudit(int cap)
+{
+	return true;
+}
 static inline bool ns_capable(struct user_namespace *ns, int cap)
 {
 	return true;
kernel/capability.c +17 -0
index 829f49ae07b9..2c2d1e8300bd 100644
@@ -416,6 +416,23 @@ bool capable(int cap)
 	return ns_capable(&init_user_ns, cap);
 }
 EXPORT_SYMBOL(capable);
+
+/**
+ * capable_noaudit - Determine if the current task has a superior
+ * capability in effect (unaudited).
+ * @cap: The capability to be tested for
+ *
+ * This is the same as capable(), except it uses CAP_OPT_NOAUDIT as to prevent
+ * issuing spurious audit messages.
+ *
+ * This sets PF_SUPERPRIV on the task if the capability is available on the
+ * assumption that it's about to be used.
+ */
+bool capable_noaudit(int cap)
+{
+	return ns_capable_noaudit(&init_user_ns, cap);
+}
+EXPORT_SYMBOL(capable_noaudit);
 #endif /* CONFIG_MULTIUSER */
 
 /**
Signature · 1 line
2.54.0
#2 lore raw

Re: [RFC PATCH 1/4] capabily: Add new capable_noaudit

s/capabily/capability/ in the subject even if the typo actually makes it easier to find the thread.

Quoted 46 lines · On Fri, Jun 26, 2026 at 01:45:20PM +0200, [email protected] wrote:

From: Carlos Maiolino <[email protected]>

In some situations (quota enforcement bypass in this case) we'd like to check for a specific capability without triggering spurious audit messages from security modules like selinux.

Add a new helper so we don't need to use ns_capable_noaudit() directly.

---
 include/linux/capability.h |  5 +++++
 kernel/capability.c        | 17 +++++++++++++++++
 2 files changed, 22 insertions(+)
include/linux/capability.h +5 -0
index 37db92b3d6f8..873416ba884c 100644
@@ -145,6 +145,7 @@ extern bool has_capability_noaudit(struct task_struct *t, int cap);
 extern bool has_ns_capability_noaudit(struct task_struct *t,
 				      struct user_namespace *ns, int cap);
 extern bool capable(int cap);
+extern bool capable_noaudit(int cap);
 extern bool ns_capable(struct user_namespace *ns, int cap);
 extern bool ns_capable_noaudit(struct user_namespace *ns, int cap);
 extern bool ns_capable_setid(struct user_namespace *ns, int cap);
@@ -167,6 +168,10 @@ static inline bool capable(int cap)
 {
 	return true;
 }
+static inline bool capable_noaudit(int cap)
+{
+	return true;
+}
 static inline bool ns_capable(struct user_namespace *ns, int cap)
 {
 	return true;
kernel/capability.c +1 -0
index 829f49ae07b9..2c2d1e8300bd 100644
@@ -416,6 +416,23 @@ bool capable(int cap)
 	return ns_capable(&init_user_ns, cap);
 }
 EXPORT_SYMBOL(capable);
+

kernel/capability.c bool capable(int cap) · line 429

Quoted 10 lines
kernel/capability.c +10 -0
+/**
+ * capable_noaudit - Determine if the current task has a superior
+ * capability in effect (unaudited).
+ * @cap: The capability to be tested for
+ *
+ * This is the same as capable(), except it uses CAP_OPT_NOAUDIT as to prevent
+ * issuing spurious audit messages.
+ *
+ * This sets PF_SUPERPRIV on the task if the capability is available on the
+ * assumption that it's about to be used.

Can you mention that this checks the current process' effective capabilities (as opposed to the real ones)? So that nobody else has to suffer the confusion I pointed out in [1] which was the source of the security bugs in the first place?

(I do like the wrapper though)

--D

[1] https://lore.kernel.org/linux-xfs/20260625160317.GY6078@frogsfrogsfrogs/

Quoted 13 lines
kernel/capability.c +6 -0
+ */
+bool capable_noaudit(int cap)
+{
+	return ns_capable_noaudit(&init_user_ns, cap);
+}
+EXPORT_SYMBOL(capable_noaudit);
 #endif /* CONFIG_MULTIUSER */
 
 /**
Signature · 1 line
2.54.0
maintainer
#3 lore raw

Re: [RFC PATCH 1/4] capabily: Add new capable_noaudit

In reply to [email protected]
Quoted 7 lines · On Fri, Jun 26, 2026 at 7:49 AM <[email protected]> wrote:

From: Carlos Maiolino <[email protected]>

In some situations (quota enforcement bypass in this case) we'd like to check for a specific capability without triggering spurious audit messages from security modules like selinux.

Quoted 7 lines

Add a new helper so we don't need to use ns_capable_noaudit() directly.

---
 include/linux/capability.h |  5 +++++
 kernel/capability.c        | 17 +++++++++++++++++
 2 files changed, 22 insertions(+)

This is Serge's call, not mine, but FWIW, I somewhat prefer to see code use the ns_capable_XXX() variants directly as I like to think it means some thought went into ensuring the capability check is being done in the right namespace. Yes, we all know that capable() just uses the init namespace, but I like to think that having to type that out in the parameter list might be a good double check ;)

Signature · 1 line
paul-moore.com
maintainer
#4 lore raw

Re: [RFC PATCH 1/4] capabily: Add new capable_noaudit

Quoted 16 lines · Paul Moore
Quoted 7 lines · On Fri, Jun 26, 2026 at 7:49 AM <[email protected]> wrote:

From: Carlos Maiolino <[email protected]>

In some situations (quota enforcement bypass in this case) we'd like to check for a specific capability without triggering spurious audit messages from security modules like selinux.

Quoted 7 lines

Add a new helper so we don't need to use ns_capable_noaudit() directly.

---
 include/linux/capability.h |  5 +++++
 kernel/capability.c        | 17 +++++++++++++++++
 2 files changed, 22 insertions(+)
Quoted 6 lines

This is Serge's call, not mine, but FWIW, I somewhat prefer to see code use the ns_capable_XXX() variants directly as I like to think it means some thought went into ensuring the capability check is being done in the right namespace. Yes, we all know that capable() just uses the init namespace, but I like to think that having to type that out in the parameter list might be a good double check ;)

Hm, yeah, on he one hand it seems like a nice shortcut, but I still see people confusing what 'capable' really does, so standardizing on ns_capable_noaudit(&init_user_ns, x) might be worthwhile.

(and then patch 3 can go)

maintainer Reviewed-by
#6 lore raw

Re: [RFC PATCH 1/4] capabily: Add new capable_noaudit

Quoted 11 lines · Christoph Hellwig
Quoted 1 line · On Fri, Jun 26, 2026 at 01:45:20PM +0200, [email protected] wrote:

+extern bool capable_noaudit(int cap);

No need for the extern.

Otherwise this does look nice an clean to me:

But if the security folks don't like we can live with the more verbose version of it I guess.

Honestly I'm ok either way. If people misunderstand the shortcut, and ove-ruse it, that's safer than the other way. The one that scare me more is ns_capable(&current_user_ns, X). I need to do an audit of the current users of that.

So I'm happy to put

on the set.

author maintainer
#7 lore raw

Re: [RFC PATCH 1/4] capabily: Add new capable_noaudit

In reply to Christoph Hellwig
Quoted 4 lines · Christoph Hellwig
Quoted 1 line · On Fri, Jun 26, 2026 at 01:45:20PM +0200, [email protected] wrote:

+extern bool capable_noaudit(int cap);

No need for the extern.

Indeed, I was just being consistent with the rest of the file :P

Quoted 9 lines

Otherwise this does look nice an clean to me:

But if the security folks don't like we can live with the more verbose version of it I guess.

author maintainer
#8 lore raw

RFC PATCH 2/4 quota: Don't issue audit messages on quota enforcing

In reply to [email protected]

From: Carlos Maiolino <[email protected]>

Calling capable() to determine if we can bypass quota enforcement or not can trigger spurious audit messages. We don't really require it here so just use the capable_noaudit() version.

---
 fs/quota/dquot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/quota/dquot.c +1 -1
index 64cf42721496..1122a29215f7 100644
@@ -1308,7 +1308,7 @@ static int ignore_hardlimit(struct dquot *dquot)
 {
 	struct mem_dqinfo *info = &sb_dqopt(dquot->dq_sb)->info[dquot->dq_id.type];
 
-	return capable(CAP_SYS_RESOURCE) &&
+	return capable_noaudit(CAP_SYS_RESOURCE) &&
 	       (info->dqi_format->qf_fmt_id != QFMT_VFS_OLD ||
 		!(info->dqi_flags & DQF_ROOT_SQUASH));
 }
Signature · 1 line
2.54.0
Reviewed-by on v1 2/4
#9 lore raw

Re: [RFC PATCH 2/4] quota: Don't issue audit messages on quota enforcing

Quoted 16 lines · On Fri, Jun 26, 2026 at 01:45:21PM +0200, [email protected] wrote:

From: Carlos Maiolino <[email protected]>

Calling capable() to determine if we can bypass quota enforcement or not can trigger spurious audit messages. We don't really require it here so just use the capable_noaudit() version.

---
 fs/quota/dquot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/quota/dquot.c +0 -0
index 64cf42721496..1122a29215f7 100644

fs/quota/dquot.c static int ignore_hardlimit(struct dquot *dquot) · line 1311

Quoted 5 lines
fs/quota/dquot.c +1 -1
@@ -1308,7 +1308,7 @@ static int ignore_hardlimit(struct dquot *dquot)
 {
 	struct mem_dqinfo *info = &sb_dqopt(dquot->dq_sb)->info[dquot->dq_id.type];
 
-	return capable(CAP_SYS_RESOURCE) &&
+	return capable_noaudit(CAP_SYS_RESOURCE) &&

Yeah, we're just checking if we're going to enforce hardlimits, not actually denying something based on lack of capability. For all we know the user is well under their disk quota limit.

--D

Quoted 7 lines
fs/quota/dquot.c +0 -0
 	       (info->dqi_format->qf_fmt_id != QFMT_VFS_OLD ||
 		!(info->dqi_flags & DQF_ROOT_SQUASH));
 }
Signature · 1 line
2.54.0
author maintainer
#11 lore raw

RFC PATCH 3/4 xfs: replace ns_capable_noaudit()

In reply to [email protected]

From: Carlos Maiolino <[email protected]>

We don't need to use ns_capable_noaudit() as all we care is the initial user namespace, use capable_noaudit() instead.

---
 fs/xfs/xfs_trans_dquot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_trans_dquot.c +1 -1
index 50e5b323f7f1..30c2f6ec0aac 100644
@@ -835,7 +835,7 @@ xfs_trans_dqresv(
 	if ((flags & XFS_QMOPT_FORCE_RES) == 0 &&
 	    dqp->q_id &&
 	    xfs_dquot_is_enforced(dqp) &&
-	    !ns_capable_noaudit(&init_user_ns, CAP_SYS_RESOURCE)) {
+	    !capable_noaudit(CAP_SYS_RESOURCE)) {
 		int		quota_nl;
 		bool		fatal;
 
Signature · 1 line
2.54.0
#12 lore raw

Re: [RFC PATCH 3/4] xfs: replace ns_capable_noaudit()

Quoted 4 lines · On Fri, Jun 26, 2026 at 01:45:22PM +0200, [email protected] wrote:

From: Carlos Maiolino <[email protected]>

We don't need to use ns_capable_noaudit() as all we care is the initial user namespace, use capable_noaudit() instead.

Might as well do the one in xfs_fsmap.c too, since it was originally a capable() call.

--D

Quoted 22 lines
---
 fs/xfs/xfs_trans_dquot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_trans_dquot.c +1 -1
index 50e5b323f7f1..30c2f6ec0aac 100644
@@ -835,7 +835,7 @@ xfs_trans_dqresv(
 	if ((flags & XFS_QMOPT_FORCE_RES) == 0 &&
 	    dqp->q_id &&
 	    xfs_dquot_is_enforced(dqp) &&
-	    !ns_capable_noaudit(&init_user_ns, CAP_SYS_RESOURCE)) {
+	    !capable_noaudit(CAP_SYS_RESOURCE)) {
 		int		quota_nl;
 		bool		fatal;
 
Signature · 1 line
2.54.0
#13 lore raw

Re: [RFC PATCH 3/4] xfs: replace ns_capable_noaudit()

Quoted 8 lines · Darrick J. Wong
Quoted 4 lines · On Fri, Jun 26, 2026 at 01:45:22PM +0200, [email protected] wrote:

From: Carlos Maiolino <[email protected]>

We don't need to use ns_capable_noaudit() as all we care is the initial user namespace, use capable_noaudit() instead.

Might as well do the one in xfs_fsmap.c too, since it was originally a capable() call.

Yes, we should do that one as well. But that's a separate patch.

maintainer
#15 lore raw

Re: [RFC PATCH 3/4] xfs: replace ns_capable_noaudit()

In reply to [email protected]
Quoted 4 lines · On Fri, Jun 26, 2026 at 01:45:22PM +0200, [email protected] wrote:

From: Carlos Maiolino <[email protected]>

We don't need to use ns_capable_noaudit() as all we care is the initial user namespace, use capable_noaudit() instead.

Looks like some of your other xfs fixes conflict with this. Do you mind sending out a new set, and I'll pull them into the caps-next branch?

thanks,
-serge

Quoted 20 lines
---
 fs/xfs/xfs_trans_dquot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_trans_dquot.c +1 -1
index 50e5b323f7f1..30c2f6ec0aac 100644
@@ -835,7 +835,7 @@ xfs_trans_dqresv(
 	if ((flags & XFS_QMOPT_FORCE_RES) == 0 &&
 	    dqp->q_id &&
 	    xfs_dquot_is_enforced(dqp) &&
-	    !ns_capable_noaudit(&init_user_ns, CAP_SYS_RESOURCE)) {
+	    !capable_noaudit(CAP_SYS_RESOURCE)) {
 		int		quota_nl;
 		bool		fatal;
 
Signature · 1 line
2.54.0
author maintainer
#16 lore raw

Re: [RFC PATCH 3/4] xfs: replace ns_capable_noaudit()

Quoted 9 lines · Serge E. Hallyn
Quoted 4 lines · On Fri, Jun 26, 2026 at 01:45:22PM +0200, [email protected] wrote:

From: Carlos Maiolino <[email protected]>

We don't need to use ns_capable_noaudit() as all we care is the initial user namespace, use capable_noaudit() instead.

Looks like some of your other xfs fixes conflict with this. Do you mind sending out a new set, and I'll pull them into the caps-next branch?

I will Serge, thanks. I was hoping to send a new series this week but I couldn't, and I'm out next week, so I'll come back to this in a couple weeks.

Thanks for the heads up!

Carlos

Quoted 24 lines

thanks,
-serge

Quoted 20 lines
---
 fs/xfs/xfs_trans_dquot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_trans_dquot.c +1 -1
index 50e5b323f7f1..30c2f6ec0aac 100644
@@ -835,7 +835,7 @@ xfs_trans_dqresv(
 	if ((flags & XFS_QMOPT_FORCE_RES) == 0 &&
 	    dqp->q_id &&
 	    xfs_dquot_is_enforced(dqp) &&
-	    !ns_capable_noaudit(&init_user_ns, CAP_SYS_RESOURCE)) {
+	    !capable_noaudit(CAP_SYS_RESOURCE)) {
 		int		quota_nl;
 		bool		fatal;
 
Signature · 1 line
2.54.0
author maintainer
#17 lore raw

RFC PATCH 4/4 capability: unexport has_capability_noaudit

In reply to [email protected]

From: Carlos Maiolino <[email protected]>

This has been originally exported to be used in xfs. Givin we are not using it anymore, unexport for consistency.

---
 kernel/capability.c | 1 -
 1 file changed, 1 deletion(-)
kernel/capability.c +0 -1
index 2c2d1e8300bd..3d0387fb93a3 100644
@@ -326,7 +326,6 @@ bool has_capability_noaudit(struct task_struct *t, int cap)
 {
 	return has_ns_capability_noaudit(t, &init_user_ns, cap);
 }
-EXPORT_SYMBOL(has_capability_noaudit);
 
 static bool ns_capable_common(struct user_namespace *ns,
 			      int cap,
Signature · 1 line
2.54.0
Reviewed-by on v1 4/4
#18 lore raw

Re: [RFC PATCH 4/4] capability: unexport has_capability_noaudit

Quoted 15 lines · On Fri, Jun 26, 2026 at 01:45:23PM +0200, [email protected] wrote:

From: Carlos Maiolino <[email protected]>

This has been originally exported to be used in xfs. Givin we are not using it anymore, unexport for consistency.

---
 kernel/capability.c | 1 -
 1 file changed, 1 deletion(-)
kernel/capability.c +0 -0
index 2c2d1e8300bd..3d0387fb93a3 100644

kernel/capability.c bool has_capability_noaudit(struct task_struct *t, int cap) · line 329

Quoted 4 lines
kernel/capability.c +0 -1
@@ -326,7 +326,6 @@ bool has_capability_noaudit(struct task_struct *t, int cap)
 {
 	return has_ns_capability_noaudit(t, &init_user_ns, cap);
 }
-EXPORT_SYMBOL(has_capability_noaudit);

Please update the kerneldoc for this function to mention that it only checks real capability, not effective capability. I'd like to prevent someone else from making the same mistakes I did with these functions that sound the same in documentation but have very different behaviors.

--D

Quoted 7 lines
kernel/capability.c +0 -0
 static bool ns_capable_common(struct user_namespace *ns,
 			      int cap,
Signature · 1 line
2.54.0
#19 lore raw

Re: [RFC PATCH 4/4] capability: unexport has_capability_noaudit

Quoted 4 lines · Darrick J. Wong

Please update the kerneldoc for this function to mention that it only checks real capability, not effective capability. I'd like to prevent someone else from making the same mistakes I did with these functions that sound the same in documentation but have very different behaviors.

Yes, that would be useful. But make it a separate patch please, it's not related to the unexporting in any way.

#21 lore raw
In reply to [email protected]
Quoted 14 lines · On 2026-06-26 13:45 +0200, [email protected] wrote:

From: Carlos Maiolino <[email protected]>

In some cases - filesystems quota specifically here - we'd like to check for effective capabilities without issuing spurious audit messages and without the need to specify a namespace for that.

This series introduce capable_noaudit() which has the same goal as capable() but without firing audit messages.

Also, this updates both generic quota and xfs quota code to use that.

The last patch unexports has_capability_noaudit() which was originally exported to be used in xfs but turns out it does not meet our needs.

Quoted 8 lines

Note this is based on top of a current series I have to remove has_capability_noaudit() calls from xfs so the xfs patch won't apply cleanly without that series.

If adding this helper is acceptable, I'll turn this into a non-rfc series with the required changes to apply properly.

Comments? Flames?

Convert more, please.

author maintainer
#22 lore raw
Quoted 19 lines · Christian Brauner
Quoted 18 lines · On 2026-06-26 13:45 +0200, [email protected] wrote:

From: Carlos Maiolino <[email protected]>

In some cases - filesystems quota specifically here - we'd like to check for effective capabilities without issuing spurious audit messages and without the need to specify a namespace for that.

This series introduce capable_noaudit() which has the same goal as capable() but without firing audit messages.

Also, this updates both generic quota and xfs quota code to use that.

The last patch unexports has_capability_noaudit() which was originally exported to be used in xfs but turns out it does not meet our needs.

Note this is based on top of a current series I have to remove has_capability_noaudit() calls from xfs so the xfs patch won't apply cleanly without that series.

Quoted 7 lines
Quoted 4 lines

If adding this helper is acceptable, I'll turn this into a non-rfc series with the required changes to apply properly.

Comments? Flames?

Convert more, please.

Convert what? :) more callers from capable() to capable_noaudit()?

#23 lore raw
Quoted 23 lines · Carlos Maiolino
Quoted 22 lines · Christian Brauner
Quoted 21 lines · On 2026-06-26 13:45 +0200, [email protected] wrote:

From: Carlos Maiolino <[email protected]>

In some cases - filesystems quota specifically here - we'd like to check for effective capabilities without issuing spurious audit messages and without the need to specify a namespace for that.

This series introduce capable_noaudit() which has the same goal as capable() but without firing audit messages.

Also, this updates both generic quota and xfs quota code to use that.

The last patch unexports has_capability_noaudit() which was originally exported to be used in xfs but turns out it does not meet our needs.

Note this is based on top of a current series I have to remove has_capability_noaudit() calls from xfs so the xfs patch won't apply cleanly without that series.

If adding this helper is acceptable, I'll turn this into a non-rfc series with the required changes to apply properly.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Comments? Flames?

Convert more, please.

Convert what? :) more callers from capable() to capable_noaudit()?

Yes, there's more code that should use the noaudit variant. Future work...

author maintainer
#24 lore raw
Quoted 26 lines · Christian Brauner
Quoted 25 lines · Carlos Maiolino
Quoted 24 lines · Christian Brauner
Quoted 22 lines · On 2026-06-26 13:45 +0200, [email protected] wrote:

From: Carlos Maiolino <[email protected]>

In some cases - filesystems quota specifically here - we'd like to check for effective capabilities without issuing spurious audit messages and without the need to specify a namespace for that.

This series introduce capable_noaudit() which has the same goal as capable() but without firing audit messages.

Also, this updates both generic quota and xfs quota code to use that.

The last patch unexports has_capability_noaudit() which was originally exported to be used in xfs but turns out it does not meet our needs.

Note this is based on top of a current series I have to remove has_capability_noaudit() calls from xfs so the xfs patch won't apply cleanly without that series.

If adding this helper is acceptable, I'll turn this into a non-rfc series with the required changes to apply properly.

Comments? Flames?

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Convert more, please.

Convert what? :) more callers from capable() to capable_noaudit()?

Yes, there's more code that should use the noaudit variant. Future work...

/me writes to his todo list