From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Nov 20 01:30:02 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CF501065670 for ; Thu, 20 Nov 2008 01:30:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0B22E8FC0C for ; Thu, 20 Nov 2008 01:30:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mAK1U14Y066109 for ; Thu, 20 Nov 2008 01:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mAK1U1wY066108; Thu, 20 Nov 2008 01:30:01 GMT (envelope-from gnats) Resent-Date: Thu, 20 Nov 2008 01:30:01 GMT Resent-Message-Id: <200811200130.mAK1U1wY066108@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Joe Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0F99106564A for ; Thu, 20 Nov 2008 01:27:58 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id E18E28FC0A for ; Thu, 20 Nov 2008 01:27:58 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mAK1Rwk1015610 for ; Thu, 20 Nov 2008 01:27:58 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id mAK1Rw8U015609; Thu, 20 Nov 2008 01:27:58 GMT (envelope-from nobody) Message-Id: <200811200127.mAK1Rw8U015609@www.freebsd.org> Date: Thu, 20 Nov 2008 01:27:58 GMT From: Joe To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/129002: add patch to x11/slim-1.3.1 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Nov 2008 01:30:02 -0000 >Number: 129002 >Category: ports >Synopsis: add patch to x11/slim-1.3.1 >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Thu Nov 20 01:30:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Joe >Release: 7.1 >Organization: >Environment: >Description: On the developers website there is a patch i would like added to x11/slim-1.3.1 http://developer.berlios.de/patch/?func=detailpatch&patch_id=2283&group_id=2663 [ Patch #2283 ] Add a variable to run shutdown commands without root pass. This is the contents of the patch file From: Nicolas Pierron Subject: Add a variable to run shutdown commands without root password. URL: http://svn.berlios.de/svnroot/repos/slim/trunk ChangeLog: 2007-12-16 Nicolas Pierron Add a variable to run system command without root password. * app.cpp: Add the test for reboot, halt and suspend. * cfg.cpp: Add the new variable with the default value set to false. * slim.conf: Add an example of the command. --- app.cpp | 5 +++++ cfg.cpp | 1 + slim.conf | 5 +++++ 3 files changed, 11 insertions(+) Index: slim.conf =================================================================== --- slim.conf (revision 150) +++ slim.conf (working copy) @@ -10,6 +10,11 @@ console_cmd /usr/X11R6/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login" #suspend_cmd /usr/sbin/suspend +# Let normal users have access to systems commands. If the value is true, +# then the root password is requiered to start a system command. +# Valid values: true|false +# root_password false + # Full path to the xauth binary xauth_path /usr/X11R6/bin/xauth Index: cfg.cpp =================================================================== --- cfg.cpp (revision 150) +++ cfg.cpp (working copy) @@ -36,6 +36,7 @@ options.insert(option("login_cmd","exec /bin/bash -login ~/.xinitrc %session")); options.insert(option("halt_cmd","/sbin/shutdown -h now")); options.insert(option("reboot_cmd","/sbin/shutdown -r now")); + options.insert(option("root_password","true")); options.insert(option("suspend_cmd","")); options.insert(option("sessionstart_cmd","")); options.insert(option("sessionstop_cmd","")); Index: app.cpp =================================================================== --- app.cpp (revision 150) +++ app.cpp (working copy) @@ -407,6 +407,11 @@ case Panel::Console: cerr << APPNAME << ": Got a special command (" << LoginPanel->GetName() << ")" << endl; return true; // <--- This is simply fake! + case Panel::Suspend: + case Panel::Halt: + case Panel::Reboot: + if (cfg->getOption("root_password") == "false") + return true; default: break; }; >How-To-Repeat: >Fix: Patch attached with submission follows: From: Nicolas Pierron Subject: r???: Add a variable to run shutdown commands without root password. URL: http://svn.berlios.de/svnroot/repos/slim/trunk ChangeLog: 2007-12-16 Nicolas Pierron Add a variable to run system command without root password. * app.cpp: Add the test for reboot, halt and suspend. * cfg.cpp: Add the new variable with the default value set to false. * slim.conf: Add an example of the command. --- app.cpp | 5 +++++ cfg.cpp | 1 + slim.conf | 5 +++++ 3 files changed, 11 insertions(+) Index: slim.conf =================================================================== --- slim.conf (revision 150) +++ slim.conf (working copy) @@ -10,6 +10,11 @@ console_cmd /usr/X11R6/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login" #suspend_cmd /usr/sbin/suspend +# Let normal users have access to systems commands. If the value is true, +# then the root password is requiered to start a system command. +# Valid values: true|false +# root_password false + # Full path to the xauth binary xauth_path /usr/X11R6/bin/xauth Index: cfg.cpp =================================================================== --- cfg.cpp (revision 150) +++ cfg.cpp (working copy) @@ -36,6 +36,7 @@ options.insert(option("login_cmd","exec /bin/bash -login ~/.xinitrc %session")); options.insert(option("halt_cmd","/sbin/shutdown -h now")); options.insert(option("reboot_cmd","/sbin/shutdown -r now")); + options.insert(option("root_password","true")); options.insert(option("suspend_cmd","")); options.insert(option("sessionstart_cmd","")); options.insert(option("sessionstop_cmd","")); Index: app.cpp =================================================================== --- app.cpp (revision 150) +++ app.cpp (working copy) @@ -407,6 +407,11 @@ case Panel::Console: cerr << APPNAME << ": Got a special command (" << LoginPanel->GetName() << ")" << endl; return true; // <--- This is simply fake! + case Panel::Suspend: + case Panel::Halt: + case Panel::Reboot: + if (cfg->getOption("root_password") == "false") + return true; default: break; }; >Release-Note: >Audit-Trail: >Unformatted: