Remove /etc/sudoers.d/zfs
The smartctl exception in /etc/sudoers.d/zfs doesn't cover devices like NVMe or symlinked devices. Just get rid of it rather than keep maintaining it. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #18626
This commit is contained in:
@@ -2,7 +2,6 @@ usr/bin/zarcsummary.py
|
|||||||
usr/share/zfs/zfs-helpers.sh
|
usr/share/zfs/zfs-helpers.sh
|
||||||
etc/default/zfs
|
etc/default/zfs
|
||||||
etc/init.d
|
etc/init.d
|
||||||
etc/sudoers.d
|
|
||||||
etc/zfs/vdev_id.conf.alias.example
|
etc/zfs/vdev_id.conf.alias.example
|
||||||
etc/zfs/vdev_id.conf.multipath.example
|
etc/zfs/vdev_id.conf.multipath.example
|
||||||
etc/zfs/vdev_id.conf.sas_direct.example
|
etc/zfs/vdev_id.conf.sas_direct.example
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
# SPDX-License-Identifier: CDDL-1.0
|
# SPDX-License-Identifier: CDDL-1.0
|
||||||
sudoersddir = $(sysconfdir)/sudoers.d
|
|
||||||
sudoersd_DATA = \
|
|
||||||
%D%/sudoers.d/zfs
|
|
||||||
|
|
||||||
dist_noinst_DATA += $(sudoersd_DATA)
|
|
||||||
|
|
||||||
|
|
||||||
sysconf_zfsdir = $(sysconfdir)/zfs
|
sysconf_zfsdir = $(sysconfdir)/zfs
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
##
|
|
||||||
## Allow any user to run `zpool iostat/status -c smart` in order
|
|
||||||
## to read basic SMART health statistics for a pool.
|
|
||||||
##
|
|
||||||
## CAUTION: Any syntax error introduced here will break sudo.
|
|
||||||
## Editing with 'visudo' is recommended: visudo -f /etc/sudoers.d/zfs
|
|
||||||
##
|
|
||||||
|
|
||||||
# ALL ALL = (root) NOPASSWD: /usr/sbin/smartctl -a /dev/[hsv]d[a-z0-9]*
|
|
||||||
@@ -109,10 +109,7 @@ environment variable set.
|
|||||||
If a script requires the use of a privileged command, like
|
If a script requires the use of a privileged command, like
|
||||||
.Xr smartctl 8 ,
|
.Xr smartctl 8 ,
|
||||||
then it's recommended you allow the user access to it in
|
then it's recommended you allow the user access to it in
|
||||||
.Pa /etc/sudoers
|
.Pa /etc/sudoers .
|
||||||
or add the user to the
|
|
||||||
.Pa /etc/sudoers.d/zfs
|
|
||||||
file.
|
|
||||||
.Pp
|
.Pp
|
||||||
If
|
If
|
||||||
.Fl c
|
.Fl c
|
||||||
|
|||||||
@@ -525,7 +525,6 @@ systemctl --system daemon-reload >/dev/null || true
|
|||||||
%config(noreplace) %{_sysconfdir}/%{name}/zed.d/*
|
%config(noreplace) %{_sysconfdir}/%{name}/zed.d/*
|
||||||
%config(noreplace) %{_sysconfdir}/%{name}/zpool.d/*
|
%config(noreplace) %{_sysconfdir}/%{name}/zpool.d/*
|
||||||
%config(noreplace) %{_sysconfdir}/%{name}/vdev_id.conf.*.example
|
%config(noreplace) %{_sysconfdir}/%{name}/vdev_id.conf.*.example
|
||||||
%attr(440, root, root) %config(noreplace) %{_sysconfdir}/sudoers.d/*
|
|
||||||
|
|
||||||
%config(noreplace) %{_bashcompletiondir}/zfs
|
%config(noreplace) %{_bashcompletiondir}/zfs
|
||||||
%config(noreplace) %{_bashcompletiondir}/zpool
|
%config(noreplace) %{_bashcompletiondir}/zpool
|
||||||
|
|||||||
Reference in New Issue
Block a user