Bug 14945 - "smbd --build-options" no longer works without an smb.conf file
Summary: "smbd --build-options" no longer works without an smb.conf file
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: 4.15.3
Hardware: All All
: P5 regression (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
Depends on:
Reported: 2022-01-12 22:36 UTC by David Disseldorp
Modified: 2022-01-19 15:29 UTC (History)
4 users (show)

See Also:

patch for master (1.58 KB, patch)
2022-01-13 14:34 UTC, Andreas Schneider
asn: review? (ddiss)
metze: review+
Patch for v4-15-test (1.72 KB, patch)
2022-01-17 14:10 UTC, Stefan Metzmacher
asn: review+
ddiss: review+

Note You need to log in before you can comment on or make changes to this bug.
Description David Disseldorp 2022-01-12 22:36:22 UTC
With Samba 4.15.3, "smbd -b" fails if a file can't be opened at the CONFIGFILE path. With 4.14.11 and prior this worked just fine, hence why I've raised this as a regression (should be low priority though).

Workaround is to pass "smbd -b -s /dev/null", but that doesn't allow for discovery of the actual CONFIGFILE build path (it shows /dev/null).
Comment 1 David Disseldorp 2022-01-13 10:10:52 UTC
I bisected this regression down to:

commit d8f84205337a8baae7f4057a042e74b3d1c3633a
Author: Andreas Schneider <asn@samba.org>
Date:   Tue Jan 5 14:35:39 2021 +0100

    s3:smbd: Migrate smbd to new cmdline option parser
    Signed-off-by: Andreas Schneider <asn@samba.org>
    Reviewed-by: Andrew Bartlett <abartlet@samba.org>

@Andreas: would you mind picking up this ticket?
Comment 2 Andreas Schneider 2022-01-13 14:34:12 UTC
Created attachment 17083 [details]
patch for master

Dave, could you please test if this works for you?
Comment 3 Stefan Metzmacher 2022-01-17 13:01:15 UTC
Comment on attachment 17083 [details]
patch for master

I think that's fine, can you create a merge request, so that we can get this into 4.15.4 (in 2 days)?
Comment 4 Samba QA Contact 2022-01-17 13:18:03 UTC
This bug was referenced in samba master:

Comment 5 Stefan Metzmacher 2022-01-17 14:10:39 UTC
Created attachment 17097 [details]
Patch for v4-15-test
Comment 6 Andreas Schneider 2022-01-17 14:29:52 UTC
Jule, please apply the patch to 4.15. Thanks!
Comment 7 Jule Anger 2022-01-18 17:39:38 UTC
Pushed to autobuild-v4-15-test.
Comment 8 Samba QA Contact 2022-01-18 18:43:04 UTC
This bug was referenced in samba v4-15-test:

Comment 9 Jule Anger 2022-01-18 19:26:58 UTC
Closing out bug report.

Comment 10 Samba QA Contact 2022-01-19 15:29:08 UTC
This bug was referenced in samba v4-15-stable (Release samba-4.15.4):