Merge ~michal-maloszewski99/ubuntu/+source/samba:samba-tool-usrpassword-jammy-fix into ubuntu/+source/samba:ubuntu/jammy-devel

Proposed by Michał Małoszewski
Status: Merged
Approved by: git-ubuntu bot
Approved revision: not available
Merge reported by: Robie Basak
Merged at revision: 4798c6fe1786a9ba229c1ff6fd830a144db0e0e9
Proposed branch: ~michal-maloszewski99/ubuntu/+source/samba:samba-tool-usrpassword-jammy-fix
Merge into: ubuntu/+source/samba:ubuntu/jammy-devel
Diff against target: 57 lines (+35/-0)
3 files modified
debian/changelog (+9/-0)
debian/patches/issue-when-updating-old-passwd-containing-regex-metachars.patch (+25/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
git-ubuntu bot Approve
Simon Quigley (community) Approve
Canonical Server Reporter Pending
Review via email: mp+449097@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Michał Małoszewski (michal-maloszewski99) wrote :

Results: (from http://autopkgtest.ubuntu.com/results/autopkgtest-jammy-michal-maloszewski99-samba-tool-password-fix-jammy-ppa/?format=plain)
  samba @ amd64:
    http://autopkgtest.ubuntu.com/results/autopkgtest-jammy-michal-maloszewski99-samba-tool-password-fix-jammy-ppa/jammy/amd64/s/samba/20230814_125822_43099@/log.gz
    14.08.23 12:58:22 ✅ Triggers: samba/2:4.15.13+dfsg-0ubuntu1.4~ppa1
  samba @ arm64:
    http://autopkgtest.ubuntu.com/results/autopkgtest-jammy-michal-maloszewski99-samba-tool-password-fix-jammy-ppa/jammy/arm64/s/samba/20230814_131919_884d5@/log.gz
    14.08.23 13:19:19 ✅ Triggers: samba/2:4.15.13+dfsg-0ubuntu1.4~ppa1
  samba @ armhf:
    http://autopkgtest.ubuntu.com/results/autopkgtest-jammy-michal-maloszewski99-samba-tool-password-fix-jammy-ppa/jammy/armhf/s/samba/20230814_125426_5208e@/log.gz
    14.08.23 12:54:26 ✅ Triggers: samba/2:4.15.13+dfsg-0ubuntu1.4~ppa1
  samba @ ppc64el:
    http://autopkgtest.ubuntu.com/results/autopkgtest-jammy-michal-maloszewski99-samba-tool-password-fix-jammy-ppa/jammy/ppc64el/s/samba/20230814_130220_54dc7@/log.gz
    14.08.23 13:02:20 ✅ Triggers: samba/2:4.15.13+dfsg-0ubuntu1.4~ppa1
  samba @ s390x:
    http://autopkgtest.ubuntu.com/results/autopkgtest-jammy-michal-maloszewski99-samba-tool-password-fix-jammy-ppa/jammy/s390x/s/samba/20230814_130309_35035@/log.gz
    14.08.23 13:03:09 ✅ Triggers: samba/2:4.15.13+dfsg-0ubuntu1.4~ppa1
Running: (none)
Waiting: (none)

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

Results: (from http://autopkgtest.ubuntu.com/results/autopkgtest-jammy-michal-maloszewski99-samba-tool-password-fix-jammy-ppa/?format=plain)
  samba @ amd64:
    http://autopkgtest.ubuntu.com/results/autopkgtest-jammy-michal-maloszewski99-samba-tool-password-fix-jammy-ppa/jammy/amd64/s/samba/20230818_231803_f7ab0@/log.gz
    18.08.23 23:18:03 ✅ Triggers: samba/2:4.15.13+dfsg-0ubuntu1.4~ppa14
  samba @ arm64:
    http://autopkgtest.ubuntu.com/results/autopkgtest-jammy-michal-maloszewski99-samba-tool-password-fix-jammy-ppa/jammy/arm64/s/samba/20230818_233429_60a90@/log.gz
    18.08.23 23:34:29 ✅ Triggers: samba/2:4.15.13+dfsg-0ubuntu1.4~ppa14
  samba @ armhf:
    http://autopkgtest.ubuntu.com/results/autopkgtest-jammy-michal-maloszewski99-samba-tool-password-fix-jammy-ppa/jammy/armhf/s/samba/20230818_230612_f0540@/log.gz
    18.08.23 23:06:12 ✅ Triggers: samba/2:4.15.13+dfsg-0ubuntu1.4~ppa14
  samba @ ppc64el:
    http://autopkgtest.ubuntu.com/results/autopkgtest-jammy-michal-maloszewski99-samba-tool-password-fix-jammy-ppa/jammy/ppc64el/s/samba/20230818_232023_60a90@/log.gz
    18.08.23 23:20:23 ❌ Triggers: samba/2:4.15.13+dfsg-0ubuntu1.4~ppa14
      1408s samba-ad-dc-provisioning-internal-dns FAIL 🟥
  samba @ s390x:
    http://autopkgtest.ubuntu.com/results/autopkgtest-jammy-michal-maloszewski99-samba-tool-password-fix-jammy-ppa/jammy/s390x/s/samba/20230818_231145_f7ab0@/log.gz
    18.08.23 23:11:45 ✅ Triggers: samba/2:4.15.13+dfsg-0ubuntu1.4~ppa14
Running: (none)
Waiting: (none)

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

ppc64el fails - samba-ad-dc-provisioning-internal-dns - IMO we should not consider it a failure in that specific situation. It is likely related to a failure in the process of setting up the Samba Active Directory Domain Controller with internal DNS.
The issue that has been fixed occurred at the command line arguments parse time, and it had nothing to do with the configuration of Samba AC DC.

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

It can be reviewed :)

Revision history for this message
Simon Quigley (tsimonq2) wrote :

I strongly dislike your choice of patch name (quite long). Sponsoring anyway, thanks. :)

review: Approve
Revision history for this message
git-ubuntu bot (git-ubuntu-bot) wrote :

Approvers: tsimonq2, michal-maloszewski99
Uploaders: tsimonq2
MP auto-approved

review: Approve
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 5e12a5e..ae87cce 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,12 @@
6+samba (2:4.15.13+dfsg-0ubuntu1.4) jammy; urgency=medium
7+
8+ * d/p/issue-when-updating-old-passwd-containing-regex-metachars.patch:
9+ Add changes to fix uncaught exception when updating old password
10+ containing regex metacharacters by simplifying samba-tool password
11+ redaction (LP: #2002949).
12+
13+ -- Michal Maloszewski <michal.maloszewski@canonical.com> Fri, 18 Aug 2023 15:53:14 +0200
14+
15 samba (2:4.15.13+dfsg-0ubuntu1.3) jammy; urgency=medium
16
17 * d/p/secure-channel-faulty-kb5028166.patch: fix domain membership
18diff --git a/debian/patches/issue-when-updating-old-passwd-containing-regex-metachars.patch b/debian/patches/issue-when-updating-old-passwd-containing-regex-metachars.patch
19new file mode 100644
20index 0000000..3375da0
21--- /dev/null
22+++ b/debian/patches/issue-when-updating-old-passwd-containing-regex-metachars.patch
23@@ -0,0 +1,25 @@
24+Description: Fix samba to allow updating old password
25+ The patch here is one line long. It is created from the
26+ 'suggested fix' in the reported bug in Ubuntu:
27+ https://bugs.launchpad.net/ubuntu/+source/samba/+bug/2002949
28+ The trick is to replace '(opt_str, secret_data)' with re.escape that
29+ are used to escape any special characters in 'opt_str' and
30+ 'secret_data', ensuring that they are treated as literal characters in
31+ the regex pattern.
32+Origin: other, https://bugs.launchpad.net/ubuntu/+source/samba/+bug/2002949
33+Bug: https://bugzilla.samba.org/show_bug.cgi?id=15289
34+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/2002949
35+Last-Update: 2023-08-21
36+---
37+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
38+--- a/python/samba/getopt.py
39++++ b/python/samba/getopt.py
40+@@ -198,7 +198,7 @@
41+ # [= ] -> The option and the secret data might be separated by space
42+ # or equal sign.
43+ # [ ]*.* -> After the secret data might be one, many or no space.
44+- pass_opt_re_str = "(.*[ ]+)(%s[= ]%s)([ ]*.*)" % (opt_str, secret_data)
45++ pass_opt_re_str = "(.*[ ]+)(%s[= ]%s)([ ]*.*)" % (re.escape(opt_str), re.escape(secret_data))
46+ pass_opt_re = re.compile(pass_opt_re_str)
47+ # Get current proctitle.
48+ cur_proctitle = setproctitle.getproctitle()
49diff --git a/debian/patches/series b/debian/patches/series
50index 0a6a142..6839522 100644
51--- a/debian/patches/series
52+++ b/debian/patches/series
53@@ -65,3 +65,4 @@ CVE-2023-34968-10.patch
54 CVE-2023-34968-11.patch
55 CVE-2023-34968-12.patch
56 secure-channel-faulty-kb5028166.patch
57+issue-when-updating-old-passwd-containing-regex-metachars.patch

Subscribers

People subscribed via source and target branches