Activity log for bug #1792400

Date Who What changed Old value New value Message
2018-09-13 15:15:23 Markus bug added bug
2018-09-13 15:21:49 Markus description Setup: install smbd in host and lxd-container. Now restart smbd in host: service smbd restart All is OK. Problem: nmap shows "closed" on ports 139 and 445. And users cannot use smbd server in host. ● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd) Loaded: loaded (/etc/init.d/smbd; bad; vendor preset: enabled) Active: active (exited) since Die 2016-10-18 17:35:23 CEST; 2s ago Docs: man:systemd-sysv-generator(8) Process: 24218 ExecStop=/etc/init.d/smbd stop (code=exited, status=0/SUCCESS) Process: 21980 ExecReload=/etc/init.d/smbd reload (code=exited, status=0/SUCCESS) Process: 25190 ExecStart=/etc/init.d/smbd start (code=exited, status=0/SUCCESS) Okt 18 17:35:22 speedy systemd[1]: Starting LSB: start Samba SMB/CIFS daemon (smbd)... Okt 18 17:35:23 speedy smbd[25190]: * Starting SMB/CIFS daemon smbd Okt 18 17:35:23 speedy smbd[25190]: ...done. Okt 18 17:35:23 speedy systemd[1]: Started LSB: start Samba SMB/CIFS daemon (smbd). ps axf | grep smbd: 25356 pts/2 S+ 0:00 | \_ grep --color=auto smbd 19915 ? Ss 0:08 \_ /usr/sbin/smbd -D 19919 ? S 0:00 \_ /usr/sbin/smbd -D However, netstat -tpln | grep "smbd" returns nothing and also nmap shows "closed" on ports 139 and 445. Workaround: change /etc/init.d/smbd: if ! start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/smbd -- -D ; then to if ! start-stop-daemon --start --quiet --oknodo --pidfile /var/run/samba/smbd.pid --exec /usr/sbin/smbd -- -D ; then I reported this to: https://discuss.linuxcontainers.org/t/samba-in-host-and-container/2523 apt-cache policy samba samba: Installed: 2:4.3.11+dfsg-0ubuntu0.16.04.15 Candidate: 2:4.3.11+dfsg-0ubuntu0.16.04.16 Version table: 2:4.3.11+dfsg-0ubuntu0.16.04.16 500 500 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages *** 2:4.3.11+dfsg-0ubuntu0.16.04.15 500 500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages 100 /var/lib/dpkg/status 2:4.3.8+dfsg-0ubuntu1 500 500 http://de.archive.ubuntu.com/ubuntu xenial/main amd64 Packages Setup: install smbd in host and lxd-container. Now restart smbd in host: service smbd restart All is OK. Problem: nmap shows "closed" on ports 139 and 445. And users cannot use smbd server in host.   ● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)    Loaded: loaded (/etc/init.d/smbd; bad; vendor preset: enabled)    Active: active (exited) since Die 2016-10-18 17:35:23 CEST; 2s ago      Docs: man:systemd-sysv-generator(8)   Process: 24218 ExecStop=/etc/init.d/smbd stop (code=exited, status=0/SUCCESS)   Process: 21980 ExecReload=/etc/init.d/smbd reload (code=exited, status=0/SUCCESS)   Process: 25190 ExecStart=/etc/init.d/smbd start (code=exited, status=0/SUCCESS) Okt 18 17:35:22 speedy systemd[1]: Starting LSB: start Samba SMB/CIFS daemon (smbd)... Okt 18 17:35:23 speedy smbd[25190]: * Starting SMB/CIFS daemon smbd Okt 18 17:35:23 speedy smbd[25190]: ...done. Okt 18 17:35:23 speedy systemd[1]: Started LSB: start Samba SMB/CIFS daemon (smbd). ps axf | grep smbd: 25356 pts/2 S+ 0:00 | \_ grep --color=auto smbd 19915 ? Ss 0:08 \_ /usr/sbin/smbd -D 19919 ? S 0:00 \_ /usr/sbin/smbd -D However, netstat -tpln | grep "smbd" returns nothing and also nmap shows "closed" on ports 139 and 445. Workaround [1]: change /etc/init.d/smbd:  if ! start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/smbd -- -D ; then to  if ! start-stop-daemon --start --quiet --oknodo --pidfile /var/run/samba/smbd.pid --exec /usr/sbin/smbd -- -D ; then I reported this to: https://discuss.linuxcontainers.org/t/samba-in-host-and-container/2523 apt-cache policy samba samba:   Installed: 2:4.3.11+dfsg-0ubuntu0.16.04.15   Candidate: 2:4.3.11+dfsg-0ubuntu0.16.04.16   Version table:      2:4.3.11+dfsg-0ubuntu0.16.04.16 500         500 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages  *** 2:4.3.11+dfsg-0ubuntu0.16.04.15 500         500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages         100 /var/lib/dpkg/status      2:4.3.8+dfsg-0ubuntu1 500         500 http://de.archive.ubuntu.com/ubuntu xenial/main amd64 Packages 1. https://serverfault.com/questions/810544/samba-daemon-does-not-work-as-systemd-service-but-works-in-foreground
2018-09-14 07:16:54 Christian Ehrhardt  samba (Ubuntu): status New Confirmed
2018-09-14 07:17:03 Christian Ehrhardt  bug added subscriber Ubuntu Server
2018-09-14 07:17:15 Christian Ehrhardt  tags lxd samba smb lxd samba server-next smb
2018-09-14 07:17:23 Christian Ehrhardt  bug added subscriber  Christian Ehrhardt 
2018-09-14 07:17:47 Christian Ehrhardt  nominated for series Ubuntu Xenial
2018-09-14 07:17:47 Christian Ehrhardt  bug task added samba (Ubuntu Xenial)
2018-09-14 07:17:55 Christian Ehrhardt  samba (Ubuntu Xenial): status New Triaged
2018-09-14 07:17:57 Christian Ehrhardt  samba (Ubuntu): status Confirmed Fix Released
2018-09-24 09:41:36 Christian Ehrhardt  nominated for series Ubuntu Trusty
2018-09-24 09:41:36 Christian Ehrhardt  bug task added samba (Ubuntu Trusty)
2018-09-24 09:41:41 Christian Ehrhardt  samba (Ubuntu Trusty): status New Triaged
2018-09-24 10:30:27 Launchpad Janitor merge proposal linked https://code.launchpad.net/~paelzer/ubuntu/+source/samba/+git/samba/+merge/355532
2018-09-24 11:14:24 Christian Ehrhardt  description Setup: install smbd in host and lxd-container. Now restart smbd in host: service smbd restart All is OK. Problem: nmap shows "closed" on ports 139 and 445. And users cannot use smbd server in host.   ● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)    Loaded: loaded (/etc/init.d/smbd; bad; vendor preset: enabled)    Active: active (exited) since Die 2016-10-18 17:35:23 CEST; 2s ago      Docs: man:systemd-sysv-generator(8)   Process: 24218 ExecStop=/etc/init.d/smbd stop (code=exited, status=0/SUCCESS)   Process: 21980 ExecReload=/etc/init.d/smbd reload (code=exited, status=0/SUCCESS)   Process: 25190 ExecStart=/etc/init.d/smbd start (code=exited, status=0/SUCCESS) Okt 18 17:35:22 speedy systemd[1]: Starting LSB: start Samba SMB/CIFS daemon (smbd)... Okt 18 17:35:23 speedy smbd[25190]: * Starting SMB/CIFS daemon smbd Okt 18 17:35:23 speedy smbd[25190]: ...done. Okt 18 17:35:23 speedy systemd[1]: Started LSB: start Samba SMB/CIFS daemon (smbd). ps axf | grep smbd: 25356 pts/2 S+ 0:00 | \_ grep --color=auto smbd 19915 ? Ss 0:08 \_ /usr/sbin/smbd -D 19919 ? S 0:00 \_ /usr/sbin/smbd -D However, netstat -tpln | grep "smbd" returns nothing and also nmap shows "closed" on ports 139 and 445. Workaround [1]: change /etc/init.d/smbd:  if ! start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/smbd -- -D ; then to  if ! start-stop-daemon --start --quiet --oknodo --pidfile /var/run/samba/smbd.pid --exec /usr/sbin/smbd -- -D ; then I reported this to: https://discuss.linuxcontainers.org/t/samba-in-host-and-container/2523 apt-cache policy samba samba:   Installed: 2:4.3.11+dfsg-0ubuntu0.16.04.15   Candidate: 2:4.3.11+dfsg-0ubuntu0.16.04.16   Version table:      2:4.3.11+dfsg-0ubuntu0.16.04.16 500         500 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages  *** 2:4.3.11+dfsg-0ubuntu0.16.04.15 500         500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages         100 /var/lib/dpkg/status      2:4.3.8+dfsg-0ubuntu1 500         500 http://de.archive.ubuntu.com/ubuntu xenial/main amd64 Packages 1. https://serverfault.com/questions/810544/samba-daemon-does-not-work-as-systemd-service-but-works-in-foreground [Impact] * Fix init scripts start action to have a safer process detection with containers around * Fix init scripts stop action to not affect unintended processes due to stale pidfiles [Test Case] * 1. Start a container * 2. Start samba in the Container (or winbind or nmbd) * 3. Start samba in the host (or winbind or nmbd) => it will not start as such a binary is already running * #2 and #3 can be switched, and then as 4. restart smbd in the host => it will shut down but not re-start Fixed: The container process should have no influence This also fixes issues where the pidfile would not be updated * install and start smbd * "Simulate" a corrupted pidfile by putting the PID of a different process in it * stop the sambd service => without the fixes this will drag down the other process you put in the pidfile Fixed: a stale pidfile entry should not let non-smbd (or winbind, nmbd) processes be affected [Regression Potential] * We tried to think of all edge cases of these start/stop actions but didn't come up with one that is broken. Aside from missing one of those cases there might be non-archive scripts that expect the old behavior. But even for thse no critical ones came to my mind so far. Worst case there'd be a combination that leads to the service no(re-)starting after the SRU - so thinking about potential cases is important. [Other Info] * n/a --- Setup: install smbd in host and lxd-container. Now restart smbd in host: service smbd restart All is OK. Problem: nmap shows "closed" on ports 139 and 445. And users cannot use smbd server in host.   ● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)    Loaded: loaded (/etc/init.d/smbd; bad; vendor preset: enabled)    Active: active (exited) since Die 2016-10-18 17:35:23 CEST; 2s ago      Docs: man:systemd-sysv-generator(8)   Process: 24218 ExecStop=/etc/init.d/smbd stop (code=exited, status=0/SUCCESS)   Process: 21980 ExecReload=/etc/init.d/smbd reload (code=exited, status=0/SUCCESS)   Process: 25190 ExecStart=/etc/init.d/smbd start (code=exited, status=0/SUCCESS) Okt 18 17:35:22 speedy systemd[1]: Starting LSB: start Samba SMB/CIFS daemon (smbd)... Okt 18 17:35:23 speedy smbd[25190]: * Starting SMB/CIFS daemon smbd Okt 18 17:35:23 speedy smbd[25190]: ...done. Okt 18 17:35:23 speedy systemd[1]: Started LSB: start Samba SMB/CIFS daemon (smbd). ps axf | grep smbd: 25356 pts/2 S+ 0:00 | \_ grep --color=auto smbd 19915 ? Ss 0:08 \_ /usr/sbin/smbd -D 19919 ? S 0:00 \_ /usr/sbin/smbd -D However, netstat -tpln | grep "smbd" returns nothing and also nmap shows "closed" on ports 139 and 445. Workaround [1]: change /etc/init.d/smbd:  if ! start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/smbd -- -D ; then to  if ! start-stop-daemon --start --quiet --oknodo --pidfile /var/run/samba/smbd.pid --exec /usr/sbin/smbd -- -D ; then I reported this to: https://discuss.linuxcontainers.org/t/samba-in-host-and-container/2523 apt-cache policy samba samba:   Installed: 2:4.3.11+dfsg-0ubuntu0.16.04.15   Candidate: 2:4.3.11+dfsg-0ubuntu0.16.04.16   Version table:      2:4.3.11+dfsg-0ubuntu0.16.04.16 500         500 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages  *** 2:4.3.11+dfsg-0ubuntu0.16.04.15 500         500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages         100 /var/lib/dpkg/status      2:4.3.8+dfsg-0ubuntu1 500         500 http://de.archive.ubuntu.com/ubuntu xenial/main amd64 Packages 1. https://serverfault.com/questions/810544/samba-daemon-does-not-work-as-systemd-service-but-works-in-foreground
2018-09-27 09:23:38 Christian Ehrhardt  description [Impact] * Fix init scripts start action to have a safer process detection with containers around * Fix init scripts stop action to not affect unintended processes due to stale pidfiles [Test Case] * 1. Start a container * 2. Start samba in the Container (or winbind or nmbd) * 3. Start samba in the host (or winbind or nmbd) => it will not start as such a binary is already running * #2 and #3 can be switched, and then as 4. restart smbd in the host => it will shut down but not re-start Fixed: The container process should have no influence This also fixes issues where the pidfile would not be updated * install and start smbd * "Simulate" a corrupted pidfile by putting the PID of a different process in it * stop the sambd service => without the fixes this will drag down the other process you put in the pidfile Fixed: a stale pidfile entry should not let non-smbd (or winbind, nmbd) processes be affected [Regression Potential] * We tried to think of all edge cases of these start/stop actions but didn't come up with one that is broken. Aside from missing one of those cases there might be non-archive scripts that expect the old behavior. But even for thse no critical ones came to my mind so far. Worst case there'd be a combination that leads to the service no(re-)starting after the SRU - so thinking about potential cases is important. [Other Info] * n/a --- Setup: install smbd in host and lxd-container. Now restart smbd in host: service smbd restart All is OK. Problem: nmap shows "closed" on ports 139 and 445. And users cannot use smbd server in host.   ● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)    Loaded: loaded (/etc/init.d/smbd; bad; vendor preset: enabled)    Active: active (exited) since Die 2016-10-18 17:35:23 CEST; 2s ago      Docs: man:systemd-sysv-generator(8)   Process: 24218 ExecStop=/etc/init.d/smbd stop (code=exited, status=0/SUCCESS)   Process: 21980 ExecReload=/etc/init.d/smbd reload (code=exited, status=0/SUCCESS)   Process: 25190 ExecStart=/etc/init.d/smbd start (code=exited, status=0/SUCCESS) Okt 18 17:35:22 speedy systemd[1]: Starting LSB: start Samba SMB/CIFS daemon (smbd)... Okt 18 17:35:23 speedy smbd[25190]: * Starting SMB/CIFS daemon smbd Okt 18 17:35:23 speedy smbd[25190]: ...done. Okt 18 17:35:23 speedy systemd[1]: Started LSB: start Samba SMB/CIFS daemon (smbd). ps axf | grep smbd: 25356 pts/2 S+ 0:00 | \_ grep --color=auto smbd 19915 ? Ss 0:08 \_ /usr/sbin/smbd -D 19919 ? S 0:00 \_ /usr/sbin/smbd -D However, netstat -tpln | grep "smbd" returns nothing and also nmap shows "closed" on ports 139 and 445. Workaround [1]: change /etc/init.d/smbd:  if ! start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/smbd -- -D ; then to  if ! start-stop-daemon --start --quiet --oknodo --pidfile /var/run/samba/smbd.pid --exec /usr/sbin/smbd -- -D ; then I reported this to: https://discuss.linuxcontainers.org/t/samba-in-host-and-container/2523 apt-cache policy samba samba:   Installed: 2:4.3.11+dfsg-0ubuntu0.16.04.15   Candidate: 2:4.3.11+dfsg-0ubuntu0.16.04.16   Version table:      2:4.3.11+dfsg-0ubuntu0.16.04.16 500         500 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages  *** 2:4.3.11+dfsg-0ubuntu0.16.04.15 500         500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages         100 /var/lib/dpkg/status      2:4.3.8+dfsg-0ubuntu1 500         500 http://de.archive.ubuntu.com/ubuntu xenial/main amd64 Packages 1. https://serverfault.com/questions/810544/samba-daemon-does-not-work-as-systemd-service-but-works-in-foreground [Impact] * Issue: the current init script * won't start samba related services on the host if there is a process of the same binary in a container * might on stop affect a process that it was not intended to stop  * Solution: Fix init scripts to * start action to have a safer process detection with containers around   * stop action to not affect unintended processes due to stale pidfiles [Test Case]  * 1. Start a container  * 2. Start samba in the Container (or winbind or nmbd)  * 3. Start samba in the host (or winbind or nmbd)   => it will not start as such a binary is already running  * #2 and #3 can be switched, and then as 4. restart smbd in the host   => it will shut down but not re-start Fixed: The container process should have no influence  This also fixes issues where the pidfile would not be updated  * install and start smbd  * "Simulate" a corrupted pidfile by putting the PID of a different    process in it  * stop the sambd service   => without the fixes this will drag down the other process you put in      the pidfile Fixed: a stale pidfile entry should not let non-smbd (or winbind, nmbd) processes be affected [Regression Potential]  * We tried to think of all edge cases of these start/stop actions but    didn't come up with one that is broken. Aside from missing one of those    cases there might be non-archive scripts that expect the old behavior.    But even for thse no critical ones came to my mind so far.    Worst case there'd be a combination that leads to the service    no(re-)starting after the SRU - so thinking about potential cases is    important. [Other Info]  * n/a --- Setup: install smbd in host and lxd-container. Now restart smbd in host: service smbd restart All is OK. Problem: nmap shows "closed" on ports 139 and 445. And users cannot use smbd server in host.   ● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)    Loaded: loaded (/etc/init.d/smbd; bad; vendor preset: enabled)    Active: active (exited) since Die 2016-10-18 17:35:23 CEST; 2s ago      Docs: man:systemd-sysv-generator(8)   Process: 24218 ExecStop=/etc/init.d/smbd stop (code=exited, status=0/SUCCESS)   Process: 21980 ExecReload=/etc/init.d/smbd reload (code=exited, status=0/SUCCESS)   Process: 25190 ExecStart=/etc/init.d/smbd start (code=exited, status=0/SUCCESS) Okt 18 17:35:22 speedy systemd[1]: Starting LSB: start Samba SMB/CIFS daemon (smbd)... Okt 18 17:35:23 speedy smbd[25190]: * Starting SMB/CIFS daemon smbd Okt 18 17:35:23 speedy smbd[25190]: ...done. Okt 18 17:35:23 speedy systemd[1]: Started LSB: start Samba SMB/CIFS daemon (smbd). ps axf | grep smbd: 25356 pts/2 S+ 0:00 | \_ grep --color=auto smbd 19915 ? Ss 0:08 \_ /usr/sbin/smbd -D 19919 ? S 0:00 \_ /usr/sbin/smbd -D However, netstat -tpln | grep "smbd" returns nothing and also nmap shows "closed" on ports 139 and 445. Workaround [1]: change /etc/init.d/smbd:  if ! start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/smbd -- -D ; then to  if ! start-stop-daemon --start --quiet --oknodo --pidfile /var/run/samba/smbd.pid --exec /usr/sbin/smbd -- -D ; then I reported this to: https://discuss.linuxcontainers.org/t/samba-in-host-and-container/2523 apt-cache policy samba samba:   Installed: 2:4.3.11+dfsg-0ubuntu0.16.04.15   Candidate: 2:4.3.11+dfsg-0ubuntu0.16.04.16   Version table:      2:4.3.11+dfsg-0ubuntu0.16.04.16 500         500 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages  *** 2:4.3.11+dfsg-0ubuntu0.16.04.15 500         500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages         100 /var/lib/dpkg/status      2:4.3.8+dfsg-0ubuntu1 500         500 http://de.archive.ubuntu.com/ubuntu xenial/main amd64 Packages 1. https://serverfault.com/questions/810544/samba-daemon-does-not-work-as-systemd-service-but-works-in-foreground
2018-10-03 13:55:17 Robie Basak samba (Ubuntu Xenial): status Triaged Fix Committed
2018-10-03 13:55:19 Robie Basak bug added subscriber Ubuntu Stable Release Updates Team
2018-10-03 13:55:21 Robie Basak bug added subscriber SRU Verification
2018-10-03 13:55:23 Robie Basak tags lxd samba server-next smb lxd samba server-next smb verification-needed verification-needed-xenial
2018-10-09 12:19:18 Christian Ehrhardt  tags lxd samba server-next smb verification-needed verification-needed-xenial lxd samba server-next smb verification-done verification-done-xenial
2018-10-11 07:41:43 Łukasz Zemczak removed subscriber Ubuntu Stable Release Updates Team
2018-10-11 07:52:15 Launchpad Janitor samba (Ubuntu Xenial): status Fix Committed Fix Released
2018-10-16 08:02:55 Launchpad Janitor merge proposal linked https://code.launchpad.net/~paelzer/ubuntu/+source/samba/+git/samba/+merge/356791
2018-10-16 08:04:10 Launchpad Janitor merge proposal linked https://code.launchpad.net/~paelzer/ubuntu/+source/samba/+git/samba/+merge/356793
2018-10-17 12:05:29 Robie Basak samba (Ubuntu Trusty): status Triaged Fix Committed
2018-10-17 12:05:31 Robie Basak bug added subscriber Ubuntu Stable Release Updates Team
2018-10-17 12:05:33 Robie Basak tags lxd samba server-next smb verification-done verification-done-xenial lxd samba server-next smb verification-done-xenial verification-needed verification-needed-trusty
2018-10-18 07:25:13 Christian Ehrhardt  tags lxd samba server-next smb verification-done-xenial verification-needed verification-needed-trusty lxd samba server-next smb verification-done verification-done-trusty verification-done-xenial
2018-10-24 14:48:38 Robie Basak tags lxd samba server-next smb verification-done verification-done-trusty verification-done-xenial lxd samba server-next smb verification-done verification-done-xenial verification-failed-trusty
2018-10-24 15:11:50 Christian Ehrhardt  samba (Ubuntu Trusty): status Fix Committed Invalid
2018-11-03 20:21:29 Mathew Hodson samba (Ubuntu Trusty): importance Undecided Low
2018-11-03 20:25:44 Mathew Hodson samba (Ubuntu): importance Undecided High
2018-11-03 20:25:51 Mathew Hodson samba (Ubuntu Xenial): importance Undecided High
2018-11-03 20:26:19 Mathew Hodson samba (Ubuntu Trusty): status Invalid Won't Fix
2018-11-14 13:16:40 Christian Ehrhardt  tags lxd samba server-next smb verification-done verification-done-xenial verification-failed-trusty lxd samba server-next smb verification-done-xenial verification-failed-trusty
2018-11-27 12:25:44 Launchpad Janitor samba (Ubuntu Trusty): status Won't Fix Fix Released
2018-11-27 12:25:44 Launchpad Janitor cve linked 2018-14629
2018-11-27 12:25:44 Launchpad Janitor cve linked 2018-16841
2018-11-27 12:25:44 Launchpad Janitor cve linked 2018-16851