Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Feb 2007 09:55:36 -0800
From:      "Maksim Yevmenkin" <maksim.yevmenkin@gmail.com>
To:        "Iain Hibbert" <plunky@rya-online.net>
Cc:        freebsd-bluetooth@freebsd.org
Subject:   Re: obexapp 1.4.5
Message-ID:  <bb4a86c70702210955p59ee0a28i19ea12c87e48d86a@mail.gmail.com>
In-Reply-To: <1171997469.725737.13812.nullmailer@galant.ukfsn.org>
References:  <bb4a86c70701300920g47111252n9c50cef20221973a@mail.gmail.com> <bb4a86c70701301952y322a5174m762889c986986768@mail.gmail.com> <Pine.NEB.4.64.0702201732410.9463@localhost.> <1171997469.725737.13812.nullmailer@galant.ukfsn.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bb4a86c70702210955p59ee0a28i19ea12c87e48d86a>