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
Andrew Bartlett
2019-Sep-26 18:47 UTC
[Samba] why auth3_check_password load smb.conf again
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, > HaihuaIt 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
Apparently Analagous Threads
- Windows AD report KRB5KDC_ERR_ETYPE_NOSUPP when client request AES ticket
- remote name change & machine account creation (Bug ?)
- Illegal instruction: 4 (core dumped) when running testparm & [sn]mbd with default config
- smbclient (Samba 4.9.4) "Unable to initialize messaging context"?
- smbstatus, SWAT, etc. not displaying NetBIOS name for XP SP2 machines