Hi Paride, Yeah, I checked the changelog for 4.13.14+dfsg-0ubuntu0.20.04.2 and the minor change reported there did not sound like it would have any relation to the behavior I've described. But none the less, I am confident I see a difference between the .1 and .2 set of packages.
I've created a few Docker containers that demonstrate this on a 'clean' system based on the ubuntu:20.04 image. See: https://gitlab.developers.cam.ac.uk/alt36/lp1952633 The Dockerfile in all three directories is identical, except when they explicitly install either the .1 or the .2 packages. The only other difference between the three directories is in smb.conf: the .1 and .2-dynamic versions have "include = /data/config/%i/shares", whilst the .2-static version has "include = /data/config/127.0.0.1/shares". In each case, the share definition which should be included has a root preexec script which is called with %i as an argument, and that script just echoes the arguments to a log file. The containers each run demo.sh which will: 1. start smbd 2. run a "smbclient ls" command 3. cat the logfile contents. The gitlab repo has an associated docker container registry with images I've pushed for each of the three Dockerfiles, so you should be able to repeat the following... Using the .1 packages. The "smbclient ls" succeeds, and the logfile contains 127.0.0.1 as expected: $ docker run --rm registry.gitlab.developers.cam.ac.uk/alt36/lp1952633:20.04.1 * Starting SMB/CIFS daemon smbd ...done. . D 0 Thu Dec 2 18:32:07 2021 .. D 0 Thu Dec 2 18:32:08 2021 examplefile N 0 Thu Dec 2 18:32:07 2021 61794184 blocks of size 1024. 15564168 blocks available Output of "prexec.sh %i:" 127.0.0.1 * Stopping SMB/CIFS daemon smbd ...done. Using the .2 packages and an 'include' which does not use %i. The share definition is included and the "smbclient ls" succeeds, but the logfile now contains 0.0.0.0 $ docker run --rm registry.gitlab.developers.cam.ac.uk/alt36/lp1952633:20.04.2-static * Starting SMB/CIFS daemon smbd ...done. . D 0 Thu Dec 2 18:36:53 2021 .. D 0 Thu Dec 2 18:36:54 2021 examplefile N 0 Thu Dec 2 18:36:53 2021 61794184 blocks of size 1024. 15564152 blocks available Output of "prexec.sh %i:" 0.0.0.0 * Stopping SMB/CIFS daemon smbd ...done. Finally, using the .2 packages and an 'include' using %i. smbclient does not connect, and thus the logfile doesn't exist because we don't get as far as running the root preexec script specified in the share definition $ docker run --rm registry.gitlab.developers.cam.ac.uk/alt36/lp1952633:20.04.2-dynamic * Starting SMB/CIFS daemon smbd ...done. tree connect failed: NT_STATUS_BAD_NETWORK_NAME Output of "prexec.sh %i:" cat: /tmp/preexec.log: No such file or directory * Stopping SMB/CIFS daemon smbd ...done. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1952633 Title: %i token does not expand on 4.13.14+dfsg-0ubuntu0.20.04.2 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1952633/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
