summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bluetooth/sdpd/sur.c
diff options
context:
space:
mode:
authoremax <emax@FreeBSD.org>2005-12-06 17:56:36 +0000
committeremax <emax@FreeBSD.org>2005-12-06 17:56:36 +0000
commit33f5a902c54a3c48d2ad668c3399f8b5d3cbe1aa (patch)
treefb49b5260c303252ffc020521385ecddc194bd1e /usr.sbin/bluetooth/sdpd/sur.c
parentad3630f76e09394ffde1515f25e05b7be7f30eff (diff)
downloadFreeBSD-src-33f5a902c54a3c48d2ad668c3399f8b5d3cbe1aa.zip
FreeBSD-src-33f5a902c54a3c48d2ad668c3399f8b5d3cbe1aa.tar.gz
Teach sdpd(8) to check peer's credentials before accepting request to
register, remove or change services in the local database. For now only accept the request if the peer has effective user ID the same as 'root' user ID. MFC after: 1 week
Diffstat (limited to 'usr.sbin/bluetooth/sdpd/sur.c')
-rw-r--r--usr.sbin/bluetooth/sdpd/sur.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/bluetooth/sdpd/sur.c b/usr.sbin/bluetooth/sdpd/sur.c
index 6d7f778..143eaf3 100644
--- a/usr.sbin/bluetooth/sdpd/sur.c
+++ b/usr.sbin/bluetooth/sdpd/sur.c
@@ -58,7 +58,8 @@ server_prepare_service_unregister_response(server_p srv, int32_t fd)
* value32 - uuid 4 bytes
*/
- if (!srv->fdidx[fd].control || req_end - req < 4)
+ if (!srv->fdidx[fd].control ||
+ !srv->fdidx[fd].priv || req_end - req < 4)
return (SDP_ERROR_CODE_INVALID_REQUEST_SYNTAX);
/* Get handle */
OpenPOWER on IntegriCloud