bin/175799: Adding more tools to be used by operator group members (reboot, apm, acpiconf)
Olivier Cochard-Labbe
olivier at cochard.me
Sun Feb 3 14:50:00 UTC 2013
>Number: 175799
>Category: bin
>Synopsis: Adding more tools to be used by operator group members (reboot, apm, acpiconf)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Feb 03 14:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Olivier Cochard-Labbe
>Release: -current
>Organization:
>Environment:
FreeBSD bigdev.bsdrp.net 10.0-CURRENT FreeBSD 10.0-CURRENT #3 r245977M: Sun Jan 27 13:56:05 CET 2013 root at bigdev.bsdrp.net:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
There are only 2 useable tools by "operator" group members:
shutdown (and its child: poweroff, halt, etc
) and mksnap_ffs.
On my HAL-less laptop, I've put my user in the operator group that let
me reboot/power-off it with shutdown.
But I would to be able to suspend-resume it too with zzz (that call apm and acpiconf).
Here is the list of tool useable by operator group:
/sbin/reboot/
/usr/sbin/apm
/usr/sbin/acpiconf
Here is the thread on the -current mailing-list regarding this proposal:
http://lists.freebsd.org/pipermail/freebsd-current/2013-January/039198.html
>How-To-Repeat:
>Fix:
By applying the simple attached patch.
Patch attached with submission follows:
Index: sbin/reboot/Makefile
===================================================================
--- sbin/reboot/Makefile (revision 245914)
+++ sbin/reboot/Makefile (working copy)
@@ -14,6 +14,10 @@
MLINKS+= boot_i386.8 boot.8
.endif
+BINOWN= root
+BINGRP= operator
+BINMODE=4550
+
LINKS= ${BINDIR}/reboot ${BINDIR}/halt ${BINDIR}/reboot ${BINDIR}/fastboot \
${BINDIR}/reboot ${BINDIR}/fasthalt
Index: sys/amd64/conf/GENERIC
===================================================================
--- sys/amd64/conf/GENERIC (revision 245914)
+++ sys/amd64/conf/GENERIC (working copy)
@@ -80,11 +80,11 @@
options DDB # Support DDB.
options GDB # Support remote GDB.
options DEADLKRES # Enable the deadlock resolver
-options INVARIANTS # Enable calls of extra sanity checking
-options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS
-options WITNESS # Enable checks to detect deadlocks and cycles
-options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed
-options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones
+#options INVARIANTS # Enable calls of extra sanity checking
+#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS
+#options WITNESS # Enable checks to detect deadlocks and cycles
+#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed
+#options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones
# Make an SMP-capable kernel by default
options SMP # Symmetric MultiProcessor Kernel
Index: usr.sbin/acpi/acpiconf/Makefile
===================================================================
--- usr.sbin/acpi/acpiconf/Makefile (revision 245914)
+++ usr.sbin/acpi/acpiconf/Makefile (working copy)
@@ -4,4 +4,8 @@
PROG= acpiconf
MAN= acpiconf.8
+BINOWN= root
+BINGRP= operator
+BINMODE=4550
+
.include <bsd.prog.mk>
Index: usr.sbin/apm/Makefile
===================================================================
--- usr.sbin/apm/Makefile (revision 245914)
+++ usr.sbin/apm/Makefile (working copy)
@@ -5,4 +5,8 @@
MLINKS= apm.8 apmconf.8
MANSUBDIR= /${MACHINE_CPUARCH}
+BINOWN= root
+BINGRP= operator
+BINMODE=4550
+
.include <bsd.prog.mk>
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list