Comment 21 for bug 2002949

Revision history for this message
Michał Małoszewski (michal-maloszewski99) wrote (last edit ):

Fix works, 2:4.15.13+dfsg-0ubuntu0.20.04.5 fixes the bug in Focal; 2:4.15.13+dfsg-0ubuntu1.4 fixes the bug in Jammy; 2:4.17.7+dfsg-1ubuntu2.2 fixes the bug in Lunar

Jammy:

I've setup a VM running a Samba Active Directory Domain Controller, followed the [Test Plan] section listed above in the Bug Description and inside that container I typed in:

$ apt policy samba

The output:

samba:
  Installed: 2:4.15.13+dfsg-0ubuntu1.3
  Candidate: 2:4.15.13+dfsg-0ubuntu1.3
  Version table:
 *** 2:4.15.13+dfsg-0ubuntu1.3 500
        500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2:4.15.13+dfsg-0ubuntu1.2 500
        500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
     2:4.15.5~dfsg-0ubuntu5 500
        500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages

I've noticed that nothing has changed there, so the problem still existed, because as we could see in the output, the package version was not the one where the fix is.

Result:

ERROR(<class 're.error'>): uncaught exception - missing ), unterminated subpattern at position 8
  File "/usr/bin/samba-tool", line 44, in <module>
    retval = cmd._run("samba-tool", subcommand, *args)
  File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 235, in _run
    return self.subcommands[subcommand]._run(
  File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 235, in _run
    return self.subcommands[subcommand]._run(
  File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 153, in _run
    opts, args = parser.parse_args(list(argv))
  File "/usr/lib/python3.8/optparse.py", line 1387, in parse_args
    stop = self._process_args(largs, rargs, values)
  File "/usr/lib/python3.8/optparse.py", line 1427, in _process_args
    self._process_long_opt(rargs, values)
  File "/usr/lib/python3.8/optparse.py", line 1501, in _process_long_opt
    option.process(opt, value, values, self)
  File "/usr/lib/python3.8/optparse.py", line 784, in process
    return self.take_action(
  File "/usr/lib/python3.8/optparse.py", line 805, in take_action
    self.callback(self, opt, value, parser, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/samba/getopt.py", line 250, in _set_password
    self._ensure_secure_proctitle(opt_str, arg, "password")
  File "/usr/lib/python3/dist-packages/samba/getopt.py", line 202, in _ensure_secure_proctitle
    pass_opt_re = re.compile(pass_opt_re_str)
  File "/usr/lib/python3.8/re.py", line 252, in compile
    return _compile(pattern, flags)
  File "/usr/lib/python3.8/re.py", line 304, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/usr/lib/python3.8/sre_compile.py", line 764, in compile
    p = sre_parse.parse(p, flags)
  File "/usr/lib/python3.8/sre_parse.py", line 948, in parse
    p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
  File "/usr/lib/python3.8/sre_parse.py", line 443, in _parse_sub
    itemsappend(_parse(source, state, verbose, nested + 1,
  File "/usr/lib/python3.8/sre_parse.py", line 836, in _parse
    raise source.error("missing ), unterminated subpattern",

Then I've upgraded samba using:
$ apt install samba=2:4.15.13+dfsg-0ubuntu1.4

Later I've typed in:

$ apt policy samba
to check if installed version is changed and we see that we have new version installed (with fix)

samba:
  Installed: 2:4.15.13+dfsg-0ubuntu1.4
  Candidate: 2:4.15.13+dfsg-0ubuntu1.4
  Version table:
 *** 2:4.15.13+dfsg-0ubuntu1.4 500
             500 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 Packages
             100 /var/lib/dpkg/status
      2:4.15.13+dfsg-0ubuntu1.3 500
             500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages

Finally when I repeated steps from the [Test Plan] the problem did not exist, so the fix works:

Result:
'Changed password OK'

I could also login successfully using new password.

I repeated identical steps for Focal and Lunar and the fix works there as well.