Bug 9192 - svcctl list option prohibits smbd to start
Summary: svcctl list option prohibits smbd to start
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.6
Classification: Unclassified
Component: Config Files (show other bugs)
Version: 3.6.7
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-21 18:08 UTC by Vladimír Marek
Modified: 2012-10-02 06:57 UTC (History)
0 users

See Also:


Attachments
v4-0-test patch (1.03 KB, patch)
2012-10-01 08:31 UTC, Andreas Schneider
asn: review? (jra)
Details
v3-6-test patch (1.03 KB, patch)
2012-10-01 08:32 UTC, Andreas Schneider
jra: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimír Marek 2012-09-21 18:08:26 UTC
Recently we got new bug opened about

[general]
svcctl list = apache

causing

$ smbd -i
smbd version 3.6.7 started.
Copyright Andrew Tridgell and the Samba Team 1992-2011
Ignoring unknown parameter "idmap alloc backend"
Ignoring unknown parameter "idmap alloc backend"
rpc_srv_register: Failed to call the svcctl init function!

$ echo $?
1


After a bit of debugging, it seems that it's caused by

http://gitweb.samba.org/?p=samba.git;a=blob;f=source3/rpc_server/svcctl/srv_svcctl_reg.c;h=c3ce43f305ebe7e958d6060b3a0c54481cbd856d;hb=HEAD#l395

source3/rpc_server/svcctl/srv_svcctl_reg.c:

 395         if (ipath == NULL || dname == NULL || description == NULL) {
 396                 goto done;
 397         }


The for cycle just above walks through builtin services (Spooler, NETLOGON,
RemoteRegistry, WINS). When it does not find a match, which is the case of
custom service entered in samba config, it keeps ipath, dname and description
NULL. Thus there is no chance of going to line 400 where custom external
services should be taken into account.

When I remove the lines 395 - 397, samba starts up correctly.
Comment 1 Karolin Seeger 2012-09-28 06:43:53 UTC
Re-assigning to Andreas for investigation.

Andreas, please feel free to re-assign to someone else.
Comment 2 Andreas Schneider 2012-10-01 08:31:44 UTC
Created attachment 7963 [details]
v4-0-test patch
Comment 3 Andreas Schneider 2012-10-01 08:32:36 UTC
Created attachment 7964 [details]
v3-6-test patch
Comment 4 Vladimír Marek 2012-10-01 09:17:51 UTC
I can confirm that the 3.6 test patch works for me. I don't deal with samba 4 (yet).

Thank you
-- 
  Vlad
Comment 5 Jeremy Allison 2012-10-01 17:36:40 UTC
Re-assigning to Karolin for inclusion in 3.6.next and 4.0.0rc2.
Jeremy.
Comment 6 Karolin Seeger 2012-10-02 06:57:57 UTC
Pushed to autobuild-v4-0-test and v3-6-test.
Closing out bug report.

Thanks!