Page MenuHomeFreeBSD

Casper new architecture.
ClosedPublic

Authored by oshogbo on Nov 25 2015, 9:20 PM.
Referenced Files
Unknown Object (File)
Mar 18 2024, 1:18 PM
Unknown Object (File)
Mar 10 2024, 7:44 AM
Unknown Object (File)
Mar 10 2024, 7:44 AM
Unknown Object (File)
Mar 10 2024, 7:44 AM
Unknown Object (File)
Feb 23 2024, 3:36 PM
Unknown Object (File)
Jan 31 2024, 1:11 PM
Unknown Object (File)
Jan 26 2024, 11:00 AM
Unknown Object (File)
Jan 24 2024, 1:54 AM

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
199

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

229–230

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

300

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

302

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

518

Need to initialize both of these to NULL I think

578

check that host/serv are != NULL ?

598

Check for ai->ai_canonname == NULL?

617

Can hostname/servname be absent?

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

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
199

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

518

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.