Skip to content
Snippets Groups Projects
Commit cd3a440b authored by Matteo Croce's avatar Matteo Croce Committed by Craig Small
Browse files

sysctl: return error on permission denied


When trying to write to a readonly sysctl or a directory by mistake,
sysctl still returns success:

	# sysctl kernel.version=foo
	sysctl: setting key "kernel.version": Operation not permitted
	# echo $?
	0
	# sysctl kernel=foo
	sysctl: setting key "kernel": Operation not permitted
	# echo $?
	0

Let sysctl return error in both the cases above.

Signed-off-by: default avatarMatteo Croce <teknoraver@meta.com>
parent 293db96f
No related branches found
No related tags found
Loading
Pipeline #1718827714 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment