Bug 2222056

Summary: [RHEL 9] 'sysctl -N' shows values instead of names
Product: Red Hat Enterprise Linux 9 Reporter: Pranav Lawate <plawate>
Component: procps-ngAssignee: Jan Rybar <jrybar>
Status: CLOSED ERRATA QA Contact: Karel Volný <kvolny>
Severity: medium Docs Contact:
Priority: medium    
Version: 9.2CC: jcastran, kvolny
Target Milestone: rcKeywords: EasyFix, Triaged, Upstream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: procps-ng-3.3.17-12.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-07 08:56:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pranav Lawate 2023-07-11 17:22:14 UTC
Description of problem:
Command output `# sysctl -N`  shows the values instead of the parameter names.
'-N' wrongly behaves like '-n'

Version-Release number of selected component (if applicable):
procps-ng-3.3.17-11.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Run sysctl command with '-N'




Actual results:

RHEL 9
~~~
# sysctl -N -p /usr/lib/sysctl.d/50-default.conf
16
1
2
2
2
2
2
0
0
0
0
0
1
1
1
1
1
0 2147483647
fq_codel
1
1
1
1

# sysctl -n -p /usr/lib/sysctl.d/50-default.conf
16
1
2
2
2
2
2
0
0
0
0
0
1
1
1
1
1
0 2147483647
fq_codel
1
1
1
1
~~~


Expected results:
As per RHEL 8 results--> 
~~~
# sysctl -N -p /usr/lib/sysctl.d/50-default.conf 
kernel.sysrq
kernel.core_uses_pid
kernel.kptr_restrict
net.ipv4.conf.all.rp_filter
net.ipv4.conf.all.accept_source_route
net.ipv4.conf.all.promote_secondaries
sysctl: cannot stat /proc/sys/-net/ipv4/ping_group_range: No such file or directory
net.core.default_qdisc
fs.protected_hardlinks
fs.protected_symlinks

# sysctl -n -p /usr/lib/sysctl.d/50-default.conf 
16
1
1
1
0
1
sysctl: cannot stat /proc/sys/-net/ipv4/ping_group_range: No such file or directory
fq_codel
1
1
~~~

Comment 11 errata-xmlrpc 2023-11-07 08:56:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Low: procps-ng security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:6705