From owner-freebsd-bugs@FreeBSD.ORG Sun Feb 3 14:50:00 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 94A1C637 for ; Sun, 3 Feb 2013 14:50:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 79DE1A67 for ; Sun, 3 Feb 2013 14:50:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r13Eo08G020061 for ; Sun, 3 Feb 2013 14:50:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r13Eo0Id020060; Sun, 3 Feb 2013 14:50:00 GMT (envelope-from gnats) Resent-Date: Sun, 3 Feb 2013 14:50:00 GMT Resent-Message-Id: <201302031450.r13Eo0Id020060@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Olivier Cochard-Labbe Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 02CCF51E for ; Sun, 3 Feb 2013 14:43:24 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id E7562A45 for ; Sun, 3 Feb 2013 14:43:23 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r13EhMQc072756 for ; Sun, 3 Feb 2013 14:43:22 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id r13EhM1A072755; Sun, 3 Feb 2013 14:43:22 GMT (envelope-from nobody) Message-Id: <201302031443.r13EhM1A072755@red.freebsd.org> Date: Sun, 3 Feb 2013 14:43:22 GMT From: Olivier Cochard-Labbe To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: bin/175799: Adding more tools to be used by operator group members (reboot, apm, acpiconf) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2013 14:50:00 -0000 >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@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 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 >Release-Note: >Audit-Trail: >Unformatted: