Closed
Bug 441503
Opened 16 years ago
Closed 16 years ago
Need update on contrib/syncLDAP.pl
Categories
(Bugzilla :: User Accounts, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.0
People
(Reporter: himorin, Assigned: himorin)
Details
Attachments
(1 file, 1 obsolete file)
1.08 KB,
patch
|
emmanuel
:
review+
|
Details | Diff | Splinter Review |
current contrib/syncLDAP.pl causes an error when we use uri schema on LDAPserver parameter. (It's ok with normal localhost:389 type, but fails on ldap://localhost:389) I think it might be better to patch this script.
Attachment #326447 -
Flags: review?(mkanat)
Comment 1•16 years ago
|
||
In contrib/syncLDAP, we have : my $LDAPport = "389"; # default LDAP port if($LDAPserver =~ /:/) { ($LDAPserver, $LDAPport) = split(":",$LDAPserver); } If you submit an URI, you get $LDAPserver which contains "ldap" and $LDAPport which contains "localhost:389" (or whatever your ldap server is set to in params).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 2•16 years ago
|
||
After reading the documentation for Net::LDAP, I'm not sure separating the LDAPserver param into host and port parts is necessary. You can just pass $LDAPserver as host, "389" as port to Net::LDAP's new function and things work fine.
Assignee | ||
Comment 3•16 years ago
|
||
(In reply to comment #2) > After reading the documentation for Net::LDAP, I'm not sure separating the > LDAPserver param into host and port parts is necessary. Sorry, i forgot about that. You're definitely true. So, problem is not from uri scheme but the port number tweak in syncLDAP.pl code. i'll update my patch.
Assignee | ||
Comment 4•16 years ago
|
||
update
Attachment #326447 -
Attachment is obsolete: true
Attachment #326506 -
Flags: review?
Attachment #326447 -
Flags: review?(mkanat)
Comment 5•16 years ago
|
||
With the second version of the patch, anyone who uses just a hostname (ie. localhost) as $LDAPserver will not be able to connect. Again, I'm pretty sure that you only need to remove these three lines from the syncLDAP script : if($LDAPserver =~ /:/) { ($LDAPserver, $LDAPport) = split(":",$LDAPserver); } and everything should work fine.
Assignee | ||
Comment 6•16 years ago
|
||
(In reply to comment #5) > Again, I'm pretty sure that you only need to remove these three lines from the > syncLDAP script : i've tried once, but failed with ldaps:// uri. removing port setting, it works. # It seems against to the Net::LDAP documentation,,,
Comment 7•16 years ago
|
||
(In reply to comment #6) > > i've tried once, but failed with ldaps:// uri. removing port setting, it works. This shouldn't happen. Net::LDAP contains this line of code : $host =~ s/^([^:]+|\[.*\]):(\d+)$/$1/ and $port = $2; so it should be doing your job for you. I'll see if I can test this today.
Comment 8•16 years ago
|
||
himorin, ask manu specifically for review so that he sees this patch in his review queue (or manu: feel free to set the review flag after testing).
Assignee: user-accounts → shimono
Assignee | ||
Updated•16 years ago
|
Attachment #326506 -
Flags: review? → review?(eseyman)
Assignee | ||
Comment 9•16 years ago
|
||
i've tested @ $ perl -MNet::LDAP -e 'print Net::LDAP->VERSION' 0.34
Comment 10•16 years ago
|
||
Comment on attachment 326506 [details] [diff] [review] patch v2 for syncLDAP.pl >+if($LDAPserver =~ /\:\/\//) { Nitpick: ':' isn't a special caracter in regexps and there's no need to escape it. This could be fixed on checkin, I guess. I've put this patch through the paces and it checks out fine. r+ from me.
Attachment #326506 -
Flags: review?(eseyman) → review+
Comment 11•16 years ago
|
||
Could you (either manu or himorin) request approval for affected branches?
Status: NEW → ASSIGNED
Assignee | ||
Comment 12•16 years ago
|
||
target code block of this exists on file version 1.1 (@cvs)
Flags: approval3.2?
Flags: approval3.0?
Flags: approval2.22?
Flags: approval2.20?
Assignee | ||
Updated•16 years ago
|
Flags: approval2.22?
Flags: approval2.20?
Comment 13•16 years ago
|
||
2.x are restricted to security fixes.
Flags: approval3.2?
Flags: approval3.2+
Flags: approval3.0?
Flags: approval3.0+
Flags: approval+
Target Milestone: --- → Bugzilla 3.0
Comment 14•16 years ago
|
||
3.0: Checking in contrib/syncLDAP.pl; /cvsroot/mozilla/webtools/bugzilla/contrib/syncLDAP.pl,v <-- syncLDAP.pl new revision: 1.9.2.2; previous revision: 1.9.2.1 done 3.2: Checking in contrib/syncLDAP.pl; /cvsroot/mozilla/webtools/bugzilla/contrib/syncLDAP.pl,v <-- syncLDAP.pl new revision: 1.12.2.1; previous revision: 1.12 done tip: Checking in contrib/syncLDAP.pl; /cvsroot/mozilla/webtools/bugzilla/contrib/syncLDAP.pl,v <-- syncLDAP.pl new revision: 1.13; previous revision: 1.12 done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment 15•16 years ago
|
||
And, of course, I forgot to correct the nitpick before committing. 3.0: Checking in contrib/syncLDAP.pl; /cvsroot/mozilla/webtools/bugzilla/contrib/syncLDAP.pl,v <-- syncLDAP.pl new revision: 1.9.2.3; previous revision: 1.9.2.2 done 3.2: Checking in contrib/syncLDAP.pl; /cvsroot/mozilla/webtools/bugzilla/contrib/syncLDAP.pl,v <-- syncLDAP.pl new revision: 1.12.2.2; previous revision: 1.12.2.1 done tip: Checking in contrib/syncLDAP.pl; /cvsroot/mozilla/webtools/bugzilla/contrib/syncLDAP.pl,v <-- syncLDAP.pl new revision: 1.14; previous revision: 1.13 done
You need to log in
before you can comment on or make changes to this bug.
Description
•