From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 31 16:30:59 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 B3BA410656BC for ; Sat, 31 Jan 2009 16:30:59 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.187]) by mx1.freebsd.org (Postfix) with ESMTP id 2F1BE8FC12 for ; Sat, 31 Jan 2009 16:30:59 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by nf-out-0910.google.com with SMTP id h3so135053nfh.33 for ; Sat, 31 Jan 2009 08:30:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received: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=w1BaNMxfj5055S51IKAKtgoJlzuYZON3q7Q1B+LjZyQ=; b=Q04LU8BvKlwaVztzVwsTcvSqkEkeMTDPlTdo1bGNX8fu1tNtUp8W25SxglbOR5aIDO C2OX4OKHMJdrIBetXReJUoLdMszcj6kY4cljUmAidaVIdE2GqLQztLHldwd+fucONuJl fMDZFeo4kt6oW6y4+V6fSoMoc+NfNa9u9jlyc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=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=dQLezDF4WOeB6aijWOKLCwlY5vphuuFzO5ts0Qn4vy7zDPLtZu96SzcyLZHwDzAq5N id+1nFQASnSqXMTN6Mdm7wQytQsibOXjAGMlw085tVcSsme4RRtGCAAo3oHkuUJf+P0d x/RANF6uMPGsj8uh0stmBeP8EvY7pB/AJaz98= Received: by 10.210.87.19 with SMTP id k19mr4566ebb.79.1233419458224; Sat, 31 Jan 2009 08:30:58 -0800 (PST) Received: from epsilon.lan ([83.144.140.27]) by mx.google.com with ESMTPS id q9sm2438054gve.27.2009.01.31.08.30.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 31 Jan 2009 08:30:57 -0800 (PST) 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: <76ADC89F-EFAC-4F45-A0B7-FA58470018DF@gmail.com> Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-2--438304265" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Sat, 31 Jan 2009 16:30:49 +0000 X-Pgp-Agent: GPGMail 1.2.0 (v56) X-Mailer: Apple Mail (2.930.3) X-Mailman-Approved-At: Sat, 31 Jan 2009 16:36:18 +0000 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:00 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-2--438304265 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-2--438304265 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) iEYEARECAAYFAkmEfLkACgkQfD8M/ASTygIX0ACgrI909aI0XUgHgC+PAcHFagNH whcAoJ/DaVTMV16GqPYUoc0m1f3y0v/0 =FMVO -----END PGP SIGNATURE----- --Apple-Mail-2--438304265--