[Samba] Variable %I is '0.0.0.0'

Ralph Boehme slow at samba.org
Mon Jul 31 10:30:08 UTC 2023


On 7/31/23 11:45, Arnaud FLORENT via samba wrote:
> since we upgrade to samba 4.16 on ubuntu 20.04 using www.corpit.ru 
> repository,  we got small issues with variable substitution in NT PDC mode.
> 
> we use "add machine script" to call a script with %u %I
> 
> add machine script = /usr/sbin/s-addmachine %u %I
> 
> 
> with samba 4.15 , %I value was correct (the IP address of the client 
> machine) but with samba 4.16 the value is now 0.0.0.0

this is probably a result of the rewritten RPC service infrastructure. 
RPC services now run in seperate processes started from the RPC process 
controller samba-dcerpcd. Due to this some state needed for the variable 
substitution is not present in the RPC service when expanding variables.

%I is likely one of them though I wonder whether lp_add_machine_script() 
is actually called in RPC context or just as part of the SMB 
authentication. This is going to depend on the vector you're using to 
triggert this.

> any ideas to correct this please?

we have some ideas about making to propegate more state from the SMB 
session process to the RPC service, but due to lack of interested 
parties funding the work, this has not materialized yet.

-slow

-- 
Ralph Boehme, Samba Team                      https://samba.org/
SerNet Samba Team Lead                     https://sernet.de/en/
SAMBA+ Samba Packages                        https://samba.plus/
SAMBA+ Webinars                https://samba.plus/samba-webinars

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba/attachments/20230731/70c24a57/OpenPGP_signature.sig>


More information about the samba mailing list