Simon Josefsson <[email protected]> writes: > Mats Erik Andersson <[email protected]> writes: > >> onsdag den 14 mars 2012 klockan 08:43 skrev Simon Josefsson detta: >>> Mats Erik Andersson <[email protected]> writes: >>> >>> > The test script is problematic: >>> > >>> > b) A particular system may be legally set up in a manner that >>> > a non-fully qualified host name is returned by xgethostname() >>> > and ensuing resolution. This can be accomplished by >>> > >>> > # /etc/hosts >>> > 10.0.1.1 dag dag.utan.ljus >>> > >>> > # /etc/nsswitch.conf >>> > hosts files dns >>> > >>> > $ hostname >>> > dag >>> > >>> > Thus "dnsdomainname" fails with "cannot qualify host name: dag", >>> > again producing a false negative in the test script. This happened >>> > to be the case on my OpenSolaris/OpenIndiana systems! >>> > >>> > The test script should report "skipping" in either of the above cases. >>> >>> You are right. I pushed a patch that should make the self-test pass, >>> however it would nice to improve it eventually to other error situations >>> (I've added a FIXME discussing this). I can't think of any easy way to >>> do that in a portable way though. >> >> I think we can defend code in "src/dnsdomainname.c" which returns >> the empty string in the second of my cases, and doing so with exit >> status naught, thus claiming normal condition. > > I agree, Debian's dnsdomainname appears to behave that way already.
I have fixed this now. Thanks, /Simon
