userns: security: Inform LSMs of capability check during userns creation
PATCH 1/1 userns: security: Inform LSMs of capability check during userns creation
Right now security_capable() gets called in create_user_ns() to snapshot whether the parent could setfcap, but the LSM gets zero context on where the check actually came from. It is the same story as setid: without a dedicated flag, security modules cannot tell this apart from regular capability checks.
Add CAP_OPT_USERNS_CREATE and pass it along from create_user_ns().
---
Thanks Christian for the suggestion :).
--- include/linux/security.h | 2 ++ kernel/user_namespace.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-)
include/linux/security.h +2 -0
@@ -75,6 +75,8 @@ struct nsset;#define CAP_OPT_NOAUDIT BIT(1)/* If capable is being called by a setid function */ #define CAP_OPT_INSETID BIT(2) +/* Is capable being called from the user namespace creation path? */ +#define CAP_OPT_USERNS_CREATE BIT(3)/* LSM Agnostic defines for security_sb_set_mnt_opts() flags */ #define SECURITY_LSM_NATIVE_LABELS 1
kernel/user_namespace.c +2 -1
@@ -134,7 +134,8 @@ int create_user_ns(struct cred *new)* audit: the creator may never map uid 0. */ ns->parent_could_setfcap = - !security_capable (new, parent_ns,CAP_SETFCAP ,CAP_OPT_NOAUDIT ); + !security_capable (new, parent_ns,CAP_SETFCAP , +CAP_OPT_NOAUDIT |CAP_OPT_USERNS_CREATE ); ret =ns_common_init (ns);if (ret)
Signature · 1 line
2.53.0
Serge E. Hallyn
maintainerQuoted 7 lines · Bradley Morgan
Right now
security_capable()gets called increate_user_ns()to snapshot whether the parent could setfcap, but the LSM gets zero context on where the check actually came from. It is the same story as setid: without a dedicated flag, security modules cannot tell this apart from regular capability checks.Add
CAP_OPT_USERNS_CREATEand pass it along fromcreate_user_ns().
This should be patch 1/N in a set that introduces a user of it in some lsm.
Quoted 39 lines
Suggested-by Christian Brauner <[email protected]>Signed-off-by Bradley Morgan <[email protected]>---
Thanks Christian for the suggestion :).--- include/linux/security.h | 2 ++ kernel/user_namespace.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-)include/linux/security.h +2
-0@@ -75,6 +75,8 @@ struct nsset;#define CAP_OPT_NOAUDIT BIT(1)/* If capable is being called by a setid function */ #define CAP_OPT_INSETID BIT(2) +/* Is capable being called from the user namespace creation path? */ +#define CAP_OPT_USERNS_CREATE BIT(3)/* LSM Agnostic defines for security_sb_set_mnt_opts() flags */ #define SECURITY_LSM_NATIVE_LABELS 1kernel/user_namespace.c +2
-1@@ -134,7 +134,8 @@ int create_user_ns(struct cred *new)* audit: the creator may never map uid 0. */ ns->parent_could_setfcap = - !security_capable (new, parent_ns,CAP_SETFCAP ,CAP_OPT_NOAUDIT ); + !security_capable (new, parent_ns,CAP_SETFCAP , +CAP_OPT_NOAUDIT |CAP_OPT_USERNS_CREATE ); ret =ns_common_init (ns);if (ret)Signature · 1 line
2.53.0
Quoted 11 lines · Serge E. Hallyn
Quoted 7 lines · Bradley Morgan
Right now
security_capable()gets called increate_user_ns()to snapshot whether the parent could setfcap, but the LSM gets zero context on where the check actually came from. It is the same story as setid: without a dedicated flag, security modules cannot tell this apart from regular capability checks.Add
CAP_OPT_USERNS_CREATEand pass it along fromcreate_user_ns().This should be patch 1/N in a set that introduces a user of it in some lsm.
hmm. Did you read Christians suggestion? Let's see if Christian or anyone else could suggest a nice little lsm user for this.
If nobody responds, in coming days, I'll go and find and do a user for it.
Quoted 37 lines
Quoted 3 lines
Suggested-by Christian Brauner <[email protected]>Link:
https://lore.kernel.org/all/20261111-kommt-gischt-ohnedies-469998d2f219@brauner/
Quoted 33 lines
Signed-off-by Bradley Morgan <[email protected]>---
Thanks Christian for the suggestion :).--- include/linux/security.h | 2 ++ kernel/user_namespace.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-)include/linux/security.h +2
-0@@ -75,6 +75,8 @@ struct nsset;#define CAP_OPT_NOAUDIT BIT(1)/* If capable is being called by a setid function */ #define CAP_OPT_INSETID BIT(2) +/* Is capable being called from the user namespace creation path? */ +#define CAP_OPT_USERNS_CREATE BIT(3)/* LSM Agnostic defines for security_sb_set_mnt_opts() flags */ #define SECURITY_LSM_NATIVE_LABELS 1kernel/user_namespace.c +2
-1@@ -134,7 +134,8 @@ int create_user_ns(struct cred *new)* audit: the creator may never map uid 0. */ ns->parent_could_setfcap = - !security_capable (new, parent_ns,CAP_SETFCAP ,CAP_OPT_NOAUDIT ); + !security_capable (new, parent_ns,CAP_SETFCAP , +CAP_OPT_NOAUDIT |CAP_OPT_USERNS_CREATE );
Quoted 5 lines
Quoted 4 lines
kernel/user_namespace.c +0
-0ret =ns_common_init (ns);if (ret)Signature · 1 line
2.53.0
--- Thanks!
Serge Hallyn
maintainerNov 13, 2026 15:54:37 Bradley Morgan <[email protected]>:
Quoted 9 lines
Quoted 7 lines · Serge E. Hallyn
Quoted 6 lines · Bradley Morgan
Right now
security_capable()gets called increate_user_ns()to snapshot whether the parent could setfcap, but the LSM gets zero context on where the check actually came from. It is the same story as setid: without a dedicated flag, security modules cannot tell this apart from regular capability checks.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Add
CAP_OPT_USERNS_CREATEand pass it along fromcreate_user_ns().This should be patch 1/N in a set that introduces a user of it in some lsm.
hmm. Did you read Christians suggestion?
I did, when he first sent it. Actually it seems to me that what the lsm would really like to know is that this is not for an immediate use of setfcap, but possible future use. But that doesn't really matter. I wasn't judging the patch. I was just going by what i believe is general lsm subsystem policy.
Quoted 49 lines
Let's see if Christian or anyone
else could suggest a nice little lsm user for this.If nobody responds, in coming days, I'll go and find and do a user for it.
Quoted 37 lines
Quoted 3 lines
Suggested-by Christian Brauner <[email protected]>Link:
https://lore.kernel.org/all/20261111-kommt-gischt-ohnedies-469998d2f219@brauner/
Quoted 33 lines
Signed-off-by Bradley Morgan <[email protected]>---
Thanks Christian for the suggestion :).
---include/linux/security.h| 2 ++
kernel/user_namespace.c | 3 ++-2 files changed, 4 insertions(+), 1 deletion(-)include/linux/security.h +2
-0@@ -75,6 +75,8 @@ struct nsset;#define CAP_OPT_NOAUDIT BIT(1)/* If capable is being called by a setid function */ #define CAP_OPT_INSETID BIT(2) +/* Is capable being called from the user namespace creation path? */ +#define CAP_OPT_USERNS_CREATE BIT(3)/* LSM Agnostic defines for security_sb_set_mnt_opts() flags */ #define SECURITY_LSM_NATIVE_LABELS 1kernel/user_namespace.c +0
-0@@ -134,7 +134,8 @@ int create_user_ns(struct cred *new)* audit: the creator may never map uid 0. */
ns->parent_could_setfcap=
- !security_capable(new,parent_ns,CAP_SETFCAP,CAP_OPT_NOAUDIT); + !security_capable(new,parent_ns,CAP_SETFCAP,
+CAP_OPT_NOAUDIT|CAP_OPT_USERNS_CREATE);Quoted 5 lines
Quoted 4 lines
ret =
ns_common_init(ns);
if (ret)
--
2.53.0--- Thanks!
Quoted 18 lines · Serge Hallyn
Nov 13, 2026 15:54:37 Bradley Morgan <[email protected]>:
Quoted 4 lines
Quoted 2 lines · Serge E. Hallyn
Quoted 1 line · Bradley Morgan
Right now
security_capable()gets called increate_user_ns()tosnapshot
Quoted 1 line
Quoted 1 line
Quoted 1 line
whether the parent could setfcap, but the LSM gets zero context on
where
Quoted 9 lines
Quoted 8 lines
Quoted 5 lines
the check actually came from. It is the same story as setid: without a dedicated flag, security modules cannot tell this apart from regular capability checks.
Add
CAP_OPT_USERNS_CREATEand pass it along fromcreate_user_ns().This should be patch 1/N in a set that introduces a user of it in some lsm.
Quoted 7 lines
Quoted 1 line
hmm. Did you read Christians suggestion?
I did, when he first sent it. Actually it seems to me that what the lsm would really like to know is that this is not for an immediate use of setfcap, but possible future use. But that doesn't really matter. I wasn't judging the patch. I was just going by what i believe is general lsm subsystem policy.
( my word wrapping client did not like that message :( )
hmm, it's pre-reqed over the patch as on the lore link, so Christian may want to have a look at this obe
Quoted 31 lines
Quoted 5 lines
Let's see if Christian or anyone
else could suggest a nice little lsm user for this.If nobody responds, in coming days, I'll go and find and do a user for
it.
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Suggested-by Christian Brauner <[email protected]>Link:
https://lore.kernel.org/all/20261111-kommt-gischt-ohnedies-469998d2f219@brauner/
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Signed-off-by Bradley Morgan <[email protected]>---
Thanks Christian for the suggestion :).
---include/linux/security.h| 2 ++
kernel/user_namespace.c | 3 ++-2 files changed, 4 insertions(+), 1 deletion(-)include/linux/security.h +2
-0@@ -75,6 +75,8 @@ struct nsset;#define CAP_OPT_NOAUDIT BIT(1)/* If capable is being called by a setid function */ #define CAP_OPT_INSETID BIT(2) +/* Is capable being called from the user namespace creation path? */ +#define CAP_OPT_USERNS_CREATE BIT(3)
Quoted 24 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
include/linux/security.h +0
-0/* LSM Agnostic defines for security_sb_set_mnt_opts() flags */ #define SECURITY_LSM_NATIVE_LABELS 1kernel/user_namespace.c +0
-0@@ -134,7 +134,8 @@ int create_user_ns(struct cred *new)* audit: the creator may never map uid 0. */
ns->parent_could_setfcap=
- !security_capable(new,parent_ns,CAP_SETFCAP,
CAP_OPT_NOAUDIT);Quoted 10 lines
Quoted 8 lines
Quoted 7 lines
+ !security_capable(new,
parent_ns,CAP_SETFCAP, +CAP_OPT_NOAUDIT|CAP_OPT_USERNS_CREATE);ret =
ns_common_init(ns);
if (ret)
--
2.53.0--- Thanks!
--- Thanks!
Serge E. Hallyn
maintainerQuoted 21 lines · Bradley Morgan
Quoted 20 lines · Serge Hallyn
Nov 13, 2026 15:54:37 Bradley Morgan <[email protected]>:
Quoted 4 lines
Quoted 2 lines · Serge E. Hallyn
Quoted 1 line · Bradley Morgan
Right now
security_capable()gets called increate_user_ns()tosnapshot
Quoted 1 line
Quoted 1 line
Quoted 1 line
whether the parent could setfcap, but the LSM gets zero context on
where
Quoted 10 lines
Quoted 8 lines
Quoted 5 lines
the check actually came from. It is the same story as setid: without a dedicated flag, security modules cannot tell this apart from regular capability checks.
Add
CAP_OPT_USERNS_CREATEand pass it along fromcreate_user_ns().This should be patch 1/N in a set that introduces a user of it in some lsm.
hmm. Did you read Christians suggestion?
Quoted 7 lines
Quoted 5 lines
I did, when he first sent it. Actually it seems to me that what the lsm would really like to know is that this is not for an immediate use of setfcap, but possible future use. But that doesn't really matter. I wasn't judging the patch. I was just going by what i believe is general lsm subsystem policy.
( my word wrapping client did not like that message :( )
Hm. yeah. (Do you mean word-wrapping or non-word-wrapping?) I see my phone mailer made it all one line. I'll see if there's a setting for that.
Quoted 2 lines
hmm, it's pre-reqed over the patch as on the lore link, so Christian may want to have a look at this obe
Did this line get cut off?
Quoted 56 lines
Quoted 30 lines
Quoted 4 lines
Let's see if Christian or anyone
else could suggest a nice little lsm user for this.If nobody responds, in coming days, I'll go and find and do a user for
it.
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Suggested-by Christian Brauner <[email protected]>Link:
https://lore.kernel.org/all/20261111-kommt-gischt-ohnedies-469998d2f219@brauner/
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Signed-off-by Bradley Morgan <[email protected]>---
Thanks Christian for the suggestion :).
---include/linux/security.h| 2 ++
kernel/user_namespace.c | 3 ++-2 files changed, 4 insertions(+), 1 deletion(-)include/linux/security.h +2
-0@@ -75,6 +75,8 @@ struct nsset;#define CAP_OPT_NOAUDIT BIT(1)/* If capable is being called by a setid function */ #define CAP_OPT_INSETID BIT(2) +/* Is capable being called from the user namespace creation path? */ +#define CAP_OPT_USERNS_CREATE BIT(3)Quoted 24 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
include/linux/security.h +0
-0/* LSM Agnostic defines for security_sb_set_mnt_opts() flags */ #define SECURITY_LSM_NATIVE_LABELS 1kernel/user_namespace.c +0
-0@@ -134,7 +134,8 @@ int create_user_ns(struct cred *new)* audit: the creator may never map uid 0. */
ns->parent_could_setfcap=
- !security_capable(new,parent_ns,CAP_SETFCAP,
CAP_OPT_NOAUDIT);Quoted 10 lines
Quoted 8 lines
Quoted 7 lines
+ !security_capable(new,
parent_ns,CAP_SETFCAP, +CAP_OPT_NOAUDIT|CAP_OPT_USERNS_CREATE);ret =
ns_common_init(ns);
if (ret)
--
2.53.0--- Thanks!
--- Thanks!
Quoted 29 lines · Serge E. Hallyn
Quoted 4 lines · Bradley Morgan
Quoted 3 lines · Serge Hallyn
Nov 13, 2026 15:54:37 Bradley Morgan <[email protected]>:
Quoted 1 line
On 13 November 2026 21:39:33 GMT, "Serge E. Hallyn"
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Quoted 2 lines · wrote:
Quoted 1 line · Bradley Morgan
Right now
security_capable()gets called increate_user_ns()tosnapshot
Quoted 1 line
Quoted 1 line
Quoted 1 line
whether the parent could setfcap, but the LSM gets zero context on
where
Quoted 1 line
Quoted 1 line
Quoted 1 line
the check actually came from. It is the same story as setid:
without a
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
dedicated flag, security modules cannot tell this apart from
regular
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
capability checks.
Add
CAP_OPT_USERNS_CREATEand pass it along fromcreate_user_ns().Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
This should be patch 1/N in a set that introduces a user of it in some lsm.
hmm. Did you read Christians suggestion?
I did, when he first sent it. Actually it seems to me that what the lsm would really like to know is that this is not for an immediate use of setfcap, but possible future use. But that doesn't really matter. I
wasn't
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
judging the patch. I was just going by what i believe is general lsm subsystem policy.
( my word wrapping client did not like that message :( )
Hm. yeah. (Do you mean word-wrapping or non-word-wrapping?) I see my phone mailer made it all one line. I'll see if there's a setting for that.
like I had to scroll right in order to read all of your text.
Quoted 5 lines
Quoted 3 lines
hmm, it's pre-reqed over the patch as on the lore link, so Christian may want to have a look at this obe
Did this line get cut off?
s/obe/one , typo.
Quoted 22 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Let's see if Christian or anyone
else could suggest a nice little lsm user for this.If nobody responds, in coming days, I'll go and find and do a user
for
Quoted 16 lines
Quoted 6 lines
it.
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Suggested-by Christian Brauner <[email protected]>Link:
https://lore.kernel.org/all/20261111-kommt-gischt-ohnedies-469998d2f219@brauner/
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Signed-off-by Bradley Morgan <[email protected]>---
Thanks Christian for the suggestion :).
---include/linux/security.h| 2 ++
kernel/user_namespace.c | 3 ++-2 files changed, 4 insertions(+), 1 deletion(-)
Quoted 39 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
include/linux/security.h struct nsset; · line 78
Quoted 9 lines
include/linux/security.h +1
-0@@ -75,6 +75,8 @@ struct nsset;#define CAP_OPT_NOAUDIT BIT(1)/* If capable is being called by a setid function */ #define CAP_OPT_INSETID BIT(2) +/* Is capable being called from the user namespace creation path? */
Quoted 28 lines
Quoted 26 lines
Quoted 13 lines
Quoted 13 lines
Quoted 11 lines
include/linux/security.h +1
-0+#define CAP_OPT_USERNS_CREATE BIT(3)/* LSM Agnostic defines for security_sb_set_mnt_opts() flags */ #define SECURITY_LSM_NATIVE_LABELS 1kernel/user_namespace.c +0
-0@@ -134,7 +134,8 @@ int create_user_ns(struct cred *new)* audit: the creator may never map uid 0. */ Quoted 2 lines
ns->parent_could_setfcap=
- !security_capable(new,parent_ns,CAP_SETFCAP,
CAP_OPT_NOAUDIT);Quoted 10 lines
Quoted 8 lines
Quoted 7 lines
+ !security_capable(new,
parent_ns,CAP_SETFCAP, +CAP_OPT_NOAUDIT|CAP_OPT_USERNS_CREATE);ret =
ns_common_init(ns);
if (ret)
--
2.53.0--- Thanks!
--- Thanks!
--- Thanks!
Quoted 16 lines · Serge Hallyn
Nov 13, 2026 15:54:37 Bradley Morgan <[email protected]>:
Quoted 14 lines
Quoted 11 lines · Serge E. Hallyn
Quoted 7 lines · Bradley Morgan
Right now
security_capable()gets called increate_user_ns()to snapshot whether the parent could setfcap, but the LSM gets zero context on where the check actually came from. It is the same story as setid: without a dedicated flag, security modules cannot tell this apart from regular capability checks.Add
CAP_OPT_USERNS_CREATEand pass it along fromcreate_user_ns().This should be patch 1/N in a set that introduces a user of it in some lsm.
Quoted 7 lines
Quoted 1 line
hmm. Did you read Christians suggestion?
I did, when he first sent it. Actually it seems to me that what the lsm would really like to know is that this is not for an immediate use of setfcap, but possible future use. But that doesn't really matter. I wasn't judging the patch. I was just going by what i believe is general lsm subsystem policy.
My main point is this: right now security_capable() doesn't actually specify what specific action it denies. I think we would be much better served if we had an enum that would allow us to annotate places where it matters what specific action is checked. I would make use of this in bpf lsms.
Quoted 28 lines · Christian Brauner
Quoted 6 lines · Serge Hallyn
Nov 13, 2026 15:54:37 Bradley Morgan <[email protected]>:
Quoted 4 lines
Quoted 2 lines · Serge E. Hallyn
Quoted 1 line · Bradley Morgan
Right now
security_capable()gets called increate_user_ns()tosnapshot
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
whether the parent could setfcap, but the LSM gets zero context on
where
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
the check actually came from. It is the same story as setid: without
a
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
dedicated flag, security modules cannot tell this apart from regular capability checks.
Add
CAP_OPT_USERNS_CREATEand pass it along fromcreate_user_ns().This should be patch 1/N in a set that introduces a user of it in some lsm.
Quoted 7 lines
Quoted 1 line
hmm. Did you read Christians suggestion?
I did, when he first sent it. Actually it seems to me that what the lsm would really like to know is that this is not for an immediate use of setfcap, but possible future use. But that doesn't really matter. I wasn't judging the patch. I was just going by what i believe is general lsm subsystem policy.
Quoted 5 lines
My main point is this: right now
security_capable()doesn't actually specify what specific action it denies. I think we would be much better served if we had an enum that would allow us to annotate places where it matters what specific action is checked. I would make use of this in bpf lsms.
Does this patch look okay to you? Would you like any improvements? (Except from adding a user) :)
Quoted 1 line
--- Thanks!
Quoted 30 lines · Bradley Morgan
Quoted 28 lines · Christian Brauner
Quoted 6 lines · Serge Hallyn
Nov 13, 2026 15:54:37 Bradley Morgan <[email protected]>:
Quoted 4 lines
Quoted 2 lines · Serge E. Hallyn
Quoted 1 line · Bradley Morgan
Right now
security_capable()gets called increate_user_ns()tosnapshot
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
whether the parent could setfcap, but the LSM gets zero context on
where
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
the check actually came from. It is the same story as setid: without
a
Quoted 15 lines
Quoted 9 lines
Quoted 7 lines
Quoted 4 lines
dedicated flag, security modules cannot tell this apart from regular capability checks.
Add
CAP_OPT_USERNS_CREATEand pass it along fromcreate_user_ns().This should be patch 1/N in a set that introduces a user of it in some lsm.
hmm. Did you read Christians suggestion?
I did, when he first sent it. Actually it seems to me that what the lsm would really like to know is that this is not for an immediate use of setfcap, but possible future use. But that doesn't really matter. I wasn't judging the patch. I was just going by what i believe is general lsm subsystem policy.
Quoted 8 lines
Quoted 5 lines
My main point is this: right now
security_capable()doesn't actually specify what specific action it denies. I think we would be much better served if we had an enum that would allow us to annotate places where it matters what specific action is checked. I would make use of this in bpf lsms.Does this patch look okay to you? Would you like any improvements? (Except from adding a user) :)
I think it's fine but Serge has more expertise in this area. So I'd like hear back from him again.
Serge E. Hallyn
maintainerQuoted 37 lines · Christian Brauner
Quoted 36 lines · Bradley Morgan
Quoted 33 lines · Christian Brauner
Quoted 6 lines · Serge Hallyn
Nov 13, 2026 15:54:37 Bradley Morgan <[email protected]>:
Quoted 4 lines
Quoted 2 lines · Serge E. Hallyn
Quoted 1 line · Bradley Morgan
Right now
security_capable()gets called increate_user_ns()tosnapshot
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
whether the parent could setfcap, but the LSM gets zero context on
where
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
the check actually came from. It is the same story as setid: without
a
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
dedicated flag, security modules cannot tell this apart from regular capability checks.
Add
CAP_OPT_USERNS_CREATEand pass it along fromcreate_user_ns().This should be patch 1/N in a set that introduces a user of it in some lsm.
Quoted 7 lines
Quoted 1 line
hmm. Did you read Christians suggestion?
I did, when he first sent it. Actually it seems to me that what the lsm would really like to know is that this is not for an immediate use of setfcap, but possible future use. But that doesn't really matter. I wasn't judging the patch. I was just going by what i believe is general lsm subsystem policy.
My main point is this: right now
security_capable()doesn't actually specify what specific action it denies. I think we would be much better served if we had an enum that would allow us to annotate places where it matters what specific action is checked. I would make use of this in bpf lsms.
Quoted 5 lines
Quoted 2 lines
Does this patch look okay to you? Would you like any improvements? (Except from adding a user) :)
I think it's fine but Serge has more expertise in this area. So I'd like hear back from him again.
Yup, I'm good with the patch itself, thanks!
-serge