Bug 15330 - samba4.blackbox.schemaupgrade fails as string functions on bytes are used
Summary: samba4.blackbox.schemaupgrade fails as string functions on bytes are used
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Test infrastructure (show other bugs)
Version: 4.18.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-10 08:20 UTC by Andreas Schneider
Modified: 2023-04-05 18:27 UTC (History)
2 users (show)

See Also:


Attachments
patch for 4.18 (2.12 KB, patch)
2023-03-14 10:05 UTC, Andreas Schneider
ab: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2023-03-10 08:20:18 UTC
ERROR(<class 'TypeError'>): uncaught exception - replace() argument 1 must be str, not bytes
      File "/builddir/build/BUILD/samba-4.18.0/bin/python/samba/netcmd/__init__.py", line 230, in _run
        return self.run(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/builddir/build/BUILD/samba-4.18.0/bin/python/samba/netcmd/ldapcmp.py", line 966, in run
        if b1.diff(b2):
           ^^^^^^^^^^^
      File "/builddir/build/BUILD/samba-4.18.0/bin/python/samba/netcmd/ldapcmp.py", line 790, in diff
        if object1 == object2:
           ^^^^^^^^^^^^^^^^^^
      File "/builddir/build/BUILD/samba-4.18.0/bin/python/samba/netcmd/ldapcmp.py", line 557, in __eq__
        return self.cmp_attrs(other)
               ^^^^^^^^^^^^^^^^^^^^^
      File "/builddir/build/BUILD/samba-4.18.0/bin/python/samba/netcmd/ldapcmp.py", line 656, in cmp_attrs
        p = [self.fix_domain_netbios(j) for j in m]
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/builddir/build/BUILD/samba-4.18.0/bin/python/samba/netcmd/ldapcmp.py", line 656, in <listcomp>
        p = [self.fix_domain_netbios(j) for j in m]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/builddir/build/BUILD/samba-4.18.0/bin/python/samba/netcmd/ldapcmp.py", line 542, in fix_domain_netbios
        res = res.replace(self.con.domain_netbios.lower(), self.con.domain_netbios.upper())
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


Patch will follow.
Comment 1 Andreas Schneider 2023-03-14 10:05:06 UTC
Created attachment 17816 [details]
patch for 4.18
Comment 2 Alexander Bokovoy 2023-03-15 12:45:27 UTC
Comment on attachment 17816 [details]
patch for 4.18

ДПЕЬ
Comment 3 Alexander Bokovoy 2023-03-15 12:45:37 UTC
Comment on attachment 17816 [details]
patch for 4.18

LGTM
Comment 4 Andreas Schneider 2023-03-15 17:33:42 UTC
Jule, please add the patch to 4.18. Thanks!
Comment 5 Jule Anger 2023-03-29 19:03:23 UTC
Pushed to autobuild-v4-18-test.
Comment 6 Jule Anger 2023-04-05 18:27:22 UTC
This bug was referenced in samba v4-18-test:

4022ee96aef8184f7d1a4686e06113cda7e29ac3

The Samba QA Contact didn't notice because of a typo in the BUG reference in the commit message.


Closing out bug report.

Thanks!