Drop group privileges after opening the kvm descriptor, otherwise, the code
authordelphij <delphij@FreeBSD.org>
Tue, 1 Sep 2015 06:28:16 +0000 (06:28 +0000)
committerdelphij <delphij@FreeBSD.org>
Tue, 1 Sep 2015 06:28:16 +0000 (06:28 +0000)
commit061b55cf1969e8b2c2bca1d8c94923962d4c4283
treeb07e881008b8530903d7956df6e165df1dc6ccf9
parent663f8328dc413447d38e4db62dad8cb381438350
Drop group privileges after opening the kvm descriptor, otherwise, the code
would not drop privileges as expected.

While there also add checks for the drop and bail out immediately if we
failed.

MFC after: 3 days
usr.bin/bluetooth/btsockstat/btsockstat.c