change rpcclient dfsgetinfo path syntax ?

Andreas Schneider asn at samba.org
Mon Jun 12 12:19:12 UTC 2023


On Friday, 9 June 2023 17:24:57 CEST Pavel Filipenský via samba-technical 
wrote:
> Hi,
> 
> with samba 4.17.5 following syntax was fine (consider that all
> backslashes are escaped, so every backslash appears twice at the command
> line)
> 
> $ rpcclient localhost -U% -c
> 'dfsgetinfo**\\\\localhost\\samba-share\\pointA localhost pointA'
> 
> with samba 4.18.2 only this works:
> 
> $ rpcclient localhost -U% -c 'dfsgetinfo \\localhost\samba-share\pointA
> localhost point'
> 
> Looking into /var/log/samba/log.rpcd_classic shows that:
> - 4.17 is using parse_dfs_path() with trim_char(p, '/', '/')
> - 4.18 is using parse_dfs_path_strict() that does not trim anything and
> assumes single '\'

Looking at the commit message of 06750a96 Jeremy wrote:

  The paths sent in these calls are guaranteed to be of canonical form: 

  \SERVER\share\pathname

This means in rpcclient you need to check if the path start with \\ and remove 
one before handing it down to that function.

Obviously we need an rpcclient test for this ...


Best regards


	Andreas


-- 
Andreas Schneider                      asn at samba.org
Samba Team                             www.samba.org
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D





More information about the samba-technical mailing list