obexapp 1.4.5

Iain Hibbert plunky at rya-online.net
Wed Feb 21 22:34:54 UTC 2007


On Wed, 21 Feb 2007, Maksim Yevmenkin wrote:
> 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 think the problem with my implementation of this is that the SCM_CREDS
information is sent alongside the first normal message, and because that
are not sent until after the setuid(), the credentials have changed..

As I recall, for PEER_CREDS, sdpd actively queries the remote credentials
when as the socket is open - (it seems that a slight race condition could
exist there, or are the credentials passed the ones that were used to open
the socket?)

I will look into this a bit more, maybe if I arrange to send() an zero
length message before changing the uid it may work, though I'm not sure
how well sdpd will handle that..

iain


More information about the freebsd-bluetooth mailing list