a become_user() function that can be called from smbpasswd command

Luke Kenneth Casson Leighton lkcl at cb1.com
Tue May 12 10:57:04 GMT 1998


andrew,

i would like to get the correct lp_xxx() substitutions in parameters, from
smbpasswd or other utilities, when calling the new getsam21pwnam() 
function.  this calls getsmb21pwnam() ifndef LDAP, which then copies
lp_logon_path() and lp_logon_script() and such-like into the struct
sam_passwd return result.

the lp_xxx() parameters, however, are not going to have the correct
information, because become_user() and reload_services() will not have
been called.

become_user() is an smbd-dependent function, which is a bit of a downer.

there are a setof %<x> substitutions which need to be set, such that
reload_services() can be called properly: assuming that a mechanism exists
(either by specifying them in a swat advanced option or by specifying them
all on the smbpasswd command-line or something horrible), what are the
chances of writing a become_user() function that does not depend on
connection_struct and user_struct, but is functionally identical?

luke




More information about the samba-technical mailing list