smbd's eye view of all parameters and services

Steve Litt slitt at
Thu Oct 14 02:51:01 GMT 1999

Hi everyone,

Today I had this insatiable urge to know *exactly* what Samba thought my
print command was (I don't have one in smb.conf). Testparm and SWAT both
got the wrong answer, as proved when I hard coded its returned value into a
printer share (the printer share stopped printing). Indeed, init_locals()
in loadparm.c showed what was going on.

It looks to me like there's a ready-made function to do what I want. It
looks to me like a call to 

lp_dump(openfileptr, 1, lp_numservices());

would put the entire configuration, as smbd sees it, defaults and all, into
the file. The file can then be grepped for the needed info. Has anyone
inserted that in smbd in such a way it could be triggered by a signal or
anything like that? I couldn't find it, but maybe I didn't know where to
look. If nobody's done it, any idea where to place it? Any opinions on what
should be used to trigger it? Is this a good idea, or am I missing something?


Steve Litt

More information about the samba mailing list