The Samba-Bugzilla – Attachment 17816 Details for
Bug 15330
samba4.blackbox.schemaupgrade fails as string functions on bytes are used
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for 4.18
0001-python-netcmd-Decode-return-value-of-find_netbios-fr.patch (text/plain), 2.12 KB, created by
Andreas Schneider
on 2023-03-14 10:05:06 UTC
(
hide
)
Description:
patch for 4.18
Filename:
MIME Type:
Creator:
Andreas Schneider
Created:
2023-03-14 10:05:06 UTC
Size:
2.12 KB
patch
obsolete
>From db24e8538c2bf18311e7696878577849b6843bdb Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >Date: Fri, 10 Mar 2023 09:08:48 +0100 >Subject: [PATCH] python:netcmd: Decode return value of find_netbios() from > bytes into string > >ERROR(<class 'TypeError'>): uncaught exception - replace() argument 1 must be >str, not bytes > File "bin/python/samba/netcmd/__init__.py", line 230, in _run > return self.run(*args, **kwargs) > ^^^^^^^^^^^^^^^^^^^^^^^^^ > File "bin/python/samba/netcmd/ldapcmp.py", line 966, in run > if b1.diff(b2): > ^^^^^^^^^^^ > File "bin/python/samba/netcmd/ldapcmp.py", line 790, in diff > if object1 == object2: > ^^^^^^^^^^^^^^^^^^ > File "bin/python/samba/netcmd/ldapcmp.py", line 557, in __eq__ > return self.cmp_attrs(other) > ^^^^^^^^^^^^^^^^^^^^^ > File "bin/python/samba/netcmd/ldapcmp.py", line 656, in cmp_attrs > p = [self.fix_domain_netbios(j) for j in m] > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "bin/python/samba/netcmd/ldapcmp.py", line 656, in <listcomp> > p = [self.fix_domain_netbios(j) for j in m] > ^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "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()) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > >BUGS: https://bugzilla.samba.org/show_bug.cgi?id=15330 > >Signed-off-by: Andreas Schneider <asn@samba.org> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >(cherry picked from commit 4fa0242b9d34decd8dbd813be40655a593df3db9) >--- > python/samba/netcmd/ldapcmp.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/python/samba/netcmd/ldapcmp.py b/python/samba/netcmd/ldapcmp.py >index fb49cbe1ae5..ff26e96332d 100644 >--- a/python/samba/netcmd/ldapcmp.py >+++ b/python/samba/netcmd/ldapcmp.py >@@ -121,7 +121,7 @@ class LDAPBase(object): > > for x in res: > if "nETBIOSName" in x: >- return x["nETBIOSName"][0] >+ return x["nETBIOSName"][0].decode() > > def object_exists(self, object_dn): > res = None >-- >2.39.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
ab
:
review+
Actions:
View
Attachments on
bug 15330
: 17816