From owner-freebsd-bluetooth@FreeBSD.ORG Wed Feb 21 17:55:37 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 44D93170467 for ; Wed, 21 Feb 2007 17:55:37 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.228]) by mx1.freebsd.org (Postfix) with ESMTP id 0865E13C481 for ; Wed, 21 Feb 2007 17:55:36 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by nz-out-0506.google.com with SMTP id i11so2612133nzh for ; Wed, 21 Feb 2007 09:55:36 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=OTAMBMK2TNYwbvwUbtIwGKu6JrLy+/97xE236gFxWrv1pprHwW3NY/p+RnYg/2Ag+/UF1lFa3VHs6oPzy0b9byNbrVsGV1F/KJmF9VkYxApfotQYx7Z7bYJTUKJhPRshcPS6lEWYPd3eLqWLnyykvhXSH0XUnTq8wPDGK7P1W+c= Received: by 10.65.100.14 with SMTP id c14mr14419944qbm.1172080536229; Wed, 21 Feb 2007 09:55:36 -0800 (PST) Received: by 10.65.137.17 with HTTP; Wed, 21 Feb 2007 09:55:36 -0800 (PST) Message-ID: Date: Wed, 21 Feb 2007 09:55:36 -0800 From: "Maksim Yevmenkin" To: "Iain Hibbert" In-Reply-To: <1171997469.725737.13812.nullmailer@galant.ukfsn.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1171997469.725737.13812.nullmailer@galant.ukfsn.org> Cc: freebsd-bluetooth@freebsd.org Subject: Re: obexapp 1.4.5 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, 21 Feb 2007 17:55:37 -0000 Iain, > One problem that I have found, is that the "-u" option does not work > properly - well, the setgid()/setuid() does work but the > OBEX_ServerRegister() fails because the process no longer has privilege to > register services.. well, the sdp_session_open() is called before setgid()/setuid() so sdpd will mark this session as "privileged". once sdp session is open, obexapp can drop its privileges and still be able to register service with sdpd. > I had to change the privilege checking part of sdpd(8) for NetBSD since we > do not have the LOCAL_PEERCRED message and I wonder if this is related to > that.. I guess the following works fine in FreeBSD? > > # obexapp -s -S -C 10 -u user yes, it works just fine. i guess, for the sake of compatibility, i could change libsdp/sdpd to something similar to LOCAL_CREDS (or whatever supported by BSDs), where local sdp client is expected to send its credentials right after the session is opened. this would require minor change to libsdp's sdp_open_local and sdpd(8). thanks, max