Page MenuHomeFreeBSD

Casper new architecture.
ClosedPublic

Authored by oshogbo on Nov 25 2015, 9:20 PM.
Referenced Files
F105712370: D4277.diff
Thu, Dec 19, 2:02 PM
Unknown Object (File)
Sun, Dec 8, 9:41 PM
Unknown Object (File)
Tue, Dec 3, 12:40 PM
Unknown Object (File)
Sat, Nov 30, 9:47 AM
Unknown Object (File)
Fri, Nov 29, 7:11 AM
Unknown Object (File)
Oct 3 2024, 2:16 PM
Unknown Object (File)
Oct 3 2024, 7:56 AM
Unknown Object (File)
Oct 1 2024, 1:17 PM

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

oshogbo retitled this revision from to Casper new architecture..
oshogbo updated this object.
oshogbo edited the test plan for this revision. (Show Details)
oshogbo added a reviewer: jonathan.
oshogbo added a project: capsicum.

I *think* that nvlist_add_string() and friends don't cope with a NULL value, which means that all of the places where optional strings turn up in an API need to cope with absence. I've commented on a few such places, but there's probably more...

lib/libcasper/services/cap_dns/cap_dns.c
198

Should this be prefixed with a if (nvlist_exists_string(nvl, "ai_canonname")), plus an initialization of canonname to NULL above?

228–229

Either one of hostname/servname can be NULL, which I don't think nvlist_add_string() copes with.

299

add && nvlist_exists_string(nvl, "host") ?

301

add && nvlist_exists_string(nvl, "serv") ?

517

Need to initialize both of these to NULL I think

577

check that host/serv are != NULL ?

597

Check for ai->ai_canonname == NULL?

616

Can hostname/servname be absent?

tools/regression/capsicum/libcasper/dns.c
49

Presumably these tests haven't been updated yet?

Update according to David suggestion.
I forgot to commit changes about test, thanks!
You make very good points.

oshogbo added inline comments.
lib/libcasper/services/cap_dns/cap_dns.c
198

dnvlist will be bather here but you are right we should check this value.

517

It's done.
Just before memset.

oshogbo added a reviewer: ed.
oshogbo added subscribers: rwatson, pjd.
bdrewery requested changes to this revision.Jan 8 2016, 6:55 PM
bdrewery added a reviewer: bdrewery.

Please also update these as needed:

targets/pseudo/userland/Makefile.depend:DIRDEPS+= sbin/casperd
targets/pseudo/userland/lib/Makefile.depend: lib/libcasper \
targets/pseudo/userland/libexec/Makefile.depend: libexec/casper/dns \
targets/pseudo/userland/libexec/Makefile.depend: libexec/casper/grp \
targets/pseudo/userland/libexec/Makefile.depend: libexec/casper/pwd \
targets/pseudo/userland/libexec/Makefile.depend: libexec/casper/random \
targets/pseudo/userland/libexec/Makefile.depend: libexec/casper/sysctl \

Makefile.inc1
551

This change should not be needed. The change in etc/mtree/BSD.root.dist will create the directory.

This revision now requires changes to proceed.Jan 8 2016, 6:55 PM
oshogbo edited edge metadata.

I updated Makefile.depnd which was pointed out byt @bdrewery.
I update also some dependencies in libnames and BSD.debug.dist.

This revision was automatically updated to reflect the committed changes.