From owner-freebsd-bluetooth@FreeBSD.ORG Wed Mar 8 00:56:17 2006 Return-Path: X-Original-To: freebsd-bluetooth@FreeBSD.org Delivered-To: freebsd-bluetooth@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 93D5C16A420 for ; Wed, 8 Mar 2006 00:56:17 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: from mail02.svc.cra.dublin.eircom.net (mail02.svc.cra.dublin.eircom.net [159.134.118.18]) by mx1.FreeBSD.org (Postfix) with SMTP id 051A543D4C for ; Wed, 8 Mar 2006 00:56:16 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: (qmail 34313 messnum 5244129 invoked from network[83.70.176.191/unknown]); 8 Mar 2006 00:56:15 -0000 Received: from unknown (HELO rya-online.net) (83.70.176.191) by mail02.svc.cra.dublin.eircom.net (qp 34313) with SMTP; 8 Mar 2006 00:56:15 -0000 Received: (nullmailer pid 3950 invoked by uid 1000); Wed, 08 Mar 2006 00:55:42 -0000 Date: Wed, 8 Mar 2006 00:55:42 +0000 (GMT) To: Maksim Yevmenkin In-Reply-To: <440E1988.10202@savvis.net> References: <440DCFF0.6090809@savvis.net> <1141761895.037384.5308.nullmailer@galant.ukfsn.org> <440DF38F.7020707@savvis.net> <1141772196.551930.3681.nullmailer@galant.ukfsn.org> <440E1988.10202@savvis.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1141779342.768110.17808.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@FreeBSD.org Subject: Re: apple bluetooth keyboard X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Mar 2006 00:56:17 -0000 On Tue, 7 Mar 2006, Maksim Yevmenkin wrote: > well, this is the completely different can of worms. both hcid (in linux) and > hcsecd(8) (in freebsd), to some extend, assume that there is only one user. > > bluepin is just x11 application. it will display windows on whatever DISPLAY > is set at the moment. yes, but hcsecd cannot start it, because hcsecd is a different uid and has no permissions to access the display.. besides, it is not the function of a daemon to put windows on the display. Displays belong to users, if there are any. If they want windows to open, they will run programs that do that. > > If user 'blue' wants to enable pin code requests, he can run the pin > > program (maybe from .login) and it would open the control socket (which > > can have ownership and permissions specified?) and sleep, listening for > > pin requests, and wake up with a window when something happens. > > > > If user 'red' does not care about bluetooth, she just does nothing and > > will never be bothered. > may be. but what if user 'red' also wants to run pin program. now hcsecd(8) > will have two control pipes. which pipe should it use? should it use both? are > you suggesting that hcsecd(8) should be configured to redirect pin requests > from specific devices to specific pipe? that could be problematic - can a unix domain socket be opened by multiple users for read/write? In fact, multiple simultaneous users gets ugly, as sockets in general do not have access permissions in any case - if user 'blue' opens the baseband connection, then 'red' can access the device through another L2CAP or RFCOMM socket (well, they can in my world :) > btw, what usage scenario do you have in mind that requires multiple users to > access the same (or multiple) bluetooth devices on the same host? my thought was that users might be consecutive > so, i think, the something like bluepin will work just fine. the only issue > here is that user required to run gui. well, if you are trying to set up a pairing to another device from a computer with only a text console, you can always add the pin code to the config file directly? then hcsecd could use LOG_NOTICE instead of LOG_DEBUG at this point. alternatively, a helper application could be run in advance, if hcsecd would remember a given pin/device combo for N seconds % tiepin -a phone 1234 % rfcomm_sppd -a phone ? I can't think any more, its too late. iain