Netscape has changed the way its internal LDAP is set up.

This commit is contained in:
terry%netscape.com 1999-01-08 00:27:15 +00:00
Родитель 72bbc2b691
Коммит 84f3bca5d8
3 изменённых файлов: 25 добавлений и 86 удалений

Просмотреть файл

@ -28,7 +28,7 @@ set cocommand /tools/ns/bin/co
set lxr_base http://cvs-mirror.mozilla.org/webtools/lxr/source
set mozilla_lxr_kludge TRUE
set ldapserver directory.mcom.com
set ldapserver nsdirectory.mcom.com
# set ldapserver hoth.mcom.com
set ldapport 389
@ -45,6 +45,27 @@ if {![info exists env(TZ)] || [cequal $env(TZ) ""]} {
set BUGSYSTEMEXPR {<A HREF="http://scopus/bugsplat/show_bug.cgi?id=&">&</A>}
set treeid {default}
if {[info exists tcl_version] && $tcl_version >= 8.0} {
# The below tclX functions moved into the main TCL codebase in version 8,
# but their names changed. So, we cope. Note that these conversion
# routines only cover Bonsai's current use of these routines, not all
# possible uses.
proc getclock {} {
return [clock seconds]
}
proc convertclock {str args} {
if {[lindex $args 0] == "GMT"} {
return [clock scan $str -gmt 1]
}
return [clock scan $str]
}
proc fmtclock {date args} {
}
}
proc NOTDEF {foo} {
}
@ -442,7 +463,7 @@ proc GenerateProfileHTML {name} {
set value($n) ""
}
if {[catch {set fid [open "|./data/ldapsearch -b \"o=Netscape Communications Corp.,c=US\" -h $ldapserver -p $ldapport -s sub \"(mail=$name@netscape.com)\" $namelist" r]} errinfo]} {
if {[catch {set fid [open "|./data/ldapsearch -b \"dc=netscape,dc=com\" -h $ldapserver -p $ldapport -s sub \"(mail=$name@netscape.com)\" $namelist" r]} errinfo]} {
return "<B>Error -- Couldn't contact the directory server.</B><PRE>$errinfo</PRE>"
}

Просмотреть файл

@ -1,83 +0,0 @@
#!/usr/bonsaitools/bin/mysqltcl
# -*- Mode: tcl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
# License for the specific language governing rights and limitations
# under the License.
#
# The Original Code is the Bonsai CVS tool.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are Copyright (C) 1998
# Netscape Communications Corporation. All Rights Reserved.
source CGI.tcl
if {![info exists FORM(person)]} {
puts {
<TITLE>Uh, who?</TITLE>
<H1>Who would you like to know more about?</H1>
Please enter the username of the person whose Bonsai profile
you'd like to see.
<p>
<form method=get action="profile.cgi">
<B>User:</B><INPUT SIZE=10 NAME=person>
<INPUT TYPE=SUBMIT Value="Submit"></FORM>
}
PutsTrailer
exit
}
set fid [open "|./data/ldapsearch -b \"o=Netscape Communications Corp.,c=US\" -h $ldapserver -p $ldapport -s sub \"(mail=$FORM(person)@netscape.com)\" cn" r]
while {[gets $fid line] >= 0} {
if {[regexp -- {^cn: (.*)$} $line foo n]} {
set fullname $n
}
}
close $fid
if {![info exists fullname]} {
puts {
<TITLE>Uh, who?</TITLE>
<H1>Who would you like to know more about?</H1>
There doesn't seem to be anybody with e-mail address
<b><tt>$FORM(person)</tt></b>.
<p>
Please enter the username of the person whose Bonsai profile
you'd like to see.
<p>
<form method=get action="profile.cgi">
<B>User:</B><INPUT SIZE=10 NAME=person>
<INPUT TYPE=SUBMIT Value="Submit"></FORM>
}
PutsTrailer
exit
}
puts "Content-type: text/html
Refresh: 0; URL=http://phonebook/cgi-bin/expand-entry.pl?fullname=[url_quote "$fullname,o=Netscape Communications Corp.,c=US"]
<HTML>
<TITLE>What a hack.</TITLE>
One moment while we whisk you away to the appropriate phonebook page..."
exit

Просмотреть файл

@ -147,7 +147,8 @@ proc GetInfoForPeople {peoplelist} {
if {[cequal $ldapserver ""]} {
return
}
if {[catch {set fid [open "|./data/ldapsearch -b \"o=Netscape Communications Corp.,c=US\" -h $ldapserver -p $ldapport -s sub -S mail \"$query\" mail cn nscpcurcontactinfo" r]} errvar]} {
puts "Contacting ldap server $ldapserver <br>"
if {[catch {set fid [open "|./data/ldapsearch -b \"dc=netscape,dc=com\" -h $ldapserver -p $ldapport -s sub -S mail \"$query\" mail cn nscpcurcontactinfo" r]} errvar]} {
set ldaperror 1
} else {
set doingcontactinfo 0