lockdown: Allow unprivileged users to see lockdown status
Subsystems (2)
PATCH 1/1 lockdown: Allow unprivileged users to see lockdown status
A number of userspace tools, such as systemtap, need a way to see the current lockdown state so they can gracefully deal with the kernel being locked down. The state is already exposed in /sys/kernel/security/lockdown, but is only readable by root. Adjust the permissions so unprivileged users can read the state.
--- security/lockdown/lockdown.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
security/lockdown/lockdown.c +1 -1
@@ -150,7 +150,7 @@ static int __init lockdown_secfs_init(void) {struct dentry *dentry; - dentry =securityfs_create_file ("lockdown" ,0600 ,NULL ,NULL , + dentry =securityfs_create_file ("lockdown" ,0644 ,NULL ,NULL , &lockdown_ops);return PTR_ERR_OR_ZERO (dentry); }
Signature · 1 line
2.24.1
James Morris
maintainerQuoted 9 lines · Jeremy Cline
A number of userspace tools, such as systemtap, need a way to see the current lockdown state so they can gracefully deal with the kernel being locked down. The state is already exposed in
/sys/kernel/security/lockdown, but is only readable by root. Adjust the permissions so unprivileged users can read the state.Fixes 000d388ed3bb ("security: Add a static lockdown policy LSM")Cc Frank Ch. Eigler <[email protected]>Signed-off-by Jeremy Cline <[email protected]>
Looks fine to me, any objection from Matthew or others?
Quoted 18 lines
--- security/lockdown/lockdown.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)security/lockdown/lockdown.c +1
-1@@ -150,7 +150,7 @@ static int __init lockdown_secfs_init(void) {struct dentry *dentry; - dentry =securityfs_create_file ("lockdown" ,0600 ,NULL ,NULL , + dentry =securityfs_create_file ("lockdown" ,0644 ,NULL ,NULL , &lockdown_ops);return PTR_ERR_OR_ZERO (dentry); }
Signature · 2 lines
James Morris <[email protected]>
Quoted 8 lines · James Morris
Quoted 6 lines · Jeremy Cline
A number of userspace tools, such as systemtap, need a way to see the current lockdown state so they can gracefully deal with the kernel being locked down. The state is already exposed in
/sys/kernel/security/lockdown, but is only readable by root. Adjust the permissions so unprivileged users can read the state.
Quoted 6 lines
Quoted 3 lines
Fixes 000d388ed3bb ("security: Add a static lockdown policy LSM")Cc Frank Ch. Eigler <[email protected]>Signed-off-by Jeremy Cline <[email protected]>Looks fine to me, any objection from Matthew or others?
Can we take resounding silence as no objections?
- Jeremy
Quoted 23 lines
Quoted 18 lines
--- security/lockdown/lockdown.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)security/lockdown/lockdown.c +1
-1@@ -150,7 +150,7 @@ static int __init lockdown_secfs_init(void) {struct dentry *dentry; - dentry =securityfs_create_file ("lockdown" ,0600 ,NULL ,NULL , + dentry =securityfs_create_file ("lockdown" ,0644 ,NULL ,NULL , &lockdown_ops);return PTR_ERR_OR_ZERO (dentry); }Signature · 2 lines
James Morris <[email protected]>
James Morris
maintainerQuoted 9 lines · Jeremy Cline
Quoted 8 lines · James Morris
Quoted 6 lines · Jeremy Cline
A number of userspace tools, such as systemtap, need a way to see the current lockdown state so they can gracefully deal with the kernel being locked down. The state is already exposed in
/sys/kernel/security/lockdown, but is only readable by root. Adjust the permissions so unprivileged users can read the state.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Fixes 000d388ed3bb ("security: Add a static lockdown policy LSM")Cc Frank Ch. Eigler <[email protected]>Signed-off-by Jeremy Cline <[email protected]>Looks fine to me, any objection from Matthew or others?
Can we take resounding silence as no objections?
Please resend and I'll apply it to my tree.
Quoted 27 lines
- Jeremy
Quoted 23 lines
Quoted 18 lines
--- security/lockdown/lockdown.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)security/lockdown/lockdown.c +1
-1@@ -150,7 +150,7 @@ static int __init lockdown_secfs_init(void) {struct dentry *dentry; - dentry =securityfs_create_file ("lockdown" ,0600 ,NULL ,NULL , + dentry =securityfs_create_file ("lockdown" ,0644 ,NULL ,NULL , &lockdown_ops);return PTR_ERR_OR_ZERO (dentry); }Signature · 2 lines
James Morris <[email protected]>
Signature · 2 lines
James Morris <[email protected]>
PATCH RESEND 1/1 lockdown: Allow unprivileged users to see lockdown status
In reply to Jeremy ClineA number of userspace tools, such as systemtap, need a way to see the current lockdown state so they can gracefully deal with the kernel being locked down. The state is already exposed in /sys/kernel/security/lockdown, but is only readable by root. Adjust the permissions so unprivileged users can read the state.
--- security/lockdown/lockdown.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
security/lockdown/lockdown.c +1 -1
@@ -150,7 +150,7 @@ static int __init lockdown_secfs_init(void) {struct dentry *dentry; - dentry =securityfs_create_file ("lockdown" ,0600 ,NULL ,NULL , + dentry =securityfs_create_file ("lockdown" ,0644 ,NULL ,NULL , &lockdown_ops);return PTR_ERR_OR_ZERO (dentry); }
Signature · 1 line
2.26.2
James Morris
maintainerQuoted 9 lines · Jeremy Cline
A number of userspace tools, such as systemtap, need a way to see the current lockdown state so they can gracefully deal with the kernel being locked down. The state is already exposed in
/sys/kernel/security/lockdown, but is only readable by root. Adjust the permissions so unprivileged users can read the state.Fixes 000d388ed3bb ("security: Add a static lockdown policy LSM")Cc Frank Ch. Eigler <[email protected]>Signed-off-by Jeremy Cline <[email protected]>
Applied togit://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-general
Signature · 2 lines
James Morris <[email protected]>