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:
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)
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: 13+dfsg- 0ubuntu1. 3 13+dfsg- 0ubuntu1. 3 13+dfsg- 0ubuntu1. 3 500 archive. ubuntu. com/ubuntu jammy-updates/main amd64 Packages dpkg/status 4.15.13+ dfsg-0ubuntu1. 2 500 security. ubuntu. com/ubuntu jammy-security/main amd64 Packages 4.15.5~ dfsg-0ubuntu5 500 archive. ubuntu. com/ubuntu jammy/main amd64 Packages
Installed: 2:4.15.
Candidate: 2:4.15.
Version table:
*** 2:4.15.
500 http://
100 /var/lib/
2:
500 http://
2:
500 http://
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 samba-tool" , line 44, in <module> "samba- tool", subcommand, *args) python3/ dist-packages/ samba/netcmd/ __init_ _.py", line 235, in _run s[subcommand] ._run( python3/ dist-packages/ samba/netcmd/ __init_ _.py", line 235, in _run s[subcommand] ._run( python3/ dist-packages/ samba/netcmd/ __init_ _.py", line 153, in _run parse_args( list(argv) ) python3. 8/optparse. py", line 1387, in parse_args args(largs, rargs, values) python3. 8/optparse. py", line 1427, in _process_args _process_ long_opt( rargs, values) python3. 8/optparse. py", line 1501, in _process_long_opt process( opt, value, values, self) python3. 8/optparse. py", line 784, in process python3. 8/optparse. py", line 805, in take_action callback( self, opt, value, parser, *args, **kwargs) python3/ dist-packages/ samba/getopt. py", line 250, in _set_password _ensure_ secure_ proctitle( opt_str, arg, "password") python3/ dist-packages/ samba/getopt. py", line 202, in _ensure_ secure_ proctitle pass_opt_ re_str) python3. 8/re.py" , line 252, in compile python3. 8/re.py" , line 304, in _compile compile( pattern, flags) python3. 8/sre_compile. py", line 764, in compile python3. 8/sre_parse. py", line 948, in parse python3. 8/sre_parse. py", line 443, in _parse_sub (_parse( source, state, verbose, nested + 1, python3. 8/sre_parse. py", line 836, in _parse error(" missing ), unterminated subpattern",
File "/usr/bin/
retval = cmd._run(
File "/usr/lib/
return self.subcommand
File "/usr/lib/
return self.subcommand
File "/usr/lib/
opts, args = parser.
File "/usr/lib/
stop = self._process_
File "/usr/lib/
self.
File "/usr/lib/
option.
File "/usr/lib/
return self.take_action(
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
pass_opt_re = re.compile(
File "/usr/lib/
return _compile(pattern, flags)
File "/usr/lib/
p = sre_compile.
File "/usr/lib/
p = sre_parse.parse(p, flags)
File "/usr/lib/
p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
File "/usr/lib/
itemsappend
File "/usr/lib/
raise source.
Then I've upgraded samba using: 4.15.13+ dfsg-0ubuntu1. 4
$ apt install samba=2:
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: 13+dfsg- 0ubuntu1. 4 13+dfsg- 0ubuntu1. 4 13+dfsg- 0ubuntu1. 4 500 archive. ubuntu. com/ubuntu jammy-proposed/main amd64 Packages dpkg/status 4.15.13+ dfsg-0ubuntu1. 3 500 archive. ubuntu. com/ubuntu jammy-updates/main amd64 Packages
Installed: 2:4.15.
Candidate: 2:4.15.
Version table:
*** 2:4.15.
500 http://
100 /var/lib/
2:
500 http://
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.