[Samba] why auth3_check_password load smb.conf again
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:
> In function auth3_check_password of file source3/auth/auth_ntlmssp.c,
> 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
> hurts the performance when smb.conf is large.
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. */
/* setup the string used by %U */
/* sub_set_smb_name checks for weird internally */
I hope this helps your investigations,
Andrew Bartlett https://samba.org/~abartlet/
Authentication Developer, Samba Team https://samba.org
Samba Developer, Catalyst IT
More information about the samba