← Back to team overview

enterprise-support team mailing list archive

[Bug 2039048] [NEW] %i token does not expand on 4.15.13+dfsg-0ubuntu0.20.04.6

 

Public bug reported:

We use samba config files where we use %i to dynamically include config
files dependent upon the IP address that a client connects to. As of
4.15.13+dfsg-0ubuntu0.20.04.6, if I use an "include" line in [global] as
follows:

 include = /etc/samba/%i/shares

and define a simple share definition in
/etc/samba/$SERVER_IP_ADDRESS/shares then I am unable to connect to the
share. Using e.g. smbclient from Focal, I see "tree connect failed:
NT_STATUS_BAD_NETWORK_NAME" on the client. The samba log on the server
reports

[2023/10/11 13:33:28.382049,  2] ../../source3/param/loadparm.c:2512(lp_include)
  Can't find include file /etc/samba/0.0.0.0/shares

Note the presence of "0.0.0.0" rather than the actual IP address of the
server.

If I change the include line to use the hard-coded IP address rather
than %i I can then access the share defined in /etc/samba/1.2.3.4/shares
without problem. (NB replacing the actual IP address I am using with
"1.2.3.4" ...)

My live servers are still running 4.15.13+dfsg-0ubuntu0.20.04.5 and are
succesfully including config files with paths defined using "%i".

This feels reminiscent of
https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1952633/ where we
saw the same behaviour with %i . The actual fault was not identified
conclusively there but was felt to perhaps be due to a buggy build.

** Affects: samba (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server/Client Support Team, which is subscribed to samba in Ubuntu.
Matching subscriptions: Ubuntu Server/Client Support Team
https://bugs.launchpad.net/bugs/2039048

Title:
  %i token does not expand on 4.15.13+dfsg-0ubuntu0.20.04.6

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/samba/+bug/2039048/+subscriptions



Follow ups