[Samba] why auth3_check_password load smb.conf again
Andrew Bartlett
abartlet at samba.org
Thu Sep 26 18:47:06 UTC 2019
On Thu, 2019-09-26 at 11:41 -0700, haihua yang via samba wrote:
> Hi,
> In function auth3_check_password of file source3/auth/auth_ntlmssp.c,
> it
> load smb.conf by lp_load_with_shares(get_dyn_CONFIGFILE());.
> I am wondering why it is needed since smbd has load config before and
> it
> hurts the performance when smb.conf is large.
> Thanks,
> Haihua
It is to allow %U and %m substitutions using the code above that line:
/* The client has given us its machine name (which we only get
over NBT transport).
We need to possibly reload smb.conf if smb.conf includes
depend on the machine name. */
set_remote_machine_name(user_info->workstation_name, True);
/* setup the string used by %U */
/* sub_set_smb_name checks for weird internally */
sub_set_smb_name(user_info->client.account_name);
I hope this helps your investigations,
Andrew Bartlett
--
Andrew Bartlett https://samba.org/~abartlet/
Authentication Developer, Samba Team https://samba.org
Samba Developer, Catalyst IT
https://catalyst.net.nz/services/samba
More information about the samba
mailing list