The testparm(1) man page says: If testparm finds an error in the smb.conf file it returns an exit code of 1 to the calling program, else it returns an exit code of 0. This allows shell scripts to test the output from testparm. Yet when I try running testparm on invalid files, it exits with 0. E.g.: testparm /bin/cat produces the following output (cut and pasted from another window:) $ testparm -s -x /bin/cat Load smb config files from /bin/cat params.c:Parameter() - Unexpected end-of-file at: ELF Loaded services file OK. # Global parameters [global] $ echo $? 0 $ ----end of cut and paste---- I see this on RH 8.0 with the following RH produced samba rpm's: samba-common-2.2.7-4.8.0 samba-swat-2.2.7-4.8.0 samba-client-2.2.7-4.8.0 samba-2.2.7-4.8.0 and on Fedora Core 3 with the following RH produced samba rpm's: samba-client-3.0.10-1.fc3 samba-common-3.0.10-1.fc3 system-config-samba-1.2.28-0.fc3.1 samba-swat-3.0.10-1.fc3 samba-3.0.10-1.fc3 I did check over at RedHat's bugzilla, but did not find this bug reported there, either.
Created attachment 6103 [details] return false on EOF
The comment says: /* Shouldn't have EOF within param name. */ Isn't this a have-to-be error situation where it's fine to return false? Please see comment#1.
Pushed to v3-6-test and master. Holger, do you think this belongs in 3.5.7 ? Jeremy.
Created attachment 6108 [details] Patch for v3-5-test Yes Jeremy, I've attached a patch for cherry-picking to v3-5-test.
Comment on attachment 6108 [details] Patch for v3-5-test +1 from me.
Re-assigning to Karolin for inclusion in 3.5.next. Jeremy.
Pushed to v3-5-test. Closing out bug report. Thanks!