svcctl list option prohibits smbd to start

Jeremy Allison jra at samba.org
Mon Sep 17 13:15:01 MDT 2012


On Fri, Aug 31, 2012 at 09:25:14PM +0200, Vladimir Marek wrote:
> Hi,
> 
> 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.
> 
> Are the three lines in question a bug or did I misunderstood the situation?

No, that looks like a bug to me ! We certainly shouldn't be
aborting here as the very next section of code will set up
ipath, dname and description if it's an external servicename.

I'll log a bug and get your fix integrated.

Cheers,

Jeremy.


More information about the samba-technical mailing list