Page MenuHomeFreeBSD

usr.sbin/praudit: fix tests after 5619d49e07
ClosedPublic

Authored by arichardson on Feb 2 2021, 3:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 29 2024, 8:13 PM
Unknown Object (File)
Sep 27 2024, 7:48 PM
Unknown Object (File)
Sep 27 2024, 4:52 PM
Unknown Object (File)
Sep 25 2024, 4:07 PM
Unknown Object (File)
Sep 24 2024, 5:23 AM
Unknown Object (File)
Sep 8 2024, 2:04 AM
Unknown Object (File)
Sep 8 2024, 12:28 AM
Unknown Object (File)
Sep 6 2024, 8:30 AM
Subscribers

Details

Summary

Commit 5619d49e07 made the getgrgid() call inside bsm work as
intended so we now print "wheel" instead of a numeric 0 in the rgid field.

Test Plan

Before: 2/10 passed (8 failed)
After: 10/10 passed (0 failed)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

The old tests still pass on my system (built Jan-9-2021). Can you figure out what's different about yours?

The old tests still pass on my system (built Jan-9-2021). Can you figure out what's different about yours?

I built d21ce74dcce6f8b69451b3b2dd291d35cbb70609 with D28451. The tests are failing on RISC-V/AArch64/Amd64 and I can't see any obvious commits since 9th Jan.

The old tests still pass on my system (built Jan-9-2021). Can you figure out what's different about yours?

I built d21ce74dcce6f8b69451b3b2dd291d35cbb70609 with D28451. The tests are failing on RISC-V/AArch64/Amd64 and I can't see any obvious commits since 9th Jan.

Yes, it fails for me too, now that I've updated. From the source code of openbsm, it looks like getgrgid wasn't working before, and is now. The change might be related to the recently fixed https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252094 or https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=165527 ?

arichardson retitled this revision from usr.sbin/praudit: fix tests to usr.sbin/praudit: fix tests after 5619d49e07.Feb 3 2021, 9:50 AM
arichardson edited the summary of this revision. (Show Details)
arichardson edited the test plan for this revision. (Show Details)
arichardson added a reviewer: markj.

I just ran the tests with 5619d49e07d3942e438f3d06269f3c1c466cf5b7 built and they fail, whereas with commit 7abc10098b3d9c23d611294714b3058e8048aec0 (the one before) they still print the numeric 0.

Thanks for fixing this and sorry for the breakage. I had run a subset of the test suite but clearly should have run the whole thing.

The problem seems to be that praudit() expects setgroupent(1) to work since it runs in capability mode and can't open the group database after initialization. 48a186863431ec7a23c6174bc376cafa59dd5fbf fixes that. I suspect running the tests with kern.trap_enotcap=1 would cause them to crash before the fix.

This revision is now accepted and ready to land.Feb 3 2021, 1:53 PM