libcasper/cap_grp tests: Reset the group database handle
Some tests verify that the capgrp capability does not permit calls to setgrent(3), but all tests need to ensure that they reset the capability's group database handle, otherwise the local process and casper process will be out of sync. The cap_pwd tests already handle this. Sponsored by: The FreeBSD Foundation MFC after: 1 month
This commit is contained in:
parent
48a1868634
commit
1a05d9519d
@ -321,6 +321,8 @@ test_cmds(cap_channel_t *origcapgrp)
|
|||||||
capgrp = cap_clone(origcapgrp);
|
capgrp = cap_clone(origcapgrp);
|
||||||
CHECK(capgrp != NULL);
|
CHECK(capgrp != NULL);
|
||||||
|
|
||||||
|
cap_setgrent(capgrp);
|
||||||
|
|
||||||
cmds[0] = "getgrent";
|
cmds[0] = "getgrent";
|
||||||
cmds[1] = "getgrent_r";
|
cmds[1] = "getgrent_r";
|
||||||
cmds[2] = "getgrnam";
|
cmds[2] = "getgrnam";
|
||||||
@ -361,6 +363,8 @@ test_cmds(cap_channel_t *origcapgrp)
|
|||||||
capgrp = cap_clone(origcapgrp);
|
capgrp = cap_clone(origcapgrp);
|
||||||
CHECK(capgrp != NULL);
|
CHECK(capgrp != NULL);
|
||||||
|
|
||||||
|
cap_setgrent(capgrp);
|
||||||
|
|
||||||
cmds[0] = "getgrent";
|
cmds[0] = "getgrent";
|
||||||
cmds[1] = "getgrent_r";
|
cmds[1] = "getgrent_r";
|
||||||
cmds[2] = "getgrnam";
|
cmds[2] = "getgrnam";
|
||||||
|
Loading…
Reference in New Issue
Block a user