From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 31 16:31:44 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F1A410656C9 for ; Sat, 31 Jan 2009 16:31:44 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-ew0-f21.google.com (mail-ew0-f21.google.com [209.85.219.21]) by mx1.freebsd.org (Postfix) with ESMTP id DE6CF8FC13 for ; Sat, 31 Jan 2009 16:31:43 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ewy14 with SMTP id 14so1538673ewy.19 for ; Sat, 31 Jan 2009 08:31:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:in-reply-to :subject:x-priority:references:message-id:content-type :content-transfer-encoding:mime-version:date:cc:x-pgp-agent:x-mailer; bh=myWoQl2tdj5T/KDYcRr350K9xM+yVGSDZ+3rzBnLYv0=; b=DRJjjDBnxdVEzl2U/qVfrw5sEjs1rEZGrq67xHB/U7hKnJqPqZz9L8EMGPXYTmyTTS jmi///DSi856o9Ehn6QaIWq4bFQ5wtjjD3aHJgZbVpH8eEV5Y9iZEIw0mySVG9gV6cqD IVFg0WL/69BMbxhRYtRMvObrQFB/1TauDyN30= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:in-reply-to:subject:x-priority:references:message-id :content-type:content-transfer-encoding:mime-version:date:cc :x-pgp-agent:x-mailer; b=h7yd88ErM80Si9+aDcim1UQZtj/X1nKNvWufqpESWf85mLf22wEwzYnMm4orZgffLx GRr6nOMfICJNVGeCZXynNwX09qtbuePiikMi+qDA+T0fcxWhiOaKpe1bjoIC7FQkRUwi nui3Vjci/W5J1vjKgmmN33bzUHm6JGpxS7XI0= Received: by 10.210.35.17 with SMTP id i17mr2714458ebi.140.1233419503040; Sat, 31 Jan 2009 08:31:43 -0800 (PST) Received: from epsilon.lan ([83.144.140.27]) by mx.google.com with ESMTPS id q9sm2438054gve.27.2009.01.31.08.31.40 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 31 Jan 2009 08:31:42 -0800 (PST) Sender: Rui Paulo From: Rui Paulo To: Alexander Leidinger In-Reply-To: <20090130085227.957230z897u8viww@webmail.leidinger.net> X-Priority: 3 (Normal) References: <20090127124137.46fcfac5@baby-jane.lamaiziere.net> <20090127150040.GA4333@haruhi> <20090128134309.GN17198@hoeg.nl> <20090129151021.14131so3ozumpfj4@webmail.leidinger.net> <20090129143606.GC17198@hoeg.nl> <20090130085227.957230z897u8viww@webmail.leidinger.net> Message-Id: <508FD1E6-8281-4C9E-A495-AE435447C636@freebsd.org> Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-3--438256651" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Sat, 31 Jan 2009 16:31:37 +0000 X-Pgp-Agent: GPGMail 1.2.0 (v56) X-Mailer: Apple Mail (2.930.3) Cc: Ed Schouten , Daniel Lannstrom , FreeBSD Hackers Subject: Re: Mackbook pro nvidia based video backlight X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2009 16:31:44 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-3--438256651 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On 30 Jan 2009, at 07:52, Alexander Leidinger wrote: > Quoting Ed Schouten (from Thu, 29 Jan 2009 15:36:06 > +0100): > >> * Alexander Leidinger wrote: >>> So you want that either >>> - a daemon running as root is written which listens to user >>> requests to set the backlight via sysctl >>> or >>> - a SUID root program is written that sets the backlight >>> via sysctl >>> instead of >>> - a character device with appropriate filesystem permissions >>> which allows to not go the SUID root or daemon running as >>> root way >>> ? >> >> Yes. The primary reason is that it is more consistent with the rest >> of >> the operating system. powerd also uses sysctl's instead of a >> character >> device, for example. > > Powerd does not interact with the user, it is doing automatic power > management. A backlight on the other hand needs to be adjustable by > the user. > > Normally I would expect some keys on the keyboard to handle this, so > there should be no need to have some userland stuff, but as I don't > know about how Apple is doing this, I assume there's some valid > reason to handle it from userland. But then there needs to be some > easy way to let an user handle it, even if you are on the console. A > separate daemon or a SUID root program to control the backlight > sounds like overkill to me. Well, easy: only let the operator group change the sysctl and add your appropriate user accounts to the operator group. No daemon is needed. This is what I thought about when doing the Intel backlight driver, but I never actually did it. Regards, -- Rui Paulo --Apple-Mail-3--438256651 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) iEUEARECAAYFAkmEfOkACgkQfD8M/ASTygJ9xQCVFEaOpr7Oj1sC8kuvRyH2Hwqu rgCcCVy3U2WaQWg/8MCYaVV8BJookbE= =VKiZ -----END PGP SIGNATURE----- --Apple-Mail-3--438256651--