Details
- Reviewers
ed jonathan bdrewery - Commits
- rS296047: Convert casperd(8) daemon to the libcasper.
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
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.
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. |
I updated Makefile.depnd which was pointed out byt @bdrewery.
I update also some dependencies in libnames and BSD.debug.dist.