Samba 3 to Samba 4 Migration. (myldap-pub.py patch)
Lukasz Zalewski
lukas at eecs.qmul.ac.uk
Mon Nov 1 03:04:11 MDT 2010
On 10/30/2010 06:59 PM, Lukasz Zalewski wrote:
> On 29/10/2010 13:45, Matthias Dieter Wallnöfer wrote:
> Matthias, all
>> Lukasz,
>>
>> no chance to make it also Python 2.4 compatible? I think it shouldn't be
>> too hard to test that. Since that would be a criteria to add it to our
>> source tree.
> I have made he script python 2.4 compatible, but before i send a patch i
> have three questions:
> 1. The script throws an error on the following line of code in 2.4 (2.6
> is fine)
> zeros = b'\x00' * 16
> is it safe to remove the string literal, i.e.
> zeros = '\x00' * 16
>
> the results seem to be the same but want to check
>
> 2. The getpass module in 2.4 does not play well with redirected output
> : when the output is redirected to the file and getpass("Enter LDAP
> Password:") invoked, the prompt string is redirected too. This has two
> negative side effects: users are left wondering what is going on as the
> script seems to be hanging, Enter LDAP Password: becomes part of the
> ldif. This works fine in 2.6
>
> 3. the script seems to allow import of only sambaGroupType's of 2 and 4,
> i.e.
>
> if sgt == SID_NAME_DOM_GRP:
> gt = GTYPE_SECURITY_GLOBAL_GROUP
> elif sgt == SID_NAME_ALIAS:
> #gt = GTYPE_SECURITY_BUILTIN_LOCAL_GROUP
> gt = GTYPE_SECURITY_DOMAIN_LOCAL_GROUP
> else:
> assert False, "sgt[%r]" % (sgt)
>
> I have found an old post
> (http://lists.samba.org/archive/samba-technical/2009-March/063905.html)
> where Volker mentions that s3 supports 2, 4 and 5. Mark is running the
> script and seems to have type 5 in his ldap which stops the script
> execution. Can type 5 be mapped to anything in s4 or is it just
> incompatible?
>
> Thx
>
> Luk
Attached is a diff and complete script (python 2.4 friendly). The above
issues are still outstanding though :(
Regards
Luk
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: myldap-pub.py
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20101101/49ccc6c1/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: myldap-pub-8.diff
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20101101/49ccc6c1/attachment-0001.ksh>
More information about the samba-technical
mailing list