Page MenuHomeFreeBSD

Casper new architecture.
ClosedPublic

Authored by oshogbo on Nov 25 2015, 9:20 PM.
Referenced Files
Unknown Object (File)
Thu, Dec 19, 5:13 PM
Unknown Object (File)
Thu, Dec 19, 4:56 PM
Unknown Object (File)
Thu, Dec 19, 4:52 PM
Unknown Object (File)
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

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.