Compare commits

..

445 Commits

Author SHA1 Message Date
heikki%netscape.com
a637f81f7f new project started
git-svn-id: svn://10.0.0.236/branches/mozilla@91184 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-03 22:13:38 +00:00
(no author)
6cfadae5d1 This commit was manufactured by cvs2svn to create branch 'mozilla'.
git-svn-id: svn://10.0.0.236/branches/mozilla@8534 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:36:10 +00:00
slamm%netscape.com
84edad5824 Make cvs ignore the dist directory
git-svn-id: svn://10.0.0.236/trunk@8533 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:36:09 +00:00
slamm%netscape.com
f3068af283 Add a few .html files to ignore.
git-svn-id: svn://10.0.0.236/trunk@8532 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:36:02 +00:00
slamm%netscape.com
cc89363c8d Clear up some warnings.
git-svn-id: svn://10.0.0.236/trunk@8531 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:35:59 +00:00
slamm%netscape.com
016e174f1c Remove the old-style bookmarks. RDF is the way.
git-svn-id: svn://10.0.0.236/trunk@8530 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:35:54 +00:00
gagan%netscape.com
2c6d5481f0 Merge from NuCache_BRANCH. Will not affect the build process.
git-svn-id: svn://10.0.0.236/trunk@8529 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:35:28 +00:00
slamm%netscape.com
275be6a065 Hookup NETSCAPE_COMMERCIAL for the Unix builds.
git-svn-id: svn://10.0.0.236/trunk@8528 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:35:26 +00:00
slamm%netscape.com
6f20578d40 Superseded by RDFTreeView.(cpp|h).
git-svn-id: svn://10.0.0.236/trunk@8527 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:35:23 +00:00
slamm%netscape.com
2e92dea938 Remove stuff that had to do with old-style bookmarks. Still need tohookup the new RDF stuff.
git-svn-id: svn://10.0.0.236/trunk@8526 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:35:16 +00:00
slamm%netscape.com
de8df47d71 Use RDFBase class.
git-svn-id: svn://10.0.0.236/trunk@8525 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:35:01 +00:00
slamm%netscape.com
6ec52ecc85 Create a group of toolbars from RDF.
git-svn-id: svn://10.0.0.236/trunk@8524 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:34:55 +00:00
slamm%netscape.com
0f28d99589 RDF toolbars. Currently only creates buttons for bookmarks.
git-svn-id: svn://10.0.0.236/trunk@8523 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:34:52 +00:00
slamm%netscape.com
3b785e0993 Was BookmarkBase. Base class for RDF menus and toolbars.
git-svn-id: svn://10.0.0.236/trunk@8522 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:34:49 +00:00
slamm%netscape.com
2e52f29f54 New base class for accessing RDF backend.
git-svn-id: svn://10.0.0.236/trunk@8521 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:34:42 +00:00
slamm%netscape.com
f07932374c Plug a memory leak.
git-svn-id: svn://10.0.0.236/trunk@8520 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:34:39 +00:00
slamm%netscape.com
ab55e92f0c ifdef out the selector bar and use the new RDFBase class
git-svn-id: svn://10.0.0.236/trunk@8519 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:34:36 +00:00
slamm%netscape.com
efc662e171 Replace old-style bookmarks with RDF and clean up the openFileAction
git-svn-id: svn://10.0.0.236/trunk@8518 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:34:34 +00:00
slamm%netscape.com
85f0826660 Add beginnings of RDF Toolbars and replace old-style bookmarks with RDF.
git-svn-id: svn://10.0.0.236/trunk@8517 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:34:26 +00:00
slamm%netscape.com
25493021ad Add beginnings of RDF Toolbars
git-svn-id: svn://10.0.0.236/trunk@8516 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:34:23 +00:00
slamm%netscape.com
9b02416f9a Replace old-style bookmarks and history with RDF.
git-svn-id: svn://10.0.0.236/trunk@8515 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:34:17 +00:00
slamm%netscape.com
ee2f6bf759 Fix a UMR
git-svn-id: svn://10.0.0.236/trunk@8514 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:34:05 +00:00
slamm%netscape.com
661ba6dce5 Get rid of references to the old bookmarks backend and replace it with RDF
git-svn-id: svn://10.0.0.236/trunk@8513 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:33:55 +00:00
slamm%netscape.com
781f32753d Split out the translation resources. Use and '@INCLUDE <file>@' directive in the resources file. Eventually we can replace 'sed' with 'perl' to do this in a more general way.
git-svn-id: svn://10.0.0.236/trunk@8512 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:33:51 +00:00
slamm%netscape.com
2284ad2c19 Zap some compiler warnings.
git-svn-id: svn://10.0.0.236/trunk@8511 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:33:42 +00:00
slamm%netscape.com
f248fe0fb6 Move remote command 'addbookmark' to src dir. Delete some unused defines
git-svn-id: svn://10.0.0.236/trunk@8510 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:33:39 +00:00
slamm%netscape.com
2573e08295 Toss dead bkmks code.
git-svn-id: svn://10.0.0.236/trunk@8509 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:33:34 +00:00
gagan%netscape.com
b19f886c20 Test checkin to verify merge. Not in build process.
git-svn-id: svn://10.0.0.236/trunk@8508 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:31:05 +00:00
buster%netscape.com
b741cf53cc fixed a minor bug handling tables with COLS attribute
git-svn-id: svn://10.0.0.236/trunk@8505 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 17:53:47 +00:00
buster%netscape.com
663dc8e0c4 more content decoupling
support work for style optimizations
fixed a bug in table columns  -- the attribute repeat defaults to 1, not 0


git-svn-id: svn://10.0.0.236/trunk@8504 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 17:26:38 +00:00
dcone%netscape.com
3d8bc3335c Major redo based on a new GFX library
git-svn-id: svn://10.0.0.236/trunk@8503 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 14:16:51 +00:00
dcone%netscape.com
84c5fb38d5 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@8502 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 14:15:58 +00:00
dcone%netscape.com
7d4f3d041d Mac work for Raptor
git-svn-id: svn://10.0.0.236/trunk@8501 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 14:15:34 +00:00
dcone%netscape.com
26bccfb7fb doing Mac work, temporary file
git-svn-id: svn://10.0.0.236/trunk@8500 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 14:14:50 +00:00
dcone%netscape.com
4f173c4c7e fixed some port bugs
git-svn-id: svn://10.0.0.236/trunk@8499 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 14:13:36 +00:00
cls%seawood.org
2979dc680a Fixed problem with files being generated in the srcdir.
git-svn-id: svn://10.0.0.236/trunk@8498 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 08:58:26 +00:00
ramiro%netscape.com
8ec1898b2d Fix EXPORTS.
git-svn-id: svn://10.0.0.236/trunk@8497 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 06:32:25 +00:00
ramiro%netscape.com
0c42478791 First step in moving the tooltip insanity out of the xfe and onto its own
library.


git-svn-id: svn://10.0.0.236/trunk@8496 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 06:30:33 +00:00
shaver%netscape.com
9013b35743 JS_ConstructObject: fill NULL proto/parent like JSOP_NEW would
git-svn-id: svn://10.0.0.236/trunk@8495 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 06:14:55 +00:00
terry%netscape.com
502157a1c3 Bugzilla source.
git-svn-id: svn://10.0.0.236/trunk@8494 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 06:14:20 +00:00
ramiro%netscape.com
d404f00d25 First step in moving the tooltip insanity out of the xfe and onto its own
library.


git-svn-id: svn://10.0.0.236/trunk@8493 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 05:59:32 +00:00
rpotts%netscape.com
bf872ac3ec Removed optimization which was causing timer skew and unreliable callbacks...
git-svn-id: svn://10.0.0.236/trunk@8492 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 05:40:35 +00:00
cls%seawood.org
bde336e65a Updates to autoconf files.
git-svn-id: svn://10.0.0.236/trunk@8491 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 04:04:57 +00:00
troy%netscape.com
a362d09c18 Changed ImageUpdated() to only do gamma correction if the gamma value
is not 1.0


git-svn-id: svn://10.0.0.236/trunk@8490 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 03:27:54 +00:00
pierre%netscape.com
6690f04312 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@8489 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 03:13:44 +00:00
troy%netscape.com
470cc500f6 Added nsHTMLLayer.cpp
git-svn-id: svn://10.0.0.236/trunk@8488 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 02:24:18 +00:00
troy%netscape.com
01d498dee2 Work in progress for LAYER tag
git-svn-id: svn://10.0.0.236/trunk@8487 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 02:23:21 +00:00
av%netscape.com
2f7cb6dd66 Temporarily fixing build problems
git-svn-id: svn://10.0.0.236/trunk@8486 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 02:08:03 +00:00
akkana%netscape.com
f34bdf6247 fix 309734, nesting of 'delete past table cell boundary' dialogs
git-svn-id: svn://10.0.0.236/trunk@8485 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 00:51:36 +00:00
ftang%netscape.com
438b28d444 add XP_ASSERT(IsUTFString) to verify RDF_Assert. Reviewed by rjc
git-svn-id: svn://10.0.0.236/trunk@8484 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 00:20:49 +00:00
cyeh%netscape.com
e6984159d7 added two perl scripts to the Mac only module to handle the
build number thingy on mac


git-svn-id: svn://10.0.0.236/trunk@8483 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 00:10:22 +00:00
av%netscape.com
2046d01aaf Anthrax feature for Windows
git-svn-id: svn://10.0.0.236/trunk@8482 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 23:45:14 +00:00
valeski%netscape.com
47fc00a267 removed some macros (for debugging ease). Changed the XP_OpenDir and an XP dir status routine to PR_* to get local file system directory listings working in Raptor.
git-svn-id: svn://10.0.0.236/trunk@8481 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 23:33:28 +00:00
av%netscape.com
9a0edc87f3 Anthrax feature for Windows
git-svn-id: svn://10.0.0.236/trunk@8480 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 23:22:26 +00:00
akkana%netscape.com
199dec9b31 Ender: make toolbars update as cursor or selection is moved.
git-svn-id: svn://10.0.0.236/trunk@8479 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 23:10:27 +00:00
despotdaemon%netscape.com
214781436a Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@8478 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 22:53:33 +00:00
cmanske%netscape.com
c5ea8ac346 Removed attempt to optimize editor layout by not relaying out entire line. Must find another solution
git-svn-id: svn://10.0.0.236/trunk@8477 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 22:48:27 +00:00
cmanske%netscape.com
8ffebb5d83 Composer FE bug fixes. Reverted background drawing change - fixed in XP code
git-svn-id: svn://10.0.0.236/trunk@8476 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 22:47:40 +00:00
pinkerton%netscape.com
e69fd8c60c remove string for IBM3270 stuff (unused).
git-svn-id: svn://10.0.0.236/trunk@8475 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 21:34:54 +00:00
cyeh%netscape.com
613e49ec9f generate build numbers all the time, since Mozilla is going to need
this number as well.


git-svn-id: svn://10.0.0.236/trunk@8474 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 21:23:32 +00:00
preed%netscape.com
f9278ea76d Adds functionality to write multiple comments to a log with one
submission. Also fixes some bugs and UI problems. Reviewed by terry.


git-svn-id: svn://10.0.0.236/trunk@8473 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 21:22:32 +00:00
valeski%netscape.com
9ca2937a83 we're now respecting success/failure return values from PREF_Get* routines, for the most part. imap, pop, news weren't cleaned up (nor was nucache).
Default values are now used when PREFs are down.


git-svn-id: svn://10.0.0.236/trunk@8472 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 21:17:03 +00:00
pinkerton%netscape.com
ec0bffcbe8 Removed old constant for location bar (from 3.0 days), using new one everywhere.
git-svn-id: svn://10.0.0.236/trunk@8471 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 20:33:07 +00:00
pinkerton%netscape.com
9f356b6ca1 updated for new constants, etc. Removing old cruft.
git-svn-id: svn://10.0.0.236/trunk@8470 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 20:32:29 +00:00
pinkerton%netscape.com
1ce4f42986 #ifdef Moz_mail_news stuff we don't use anymore.
git-svn-id: svn://10.0.0.236/trunk@8469 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 20:32:13 +00:00
pinkerton%netscape.com
38a5206b50 #ifdef MOZ_MAIL_NEWS stuff we don't use anymore.
git-svn-id: svn://10.0.0.236/trunk@8468 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 20:31:48 +00:00
pinkerton%netscape.com
6215521227 Move over some of McMullen's fixes for printing form elements correctly. Doesn't work, though.
git-svn-id: svn://10.0.0.236/trunk@8467 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 20:31:26 +00:00
pinkerton%netscape.com
5755542d9b remove some nethelp code.
git-svn-id: svn://10.0.0.236/trunk@8466 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 20:30:35 +00:00
pinkerton%netscape.com
86b84b5ad7 move constant from resgui into here.
git-svn-id: svn://10.0.0.236/trunk@8465 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 20:30:18 +00:00
pinkerton%netscape.com
eae7f86101 Fix bug where flex table was too large for the bookmarks window resulting in the last line being lost off the bottom.
git-svn-id: svn://10.0.0.236/trunk@8464 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 20:30:04 +00:00
pinkerton%netscape.com
9e9ec97bb3 #ifdef MOZ_MAIL_NEWS some stuff we don't use anymore.
git-svn-id: svn://10.0.0.236/trunk@8463 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 20:29:41 +00:00
pinkerton%netscape.com
85d4b6191e New "sort bookmarks menu" item.
git-svn-id: svn://10.0.0.236/trunk@8462 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 20:29:06 +00:00
pinkerton%netscape.com
2d68b2e312 Removing mail/news/conference/netcaster/3270/calendar cruft from global constants.
git-svn-id: svn://10.0.0.236/trunk@8461 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 20:28:50 +00:00
pinkerton%netscape.com
a5aa8e2640 use the new constants for form element messages.
git-svn-id: svn://10.0.0.236/trunk@8460 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 20:27:58 +00:00
pinkerton%netscape.com
c7852e9248 4.5 landing. Better drawing during printing and making the "inherited" typedefs private.
git-svn-id: svn://10.0.0.236/trunk@8459 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 20:27:38 +00:00
pinkerton%netscape.com
487b504545 No more 3270 support.
git-svn-id: svn://10.0.0.236/trunk@8458 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 20:26:11 +00:00
pinkerton%netscape.com
a66e5a4570 Allow tooltip to show up even when not on a valid cell.
git-svn-id: svn://10.0.0.236/trunk@8457 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 20:25:15 +00:00
pinkerton%netscape.com
1354f252f5 Better tooltip support (uses new tooltip for all columns).
git-svn-id: svn://10.0.0.236/trunk@8456 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 20:24:20 +00:00
cmanske%netscape.com
675baf0e9c Backed out change intended for testing only
git-svn-id: svn://10.0.0.236/trunk@8455 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 20:24:04 +00:00
pinkerton%netscape.com
6ed01ceeef Better handling of UTF8.
git-svn-id: svn://10.0.0.236/trunk@8454 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 20:23:47 +00:00
cmanske%netscape.com
9fe6bf1f51 Composer performance optimization work - FixupTableData optimizations. Added SingleSignon feature for Composer publishing. Fixed layout cell background bug - permission by nisheeth
git-svn-id: svn://10.0.0.236/trunk@8453 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 20:16:10 +00:00
cmanske%netscape.com
be91aa1f5c Removed global function not used by FEs
git-svn-id: svn://10.0.0.236/trunk@8452 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 20:16:00 +00:00
ftang%netscape.com
c9dd72cbff clean up intlwin.cpp to delete obsoleted Win16 stuff...
git-svn-id: svn://10.0.0.236/trunk@8451 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 20:05:52 +00:00
ftang%netscape.com
7fc6a69d45 fix window UTF8 problem. But the UTF8 to UTF8 conversion before Vietnamese
git-svn-id: svn://10.0.0.236/trunk@8450 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 20:03:34 +00:00
toshok%netscape.com
7da2228989 added check for sys_errlist/sys_nerr. defines HAVE_SYSERRLIST if they are present.
git-svn-id: svn://10.0.0.236/trunk@8449 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 19:57:01 +00:00
toshok%netscape.com
161a7ca9f5 get rid of all the platform ifdefs around sys_errlist. replace them all with #ifdef HAVE_SYSERRLIST, which is defined in the config/*.mk's and which should be tested for by configure.in
git-svn-id: svn://10.0.0.236/trunk@8448 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 19:44:12 +00:00
toshok%netscape.com
2040ea16b7 add NetBSD libs
git-svn-id: svn://10.0.0.236/trunk@8447 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 19:41:07 +00:00
ramiro%netscape.com
5ad56223a2 Add support for DG/UX.
Thanks to fraioli@dg-rtp.dg.com (Marc J. Fraioli).


git-svn-id: svn://10.0.0.236/trunk@8446 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 19:35:56 +00:00
jwz%mozilla.org
9f5ba2cbd4 All Unix versions of Mozilla link against libmime, so they should all
call MIME_RegisterConverters() to register the converter for documents
of type message/rfc822.

On Windows, that converter is currently only registered if SMART_MAIL is
defined.

On Mac, it's never registered at all.

Someone needs to consolidate all this.


git-svn-id: svn://10.0.0.236/trunk@8445 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 19:19:13 +00:00
spider%netscape.com
59049b4802 Unix fixes
git-svn-id: svn://10.0.0.236/trunk@8444 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 19:00:32 +00:00
prasad%netscape.com
7dfcb88001 don't hardcode domestic
git-svn-id: svn://10.0.0.236/trunk@8443 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 18:48:36 +00:00
donm%netscape.com
40260bd5fa adding files for new perl build_numbering system.
git-svn-id: svn://10.0.0.236/trunk@8442 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 17:15:41 +00:00
prasad%netscape.com
ba87cf3d53 take out Prasad node
git-svn-id: svn://10.0.0.236/trunk@8441 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 15:35:55 +00:00
spider%netscape.com
c232433e11 Updates to invalidate throbber after last image has completed loading
git-svn-id: svn://10.0.0.236/trunk@8440 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 14:45:24 +00:00
spider%netscape.com
c51c3e4af2 Updates for trex
git-svn-id: svn://10.0.0.236/trunk@8439 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 14:44:46 +00:00
brendan%netscape.com
68cdb7d0b0 Fix typos, int type mismatch, white-space, and layout style nits.
git-svn-id: svn://10.0.0.236/trunk@8438 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 08:23:34 +00:00
brendan%netscape.com
71e7443c33 Fix typos, white-space, and layout style nits.
git-svn-id: svn://10.0.0.236/trunk@8437 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 08:22:27 +00:00
brendan%netscape.com
6d7164c0d9 Propagate js/src back-out of fur's incompatible closure version-check mod.
git-svn-id: svn://10.0.0.236/trunk@8436 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 08:21:55 +00:00
brendan%netscape.com
9e306d15ea Propagate warren's OJI-related XP_MAC pragma change from js/src.
git-svn-id: svn://10.0.0.236/trunk@8435 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 08:21:09 +00:00
brendan%netscape.com
7d61af5201 Fix nits.
git-svn-id: svn://10.0.0.236/trunk@8434 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 07:56:42 +00:00
brendan%netscape.com
9667d8e074 Cope with uninitialized MWContext charset id (312759, mlm).
git-svn-id: svn://10.0.0.236/trunk@8433 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 07:37:52 +00:00
brendan%netscape.com
b9f6014b69 Fix indentation nit.
git-svn-id: svn://10.0.0.236/trunk@8432 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 07:32:25 +00:00
rpotts%netscape.com
9cf0bd7e44 Evil fix for deadlock during synchronous http url loads...
git-svn-id: svn://10.0.0.236/trunk@8431 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 05:51:40 +00:00
despotdaemon%netscape.com
f5dcaa87f4 Pseudo-automatic update of changes made by friedman@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@8430 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 05:09:33 +00:00
pierre%netscape.com
ed2b109deb added ":mozilla:dom:src:jsurl:MANIFEST"
git-svn-id: svn://10.0.0.236/trunk@8429 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 03:25:46 +00:00
rjc%netscape.com
db5c8c0aab If not set, default to data being local.
git-svn-id: svn://10.0.0.236/trunk@8428 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 01:57:51 +00:00
akkana%netscape.com
c263f6010e Fix IRIX build breakage -- add arg to isrequestorAlive call
git-svn-id: svn://10.0.0.236/trunk@8427 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 00:36:25 +00:00
pinkerton%netscape.com
95abb167e3 Changes for move of EClickState to netscape_constants (rev brade).
git-svn-id: svn://10.0.0.236/trunk@8426 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 00:23:38 +00:00
akkana%netscape.com
a0ebc626fd Show which Ender area is active by changing the frame shadow type.
git-svn-id: svn://10.0.0.236/trunk@8425 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 00:08:37 +00:00
pinkerton%netscape.com
2dfc6dd811 new UTF8 drawing routines (yay!)
git-svn-id: svn://10.0.0.236/trunk@8424 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 00:04:34 +00:00
thom%netscape.com
b96f8df857 fixed mac compile error in the initialization code
git-svn-id: svn://10.0.0.236/trunk@8423 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 00:04:27 +00:00
pinkerton%netscape.com
fc901a8a36 added new CTableTooltipPane pane.
git-svn-id: svn://10.0.0.236/trunk@8422 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 00:04:05 +00:00
pinkerton%netscape.com
b6cc01fc9a Move EClickState enums here, consolodating from several places.
git-svn-id: svn://10.0.0.236/trunk@8421 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 00:03:51 +00:00
pinkerton%netscape.com
4d8a97e52f Get new table tooltips in Aurora.
git-svn-id: svn://10.0.0.236/trunk@8420 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 00:03:32 +00:00
pinkerton%netscape.com
8a85601fbb Landing code from 4.5. Allows tooltips to stay around between areas that want them, instead of hiding each time.
git-svn-id: svn://10.0.0.236/trunk@8419 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 00:03:19 +00:00
pinkerton%netscape.com
ee01686f81 Landing of 4.5 changes to get new tooltips, bug fixes, and spring-loaded folders. Caused some APIs to change, I hope I got them all in derrived classes.
git-svn-id: svn://10.0.0.236/trunk@8418 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 00:02:34 +00:00
pinkerton%netscape.com
7c9b537c94 Changes from 4.5 to support new tooltips that don't go away when you move between two areas that desire a tooltip.
git-svn-id: svn://10.0.0.236/trunk@8417 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 00:01:56 +00:00
pinkerton%netscape.com
f04379a06b API change in tooltips from 4.5
git-svn-id: svn://10.0.0.236/trunk@8416 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 00:01:10 +00:00
pinkerton%netscape.com
f82ecce7e0 Some API changes from 4.5 version of CStandardFlexTable. Also pick up new tooltips and spring-loaded folders.
git-svn-id: svn://10.0.0.236/trunk@8415 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 00:00:54 +00:00
pinkerton%netscape.com
e096a51037 EClickState moved to Netscape_Constants
git-svn-id: svn://10.0.0.236/trunk@8413 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 23:59:57 +00:00
pinkerton%netscape.com
2411187e34 Move EClickState to Netscape_Constants
git-svn-id: svn://10.0.0.236/trunk@8412 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 23:58:57 +00:00
pinkerton%netscape.com
e0fbee679f Make Aurora tooltips use new table tooltips.
git-svn-id: svn://10.0.0.236/trunk@8411 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 23:57:43 +00:00
pinkerton%netscape.com
ae1decdd93 Added CTableTooltipPane.cp
git-svn-id: svn://10.0.0.236/trunk@8410 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 23:57:22 +00:00
pinkerton%netscape.com
79903994ab Register new table tooltip pane/attachment.
git-svn-id: svn://10.0.0.236/trunk@8409 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 23:56:42 +00:00
pinkerton%netscape.com
6560b573d4 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@8408 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 23:54:19 +00:00
cyeh%netscape.com
d8d12b4a6e adding module for the Messaging Server SDK
git-svn-id: svn://10.0.0.236/trunk@8407 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 23:38:36 +00:00
radha%netscape.com
7df87a5a4c Fix the inline editing part in navigation and management mode
git-svn-id: svn://10.0.0.236/trunk@8406 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 23:17:29 +00:00
donm%netscape.com
1ebde02c9f new perl build numbering system.
git-svn-id: svn://10.0.0.236/trunk@8405 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 23:08:56 +00:00
prasad%netscape.com
6dd5bddaf6 got rid of unnecessary stuff
git-svn-id: svn://10.0.0.236/trunk@8404 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 22:43:58 +00:00
prasad%netscape.com
f244a3ad6d taking out last change
git-svn-id: svn://10.0.0.236/trunk@8403 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 22:40:11 +00:00
prasad%netscape.com
9c58911966 adding new sources
git-svn-id: svn://10.0.0.236/trunk@8402 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 22:38:06 +00:00
prasad%netscape.com
920bfbe0de adding new sources
git-svn-id: svn://10.0.0.236/trunk@8401 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 22:31:18 +00:00
prasad%netscape.com
876243b61b adding new sources
git-svn-id: svn://10.0.0.236/trunk@8400 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 22:22:59 +00:00
prasad%netscape.com
7bee483657 adding new srcs
git-svn-id: svn://10.0.0.236/trunk@8397 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 21:33:09 +00:00
prasad%netscape.com
e112123845 changed C advaced to Advanced1 from Advanced_1 due to cvs error
git-svn-id: svn://10.0.0.236/trunk@8395 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 21:30:19 +00:00
prasad%netscape.com
67dde617f8 adding new srcs
git-svn-id: svn://10.0.0.236/trunk@8391 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 21:19:49 +00:00
prasad%netscape.com
559dde90ba adding new srcs
git-svn-id: svn://10.0.0.236/trunk@8388 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 21:13:27 +00:00
prasad%netscape.com
ceb9848678 adding new srcs
git-svn-id: svn://10.0.0.236/trunk@8386 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 21:07:59 +00:00
prasad%netscape.com
1e87ed3d72 ReadMeC.htm
git-svn-id: svn://10.0.0.236/trunk@8385 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 21:03:36 +00:00
prasad%netscape.com
91de9f6012 Adding new sources
git-svn-id: svn://10.0.0.236/trunk@8384 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 21:01:04 +00:00
prasad%netscape.com
855a68f423 adding new srcsMakefile
git-svn-id: svn://10.0.0.236/trunk@8383 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 20:58:37 +00:00
akkana%netscape.com
8cdace045c m_table is now passed in at creation time; we shouldn't delete it in dtor.
git-svn-id: svn://10.0.0.236/trunk@8382 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 20:50:56 +00:00
prasad%netscape.com
b16e806fe6 adding msg sdk sources
git-svn-id: svn://10.0.0.236/trunk@8381 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 20:50:36 +00:00
prasad%netscape.com
4d7b6655cf adding msg sdk sources*.c
git-svn-id: svn://10.0.0.236/trunk@8380 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 20:49:09 +00:00
rpotts%netscape.com
e236e09406 NGLayout only... Added a synchronous command line option for testing synchronous URL fetching.
git-svn-id: svn://10.0.0.236/trunk@8379 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 20:46:44 +00:00
prasad%netscape.com
184f5a1771 adding new files
git-svn-id: svn://10.0.0.236/trunk@8378 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 20:45:49 +00:00
prasad%netscape.com
6fe333d053 adding msg sdk sources
git-svn-id: svn://10.0.0.236/trunk@8377 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 20:42:22 +00:00
ftang%netscape.com
3916050cde fix NULL problem for IsUTF8String
git-svn-id: svn://10.0.0.236/trunk@8376 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 20:38:02 +00:00
despotdaemon%netscape.com
41d4882169 Pseudo-automatic update of changes made by cyeh@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@8375 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 20:28:48 +00:00
radha%netscape.com
9bd2fd58bd Move image rendering code to Image.cpp
git-svn-id: svn://10.0.0.236/trunk@8374 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 20:19:46 +00:00
radha%netscape.com
b6e62df847 Call fe_DisplayPixmap instead of DisplayPixmap
git-svn-id: svn://10.0.0.236/trunk@8373 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 20:17:51 +00:00
despotdaemon%netscape.com
f6c0d5546c Pseudo-automatic update of changes made by cyeh@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@8372 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 20:15:14 +00:00
radha%netscape.com
90af9ad2ff Add Image.cpp to the build list
git-svn-id: svn://10.0.0.236/trunk@8371 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 20:14:02 +00:00
radha%netscape.com
a6091b5668 Call RDFImage to draw background pixmap
git-svn-id: svn://10.0.0.236/trunk@8370 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 20:13:43 +00:00
radha%netscape.com
054abd49c4 Re-arrange the Cache code and add more utility functions
git-svn-id: svn://10.0.0.236/trunk@8369 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 20:11:25 +00:00
dcone%netscape.com
ca6bf4c1bd Finished the first pass at implementation
git-svn-id: svn://10.0.0.236/trunk@8368 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 20:10:57 +00:00
radha%netscape.com
aeda3891a5 RDFImages cache moved to RDFImage.cpp
git-svn-id: svn://10.0.0.236/trunk@8367 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 20:09:43 +00:00
radha%netscape.com
a18d7d3b91 Generic Image rendering functions moved to this new file. Initial checkin.
git-svn-id: svn://10.0.0.236/trunk@8366 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 20:09:05 +00:00
radha%netscape.com
4a21d8ddd0 Rename function DisplayPixmap to fe_DisplayPixmap
git-svn-id: svn://10.0.0.236/trunk@8365 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 20:07:32 +00:00
pinkerton%netscape.com
e3b10e7fa4 Do single-click mode in a better way.
git-svn-id: svn://10.0.0.236/trunk@8364 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 19:53:36 +00:00
pinkerton%netscape.com
11f93e6320 On mode switch, make sure tree has right # of clicks to open row.
git-svn-id: svn://10.0.0.236/trunk@8363 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 19:53:10 +00:00
pinkerton%netscape.com
e6060a48e8 Ability to set # of clicks to open row from API.
git-svn-id: svn://10.0.0.236/trunk@8362 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-24 19:52:47 +00:00
waterson%netscape.com
dec0b322d5 Fixed bad read references noticed by Jud with Quantify.
git-svn-id: svn://10.0.0.236/trunk@8357 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-23 22:15:21 +00:00
waterson%netscape.com
ebde099e8c Fixed the #ifdef NO_TIMING macros.
git-svn-id: svn://10.0.0.236/trunk@8356 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-23 22:12:07 +00:00
rickg%netscape.com
56bdc1241a more WIP for logparse
git-svn-id: svn://10.0.0.236/trunk@8355 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-23 20:21:58 +00:00
morse%netscape.com
5d78e78888 added routines for composer publishing
git-svn-id: svn://10.0.0.236/trunk@8354 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-23 15:19:19 +00:00
troy%netscape.com
11d9b958f7 Changed ParseValueorPercent() to return a PRBool
git-svn-id: svn://10.0.0.236/trunk@8353 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-23 02:10:44 +00:00
rickg%netscape.com
7623c4ab6e added iostream output to nsString
git-svn-id: svn://10.0.0.236/trunk@8352 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-22 17:50:13 +00:00
rickg%netscape.com
0c804eb8f6 new improved logparse
git-svn-id: svn://10.0.0.236/trunk@8351 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-22 17:49:36 +00:00
troy%netscape.com
a3923f12f8 Changed ParseValue() to return a PRBool result
git-svn-id: svn://10.0.0.236/trunk@8350 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-22 04:55:28 +00:00
morse%netscape.com
dcda670ab9 fix up multi-user logic for single singon
git-svn-id: svn://10.0.0.236/trunk@8349 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-22 02:46:49 +00:00
rpotts%netscape.com
661ca3e5d1 Added support to shut down netlib and the nsINetService instance...
git-svn-id: svn://10.0.0.236/trunk@8348 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-22 00:12:54 +00:00
raman%netscape.com
73df9e69d0 Converting Smartupdate code from Java to C++.
git-svn-id: svn://10.0.0.236/trunk@8347 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 23:46:11 +00:00
troy%netscape.com
afea246aeb Made sure clipChildren member of widget init data is initialized
git-svn-id: svn://10.0.0.236/trunk@8346 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 23:06:01 +00:00
akkana%netscape.com
9336325332 Fixes for switching focus on Ender toolbars
git-svn-id: svn://10.0.0.236/trunk@8345 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 23:02:19 +00:00
akkana%netscape.com
356705cb89 Fixes for switching focus on Ender toolbars. Also, clean up code wrt virtual declarations.
git-svn-id: svn://10.0.0.236/trunk@8344 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 23:01:55 +00:00
joki%netscape.com
be271d814a Fix makefile typo to fix unix builds
git-svn-id: svn://10.0.0.236/trunk@8343 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 21:59:08 +00:00
joki%netscape.com
3e45079cd6 Fix nsIWidget's GetParent call to return parent, not self.
git-svn-id: svn://10.0.0.236/trunk@8342 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 21:41:36 +00:00
joki%netscape.com
ba9796126f Adding DOM append child interface and implementing window.frames array.
git-svn-id: svn://10.0.0.236/trunk@8341 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 21:39:27 +00:00
joki%netscape.com
7e064bbd3a Modifying nsIContent's AppendChild -> AppendChildTo to stop conflict with
DOM interfaces.


git-svn-id: svn://10.0.0.236/trunk@8340 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 21:38:26 +00:00
morse%netscape.com
d80772b5de added comment requested by relliott
git-svn-id: svn://10.0.0.236/trunk@8339 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 20:45:59 +00:00
morse%netscape.com
6ad29b6117 get privacy tutorial from outside the firewall so web users can see it
git-svn-id: svn://10.0.0.236/trunk@8338 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 20:42:20 +00:00
morse%netscape.com
929cfbda61 hook up about-site menu item
git-svn-id: svn://10.0.0.236/trunk@8337 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 20:41:06 +00:00
morse%netscape.com
2def2e94bf pass current url rather than base url to single signon
git-svn-id: svn://10.0.0.236/trunk@8336 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 20:38:28 +00:00
preed%netscape.com
41bcfb40ff This is a bug fix; when two tree were displayed at once, the argument in
the menu for "addnote.cgi" was passed as tree1 and tree2, not the specific
buildtree for that block. This problem was experienced with the other menu
items, but corrected before the first checkin. This checkin fixes this
problem with addnote.cgi as well.


git-svn-id: svn://10.0.0.236/trunk@8335 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 18:40:26 +00:00
kostello%netscape.com
9bbbdd2773 Synched with Pasteboard code on the branch
git-svn-id: svn://10.0.0.236/trunk@8334 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 18:28:48 +00:00
dcone%netscape.com
f268fc7fbf *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@8333 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 17:14:30 +00:00
dcone%netscape.com
3b53441efb Added GFX factory creation, this allows the nsDeviceContext to be created.
git-svn-id: svn://10.0.0.236/trunk@8332 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 17:13:52 +00:00
dcone%netscape.com
6baa307fd1 Major redo based on a new GFX library
git-svn-id: svn://10.0.0.236/trunk@8331 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 17:13:14 +00:00
dcone%netscape.com
f252c39e4e Added the creation of the device context.
git-svn-id: svn://10.0.0.236/trunk@8330 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 17:12:32 +00:00
dcone%netscape.com
b8d3f3b8bb Updated to the correct way the DeviceContext should work, added the twips calculation
git-svn-id: svn://10.0.0.236/trunk@8329 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 17:11:15 +00:00
ramiro%netscape.com
933646ed20 Move the bookmarks menu to the top level menubar.
git-svn-id: svn://10.0.0.236/trunk@8327 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 10:43:27 +00:00
mcafee%netscape.com
fa3ec6839a Link with $(CCC).
git-svn-id: svn://10.0.0.236/trunk@8326 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 09:30:35 +00:00
mcafee%netscape.com
d6f87350e9 Changed project
git-svn-id: svn://10.0.0.236/trunk@8325 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 09:20:23 +00:00
mcafee%netscape.com
7de4af812b Include paths and defines from Makefile.mozilla
git-svn-id: svn://10.0.0.236/trunk@8324 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 09:18:32 +00:00
mcafee%netscape.com
e815ceb3a8 Adding test CFLAG
git-svn-id: svn://10.0.0.236/trunk@8323 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 09:16:07 +00:00
mcafee%netscape.com
6f28405e11 FE_UnloadPlugin() prototype added struct _np_handle* paramter.
git-svn-id: svn://10.0.0.236/trunk@8322 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 08:48:22 +00:00
mcafee%netscape.com
5aeab4a954 FE_PromptIMAPSubscriptionUpgrade() prototype changed.
git-svn-id: svn://10.0.0.236/trunk@8321 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 08:47:40 +00:00
mcafee%netscape.com
70ee80b38e _IMGCB_DisplayPixmap() prototype changed.
git-svn-id: svn://10.0.0.236/trunk@8320 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 08:47:11 +00:00
mcafee%netscape.com
72205ff75c Missing EmbedWindow calls, CheckConfirm, SelectDialog
git-svn-id: svn://10.0.0.236/trunk@8319 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 08:46:39 +00:00
mcafee%netscape.com
0506db4654 Added ybmisc.c, REQUIRES needs java, plugimpl, security.
git-svn-id: svn://10.0.0.236/trunk@8318 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 08:45:51 +00:00
mcafee%netscape.com
71b1b72d93 Initial checkin
git-svn-id: svn://10.0.0.236/trunk@8317 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 08:45:10 +00:00
mcafee%netscape.com
69d26fc990 nspr20 -> nsprpub
git-svn-id: svn://10.0.0.236/trunk@8316 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 08:31:34 +00:00
mcafee%netscape.com
b161581f85 minor comment
git-svn-id: svn://10.0.0.236/trunk@8315 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 08:16:20 +00:00
mcafee%netscape.com
4137f588cf Initial checkin
git-svn-id: svn://10.0.0.236/trunk@8314 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 08:14:20 +00:00
brendan%netscape.com
297f681a94 Insist on / after builtin at front of MIME type.
git-svn-id: svn://10.0.0.236/trunk@8313 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 08:12:14 +00:00
brendan%netscape.com
2ee8e38a4a Use text/html, not HTMLAREA, as value of TEXTAREA TYPE field; debloat code.
git-svn-id: svn://10.0.0.236/trunk@8312 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 08:11:13 +00:00
brendan%netscape.com
f2a071f8f4 Defend against null from FE_FindFileExt in CRDFImage::ProcessIcon (hyatt).
git-svn-id: svn://10.0.0.236/trunk@8311 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 08:09:01 +00:00
mcafee%netscape.com
3107038651 minor text formatting
git-svn-id: svn://10.0.0.236/trunk@8310 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 08:04:58 +00:00
mcafee%netscape.com
f293558ca7 Includes from Makefile.mozilla
git-svn-id: svn://10.0.0.236/trunk@8309 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 07:52:10 +00:00
mcafee%netscape.com
b31421ce85 Initial checkin
git-svn-id: svn://10.0.0.236/trunk@8308 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 07:41:49 +00:00
mcafee%netscape.com
ed2cfdfed2 Moving Mozilla-specific stuff to Makefile.mozilla for now
git-svn-id: svn://10.0.0.236/trunk@8307 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 07:31:53 +00:00
mcafee%netscape.com
9f847ad970 Initial checkin
git-svn-id: svn://10.0.0.236/trunk@8306 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 07:25:08 +00:00
mcafee%netscape.com
952af2cdc8 Initial checkin
git-svn-id: svn://10.0.0.236/trunk@8305 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 07:19:32 +00:00
valeski%netscape.com
16b4397839 fixing UMR (unitialized memory read) error in netlib timer tracing.
git-svn-id: svn://10.0.0.236/trunk@8304 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 07:01:22 +00:00
morse%netscape.com
bb272f36f1 fix build bustage on mac
git-svn-id: svn://10.0.0.236/trunk@8303 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 06:26:41 +00:00
rpotts%netscape.com
c88eb2fd9c Fixed a crash when Destroy(...) was called without first calling Init(...)
git-svn-id: svn://10.0.0.236/trunk@8302 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 06:21:52 +00:00
joki%netscape.com
375b5308ba Okay, another guess at this bustage.
git-svn-id: svn://10.0.0.236/trunk@8301 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 06:13:03 +00:00
joki%netscape.com
e2d66462b8 Why can't all those little slashes just get along.
git-svn-id: svn://10.0.0.236/trunk@8300 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 05:12:27 +00:00
morse%netscape.com
ffb6a2c5e7 added privacy central
git-svn-id: svn://10.0.0.236/trunk@8299 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 05:04:12 +00:00
morse%netscape.com
7cb07d6bc8 Makefile
git-svn-id: svn://10.0.0.236/trunk@8298 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 04:40:39 +00:00
morse%netscape.com
5b69c849ce added privacy central
git-svn-id: svn://10.0.0.236/trunk@8297 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 04:39:59 +00:00
joki%netscape.com
9c033f7d60 Fix this darned unix redness.
git-svn-id: svn://10.0.0.236/trunk@8296 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 04:38:43 +00:00
cls%seawood.org
724f7bde45 Restoring file biff'd in merge.
git-svn-id: svn://10.0.0.236/trunk@8295 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 03:50:48 +00:00
cls%seawood.org
e0052638a0 Restoring file biff'd in merge.
git-svn-id: svn://10.0.0.236/trunk@8293 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 03:34:44 +00:00
joki%netscape.com
191a3d156d Modify mouseover url messages to send empty string when leaving links.
git-svn-id: svn://10.0.0.236/trunk@8292 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 03:28:44 +00:00
cls%seawood.org
d50e1798e7 Fixed problem with Irix when $x_includes is not set.
git-svn-id: svn://10.0.0.236/trunk@8291 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 03:11:33 +00:00
clu%netscape.com
4911dc6d39 implemented FE of Convert Table to Text and Convert Text to Table. reviewed by sarri.
git-svn-id: svn://10.0.0.236/trunk@8290 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 03:08:41 +00:00
clu%netscape.com
d5f3797dde adding cmd ids for composer Convert_Text_To_Table and Convert_Table_To_Text. reviewed by sarri.
git-svn-id: svn://10.0.0.236/trunk@8289 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 03:06:20 +00:00
clu%netscape.com
7dbbfd73de #313490 - activation and deactivation of image dialog captions. reviewed by sarri.
git-svn-id: svn://10.0.0.236/trunk@8288 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 03:05:01 +00:00
clu%netscape.com
8c94f1f92c fix to #312039 - font toolbar update. Also implemented FE for Convert Text to Table and Convert Table to Text. reviewed by sarri.
git-svn-id: svn://10.0.0.236/trunk@8287 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 03:04:59 +00:00
clu%netscape.com
794ef9319b partial fix for #312859; reviewed by sarri.
git-svn-id: svn://10.0.0.236/trunk@8286 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 03:04:57 +00:00
leaf%mozilla.org
77970cfb5d added mozilla/config/autoconf.mk.in to MozillaSourceUnixOnly module
git-svn-id: svn://10.0.0.236/trunk@8284 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 02:42:59 +00:00
rickg%netscape.com
dfdf0fbcb9 Too many bugs to mention; tables, skipped content; perf; memory
git-svn-id: svn://10.0.0.236/trunk@8283 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 02:04:39 +00:00
rickg%netscape.com
71238ab307 fixed off by one error in Pop()
git-svn-id: svn://10.0.0.236/trunk@8282 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 02:03:56 +00:00
morse%netscape.com
9f0db52c2f fix problem caused by dereferencing null pointer
git-svn-id: svn://10.0.0.236/trunk@8281 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 01:53:08 +00:00
jevering%netscape.com
a4e04b1a1e Moving plugin directory stuff.
git-svn-id: svn://10.0.0.236/trunk@8280 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 01:12:53 +00:00
pinkerton%netscape.com
049d5d84a6 Fix rowRefresh() boo-boo so now it actually redraws the cell when the custom icon loads. Cells with custom icons now draw with the correct text color in all modes.
git-svn-id: svn://10.0.0.236/trunk@8279 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 00:40:34 +00:00
vidur%netscape.com
7aadac9126 Fixed build bustage
git-svn-id: svn://10.0.0.236/trunk@8278 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-21 00:24:40 +00:00
vidur%netscape.com
1336fb61cc Fixed build bustage.
git-svn-id: svn://10.0.0.236/trunk@8277 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 23:07:31 +00:00
vidur%netscape.com
5e62f96c2c Fixed build bustage.
git-svn-id: svn://10.0.0.236/trunk@8276 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 23:00:52 +00:00
mcafee%netscape.com
5587f1d8d2 Initial checkin
git-svn-id: svn://10.0.0.236/trunk@8275 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 22:46:05 +00:00
vidur%netscape.com
128b33e018 Used IIDs for nsIConnectionInfo and nsIDocumentLoadInfo
git-svn-id: svn://10.0.0.236/trunk@8274 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 22:29:22 +00:00
vidur%netscape.com
74ab64f3f0 Added nsIDocumentLoadInfo interface. Temporarily added service startup inside WebShell factory.
git-svn-id: svn://10.0.0.236/trunk@8273 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 22:28:52 +00:00
vidur%netscape.com
4c4c6f8445 Added nsIConnectionInfo interface. Temporarily special-cased javascript: URLs in URL parsing.
git-svn-id: svn://10.0.0.236/trunk@8272 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 22:28:09 +00:00
vidur%netscape.com
d5ef9d3965 Exported NET_StreamBuilder and NET_RegisterProtocolImplementation for modular netlib
git-svn-id: svn://10.0.0.236/trunk@8271 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 22:27:20 +00:00
vidur%netscape.com
693f5d1915 Exported NET_StreamBuilder for modular netlib
git-svn-id: svn://10.0.0.236/trunk@8270 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 22:26:31 +00:00
vidur%netscape.com
b9d512330b Added javascript: URL handling. Added AddNamedReference and RemovedNamedReference to script context interface.
git-svn-id: svn://10.0.0.236/trunk@8269 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 22:25:21 +00:00
jevering%netscape.com
92c2b89717 Moved the ART image hack to the tip.
git-svn-id: svn://10.0.0.236/trunk@8268 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 22:10:06 +00:00
pinkerton%netscape.com
deb24c7782 Handle d&d between multiple popdown trees. Make sure we broadcast that the current view has changed so that the title strip picks it up.
git-svn-id: svn://10.0.0.236/trunk@8267 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 21:51:10 +00:00
pinkerton%netscape.com
dc17b4d9a5 Fix hilight redraw bugs during d&d.
git-svn-id: svn://10.0.0.236/trunk@8266 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 21:50:12 +00:00
pinkerton%netscape.com
175ff9ffad Correctly do dragging between popdown trees in the same window. Also only open the first item in the selection when in a popdown.
git-svn-id: svn://10.0.0.236/trunk@8265 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 21:49:56 +00:00
pinkerton%netscape.com
990a507247 Broadcast message on mouse-up.
git-svn-id: svn://10.0.0.236/trunk@8264 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 21:49:11 +00:00
pinkerton%netscape.com
3f5a9b51ac Handle redrawing the popdown tree during d&d when one goes away and a new one appears. Also close on mouse-up when clicking outside of popdown.
git-svn-id: svn://10.0.0.236/trunk@8263 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 21:48:34 +00:00
jgellman%netscape.com
4d840695e9 2nd try; new parser from james clark
git-svn-id: svn://10.0.0.236/trunk@8262 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 21:20:50 +00:00
kmcclusk%netscape.com
5b9b614171 Added XP_UNIX code to leave the top slash for absolute file paths under UNIX.
This fixes a problem where all of the slashs get stripped off because the URL
is asked to parse a previously parsed url string.


git-svn-id: svn://10.0.0.236/trunk@8261 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 20:32:52 +00:00
jgellman%netscape.com
679d9e3f03 back out last checkin -- bad Macintosh karma, need more time
git-svn-id: svn://10.0.0.236/trunk@8260 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 20:05:26 +00:00
jgellman%netscape.com
a7f3d8c6b3 new XML parser from James Clark
git-svn-id: svn://10.0.0.236/trunk@8259 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 19:24:29 +00:00
karnaze%netscape.com
928a6de8a5 checked for null form manager & fixed memory leak in win95 hack code
git-svn-id: svn://10.0.0.236/trunk@8256 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 18:27:13 +00:00
buster%netscape.com
0e5df88ea8 verify that proportionate-width columns (1* format, or COLS attribute)
get sized to at least their minimum width


git-svn-id: svn://10.0.0.236/trunk@8255 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 17:31:20 +00:00
warren%netscape.com
cf540377a4 Fixed copyright.
git-svn-id: svn://10.0.0.236/trunk@8252 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 07:58:32 +00:00
warren%netscape.com
9abf0ee471 Added from SpiderMonkey131_BRANCH of ns/js/ref/liveconnect
git-svn-id: svn://10.0.0.236/trunk@8251 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 07:58:00 +00:00
rpotts%netscape.com
586e2e3691 moving changes in 3.55.2.1 onto the tip...
git-svn-id: svn://10.0.0.236/trunk@8250 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 06:19:11 +00:00
rpotts%netscape.com
b142e0f478 moving changes in 1.36.2.1 onto the tip...
git-svn-id: svn://10.0.0.236/trunk@8248 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 06:17:47 +00:00
rpotts%netscape.com
4b2b401905 moving 3.23.4.1 to the tip...
git-svn-id: svn://10.0.0.236/trunk@8246 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 06:16:32 +00:00
uid401
6c4b8f671a Documentation improvements.
git-svn-id: svn://10.0.0.236/trunk@8244 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 04:51:19 +00:00
mcafee%netscape.com
9cb384db89 Initial version
git-svn-id: svn://10.0.0.236/trunk@8243 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 03:24:24 +00:00
mcafee%netscape.com
1e98a8b997 Switching to test OS_ARCH for Rhapsody instead of using RHAPSODY.
git-svn-id: svn://10.0.0.236/trunk@8242 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 03:09:31 +00:00
mcafee%netscape.com
04523afd75 Woops, we should test OS_ARCH for Rhapsody instead of using RHAPSODY.
git-svn-id: svn://10.0.0.236/trunk@8241 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 03:09:01 +00:00
mcafee%netscape.com
0f70da9c01 Added FE_PromptIMAPSubscriptionUpgrade()
git-svn-id: svn://10.0.0.236/trunk@8240 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 02:32:50 +00:00
mcafee%netscape.com
3c5be0ed02 Added FE_ShowMinibuffer()
git-svn-id: svn://10.0.0.236/trunk@8239 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 02:32:25 +00:00
morse%netscape.com
78ddac7d6f remove lock from SI_LogNewURL to assure it won't deadlock
git-svn-id: svn://10.0.0.236/trunk@8238 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 02:31:57 +00:00
mcafee%netscape.com
560b3337b0 Added FE_AlternateCompose()
git-svn-id: svn://10.0.0.236/trunk@8237 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 02:31:42 +00:00
mcafee%netscape.com
66c2c448f7 _IMGCB_DisplayPixmap()'s paramters changed; added IMGCBFactory_Create().
git-svn-id: svn://10.0.0.236/trunk@8236 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 02:31:13 +00:00
mcafee%netscape.com
f7ebc021a8 FE_UnloadPlugin()'s parameters changed.
git-svn-id: svn://10.0.0.236/trunk@8235 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 02:30:38 +00:00
mcafee%netscape.com
5794639481 Added XFE_AskStreamQuestion to link stubfe.
git-svn-id: svn://10.0.0.236/trunk@8234 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 02:30:00 +00:00
mcafee%netscape.com
20e701cebc Added STUBFE_CreateEmbedWindow STUBFE_SaveEmbedWindow STUBFE_RestoreEmbedWindow STUBFE_DestroyEmbedWindow STUBFE_FreeBuiltinElement STUBFE_DisplayBuiltin STUBFE_CheckConfirm STUBFE_SelectDialog.
git-svn-id: svn://10.0.0.236/trunk@8233 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 02:29:26 +00:00
mcafee%netscape.com
3a38b24d07 Updated libraries to link this on Solaris. Stripped out release stuff. Took out some XFE hacks.
git-svn-id: svn://10.0.0.236/trunk@8232 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 02:28:32 +00:00
ftang%netscape.com
66656c9da5 add XP_ASSERT(IsUTF8String) to some HT api
git-svn-id: svn://10.0.0.236/trunk@8230 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 00:58:52 +00:00
mcafee%netscape.com
41f3bf64df Switch to using OS_ARCH instead of shell command. r=ramiro
git-svn-id: svn://10.0.0.236/trunk@8229 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 00:51:42 +00:00
pinkerton%netscape.com
191fdd6738 Don't let popdown tree go off the right side of window. Push it back to left if it would.
git-svn-id: svn://10.0.0.236/trunk@8228 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 00:48:01 +00:00
pinkerton%netscape.com
0f9d2f989b Fix problems with popdown tree crashing when closing on double-click (again) by making every browser window have its own version of it and have a static member which points to the currently active one so we can still do things like clip it out when blitting images in the html area w/out having to know about the browser window.
git-svn-id: svn://10.0.0.236/trunk@8227 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 00:40:08 +00:00
pinkerton%netscape.com
34e9f3e491 Don't call HT_CanDropURLOn with bogus data.
git-svn-id: svn://10.0.0.236/trunk@8226 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 00:38:45 +00:00
scullin%netscape.com
c9fa0f4535 Fix hack incompatibility.
git-svn-id: svn://10.0.0.236/trunk@8225 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 00:33:26 +00:00
cyeh%netscape.com
bb95f3bd18 adding file: merge from AUTOCONF_1_0
git-svn-id: svn://10.0.0.236/trunk@8224 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 00:31:17 +00:00
cyeh%netscape.com
72e703144e merging files from AUTOCONF_1_0 branch
git-svn-id: svn://10.0.0.236/trunk@8223 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 00:30:12 +00:00
scullin%netscape.com
053a936966 Move form element hack from branch.
git-svn-id: svn://10.0.0.236/trunk@8222 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 00:24:29 +00:00
cyeh%netscape.com
3e7e71b99a fixing biffed autoconf_1_0 merge
git-svn-id: svn://10.0.0.236/trunk@8221 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 00:18:03 +00:00
cyeh%netscape.com
dc77a65bd2 merge autoconf branch to tip
git-svn-id: svn://10.0.0.236/trunk@8220 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 23:36:20 +00:00
cyeh%netscape.com
190a99330b resurrect file toasted from tip
git-svn-id: svn://10.0.0.236/trunk@8219 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 23:34:46 +00:00
valeski%netscape.com
0317dc7bb0 fixed memory leak a little more safely :)
git-svn-id: svn://10.0.0.236/trunk@8217 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 23:33:46 +00:00
valeski%netscape.com
fe7b858a07 fixed memory leak
git-svn-id: svn://10.0.0.236/trunk@8216 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 23:32:43 +00:00
preed%netscape.com
0ac409a746 Fixes some bugs in the way messages of the day were stored; certain
characters could cause tinderbox to bomb out because they weren't escaped,
and the '1;' at the end was missing (which is bad because this is needed
if it's required). Reviewed by terry.


git-svn-id: svn://10.0.0.236/trunk@8215 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 23:31:52 +00:00
preed%netscape.com
b086f7409c Added features to allow popup menu's in showbuilds.cgi (requsted), and
modified a chop to chomp to make SURE it does what we want. Reviewed by
terry.


git-svn-id: svn://10.0.0.236/trunk@8214 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 23:20:45 +00:00
troy%netscape.com
3dd6745dd7 Changed web shell widget to NOT clip children
git-svn-id: svn://10.0.0.236/trunk@8213 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 23:13:00 +00:00
troy%netscape.com
703ca9af2b Added clipChildren option to nsWidgetInitData
git-svn-id: svn://10.0.0.236/trunk@8212 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 23:11:41 +00:00
valeski%netscape.com
277cec0087 webshell/public/nsIDocumentLoader.h
Extended the nsIDocumentLoader interface's LoadURL() method to take a reload type parameter.

webshell/public/nsIWebShell.h
Extended the nsIWebShell interface's LoadURL() method to take a reload type parameter.

webshell/src/nsDocLoader.cpp
1. Extended the nsIDocumentBindInfo interface's Bind() method to take a reload type parameter. The Bind() method now takes the reload parameter and passes it to the nsIUrl it creates.
2. Added support to the DocumentLoader for the extended LoadURL() parameter list. It now passes the reload type down into the Bind() method of the nsIDocumentBindInfo.

webshell/src/nsWebShell.cpp
1. Added support to the nsWebShell to use the new reload type parameter during loads.
2. Hooked up the reload type parameter in the nsWebShell::Reload() method so we actually use it.


git-svn-id: svn://10.0.0.236/trunk@8211 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 23:01:52 +00:00
valeski%netscape.com
b4d5c7e4ce RAPTOR ONLY CHECKIN
network/module/nsIURL.h
Added Get/Set ReloadType methods so a user can query/set the reload type for the url. The default is normal reload.

network/module/nsURL.cpp
Added support for the new nsIURL interface methods (Get/Set ReloadType).

network/module/nsNetService.cpp
OpenStream and OpenBlockingStream now query the nsIURL for it's reload type before creating the url struct. This way we can control how the url is loaded.


git-svn-id: svn://10.0.0.236/trunk@8210 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 23:00:15 +00:00
karnaze%netscape.com
fe7799e863 removed calls to DidReflow on browse button and text area
git-svn-id: svn://10.0.0.236/trunk@8206 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 21:43:46 +00:00
scullin%netscape.com
0c740efd34 Move resource hack to tip.
git-svn-id: svn://10.0.0.236/trunk@8205 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 21:38:57 +00:00
michaelp%netscape.com
f41b11459c fixed bug in loading one of the icons where the handle to load from was never
specified.


git-svn-id: svn://10.0.0.236/trunk@8204 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 21:05:50 +00:00
michaelp%netscape.com
a59b85078e added support for opening new windows with _blank url targets.
git-svn-id: svn://10.0.0.236/trunk@8203 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 21:00:51 +00:00
chuckb%netscape.com
d495a73e5b Java SDK build instructions
git-svn-id: svn://10.0.0.236/trunk@8202 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 20:57:12 +00:00
michaelp%netscape.com
0f6556178c added assert to warn you of recursive painting.
git-svn-id: svn://10.0.0.236/trunk@8201 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 20:56:52 +00:00
michaelp%netscape.com
2aa2b60dad tiny change to get things to work under the 4.1 compiler.
git-svn-id: svn://10.0.0.236/trunk@8200 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 20:56:27 +00:00
cls%seawood.org
4288391d23 AUTOCONF_1_0 landing.
git-svn-id: svn://10.0.0.236/trunk@8198 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 20:42:14 +00:00
buster%netscape.com
214f7beda3 fixes a layout bug where subsequent cells in a column when colspans are involved
could select the wrong starting width for the column, causing it to have the
wrong ending width.


git-svn-id: svn://10.0.0.236/trunk@8197 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 20:41:06 +00:00
buster%netscape.com
7adfe644b7 modified the resize reflow optimization so max element size is returned
if requested without triggering a reflow if the width hasn't changed.


git-svn-id: svn://10.0.0.236/trunk@8196 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 18:40:33 +00:00
despotdaemon%netscape.com
0e3954d4bd Pseudo-automatic update of changes made by gem@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@8195 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 18:25:53 +00:00
troy%netscape.com
88d691c869 Re-ordered code that adds loader object to the array of loaders
git-svn-id: svn://10.0.0.236/trunk@8194 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 18:07:27 +00:00
troy%netscape.com
b9f04152ae Changed call to UpdateView() to be synchronous. This keeps us from
going re-entrant


git-svn-id: svn://10.0.0.236/trunk@8193 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 17:45:28 +00:00
cyeh%netscape.com
ecc5be6ea7 change to the modules file per Chuck Boatwright, LDAP owner
git-svn-id: svn://10.0.0.236/trunk@8192 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 17:33:00 +00:00
dcone%netscape.com
539998ec1a fixed list up a little for gfx build
git-svn-id: svn://10.0.0.236/trunk@8191 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 17:26:50 +00:00
dcone%netscape.com
645dadc9f8 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@8190 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 17:24:14 +00:00
dcone%netscape.com
a9d4cc2a1b Re wrote these files to reflect the correct way of building Devicecontexts
git-svn-id: svn://10.0.0.236/trunk@8189 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 17:24:13 +00:00
dcone%netscape.com
23d55d5115 Added some project info, files
git-svn-id: svn://10.0.0.236/trunk@8188 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 17:21:53 +00:00
dcone%netscape.com
ca72a23f3d Re-syn
git-svn-id: svn://10.0.0.236/trunk@8187 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 17:21:06 +00:00
dcone%netscape.com
b29ee2f9e9 Major redo based on a new GFX library
git-svn-id: svn://10.0.0.236/trunk@8186 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 17:20:31 +00:00
buster%netscape.com
ad76084cb9 improved colspan handling.
cells with colspans and specified widths divide their width provisionally between the columns they span. This provisional division is ammended by any cell in any of the effected columns that:
1) has a colspan=1, and
2) has a width specified
the widths of all other columns must be adjusted for cells like these.  Further complicating matters is that it seems <faith> that if multiple colspanning cells intersect a column and each has a width
specified such that the column would have a different width depending on which is used, only the first such cell is used </faith>.  I can neither confirm nor deny this reading the mozilla code.

I also taught the cell map how to deal with this situation:

 colspan=1 | colspan=2 | colspan=1
 colspan=1 | colspan=2 | colspan=1

This table "really" has 4 columns, but the middle cells are treated as if they have no colspan.
Trust me, it matters.  The original colspan attributes can't simply be thrown away because Mr. DOM
could come along at any time and add/remove a cell that would make them important.


git-svn-id: svn://10.0.0.236/trunk@8185 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 15:43:51 +00:00
mcafee%netscape.com
78a287cde8 Compile flag needed to get expat/xmlparse/xmlparse.c to compile correctly.
git-svn-id: svn://10.0.0.236/trunk@8184 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 08:29:56 +00:00
mcafee%netscape.com
b05ae4a7ce Adding RHAPSODY define so we don't have to do shell commands for ifdef's in Makefiles
git-svn-id: svn://10.0.0.236/trunk@8183 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 08:26:15 +00:00
mcafee%netscape.com
e2f15157aa Adding ybfe, YellowBox/Rhapsody front-end
git-svn-id: svn://10.0.0.236/trunk@8182 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 07:23:28 +00:00
joki%netscape.com
f300c374d7 Moving view selection for event handling into nsViewManager, Adding GrabMouseEvents and GrabKeyEvents
git-svn-id: svn://10.0.0.236/trunk@8181 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 05:35:20 +00:00
troy%netscape.com
e2ff812829 Added some comments
git-svn-id: svn://10.0.0.236/trunk@8180 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 05:06:59 +00:00
troy%netscape.com
2a617558d9 Changed CopyOffScreenBits() to make sure the logical palette is selected
into the screen DC.


git-svn-id: svn://10.0.0.236/trunk@8179 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 04:41:48 +00:00
troy%netscape.com
0ea8197cc3 Changed WM_QUERYNEWPALETTE code to return TRUE to indicate that
a palette was realized


git-svn-id: svn://10.0.0.236/trunk@8176 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 02:31:08 +00:00
morse%netscape.com
3bde6edabc fixed incorrect return type on NET_CookiePermission
git-svn-id: svn://10.0.0.236/trunk@8175 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 02:30:25 +00:00
clu%netscape.com
3bcc29c1be #71944. reviewed by jfrancis.
git-svn-id: svn://10.0.0.236/trunk@8174 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 02:18:02 +00:00
clu%netscape.com
154eccdf6a adding cmd ids for composer Split Cell and Merge Cell. reviewed by jfrancis.
git-svn-id: svn://10.0.0.236/trunk@8173 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 02:18:01 +00:00
clu%netscape.com
e0c34a0c13 implementing macfe Split Cell and Merge Cell. Included AutoKey in the conditional statements for backspace delete and regular key input to help with typing efficiency. reviewed by jfrancis.
git-svn-id: svn://10.0.0.236/trunk@8172 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 02:18:00 +00:00
clu%netscape.com
2ca1451b24 checking in ftang's fix for the correct positioning of the asian language input window.
git-svn-id: svn://10.0.0.236/trunk@8171 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 02:17:59 +00:00
troy%netscape.com
1067da29bd Changed to realize the palette in the background
git-svn-id: svn://10.0.0.236/trunk@8170 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 01:58:17 +00:00
peterl%netscape.com
61c45a8a04 handle body's marginwidth/height via a special style rule
git-svn-id: svn://10.0.0.236/trunk@8169 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 01:16:40 +00:00
peterl%netscape.com
a458984ea5 handle marginwidth/height via a special style rule
git-svn-id: svn://10.0.0.236/trunk@8168 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 01:16:21 +00:00
mcafee%netscape.com
21157c248b Adding support for XP_UNIX && NO_X11. r,a=warren
git-svn-id: svn://10.0.0.236/trunk@8167 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 01:13:08 +00:00
troy%netscape.com
30842a5c4b Changed palette code to get the palette from the device context
git-svn-id: svn://10.0.0.236/trunk@8166 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 00:57:02 +00:00
troy%netscape.com
1d7149f1d1 Added GetPaletteInfo()
git-svn-id: svn://10.0.0.236/trunk@8165 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-19 00:37:05 +00:00
valeski%netscape.com
b4eb4f5402 webshell/public/nsIDocumentLoader.h
Removed support for the underlying timer/refreshurl infrastructure.

webshell/src/nsDocLoader.cpp
1. Added support in nsDocumentBindInfo for the new nsIRefreshUrl method for cancelling.
1.5 Changed the refreshurl() method so it delegates to the container's (i.e. webshell's) refreshurl() method.
2. Removed the "actual" refresh url implementation (timers) from the nsDocumentBindInfo. It's now in the webshell and nsDocumentBindInfo's implementation of nsIRefreshUrl simply delegates to the "container" (i.e. the webshell).
3. Added call to new NS_NewURL() routine which takes an nsISupports pointer as an arg, if the nsDocumentBindInfo has a container to pass along.

webshell/src/nsWebShell.cpp
Added support for the nsIRefreshUrl interface to nsWebShell (this includes the underlying timers and callback mechanism).


git-svn-id: svn://10.0.0.236/trunk@8164 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 23:25:17 +00:00
valeski%netscape.com
a192f6bdd0 network/module/nsIRefreshUrl.h
Extended the nsIRefreshUrl interface to include a cancel method.

network/module/nsNetService.cpp
1. Added code to hook the nsConnectionInfo object up to the nsISupports pointer in the url being loaded.
2. Removed the redirect logic in bam_exit_routine(). The backend dependency on the front end is gone.

network/module/nsNetStream.cpp
Added initialization/destruction of the nsISupports pointer in the nsConnectionInfo.

network/module/nsNetStream.h
Added the nsISupports member declaration to nsConnectionInfo, and remvoed the redirect member variable.

network/module/nsNetStubs.cpp
FE_SetRefreshURLTimer() routine has been modified so it no longer relies on the pConsumer (i.e. nsDocumentBindInfo) which was causing us to leak it. Now we use the nsISupports pointer in the nsConnectionInfo object to access the nsIRefreshURL interface so we can reload the url.

network/module/nsStubContext.cpp
Modified stub_complete() so we no longer pay attention to the redirect member of the nsConnectionInfo object.

network/module/nsIURL.h
1. Added GetContainer() method to nsIURL which returns the nsISupports pointer of the container for this url.
2. created a new NS_NewURL() routine which takes an nsISupports pointer as a parameter.

network/module/nsURL.cpp
1. Added a new nsURL constructor that takes a nsISupports pointer as a param.
2. Added GetContainer() method and nsISupports pointer initialization/destruction.


git-svn-id: svn://10.0.0.236/trunk@8163 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 23:24:28 +00:00
cmanske%netscape.com
182ab83bed Fixed build bustage
git-svn-id: svn://10.0.0.236/trunk@8162 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 23:18:24 +00:00
cls%seawood.org
8ac3fcb06a Added ifdefs for MOZ_NATIVE_{JPEG,PNG,ZLIB}. Approved by pnunn%netscape.com.
git-svn-id: svn://10.0.0.236/trunk@8161 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 22:59:14 +00:00
kostello%netscape.com
662cb6cd5d Added nsButton to libraries
git-svn-id: svn://10.0.0.236/trunk@8160 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 22:49:21 +00:00
kostello%netscape.com
0c173edadd Fixed FindWidgetHit. Added conditional checks for enumerator code.
git-svn-id: svn://10.0.0.236/trunk@8159 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 22:48:35 +00:00
kostello%netscape.com
e5e014b0d5 Comment back in nsIButton code
git-svn-id: svn://10.0.0.236/trunk@8158 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 22:46:07 +00:00
kostello%netscape.com
5e64f2c123 Add support for nsButton
git-svn-id: svn://10.0.0.236/trunk@8157 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 22:45:21 +00:00
kostello%netscape.com
c130b91c69 Check for null
git-svn-id: svn://10.0.0.236/trunk@8156 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 22:44:43 +00:00
kostello%netscape.com
5eaf433084 Added mControl -- temporarily, code from nsButton will probably be moved to a superclass
git-svn-id: svn://10.0.0.236/trunk@8155 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 22:44:02 +00:00
kostello%netscape.com
1d4b465870 First step in converting motif code to mac code.
git-svn-id: svn://10.0.0.236/trunk@8154 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 22:43:08 +00:00
kostello%netscape.com
08e8a4c960 Changed comment from motif to mac
git-svn-id: svn://10.0.0.236/trunk@8153 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 22:42:23 +00:00
valeski%netscape.com
e05d07e172 fixed a memory leak
git-svn-id: svn://10.0.0.236/trunk@8152 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 22:38:03 +00:00
leif%netscape.com
fa2deda6fe *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@8150 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 22:35:57 +00:00
leif%netscape.com
2d5d4601ca *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@8149 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 22:26:44 +00:00
leif%netscape.com
8ef6152a7d Added the setDefaultRebindProc() function back...
git-svn-id: svn://10.0.0.236/trunk@8148 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 22:26:30 +00:00
pnunn%netscape.com
22b4719a0f fix for #314603. pnunn. code error introduced during the modimglib-branch
landing for nglayout.


git-svn-id: svn://10.0.0.236/trunk@8147 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 22:24:59 +00:00
cmanske%netscape.com
425a7c0d6d Fixed multiple-freeing of clipboard formats
git-svn-id: svn://10.0.0.236/trunk@8146 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 22:17:18 +00:00
michaelp%netscape.com
31d0b724ac when killing a window, we now set the GWL_USERDATA to NULL. this will basically
kill the "parent" pointer.


git-svn-id: svn://10.0.0.236/trunk@8145 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 22:03:34 +00:00
karnaze%netscape.com
b35734172b marginwidth, marginheight set in <frame> is passed to sub doc and added to padding
git-svn-id: svn://10.0.0.236/trunk@8144 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 22:02:23 +00:00
scullin%netscape.com
986f93c67c Tweek interface to be compatible with branch for now.
git-svn-id: svn://10.0.0.236/trunk@8143 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 22:01:50 +00:00
dcone%netscape.com
f69f171885 added MANIFEST file for cmd/macfe/utility
git-svn-id: svn://10.0.0.236/trunk@8142 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 21:57:10 +00:00
dcone%netscape.com
c6822e5ecf First Checked In.
git-svn-id: svn://10.0.0.236/trunk@8141 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 21:55:56 +00:00
cmanske%netscape.com
9d683269ec Removed unused strings and function
git-svn-id: svn://10.0.0.236/trunk@8140 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 20:25:19 +00:00
cmanske%netscape.com
587d0f6a3b Removed unused strings and function
git-svn-id: svn://10.0.0.236/trunk@8139 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 20:25:17 +00:00
cmanske%netscape.com
aac0f510b3 Table editing menu work, fixing cell display problems.
git-svn-id: svn://10.0.0.236/trunk@8138 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 20:24:39 +00:00
cmanske%netscape.com
148ca16ff1 More table editing work: convert Excel spreadsheet to internal table format for more flexible paste options
git-svn-id: svn://10.0.0.236/trunk@8137 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 20:24:37 +00:00
morse%netscape.com
1030b2ab89 changes for privacy-central pane
git-svn-id: svn://10.0.0.236/trunk@8136 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 20:00:37 +00:00
morse%netscape.com
7240ed73e9 added string for one-site cookie viewer
git-svn-id: svn://10.0.0.236/trunk@8135 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 19:58:45 +00:00
morse%netscape.com
9005c1b29b make it compile with rhapsody compiler
git-svn-id: svn://10.0.0.236/trunk@8134 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 19:40:55 +00:00
ftang%netscape.com
9ae659900c Add vietnam.c into libi18n (libi18l for historic mistake) . Approved by steve.
git-svn-id: svn://10.0.0.236/trunk@8133 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 19:06:24 +00:00
ftang%netscape.com
eb6d9431cc add Vietname VNI into WinFE ui. Thanks Van Le levan@hotmail.com from the net
git-svn-id: svn://10.0.0.236/trunk@8132 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 19:03:36 +00:00
pinkerton%netscape.com
8700ac667d Now generating xSYM info for nsMacMessagePump.cpp in debug target.
git-svn-id: svn://10.0.0.236/trunk@8130 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 17:54:17 +00:00
kostello%netscape.com
77000c658c Fix mac build
git-svn-id: svn://10.0.0.236/trunk@8129 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 17:24:55 +00:00
pinkerton%netscape.com
8f5a39cdcc Removed full paths to PowerPlant and replaced them with compiler relative ones in shlb target.
git-svn-id: svn://10.0.0.236/trunk@8128 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 17:24:43 +00:00
kostello%netscape.com
192779608e These were checked in by mistake
git-svn-id: svn://10.0.0.236/trunk@8127 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 16:45:33 +00:00
despotdaemon%netscape.com
fb46f2e159 Pseudo-automatic update of changes made by freier@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@8126 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 16:37:34 +00:00
dcone%netscape.com
933b9fd29b Added paint and mousemove events, messagepump
git-svn-id: svn://10.0.0.236/trunk@8125 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 16:27:05 +00:00
dcone%netscape.com
7fc549fd57 Added paint and mousemove events
git-svn-id: svn://10.0.0.236/trunk@8124 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 16:23:13 +00:00
wtc%netscape.com
be00ad7fad Define HAVE_LONG_LONG because gcc/g++ support 'long long'.
git-svn-id: svn://10.0.0.236/trunk@8123 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 15:00:22 +00:00
mcafee%netscape.com
32d514c5b4 Next attempt at getting shared libs to build properly
git-svn-id: svn://10.0.0.236/trunk@8122 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 09:07:32 +00:00
mcafee%netscape.com
fa0dd8ad23 Support DLL_SUFFIX if build overrides .so default
git-svn-id: svn://10.0.0.236/trunk@8121 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 09:06:48 +00:00
mcafee%netscape.com
4cafb49f48 Break up some logic so the Rhapsody compiler can handle it.
git-svn-id: svn://10.0.0.236/trunk@8120 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 08:06:12 +00:00
mcafee%netscape.com
bc24633161 Adding support for Unix && NO_X11
git-svn-id: svn://10.0.0.236/trunk@8119 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 07:47:59 +00:00
mcafee%netscape.com
29b92b686f Support for Intel
git-svn-id: svn://10.0.0.236/trunk@8118 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 07:29:04 +00:00
mcafee%netscape.com
b6ffcd996c Rhapsody doesn't have malloc.h
git-svn-id: svn://10.0.0.236/trunk@8117 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 04:43:46 +00:00
troy%netscape.com
ff933d5110 Added GetLogicalPalette() to nsDeviceContextWin
git-svn-id: svn://10.0.0.236/trunk@8116 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 04:11:01 +00:00
joki%netscape.com
8df994b2d9 A couple of macros for getting basic event types
git-svn-id: svn://10.0.0.236/trunk@8115 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 03:47:24 +00:00
hshaw%netscape.com
cd85334f21 Fix build bustage, moral of the story, be very careful with macros which implicitly take & of your arguments
git-svn-id: svn://10.0.0.236/trunk@8114 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 02:54:13 +00:00
troy%netscape.com
2da30889d0 Changed destructor to Interrupt() image group before realeasing reference
git-svn-id: svn://10.0.0.236/trunk@8113 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 01:43:35 +00:00
jgellman%netscape.com
22c8b015c6 changes from wtc and the net for 64 bit machines, almost certainly not the last of them either
git-svn-id: svn://10.0.0.236/trunk@8112 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 01:24:30 +00:00
hshaw%netscape.com
1f308ef5fc Fix buffering problem and memory leak for gzip compressed content. Generic problem was causing assert failure on Windows only
git-svn-id: svn://10.0.0.236/trunk@8111 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 00:14:32 +00:00
kostello%netscape.com
9cd4a71b7c Fix mac build
git-svn-id: svn://10.0.0.236/trunk@8110 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-18 00:09:48 +00:00
buster%netscape.com
2cd93059a0 fixed nested tables for the case where both parent and child table are %-width,
and the columns are any variety of width types


git-svn-id: svn://10.0.0.236/trunk@8109 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-17 23:37:04 +00:00
kostello%netscape.com
2441f8be8f Added WidgetDebug.o to library
git-svn-id: svn://10.0.0.236/trunk@8108 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-17 23:36:16 +00:00
troy%netscape.com
99d339efe3 Changed CreateILColorSpace() to GetILColorSpace() (device context now
owns the color space), and cleaned up image renderer code


git-svn-id: svn://10.0.0.236/trunk@8107 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-17 23:20:42 +00:00
pnunn%netscape.com
6703ee5d5a fix for #313251, migrating #312030 to mozilla. pnunn. ok'd by nisheeth.
git-svn-id: svn://10.0.0.236/trunk@8106 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-17 22:20:27 +00:00
raman%netscape.com
0415ac2bca Updated the code to get error messages from allxpstr.h
git-svn-id: svn://10.0.0.236/trunk@8105 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-17 21:12:30 +00:00
rjc%netscape.com
43815ef0da Import IE favorites and history on Mac might like how its also done on Windows.
git-svn-id: svn://10.0.0.236/trunk@8104 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-17 20:17:06 +00:00
norris%netscape.com
3f00361c40 Allow setting document.domain to remove the port part of the URL for later origin checks.
git-svn-id: svn://10.0.0.236/trunk@8103 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-17 20:04:23 +00:00
leif%netscape.com
8947cb6020 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@8102 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-17 19:24:50 +00:00
leif%netscape.com
2d28609b8c *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@8101 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-17 19:24:04 +00:00
leif%netscape.com
aa63828e84 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@8100 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-17 19:21:33 +00:00
buster%netscape.com
fad7c8e1ab fixed a memory leak where a style context was not being released when
the table cell set the table column's style.


git-svn-id: svn://10.0.0.236/trunk@8098 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-17 19:03:36 +00:00
kmcclusk%netscape.com
c871e3a274 Implemented SetFocus.
git-svn-id: svn://10.0.0.236/trunk@8095 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-17 17:58:37 +00:00
karnaze%netscape.com
ec48384b65 removed text field and browse button of <input type=text> from content model.
git-svn-id: svn://10.0.0.236/trunk@8094 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-17 17:46:08 +00:00
rods%netscape.com
fab918d441 Add SetFocus so keyboard navigation works.
git-svn-id: svn://10.0.0.236/trunk@8093 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-17 16:43:07 +00:00
dcone%netscape.com
9be255dd28 fixed up messaging
git-svn-id: svn://10.0.0.236/trunk@8092 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-17 15:18:28 +00:00
jfrancis%netscape.com
d108641113 Correcting command handling for htmlarea form widgets. Now they no longer take over a host of browser commands like Print, Save, etc.
git-svn-id: svn://10.0.0.236/trunk@8091 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-17 10:41:54 +00:00
jfrancis%netscape.com
73d4b06bf1 First pass at getting a toolbar up for htmlarea form widgets. It's limping...
git-svn-id: svn://10.0.0.236/trunk@8090 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-17 09:23:45 +00:00
jfrancis%netscape.com
6cc6d647e1 First pass at getting a toolbar up for htmlarea form widgets. it's limping...
git-svn-id: svn://10.0.0.236/trunk@8089 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-17 09:22:39 +00:00
raman%netscape.com
f2d3791cf7 C++ implementation of Java objects. These files are not part of the build system yet.
git-svn-id: svn://10.0.0.236/trunk@8088 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-17 00:45:51 +00:00
raman%netscape.com
3c0523a89e Header files for Java to C conversion. They are not part of the build system yet.
git-svn-id: svn://10.0.0.236/trunk@8087 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-17 00:44:45 +00:00
ramiro%netscape.com
b30eac787c chilren was being freed twice - what a dumbass error.
Thanks to Matti Aarnio <matti.aarnio@sonera.fi> for pointing this out.


git-svn-id: svn://10.0.0.236/trunk@8086 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-17 00:12:39 +00:00
morse%netscape.com
61d94c0076 restore reference to MK_SIGNON_SELECTUSER, Linux bustage is a dependency-build problem
git-svn-id: svn://10.0.0.236/trunk@8085 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-16 22:57:02 +00:00
morse%netscape.com
cb017264a4 removed MK_SIGNON_SELECTUSER until I determine why it broke Linux dep build on Gromit
git-svn-id: svn://10.0.0.236/trunk@8084 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-16 21:12:53 +00:00
morse%netscape.com
f8d004b1a5 fixed problems when there are multiple usernames for the same form
git-svn-id: svn://10.0.0.236/trunk@8083 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-16 19:41:16 +00:00
morse%netscape.com
98736dbcfa change for single signon
git-svn-id: svn://10.0.0.236/trunk@8082 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-16 19:36:16 +00:00
morse%netscape.com
b9a8b563d0 change for single singon
git-svn-id: svn://10.0.0.236/trunk@8081 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-16 19:35:27 +00:00
mcafee%netscape.com
3869e5eb0f Fixing /* warning on Linux.
git-svn-id: svn://10.0.0.236/trunk@8078 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-15 18:59:11 +00:00
troy%netscape.com
931e45da01 Destructor now releases ref to image maps
git-svn-id: svn://10.0.0.236/trunk@8076 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-15 16:25:33 +00:00
morse%netscape.com
17ae035cd9 fix bug in cookie viewer
git-svn-id: svn://10.0.0.236/trunk@8075 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-15 15:42:18 +00:00
morse%netscape.com
02b6167b4f fixed bug in sigon viewer
git-svn-id: svn://10.0.0.236/trunk@8074 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-15 15:40:46 +00:00
jfrancis%netscape.com
6633d45f86 Fixing bug #313498
git-svn-id: svn://10.0.0.236/trunk@8073 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-15 10:11:34 +00:00
jfrancis%netscape.com
6d2b55c44a Adding comment to help prevent recurrences of bug #313498
git-svn-id: svn://10.0.0.236/trunk@8072 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-15 10:11:17 +00:00
jgellman%netscape.com
4c68be3695 add new arg for HT_PaneFromURL
git-svn-id: svn://10.0.0.236/trunk@8071 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-15 07:31:21 +00:00
guha%netscape.com
1feb6d428c Fix broken build
git-svn-id: svn://10.0.0.236/trunk@8070 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-15 06:40:13 +00:00
jgellman%netscape.com
1be8dcf35e Need to add the argument to gRDFMWContext() in one more place
git-svn-id: svn://10.0.0.236/trunk@8068 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-15 05:57:28 +00:00
troy%netscape.com
ed55c3c760 Added missing NS_INIT_REFCNT()
git-svn-id: svn://10.0.0.236/trunk@8065 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-15 03:24:27 +00:00
troy%netscape.com
098866905a Changed PR_FREEIF to delete[] (call to nsString::ToNewCString)
git-svn-id: svn://10.0.0.236/trunk@8064 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-15 01:53:38 +00:00
guha%netscape.com
2608a095ee output rfc822 (reviewed by rjc)
git-svn-id: svn://10.0.0.236/trunk@8063 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-15 01:33:39 +00:00
guha%netscape.com
885c4f8eed Some smart mail related stuff. Reviewed by rjc
git-svn-id: svn://10.0.0.236/trunk@8062 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-15 01:32:53 +00:00
mcafee%netscape.com
b9c34b08ec Some libraries (jpeg, xpcom) include nsprpub header files and need to know about USE_PTHREADS for some platforms (SparcLinux/RH5.1).
git-svn-id: svn://10.0.0.236/trunk@8061 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-15 01:27:17 +00:00
mcafee%netscape.com
a343fc80f6 Moving USE_PTHREADS define over to mozilla/config/config.mk, more than jpeg needs this.
git-svn-id: svn://10.0.0.236/trunk@8060 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-15 01:25:44 +00:00
mcafee%netscape.com
510af228fe jpeg includes nsprpub header files and thus needs to know about USE_PTHREADS for some platforms. Fixes SparcLinux.
git-svn-id: svn://10.0.0.236/trunk@8059 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-15 01:19:59 +00:00
morse%netscape.com
0c8d2da8cb fix problems in signon viewer
git-svn-id: svn://10.0.0.236/trunk@8058 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-15 01:18:40 +00:00
morse%netscape.com
a3efcf5b6f fix problems in cookie viewer
git-svn-id: svn://10.0.0.236/trunk@8057 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-15 01:17:50 +00:00
law%netscape.com
bbea53da38 Fixing bug in Default Browser dialog's Details... button processing
git-svn-id: svn://10.0.0.236/trunk@8056 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-15 01:01:32 +00:00
law%netscape.com
963a66acfb Adding Control Panel extension; not part of build process yet
git-svn-id: svn://10.0.0.236/trunk@8055 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-15 00:23:37 +00:00
radha%netscape.com
8491e73254 Declare fe_getPixelFromRGB explicitly to fix bustage in IRIX 6.2
git-svn-id: svn://10.0.0.236/trunk@8054 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-15 00:20:10 +00:00
joki%netscape.com
250f935f96 Sanity check return values on window.parent, window.top
git-svn-id: svn://10.0.0.236/trunk@8053 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-15 00:13:51 +00:00
gagan%netscape.com
0a8aacf896 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@8051 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-14 23:48:05 +00:00
toshok%netscape.com
8980cb4162 Track guha's change to allxpstr.rc
git-svn-id: svn://10.0.0.236/trunk@8050 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-14 23:44:26 +00:00
scullin%netscape.com
db73f7e25e Checked in api changes and some other small changes from the branch.
git-svn-id: svn://10.0.0.236/trunk@8049 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-14 23:08:54 +00:00
kmcclusk%netscape.com
1dfe01a8e4 Now detects Alt key during keypress and mouse events.
git-svn-id: svn://10.0.0.236/trunk@8048 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-14 22:58:07 +00:00
thom%netscape.com
cf7eeb834d add nsJLocation and nsLocation to project file
git-svn-id: svn://10.0.0.236/trunk@8047 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-14 22:53:51 +00:00
kmcclusk%netscape.com
b91145fa0b Now sets shift and control fields in the mouse and keyboard events properly.
git-svn-id: svn://10.0.0.236/trunk@8046 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-14 22:47:38 +00:00
joki%netscape.com
ad6f7835d1 Modify window.open method to use sizing and location parameters
git-svn-id: svn://10.0.0.236/trunk@8045 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-14 22:31:38 +00:00
33 changed files with 102 additions and 10907 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,84 +0,0 @@
1998-08-13 Leif Hedstrom <leif@netscape.com>
* Makefile.PL: Fixed so that automated installs works.
* Conn.pm (update): Fixed narly bug with ldap_modify()...
* All: Cleaned up some hash indexes, to make sure they are
properly quoted, and there are no conflicts to resolve.
* Entry.pm (STORE): Fixed a bug with attribute names not being
properly added to _oc_order_.
(addValue): Dito, added the same code as for STORE.
1998-08-06 Leif Hedstrom <leif@netscape.com>
* Entry.pm (printLDIF): Copied/modified from the Utils.pm library.
(isModified): Added this function, thought it might be useful.
1998-08-03 Leif Hedstrom <leif@netscape.com>
* Conn.pm (modifyRDN): Fixed! It also has an option to take an
"external" DN as an argument, if supplied.
1998-08-02 Leif Hedstrom <leif@netscape.com>
* Conn.pm (getErrorCode): Now takes two optional arguments, to
return the match string, and extra error string. Note that these
two arguments are pointers to strings!
* API.xs(ldap_get_lderrno): Fixed this function, at least it seems
to work now...
* Conn.pm (getLD): Added this function, convenient way to get the
LD from the OO layer.
1998-07-30 Leif Hedstrom <leif@netscape.com>
* Conn.pm (modifyRDN): New method, to rename the RDN of the entry.
* Utils.pm (answer): New function, from LdapUtils.pm.
* Conn.pm (delete): Fixed references to normalizeDN.
* Utils.pm (userCredentials): Added this function, to make it easy
to get credentials when binding as a user.
(normalizeDN): Fixed bugs, because of calling convention...
* Conn.pm (getError): Fixed bug with passing read-only argument.
1998-07-29 Leif Hedstrom <leif@netscape.com>
* Utils.pm (unixCrypt): Moved from my LdapUtils.pm module.
Added askPassword to the export tag.
* Conn.pm (new): Added support for passing a hash array of all the
parameters, as returned by the ldapArgs() function.
* Utils.pm (str2Scope): New function, for converting strings
(subtree) to a numerical scope value (2).
(askPassword): Dito, ask for a password, interactively.
(ldapArgs): Dito, handle common LDAP command line arguments.
* Makefile.PL: Minor change, to do regex match on OS version for
MSWin.
* Entry.pm: Changed all _XXX hash values to also end with a _,
hence making it easier to isolate them (/^_.*_$/).
* Conn.pm (nextEntry): Changed to accept that the attributes are
now arrays, not pointers to arrays. We still consider them as
pointers internally though, it's cleaner API.
* API.pm: Changed to use the native Exporter function to export
tags into EXPORT_OK.
1998-07-22 Leif Hedstrom <leif@netscape.com>
* LDIF.pm (readEntry): Moved from my LdapUtils.pm package.
* Utils.pm (printEntry): Moved from the ::Connection class, and
marked it as "obsolete".
(encodeBase64): Moved from my LdapUtils.pm package.
(decodeBase64): Dito.

View File

@@ -1,998 +0,0 @@
#############################################################################
# $Id: Conn.pm,v 1.17 1998-08-13 21:32:06 leif Exp $
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 PerLDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# This is the main object class for connecting to an LDAP server,
# and perform searches and updates. It depends on the ::Entry
# object class, which is the data type returned from a search
# operation for instance.
#
#############################################################################
package Mozilla::LDAP::Conn;
use Mozilla::LDAP::Utils;
use Mozilla::LDAP::API qw(/.+/);
use Mozilla::LDAP::Entry;
#############################################################################
# Creator, create and initialize a new LDAP object ("connection"). We support
# either providing all parameters as a hash array, or as individual
# arguments.
#
sub new
{
my $class = shift;
my $self = {};
my $ref;
$ref = ref($_[$[]);
if (ref $_[$[] eq "HASH")
{
my $hash;
$hash = $_[$[];
$self->{"host"} = $hash->{"host"} if defined($hash->{"host"});
$self->{"port"} = $hash->{"port"} if defined($hash->{"port"});
$self->{"binddn"} = $hash->{"bind"} if defined($hash->{"bind"});
$self->{"bindpasswd"} = $hash->{"pswd"} if defined($hash->{"pswd"});
$self->{"certdb"} = $hash->{"cert"} if defined($hash->{"cert"});
}
else
{
my ($host, $port, $binddn, $bindpasswd, $certdb, $authmeth) = @_;
$self->{"host"} = $host;
$self->{"port"} = $port;
$self->{"binddn"} = $binddn;
$self->{"bindpasswd"} = $bindpasswd;
$self->{"certdb"} = $certdb;
}
if (!defined($self->{"port"}) || ($self->{"port"} eq ""))
{
$self->{"port"} = (($self->{"certdb"} ne "") ? LDAPS_PORT : LDAP_PORT);
}
bless $self, $class;
return unless $self->init();
return $self;
}
#############################################################################
# Destructor, makes sure we close any open LDAP connections.
#
sub DESTROY
{
my $self = shift;
return unless defined($self->{"ld"});
ldap_unbind_s($self->{"ld"});
ldap_msgfree($self->{"ldres"}) if defined($self->{"ldres"});
undef $self->{"ld"};
}
#############################################################################
# Initialize a normal connection. This seems silly, why not just merge
# this back into the creator method (new)...
#
sub init
{
my $self = shift;
my $ret;
my $ld;
if ($self->{"certdb"} ne "")
{
$ret = ldapssl_client_init($self->{"certdb"}, "");
return 0 if ($ret < 0);
$ld = ldapssl_init($self->{"host"}, $self->{"port"}, 1);
}
else
{
$ld = ldap_init($self->{"host"}, $self->{"port"});
}
if (!$ld)
{
perror("ldap_init");
return 0;
}
$self->{"ld"} = $ld;
$ret = ldap_simple_bind_s($ld, $self->{"binddn"}, $self->{"bindpasswd"});
if ($ret)
{
ldap_perror($ld, "Authentication failed");
return 0;
}
return 1;
}
#############################################################################
# Checks if a string is a properly formed LDAP URL.
#
sub isURL
{
my ($self, $url) = @_;
return ldap_is_ldap_url($url);
}
#############################################################################
# Return the actual low level LD connection structure, which is needed if
# you want to call any of the API functions yourself...
#
sub getLD
{
my ($self) = @_;
return $self->{"ld"} if $self->{"ld"};
}
#############################################################################
# Return the Error code from the last LDAP api function call. The last two
# optional arguments are pointers to strings, and will be set to the
# match string and extra error string if appropriate.
#
sub getErrorCode
{
my ($self, $match, $msg) = @_;
my $ret;
return ldap_get_lderrno($self->{"ld"}, $match, $msg);
}
*getError = \*getErrorCode;
#############################################################################
# Return the Error string from the last LDAP api function call.
#
sub getErrorString
{
my ($self) = @_;
my ($err);
$err = ldap_get_lderrno($self->{"ld"}, undef, undef);
return ldap_err2string($err);
}
#############################################################################
# Print the last error code...
#
sub printError
{
my ($self, $str) = @_;
$str = "LDAP error: " if ($str eq "");
ldap_perror($self->{"ld"}, $str);
}
#############################################################################
# Normal LDAP search. Note that this will actually perform LDAP URL searches
# if the filter string looks like a proper URL.
#
sub search
{
my ($self, $basedn, $scope, $filter, $attrsonly, @attrs) = @_;
my $resv;
my $entry;
my $res = \$resv;
$scope = Mozilla::LDAP::Utils::str2Scope($scope);
$filter = "(objectclass=*)" if ($filter =~ /^ALL$/i);
ldap_msgfree($self->{"ldres"}) if defined($self->{"ldres"});
if (ldap_is_ldap_url($filter))
{
if (! ldap_url_search_s($self->{"ld"}, $filter, $attrsonly, $res))
{
$self->{"ldres"} = $res;
$self->{"ldfe"} = 1;
$entry = $self->nextEntry();
}
}
else
{
if (! ldap_search_s($self->{"ld"}, $basedn, $scope, $filter, \@attrs,
$attrsonly, $res))
{
$self->{"ldres"} = $res;
$self->{"ldfe"} = 1;
$entry = $self->nextEntry();
}
}
return $entry;
}
#############################################################################
# URL search, optimized for LDAP URL searches.
#
sub searchURL
{
my ($self, $url, $attrsonly) = @_;
my $resv;
my $entry;
my $res = \$resv;
ldap_msgfree($self->{"ldres"}) if defined($self->{"ldres"});
if (! ldap_url_search_s($self->{"ld"}, $url, $attrsonly, $res))
{
$self->{"ldres"} = $res;
$self->{"ldfe"} = 1;
$entry = $self->nextEntry();
}
return $entry;
}
#############################################################################
# Get an entry from the search, either the first entry, or the next entry,
# depending on the call order.
#
sub nextEntry
{
my $self = shift;
my %entry;
my @ocorder;
my ($attr, @vals, $obj, $ldentry, $berv, $dn);
my $ber = \$berv;
# I use the object directly, to avoid setting the "change" flags
$obj = tie %entry, Mozilla::LDAP::Entry;
$self->{"dn"} = "";
if ($self->{"ldfe"} == 1)
{
$self->{"ldfe"} = 0;
$ldentry = ldap_first_entry($self->{"ld"}, $self->{"ldres"});
$self->{"ldentry"} = $ldentry;
}
else
{
return "" unless $self->{"ldentry"};
$ldentry = ldap_next_entry($self->{"ld"}, $self->{"ldentry"});
$self->{"ldentry"} = $ldentry;
}
return "" unless $ldentry;
$dn = ldap_get_dn($self->{"ld"}, $self->{"ldentry"});
$obj->{"dn"} = $dn;
$self->{"dn"} = $dn;
$attr = ldap_first_attribute($self->{"ld"}, $self->{"ldentry"}, $ber);
return (bless \%entry, Mozilla::LDAP::Entry) unless $attr;
@vals = ldap_get_values_len($self->{"ld"}, $self->{"ldentry"}, $attr);
$obj->{$attr} = [@vals];
push(@ocorder, $attr);
while ($attr = ldap_next_attribute($self->{"ld"},
$self->{"ldentry"}, $ber))
{
@vals = ldap_get_values_len($self->{"ld"}, $self->{"ldentry"}, $attr);
$obj->{$attr} = [@vals];
push(@ocorder, $attr);
}
$obj->{"_oc_order_"} = \@ocorder;
$obj->{"_self_obj_"} = $obj;
ldap_ber_free($ber, 0) if $ber;
return bless \%entry, Mozilla::LDAP::Entry;
}
# This is deprecated...
*entry = \*nextEntry;
#############################################################################
# Close the connection to the LDAP server.
#
sub close
{
my $self = shift;
my $ret = 1;
$ret = ldap_unbind_s($self->{"ld"}) if defined($self->{"ld"});
undef $self->{"ld"};
return ($ret == LDAP_SUCCESS);
}
#############################################################################
# Delete an object.
#
sub delete
{
my ($self, $dn) = @_;
my $ret = 1;
if ($dn ne "")
{
$dn = Mozilla::LDAP::Utils::normalizeDN($dn);
}
else
{
$dn = Mozilla::LDAP::Utils::normalizeDN($self->{"dn"});
}
$ret = ldap_delete_s($self->{"ld"}, $dn) if ($dn ne "");
return ($ret == LDAP_SUCCESS)
}
#############################################################################
# Add an object.
#
sub add
{
my ($self, $entry) = @_;
my ($ref, $key, $val, %ent);
my $ret = 1;
my $gotcha = 0;
$ref = ref($entry);
if (($ref eq "Mozilla::LDAP::Entry") || ($ref eq "HASH"))
{
foreach $key (keys %{$entry})
{
next if (($key eq "dn") || ($key =~ /^_.+_$/));
$ent{$key} = $entry->{$key};
$gotcha++;
}
$ret = ldap_add_s($self->{"ld"}, $entry->{"dn"}, \%ent) if $gotcha;
}
return ($ret == LDAP_SUCCESS);
}
#############################################################################
# Modify the RDN, and update the entry accordingly. Note that the last
# two arguments (DN and "delete") are optional.
#
sub modifyRDN
{
my ($self, $rdn, $dn, $del) = ($_[$[], lc $_[$[ + 1], $_[$[ + 2], $_[$[ + 3]);
my (@vals);
my $ret = 1;
$del = 1 if ($del eq "");
$dn = $self->{"dn"} if ($dn eq "");
@vals = ldap_explode_dn(lc $dn, 0);
if ($vals[$[] ne $rdn)
{
$ret = ldap_modrdn2_s($self->{"ld"}, $dn, $rdn, $del);
if ($ret == LDAP_SUCCESS)
{
shift(@vals);
unshift(@vals, ($rdn));
$ld->{"dn"} = join(@vals);
}
}
return ($ret == LDAP_SUCCESS);
}
#############################################################################
# Update an object. NOTE: I'd like to clean up my change tracking tags here,
# so that we can call update() again with the same entry.
#
sub update
{
my ($self, $entry) = @_;
my (@vals, %mod, %new, @arr);
my ($key, $val);
my $ret = 1;
local $_;
foreach $key (keys (%$entry))
{
next if (($key eq "dn") || ($key =~ /^_.+_/));
if ($entry->{"_${key}_modified_"})
{
@vals = @{$entry->{$key}};
if ($#vals == $[)
{
$mod{$key} = { "rb", [$vals[$[]] };
}
else
{
@arr = ();
grep(($new{$_} = 1), @vals);
foreach (@{$entry->{"_${key}_save_"}})
{
if (! $new{$_})
{
push(@arr, $_);
}
$new{$_} = 0;
}
$mod{$key}{"db"} = [@arr] if ($#arr >= $[);
@arr = ();
foreach (keys(%new))
{
push(@arr, $_) if ($new{$_} == 1);
}
$mod{$key}{"ab"} = [@arr] if ($#arr >= $[);
}
delete $entry->{"_self_obj_"}->{"_${key}_modified_"};
undef @{$entry->{"_${key}_save_"}};
}
elsif ($entry->{"_${key}_deleted_"})
{
$mod{$key} = { "db", [] };
undef @{$entry->{"_${key}_save_"}};
delete $entry->{"_self_obj_"}->{"_${key}_deleted_"};
}
}
@arr = keys %mod;
# This is here for debug purposes only...
if ($main::LDAP_DEBUG)
{
foreach $key (@arr)
{
print "Working on $key\n";
foreach $op (keys %{$mod{$key}})
{
print "\tDoing operation: $op\n";
foreach $val (@{$mod{$key}{$op}})
{
print "\t\t$val\n";
}
}
}
}
$ret = ldap_modify_s($self->{"ld"}, $entry->{"dn"}, \%mod)
if ($#arr >= $[);
return ($ret == LDAP_SUCCESS);
}
#############################################################################
# Set the rebind procedure. This is old and obsolete...
#
sub setRebindProc
{
my ($self, $proc) = @_;
# Should we try to reinitialize the connection?
die "No LDAP connection" unless defined($self->{"ld"});
ldap_set_rebind_proc($self->{"ld"}, $proc);
}
#############################################################################
# Mandatory TRUE return value.
#
1;
#############################################################################
# POD documentation...
#
__END__
=head1 NAME
Mozilla::LDAP::Conn - Object Oriented API for the LDAP SDK.
=head1 SYNOPSIS
use Mozilla::LDAP::Conn;
use Mozilla::LDAP::Utils;
=head1 ABSTRACT
This package is the main API for using our Perl Object Oriented LDAP
module. Even though it's certainly possible, and sometimes even necessary,
to call the native LDAP C SDK functions, we strongly recommend you use
these object classes.
It's not required to use our Mozilla::LDAP::Utils.pm package, but it's
convenient and good for portability if you use as much as you can from
that package as well. This implies using the LdapConf package as well,
even though you usually don't need to use it directly.
You should read this document in combination with the Mozilla::LDAP::Entry
document. Both modules depend on each other heavily.
=head1 DESCRIPTION
First, this is not ment to be a crash course in how LDAP works, if you
have no experience with LDAP, I suggest you read some of the literature
that's available out there. The LDAP Deployment Book from Netscape, or the
LDAP C SDK documentation are good starting points.
This object class basically tracks and manages the LDAP connection, it's
current status, and the current search operation (if any). Every time you
call the B<search> method of an object instance, you'll reset it's
internal state. It depends heavily on the ::Entry class, which are used to
retrieve, modify and update a single entry.
The B<search> and B<nextEntry> methods returns Mozilla::LDAP::Entry
objects, naturally. You also have to instantiate (and modify) a new
::Entry object when you want to add new entries to an LDAP
server. Alternatively, the add() method will also take a hash array as
argument, to make it easy to create new LDAP entries.
To assure that changes to an entry are updated properly, we strongly
recommend you use the native methods of the ::Entry object class. Even
though you can modify certain elements directly, it could cause changes
not to be committed to the LDAP server. If there's something missing from
the API, please let us know, or even fix it yourself.
=head1 SOME PERLDAP/OO BASICS
An entry consist of a DN, and a hash array of pointers to attribute
values. Each attribute value (except the DN) is an array, but you have to
remember the hash array in the entry stores pointers to the array, not the
array. So, to access the first CN value of an entry, you'd do
$cn = $entry->{cn}[0];
To set the CN attribute to a completely new array of values, you'd do
$entry->{cn} = [ "Leif Hedstrom", "The Swede" ];
As long as you remember this, and try to use native Mozilla::LDAP::Entry
methods, this package will take care of most the work. Once you master
this, working with LDAP in Perl is surprisingly easy.
We already mentioned DN, which stands for Distinguished Name. Every entry
on an LDAP server must have a DN, and it's always guaranteed to be unique
within your database. Some typical DNs are
uid=leif,ou=people,o=netscape.com
cn=gene-staff,ou=mailGroup,o=netscape.com
dc=data,dc=netscape,dc=com
There's also a term called RDN, which stands for Relative Distinguished
Name. In the above examples, C<uid=leif>, C<cn=gene-staff> and C<dc=data>
are all RDNs. One particular property for a RDN is that they must be
unique within it's sub-tree. Hence, there can only be one user with
C<uid=leif> within the ou=people tree, there can never be a name conflict.
=head1 CREATING A NEW OBJECT INSTANCE
Before you can do anything with PerLDAP, you'll need to instantiate at
least one Mozilla::LDAP::Conn object, and connect it to an LDAP server. As
you probably guessed already, this is done with the B<new> method:
$conn = new Mozilla::LDAP::Conn("ldap", "389", $bind, $pswd, $cert);
die "Couldn't connect to LDAP server ldap" unless $conn;
The arguments are: Host name, port number, and optionally a bind-DN, it's
password, and a certificate. If there is no bind-DN, the connection will
be bound as the anonymous user. If the certificate file is specified, the
connection will be over SSL, and you should then probably connect to port
636. You have to check that the object was created properly, and take
proper actions if you couldn't get a connection.
There's one convenient alternative call method to this function. Instead of
providing each individual argument, you can provide one hash array
(actually, a pointer to a hash). For example:
%ld = Mozilla::LDAP::Utils::ldapArgs();
$conn = new Mozilla::LDAP::Conn(\%ld);
The components of the hash are:
$ld->{"host"}
$ld->{"port"}
$ld->{"root"}
$ld->{"bind"}
$ld->{"pswd"}
$ld->{"cert"}
and (not used in the B<new> method)
$ld->{"scope"}
Once a connection is established, the package will take care of the
rest. If for some reason the connection is lost, the object should
reconnect on it's own, automatically. [Note: This doesn't work
now... ]. You can use the Mozilla::LDAP:Conn object for any number of
operations, but since everything is currently done synchronously, you can
only have one operation active at any single time. You can of course have
multiple Mozilla::LDAP::Conn instanced active at the same time.
=head1 PERFORMING LDAP SEARCHES
We assume that you are familiar with the LDAP filter syntax already, all
searches performed by this object class uses these filters. You should
also be familiar with LDAP URLs, and LDAP object classes. There are some
of the few things you actually must know about LDAP. Perhaps the simples
filter is
(uid=leif)
This matches all entries with the UID set to "leif". Normally that
would only match one entry, but there is no guarantee for that. To find
everyone with the name "leif", you'd instead do
(cn=*leif*)
A more complicated search involves logic operators. To find all mail
groups owned by "leif" (or actually his DN), you could do
(&(objectclass=mailGroup)(owner=uid=leif,ou=people,o=netscape))
The I<owner> attribute is what's called a DN attribute, so to match on it
we have to specify the entire DN in the filter above. We could of course
also do a sub string "wild card" match, but it's less efficient, and
requires indexes to perform reasonably well.
Ok, now we are prepared to actually do a real search on the LDAP server:
$base = "o=netscape.com";
$conn = new Mozilla::LDAP::Conn("ldap", "389", "", ""); die "No LDAP
connection" unless $conn;
$entry = $conn->search($base, "subtree", "(uid=leif)");
if (! $entry)
{ # handle this event, no entries found, dude!
}
else
{
while ($entry)
{
$entry->printLDIF();
$entry = $conn->nextEntry();
}
}
This is in fact a poor mans implementation of the I<ldapsearch> command
line utility. The B<search> method returns an Mozilla::LDAP::Entry object,
which holds the first entry from the search, if any. To get the second and
subsequent entries you call the B<entry> method, until there are no more
entries. The B<printLDIF> method is a convenient function, requesting the
entry to print itself on STDOUT, in LDIF format.
The arguments to the B<search> methods are the I<LDAP Base-DN>, the
I<scope> of the search ("base", "one" or "sub"), and the actual LDAP
I<filter>. The entry return contains the DN, and all attribute values. To
access a specific attribute value, you just have to use the hash array:
$cn = $entry->{cn}[0];
Since many LDAP attributes can have more than one value, value of the hash
array is another array (or actually a pointer to an array). In many cases
you can just assume the value is in the first slot (indexed by [0]), but
for some attributes you have to support multiple values. To find out how
many values a specific attribute has, you'd call the B<size> method:
$numVals = $entry->size("objectclass");
One caveat: Many LDAP attributes are case insensitive, but the methods in
the Mozilla::LDAP::Entry package are not aware of this. Hence, if you
compare values with case sensitivity, you can experience weird
behavior. If you know an attribute is CIS (Case Insensitive), make sure
you do case insensitive string comparisons.
Unfortunately some methods in this package can't do this, and by default
will do case sensitive comparisons. We are working on this, and in a
future release some of the methods will handle this more gracefully. As an
extension (for LDAP v3.0) we could also use schema discovery for handling
this even better.
There is an alternative search method, to use LDAP URLs instead of a
filter string. This can be used to easily parse and process URLs, which is
a compact way of storing a "link" to some specific LDAP information. To
process such a search, you use the B<searchURL> method:
$entry->searchURL("ldap:///o=netscape.com??sub?(uid=leif");
As it turns out, the B<search> method also supports LDAP URL searches. If
the search filter looks like a proper URL, we will actually do an URL
search instead. This is for backward compatibility, and for ease of use.
To achieve better performance and use less memory, you can limit your
search to only retrieve certain attributes. With the LDAP URLs you specify
this as an optional parameter, and with the B<search> method you add two
more options, like
$entry = $conn->search($base, "sub", $filter, 0, ("mail", "cn");
The last argument specifies an array of attributes to retrieve, the fewer
the attributes, the faster the search will be. The second to last argument
is a boolean value indicating if we should retrieve only the attribute
names (and no values). In most cases you want this to be FALSE, to
retrieve both the attribute names, and all their values. To do this with
the B<searchURL> method, add a second argument, which should be 0 or 1.
=head1 MODIFYING AND CREATING NEW LDAP ENTRIES
Once you have an LDAP entry, either from a search, or created directly to
get a new empty object, you are ready to modify it. If you are creating a
new entry, the first thing to set it it's DN:
$entry->setDN("uid=leif,ou=people,o=netscape.com");
You should not do this for an existing LDAP entry, changing the RDN (or
DN) for such an entry must be done with B<modifyRDN>. To populate (or
modify) some other attributes, we can do
$entry->{objectclass} = [ "top", "person", "inetOrgPerson" ];
$entry->{cn} = [ "Leif Hedstrom" ];
$entry->{mail} = [ "leif@netscape.com" ];
Once you are done modifying your LDAP entry, call the B<update> method
from the Mozilla::LDAP::Conn object instance:
$conn->update($entry);
Or, if you are creating an entirely new LDAP entry, you must call the
B<add> method:
$conn->add($entry);
If all comes to worse, and you have to remove an entry again from the LDAP
server, just call the B<delete> method, like
$conn->delete($entry);
You can't use native Perl functions like push() and splice() on attribute
values, since they won't update the ::Entry instance state properly.
Instead use one of the methods provided by the object class, for instance
$conn->addValue("cn", "The Swede");
$conn->removeValue("mailAlternateAddress", "leif@mcom.com");
$conn->remove("seeAlso");
These methods return a TRUE or FALSE value, depending on the outcome
of the operation. If there was no value to remove, or a value already
exists, we return FALSE, otherwise TRUE. To check if an attribute has a
certain value, use the B<hasValue> method, like
if ($conn->hasValue("mail", "leif@netscape.com")) {
# Do something
}
There is a similar method, B<matchValue>, which takes a regular
expression to match against, instead of the entire string. For more
information this and other methods in the Entry class, see below.
=head1 OBJECT CLASS METHODS
We have already described the fundamentals of this class earlier. This is
a summary of all available methods which you can use. Be careful not to
use any undocumented features or heaviour, since the internals in this
module is likely to change.
=head2 Searching and updating entries
=over 13
=item B<new>
This creates and initialized a new LDAP connection and object. The
required arguments are host name, port number, bind DN and the bind
password. An optional argument is a certificate (public key), which causes
the LDAP connection to be established over an SSL channel. Currently we do
not support Client Authentication, so you still have to use the simple
authentication method (i.e. with a password).
A typical usage could be something like
%ld = Mozilla::LDAP::Utils::ldapArgs();
$conn = new Mozilla::LDAP::Conn(\%ld);
Also, remember that if you use SSL, the port is (usually) 636.
=item B<search>
The B<search> method is the main entry point into this module. It requires
at least three arguments: The Base DN, the scope, and the search
strings. Two more optional arguments can be given, the first specifies if
only attribute names should be returned (TRUE or FALSE). The second
argument is a list (array) of attributes to return.
The last option is very important for performance. If you are only
interested in say the "mail" and "mailHost" attributes, specifying this in
the search will signficantly reduce the search time. An example of an
efficient search is
@attr = ("cn", "uid", "mail");
$filter = "(uid=*)";
$entry = $conn->search($root, $scope, $filter, 0, @attr);
while ($entry) {
# do something
$entry = $conn->nextEntry();
}
=item B<searchURL>
This is almost identical to B<search>, except this function takes only two
arguments, an LDAP URL and an optional flag to specify if we only want the
attribute names to be returned (and no values). This function isn't very
useful, since the B<search> method will actually honor properly formed
LDAP URL's, and use it if appropriate.
=item B<nextEntry>
This method will return the next entry from the search result, and can
therefore only be called after a succesful search has been initiated. If
there are no more entries to retrieve, it returns nothing (empty string).
=item B<update>
After modifying an Ldap::Entry entry (see below), use the B<update>
method to commit changes to the LDAP server. Only attributes that has been
changed will be updated, assuming you have used the appropriate methods in
the Entry object. For instance, do not use B<push> or B<splice> to
modify an entry, the B<update> will not recognize such changes.
To change the CN value for an entry, you could do
$entry->{cn} = ["Leif Hedstrom"];
$conn->update($entry);
=item B<delete>
This will delete the current entry, or possibly an entry as specified with
the optional argument. You can use this function to delete any entry you
like, by passing it an explicit DN. If you don't pass it this argument,
B<delete> defaults to delete the current entry, from the last call to
B<search> or B<entry>.
=item B<add>
Add a new entry to the LDAP server. Make sure you use the B<new> method
for the Mozilla::LDAP::Entry object, to create a proper entry.
=item B<close>
Close the LDAP connection, and clean up the object. If you don't call this
directly, the destructor for the object instance will do the job for you.
=item B<modifyRDN>
This will rename the specified LDAP entry, by modifying it's RDN. For
example:
$rdn = "uid=fiel, ou=people, dc=netscape, dc=com";
$conn->modifyRDN($rdn, $entry->getDN());
=back
=head2 Other methods
=over 13
=item B<isURL>
Returns TRUE or FALSE if the given argument is a properly formed URL.
=item B<getLD>
Return the (internal) LDAP* connection handle, which you can use
(carefully) to call the native LDAP API functions. You shouldn't have to
use this in most cases, unless of course our OO layer is seriously flawed.
=item B<getErrorCode>
Return the error code (numeric) from the last LDAP API function
call. Remember that this can only be called I<after> the successful
creation of a new object instance. A typical usage could be
if (! $opt_n) {
$conn->modifyRDN($rdn, $entry->getDN());
$conn->printError() if $conn->getErrorCode();
}
Which will report any error message as generated by the call to B<modifyRDN>.
=item B<getErrorString>
Very much like B<getError>, but return a string with a human readable
error message. This can then be used to print a good error message on the
console.
=item B<printError>
Print the last error message on standard output.
=item B<setRebindProc>
Tell the LDAP SDK to call the provided Perl function when it has to follow
referrals. The Perl function should return an array of three elements, the
new Bind DN, password and authentication method. A typical usage is
sub rebindProc {
return ("uid=ldapadmin", "secret", LDAP_AUTH_SIMPLE);
}
$ld->setRebindProc(\&rebindProc);
=item B<setDefaultRebindProc>
This is very much like the previous function, except instead of specifying
the function to use, you give it the DN, password and Auth method. Then
we'll use a default rebind procedure (internal in C) to handle the rebind
credentials. This was a solution for the Windows/NT problem/bugs we have
with rebind procedures written in Perl.
=back
=head1 EXAMPLES
There are plenty of examples to look at, in the examples directory. We are
adding more examples every day (almost).
=head1 INSTALLATION
Installing this package is part of the Makefile supplied in the
package. See the installation procedures which are part of this package.
=head1 AVAILABILITY
This package can be retrieved from a number of places, including:
http://www.mozilla.org/directory/
Your local CPAN server
=head1 CREDITS
Most of this code was developed by Leif Hedstrom, Netscape Communications
Corporation.
=head1 BUGS
None. :)
=head1 SEE ALSO
L<Mozilla::LDAP::Entry>, L<LDAP::Mozilla:Utils> L<LDAP::Mozilla:API> and
of course L<Perl>.
=cut

View File

@@ -1,626 +0,0 @@
#############################################################################
# $Id: Entry.pm,v 1.9 1998-08-13 21:31:36 leif Exp $
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 PerLDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# This package defines an object class to manage one single LDAP
# entry. This entry can either be a newly created one, or one
# retrieved from an LDAP server, using the Mozilla::LDAP::Conn class.
#
#############################################################################
package Mozilla::LDAP::Entry;
require Tie::Hash;
@ISA = (Tie::StdHash);
#############################################################################
# Creator, make a new tie hash instance, which will keep track of all
# changes made to the hash array. This is needed so we only update modified
# attributes.
#
sub TIEHASH
{
my $class = shift;
my $self = {};
return bless $self, $class;
}
#############################################################################
# Destructor, does nothing really...
#
#sub DESTROY
#{
#}
#############################################################################
# Store method, to keep track of changes.
#
sub STORE
{
my ($self, $attr, $val) = ($_[$[], lc $_[$[ + 1], $_[$[ + 2]);
return if (($val eq "") || ($attr eq ""));
if (defined($self->{$attr}))
{
@{$self->{"_${attr}_save_"}} = @{$self->{$attr}}
unless $self->{"_${attr}_save_"};
}
$self->{$attr} = $val;
$self->{"_${attr}_modified_"} = 1;
# Potentially add the attribute to the OC order list.
if (($attr ne "dn") && !grep(/^$attr$/i, @{$self->{"_oc_order_"}}))
{
push(@{$self->{"_oc_order_"}}, $attr);
}
}
#############################################################################
# Fetch method, this is case insensitive (since LDAP is...).
#
sub FETCH
{
my ($self, $attr) = ($_[$[], lc $_[$[ + 1]);
return unless defined($self->{$attr});
return $self->{$attr};
}
#############################################################################
# Delete method, to keep track of changes.
#
sub DELETE
{
my ($self, $attr) = ($_[$[], lc $_[$[ + 1]);
return if ($attr eq "");
return unless defined($self->{$attr});
$self->{"_${attr}_deleted_"} = 1;
undef $self->{$attr};
}
#############################################################################
# Mark an attribute as changed. Normally you shouldn't have to use this,
# unless you're doing something really weird...
#
sub attrModified
{
my ($self, $attr) = ($_[$[], lc $_[$[ + 1]);
return 0 if ($attr eq "");
return 0 unless defined($self->{$attr});
@{$self->{"_${attr}_save_"}} = @{$self->{$attr}}
unless $self->{"_${attr}_save_"};
$self->{"_self_obj_"}->{"_${attr}_modified_"} = 1;
return 1;
}
#############################################################################
# Ask if a particular attribute has been modified already. Return True or
# false depending on the internal status of the attribute.
#
sub isModified
{
my ($self, $attr) = ($_[$[], lc $_[$[ + 1]);
return 0 if ($attr eq ""); return 0 unless defined($self->{$attr});
return $self->{"_self_obj_"}->{"_${attr}_modified_"};
}
#############################################################################
# Remove an attribute from the entry, basically the same as the DELETE
# method. We also make an alias for "delete" here, just in case (and to be
# somewhat backward compatible).
#
sub remove
{
my ($self, $attr) = ($_[$[], lc $_[$[ + 1]);
return 0 if ($attr eq "");
return 0 unless defined($self->{$attr});
$self->{"_self_obj_"}->{"_${attr}_deleted_"} = 1;
undef $self->{"_self_obj_"}->{$attr};
return 1;
}
*delete = \*remove;
#############################################################################
# Delete a value from an attribute, if it exists. NOTE: If it was the last
# value, we'll actually remove the entire attribute! We should then also
# remove it from the _oc_order_ list...
#
sub removeValue
{
my ($self, $attr, $val) = ($_[$[], lc $_[$[ + 1], $_[$[ + 2]);
my $i = 0;
local $_;
return 0 if (($val eq "") || ($attr eq ""));
return 0 unless defined($self->{$attr});
@{$self->{"_${attr}_save_"}} = @{$self->{$attr}}
unless $self->{"_${attr}_save_"};
foreach (@{$self->{$attr}})
{
if ($_ eq $val)
{
splice(@{$self->{$attr}}, $i, 1);
if ($self->size($attr) > 0)
{
$self->{"_self_obj_"}->{"_${attr}_modified_"} = 1;
}
else
{
$self->{"_self_obj_"}->{"_${attr}_deleted_"} = 1;
# TODO: Now remove it from _oc_order_ !
}
return 1;
}
$i++;
}
return 0;
}
*deleteValue = \*removeValue;
#############################################################################
# Add a value to an attribute. The optional third argument indicates that
# we should not enforce the uniqueness on this attibute, thus bypassing
# the test and always add the value.
#
sub addValue
{
my $self = shift;
my ($attr, $val, $force) = (lc $_[$[], $_[$[ + 1], $_[$[ + 2]);
local $_;
return 0 if (($val eq "") || ($attr eq ""));
if (!$force)
{
foreach (@{$self->{$attr}})
{
return 0 if ($_ eq $val);
}
}
if (defined($self->{$attr}))
{
@{$self->{"_${attr}_save_"}} = @{$self->{$attr}}
unless $self->{"_${attr}_save_"};
}
$self->{"_self_obj_"}->{"_${attr}_modified_"} = 1;
push(@{$self->{$attr}}, $val);
# Potentially add the attribute to the OC order list.
if (($attr ne "dn") && !grep(/^$attr$/i, @{$self->{"_oc_order_"}}))
{
push(@{$self->{"_oc_order_"}}, $attr);
}
return 1;
}
#############################################################################
# Return TRUE or FALSE, if the attribute has the specified value. The
# optional third argument says we should do case insensitive search.
#
sub hasValue
{
my($self, $attr, $val, $nocase) = @_;
return 0 if (($val eq "") || ($attr eq ""));
return 0 unless defined($self->{$attr});
return grep(/^\Q$val\E$/i, @{$self->{$attr}}) if $nocase;
return grep(/^\Q$val\E$/, @{$self->{$attr}});
}
#############################################################################
# Return TRUE or FALSE, if the attribute matches the specified regexp. The
# optional third argument says we should do case insensitive search.
#
sub matchValue
{
my($self, $attr, $reg, $nocase) = @_;
return 0 if (($reg eq "") || ($attr eq ""));
return 0 unless defined($self->{$attr});
return grep(/$reg/i, @{$self->{$attr}}) if $nocase;
return grep(/$reg/, @{$self->{$attr}});
}
#############################################################################
# Set the DN of this entry.
#
sub setDN
{
my ($self, $val) = @_;
return 0 if ($val eq "");
$self->{"dn"} = $val;
return 1;
}
#############################################################################
# Get the DN of this entry.
#
sub getDN
{
my ($self) = @_;
return $self->{"dn"};
}
#############################################################################
#
# Return the number of elements in an attribute.
#
sub size
{
my ($self, $attr) = ($_[$[], lc $_[$[ + 1]);
my @val;
return 0 if ($attr eq "");
return 0 unless defined($self->{$attr});
@val = @{$self->{$attr}};
return $#val + 1;
}
#############################################################################
#
# Return TRUE if the attribute name is in the LDAP entry.
#
sub exists
{
my ($self, $attr) = ($_[$[], lc $_[$[ + 1]);
return 0 if ($attr eq "");
return defined($self->{$attr});
}
#############################################################################
# Print an entry, in LDIF format. This is idential to the Utils::printEntry
# function, but this is sort of neat... Note that the support for Base64
# encoding isn't finished.
#
sub printLDIF
{
my ($self, $base64) = @_;
my $attr;
print "dn: ", $self->getDN(),"\n";
foreach $attr (@{$self->{"_oc_order_"}})
{
next if ($attr =~ /^_.+_$/);
next if $self->{"_${attr}_deleted_"};
grep((print "$attr: $_\n"), @{$self->{$attr}});
}
print "\n";
}
#############################################################################
# Mandatory TRUE return value.
#
1;
#############################################################################
# POD documentation...
#
__END__
=head1 NAME
Mozilla::LDAP::Entry.pm - Object class to hold one LDAP entry.
=head1 SYNOPSIS
use Mozilla::LDAP::Conn;
use Mozilla::LDAP::Entry;
=head1 ABSTRACT
The LDAP::Conn object is used to perform LDAP searches, updates, adds and
deletes. All such functions works on LDAP::Entry objects only. All
modifications and additions you'll do to an LDAP entry, will be done
through this object class.
=head1 DESCRIPTION
The LDAP::Entry object class is built on top of the Tie::Hash standard
object class. This gives us several powerful features, the main one being
to keep track of what is changing in the LDAP entry. This makes it very
easy to write LDAP clients that needs to update/modify entries, since
you'll just do the changes, and this object class will take care of the
rest.
We define local functions for STORE, FETCH and DELETE in this object
class, and inherit the rest from the super class. Overloading these
specific functions is how we can keep track of what is changing in the
entry, which turns out to be very convenient.
Most of the methods here either return the requested LDAP value, or a
status code. The status code (either 0 or 1) indicates the failure or
success of a certain operation. 0 (False) meaning the operation failed,
and a return code of 1 (True) means complete success.
One thing to remember is that in LDAP, attribute names are case
insensitive. All methods in this class are aware of this, and will convert
all attribute name arguments to lower case before performing any
operations. This does not mean that the values are case insensitive. On
the contrary, all values are considered case sensitive by this module,
even if the LDAP server itself treats it as a CIS attribute.
=head1 OBJECT CLASS METHODS
The LDAP::Entry class implements many methods you can use to access and
modify LDAP entries. It is strongly recommended that you use this API as
much as possible, and avoid using the internals of the class
directly. Failing to do so may actually break the functionality.
=head2 Creating a new entry
To create a completely new entry, use the B<new> method, for instance
$entry = new Mozilla::LDAP::Entry()
$entry->setDN("uid=leif,ou=people,dc=netscape,dc=com");
$entry->{objectclass} = [ "top", "person", "inetOrgPerson" ];
$entry->addValue("cn", "Leif Hedstrom");
$entry->addValue("sn", "Hedstrom");
$entry->addValue("givenName", "Leif");
$entry->addValue("mail", "leif@netscape.com);
$conn->add($entry);
This is the minimum requirements for an LDAP entry. It must have a DN, and
it must have at least one objectclass. As it turns out, by adding the
I<person> and I<inetOrgPerson> classes, we also must provide some more
attributes, like I<CN> and I<SN>. This is because the object classes have
these attributes marked as "required", and we'd get a schema violation
without those values.
In the example above we use both native API methods to add values, and
setting an attribute entire value set directly. Note that the value set is
a pointer to an array, and not the array itself. In the example above, the
object classes are set using an anonymous array, which the API handles
properly. It's important to be aware that the attribute value list is
indeed a pointer.
Finally, as you can see there's only only one way to add new LDAP entries,
and it's called add(). It normally takes an LDAP::Entry object instance as
argument, but it can also be called with a regular hash array if so
desired.
=head2 Adding and removing attributes and values
This is the main functionality of this module. Use these methods to do any
modifications and updates to your LDAP entries.
=over 13
=item B<attrModified>
This is an internal function, that can be used to force the API to
consider an attribute (value) to have been modified. The only argument is
the name of the attribute. In almost all situation, you never, ever,
should call this. If you do, please contact the developers, and as us to
fix the API. Example
$entry->attrModified("cn");
=item B<isModified>
This is a somewhat more useful method, which will return the internal
modification status of a particular attribute. The argument is the name of
the attribute, and the return value is True or False. If the attribute has
been modified, in any way, we return True (1), otherwise we return False
(0). For example:
if ($entry->isModified("cn")) { # do something }
=item B<remove>
This will remove the entire attribute, including all it's values, from the
entry. The only argument is the name of the attribute to remove. Let's say
you want to nuke all I<mailAlternateAddress> values (i.e. the entire
attribute should be removed from the entry):
$entry->remove("mailAlternateAddress");
=item B<removeValue>
Remove a value from an attribute, if it exists. Of course, if the
attribute has no such value, we won't try to remove it, and instead return
a False (0) status code. The arguments are the name of the attribute, and
the particular value to remove. Note that values are considered case
sensitive, so make sure you preserve case properly. An example is:
$entry->removeValue("objectclass", "nscpPerson");
=item B<addValue>
Add a value to an attribute. If the attribute value already exists, or we
couldn't add the value for any other reason, we'll return FALSE (0),
otherwise we return TRUE (1). The first two arguments are the attribute
name, and the value to add.
The optional third argument is a flag, indicating that we want to add the
attribute without checking for duplicates. This is useful if you know the
values are unique already, or if you perhaps want to allow duplicates for
a particular attribute. To add a CN to an existing entry/attribute, do:
$entry->addValue("cn", "Leif Hedstrom");
=item B<hasValue>
Return TRUE or FALSE if the attribute has the specified value. A typical
usage is to see if an entry is of a certain object class, e.g.
if ($entry->hasValue("objectclass", "person", 1)) { # do something }
The (optional) third argument indicates if the string comparison should be
case insensitive or not. The first two arguments are the name and value of
the attribute, as usual.
=item B<matchValue>
This is very similar to B<hasValue>, except it does a regular expression
match instead of a full string match. It takes the same arguments,
including the optional third argument to specify case insensitive
matching. The usage is identical to the example for hasValue, e.g.
if ($entry->matchValue("objectclass", "pers", 1)) { # do something }
=item B<setDN>
Set the DN to the specified value. Only do this on new entries, it will
not work well if you try to do this on an existing entry. If you wish to
renamed an entry, use the Mozilla::Conn::modifyRDN method instead.
Eventually we'll provide a complete "rename" method. To set the DN for a
newly created entry, we can do
$entry->setDN("uid=leif,ou=people,dc=netscape,dc=com");
=item B<getDN>
Return the DN for the entry. For instance
print "The DN is: ", $entry->getDN(), "\n";
=item B<size>
Return the number of values for a particular attribute. For instance
$entry->{cn} = [ "Leif Hedstrom", "The Swede" ];
$numVals = $entry->size("cn");
This will set C<$numVals> to two (2). The only argument is the name of the
attribute, and the return value is the size of the value array.
=item B<exists>
Return TRUE if the specified attribute is defined in the LDAP entry. This
is useful to know if an entry has a particular attribute, regardless of
the value. For instance:
if ($entry->exists("jpegphoto")) { # do something special }
=item B<printLDIF>
Print the entry (on STDOUT) in a format called LDIF (LDAP Data Interchange
Format, RFC xxxx). An example of an LDIF entry is:
dn: uid=leif,ou=people,dc=netscape,dc=com
objectclass: top
objectclass: person
objectclass: inetOrgPerson
uid: leif
cn: Leif Hedstrom
mail: leif@netscape.com
The above would be the result of
$entry->printLDIF();
If you need to write to a file, close STDOUT, and open up a file with that
file handle instead. For more useful LDIF functionality, check out the
Mozilla::LDAP::LDIF.pm module.
=back
=head2 Deleting entries
To delete an LDAP entry from the LDAP server, you have to use the
B<delete> method from the Mozilla::LDAP::Conn module. It will actually
delete any entry, if you provide an legitimate DN.
=head2 Renaming entries
Again, there's no functionality in this object class to rename the entry
(i.e. changing it's DN). For now, there is a way to modify the RDN
component of a DN through the Mozilla::LDAP::Conn module, with
B<modifyRDN>. Eventually we hope to have a complete B<rename> method,
which should be capable of renaming any entry, in any way, including
moving it to a different part of the DIT (Directory Information Tree).
=head1 EXAMPLES
There are plenty of examples to look at, in the examples directory. We are
adding more examples every day (almost).
=head1 INSTALLATION
Installing this package is part of the Makefile supplied in the
package. See the installation procedures which are part of this package.
=head1 AVAILABILITY
This package can be retrieved from a number of places, including:
http://www.mozilla.org/directory/
Your local CPAN server
=head1 CREDITS
Most of this code was developed by Leif Hedstrom, Netscape Communications
Corporation.
=head1 BUGS
None. :)
=head1 SEE ALSO
L<Mozilla::LDAP::Conn>, L<Mozilla::LDAP::API>, and of course L<Perl>.
=cut

View File

@@ -1,89 +0,0 @@
PerLDAP installation instructions
==================================
Building this package is fairly straight forward, but requires some
knowledge about using compilers and compiler tools on your system. If you
are uncomfortable using these tools, we recommend you get one of the
prebuilt binary distributions instead.
Prerequisites
=============
In order to build the module, you'll need
- Perl, version 5.003 or later. We definitely recommend you to use
v5.004 or later.
- An ANSI-C compiler, e.g. gcc-2.x, or Visual C++ 5.0.
- The LDAP client libraries and include files, e.g. the SDK from
Netscape Communications. See the README file for information on
retrieving binaries.
You can download (or CVS checkout) the Directory SDK source, see further
information available on
http://www.mozilla.org/directory/
Building
========
This package uses the normal Perl5 MakeMaker installation system. To
generate a Makefile appropriate for your platform, run perl on the
provided Makefile.PL script, e.g.
% perl Makefile.PL
You might have to use the command `perl5' or `perl-5.004', depending on
how you installed Perl-5. The script will now ask you a few questions to
find the necessary library and include files. A typical configuration
session is
data 195% perl5 Makefile.PL
PerLDAP - Perl 5 Module for LDAP
================================
Directory containing 'include' and 'lib' directory of the Netscape
LDAP Software Developer Kit (default: /usr): /opt/ldapsdk3
Using LDAPv3 Developer Kit (default: yes)?
Include SSL Support (default: yes)?
Writing Makefile for Mozilla::LDAP::API
The important question is where your LDAP SDK is installed, in the example
above the base directory is /opt/ldapsdk3. This directory should have two
subdirectories, named "lib" and "include". If you installed the SDK in the
standard /usr hierarchy, use the default value as provided by the install
script.
Assuming you get no errors or warning, proceed with the build and install:
% make
% make install
That should be it!
Automated Configuration and Installs
====================================
The Makefile.PL script also honors a set of environment variables to make
it possible to do configuration and installs non-interactively. The
variables are
LDAPSDKDIR - Full path to the C SDK base directory
LDAPSDKVER - Either "11" (for v1.1) or "30" (for v3.x)
LDAPSDKSSL - Set to "Y" to enable SSL
With these variables set, you will not be asked any of the questions
above. Just run the Makefile.PL script, and finish the build, e.g.
% perl5 Makefile.PL
% make
% make install

View File

@@ -1,269 +0,0 @@
#############################################################################
# $Id: LDIF.pm,v 1.5 1998-08-13 21:32:50 leif Exp $
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 PerLDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# Simple routines to read and write LDIF style files. You should open
# the input/output file manually, or use STDIN/STDOUT.
#
#############################################################################
package Mozilla::LDAP::LDIF;
use Mozilla::LDAP::Entry;
use Mozilla::LDAP::Utils(qw(decodeBase64));
#############################################################################
# Creator, the argument (optional) is the file handle.
#
sub new
{
my ($class, $fh) = @_;
my $self = {};
if ($fh)
{
$self->{"_fh_"} = $fh;
$self->{"_canRead_"} = 1;
$self->{"_canWrite_"} = 1;
}
else
{
$self->{"_fh_"} = STDIN;
$self->{"_canRead_"} = 1;
$self->{"_canWrite_"} = 0;
}
return bless $self, $class;
}
#############################################################################
# Destructor, close file descriptors etc. (???)
#
#sub DESTROY
#{
# my $self = shift;
#}
#############################################################################
# Read the next $entry from an ::LDIF object. No arguments
#
sub readOneEntry
{
my ($self) = @_;
my ($attr, $val, $entry, $base64, $fh);
local $_;
return unless $self->{"_canRead_"};
return unless defined($self->{"_fh_"});
# Skip leading empty lines.
$fh = $self->{"_fh_"};
while (<$fh>)
{
chop;
last unless /^\s*$/;
}
return if /^$/; # EOF
$self->{"_canWrite_"} = 0 if $self->{"_canWrite_"};
$entry = new Mozilla::LDAP::Entry();
do
{
# See if it's a continuation line.
if (/^ /o)
{
$val .= substr($_, 1);
}
else
{
if ($val && $attr)
{
if ($attr eq "dn")
{
$entry->setDN($val);
}
else
{
$val = decodeBase64($val) if $base64;
$entry->addValue($attr, "$val", 1);
}
}
($attr, $val) = split(/:\s+/, $_, 2);
$attr = lc $attr;
# Handle base64'ed data.
if ($attr =~ /:$/o)
{
$base64 = 1;
chop($attr);
}
else
{
$base64 = 0;
}
}
$_ = <$fh>;
chop;
} until /^\s*$/;
# Do the last attribute...
if ($attr && ($attr ne "dn"))
{
$val = decodeBase64($val) if $base64;
$entry->addValue($attr, "$val", 1);
}
return $entry;
}
*readEntry = \readOneEntry;
#############################################################################
# Print one entry, to the file handle. Note that we actually use some
# internals from the ::Entry object here, which is a no-no... Also, we need
# to support Base64 encoding of Binary attributes here.
#
sub writeOneEntry
{
my ($self, $entry) = @_;
my ($fh, $attr);
return unless $self->{"_canWrite_"};
$self->{"_canRead_"} = 0 if $self->{"_canRead_"};
$fh = $self->{"_fh_"};
print $fh "dn: ", $entry->getDN(),"\n";
foreach $attr (@{$entry->{"_oc_order_"}})
{
next if ($attr =~ /^_.+_$/);
next if $entry->{"_${attr}_deleted_"};
# TODO: Add support for Binary attributes.
grep((print $fh "$attr: $_\n"), @{$entry->{$attr}});
}
print $fh "\n";
}
*writeEntry = \writeOneEntry;
#############################################################################
# Read multiple entries, and return an array of Entry objects. The argument
# is the number to read, or read them all if not specified.
#
sub readEntries
{
my ($self, $num) = @_;
my $entry;
my (@entries);
return if (($num ne "") && ($num <= 0));
$num = -1 unless $num;
do
{
$entry = $self->readOneEntry();
push(@entries, $entry) if ($entry);
$num--;
} until (! $entry || $num == 0);
return @entries;
}
#############################################################################
# Write multiple entries, the argument is the array of Entry objects.
#
sub writeEntries
{
my ($self, @entries) = @_;
local $_;
foreach (@entries)
{
$self->writeOneEntry($_);
}
}
#############################################################################
# Mandatory TRUE return value.
#
1;
#############################################################################
# POD documentation...
#
__END__
=head1 NAME
Mozilla::LDAP::LDIF - Read, write and modify LDIF files.
=head1 SYNOPSIS
use Mozilla::LDAP::LDIF;
=head1 ABSTRACT
This package is used to read and write LDIF information from files (actually, file handles).
=head1 DESCRIPTION
LDIF rules...
=head1 EXAMPLES
There are plenty of examples to look at, in the examples directory. We are
adding more examples every day (almost).
=head1 INSTALLATION
Installing this package is part of the Makefile supplied in the
package. See the installation procedures which are part of this package.
=head1 AVAILABILITY
This package can be retrieved from a number of places, including:
http://www.mozilla.org/directory/
Your local CPAN server
=head1 CREDITS
Most of this code was developed by Leif Hedstrom, Netscape Communications
Corporation.
=head1 BUGS
None. :)
=head1 SEE ALSO
L<Mozilla::LDAP::Conn>, L<Mozilla::LDAP::Entry>, L<Mozilla::LDAP::API>,
and of course L<Perl>.
=cut

View File

@@ -1,24 +0,0 @@
ChangeLog
API.pm
API.xs
MANIFEST
Makefile.PL
constant.h
test.pl
typemap
Entry.pm
Conn.pm
LDIF.pm
README
MPL-1.0.txt
test_api/search.pl
test_api/write.pl
test_api/api.pl
examples/ChangeLog
examples/lfinger.pl
examples/qsearch.pl
examples/monitor.pl
examples/ldappasswd.pl
examples/rmentry.pl
examples/tabdump.pl
examples/modattr.pl

View File

@@ -1,360 +0,0 @@
MOZILLA PUBLIC LICENSE
Version 1.0
----------------
1. Definitions.
1.1. ``Contributor'' means each entity that creates or contributes to
the creation of Modifications.
1.2. ``Contributor Version'' means the combination of the Original
Code, prior Modifications used by a Contributor, and the Modifications
made by that particular Contributor.
1.3. ``Covered Code'' means the Original Code or Modifications or the
combination of the Original Code and Modifications, in each case
including portions thereof.
1.4. ``Electronic Distribution Mechanism'' means a mechanism generally
accepted in the software development community for the electronic
transfer of data.
1.5. ``Executable'' means Covered Code in any form other than Source
Code.
1.6. ``Initial Developer'' means the individual or entity identified as
the Initial Developer in the Source Code notice required by Exhibit A.
1.7. ``Larger Work'' means a work which combines Covered Code or
portions thereof with code not governed by the terms of this License.
1.8. ``License'' means this document.
1.9. ``Modifications'' means any addition to or deletion from the
substance or structure of either the Original Code or any previous
Modifications. When Covered Code is released as a series of files, a
Modification is:
A. Any addition to or deletion from the contents of a file
containing Original Code or previous Modifications.
B. Any new file that contains any part of the Original Code or
previous Modifications.
1.10. ``Original Code'' means Source Code of computer software code
which is described in the Source Code notice required by Exhibit A as
Original Code, and which, at the time of its release under this License
is not already Covered Code governed by this License.
1.11. ``Source Code'' means the preferred form of the Covered Code for
making modifications to it, including all modules it contains, plus any
associated interface definition files, scripts used to control
compilation and installation of an Executable, or a list of source code
differential comparisons against either the Original Code or another
well known, available Covered Code of the Contributor's choice. The
Source Code can be in a compressed or archival form, provided the
appropriate decompression or de-archiving software is widely available
for no charge.
1.12. ``You'' means an individual or a legal entity exercising rights
under, and complying with all of the terms of, this License or a future
version of this License issued under Section 6.1. For legal entities,
``You'' includes any entity which controls, is controlled by, or is
under common control with You. For purposes of this definition,
``control'' means (a) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (b) ownership of fifty percent (50%) or more of the
outstanding shares or beneficial ownership of such entity.
2. Source Code License.
2.1. The Initial Developer Grant.
The Initial Developer hereby grants You a world-wide, royalty-free,
non-exclusive license, subject to third party intellectual property
claims:
(a) to use, reproduce, modify, display, perform, sublicense and
distribute the Original Code (or portions thereof) with or without
Modifications, or as part of a Larger Work; and
(b) under patents now or hereafter owned or controlled by Initial
Developer, to make, have made, use and sell (``Utilize'') the
Original Code (or portions thereof), but solely to the extent that
any such patent is reasonably necessary to enable You to Utilize
the Original Code (or portions thereof) and not to any greater
extent that may be necessary to Utilize further Modifications or
combinations.
2.2. Contributor Grant.
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license, subject to third party intellectual property
claims:
(a) to use, reproduce, modify, display, perform, sublicense and
distribute the Modifications created by such Contributor (or
portions thereof) either on an unmodified basis, with other
Modifications, as Covered Code or as part of a Larger Work; and
(b) under patents now or hereafter owned or controlled by
Contributor, to Utilize the Contributor Version (or portions
thereof), but solely to the extent that any such patent is
reasonably necessary to enable You to Utilize the Contributor
Version (or portions thereof), and not to any greater extent that
may be necessary to Utilize further Modifications or combinations.
3. Distribution Obligations.
3.1. Application of License.
The Modifications which You create or to which You contribute are
governed by the terms of this License, including without limitation
Section 2.2. The Source Code version of Covered Code may be distributed
only under the terms of this License or a future version of this
License released under Section 6.1, and You must include a copy of this
License with every copy of the Source Code You distribute. You may not
offer or impose any terms on any Source Code version that alters or
restricts the applicable version of this License or the recipients'
rights hereunder. However, You may include an additional document
offering the additional rights described in Section 3.5.
3.2. Availability of Source Code.
Any Modification which You create or to which You contribute must be
made available in Source Code form under the terms of this License
either on the same media as an Executable version or via an accepted
Electronic Distribution Mechanism to anyone to whom you made an
Executable version available; and if made available via Electronic
Distribution Mechanism, must remain available for at least twelve (12)
months after the date it initially became available, or at least six
(6) months after a subsequent version of that particular Modification
has been made available to such recipients. You are responsible for
ensuring that the Source Code version remains available even if the
Electronic Distribution Mechanism is maintained by a third party.
3.3. Description of Modifications.
You must cause all Covered Code to which you contribute to contain a
file documenting the changes You made to create that Covered Code and
the date of any change. You must include a prominent statement that the
Modification is derived, directly or indirectly, from Original Code
provided by the Initial Developer and including the name of the Initial
Developer in (a) the Source Code, and (b) in any notice in an
Executable version or related documentation in which You describe the
origin or ownership of the Covered Code.
3.4. Intellectual Property Matters
(a) Third Party Claims.
If You have knowledge that a party claims an intellectual property
right in particular functionality or code (or its utilization
under this License), you must include a text file with the source
code distribution titled ``LEGAL'' which describes the claim and
the party making the claim in sufficient detail that a recipient
will know whom to contact. If you obtain such knowledge after You
make Your Modification available as described in Section 3.2, You
shall promptly modify the LEGAL file in all copies You make
available thereafter and shall take other steps (such as notifying
appropriate mailing lists or newsgroups) reasonably calculated to
inform those who received the Covered Code that new knowledge has
been obtained.
(b) Contributor APIs.
If Your Modification is an application programming interface and
You own or control patents which are reasonably necessary to
implement that API, you must also include this information in the
LEGAL file.
3.5. Required Notices.
You must duplicate the notice in Exhibit A in each file of the Source
Code, and this License in any documentation for the Source Code, where
You describe recipients' rights relating to Covered Code. If You
created one or more Modification(s), You may add your name as a
Contributor to the notice described in Exhibit A. If it is not possible
to put such notice in a particular Source Code file due to its
structure, then you must include such notice in a location (such as a
relevant directory file) where a user would be likely to look for such
a notice. You may choose to offer, and to charge a fee for, warranty,
support, indemnity or liability obligations to one or more recipients
of Covered Code. However, You may do so only on Your own behalf, and
not on behalf of the Initial Developer or any Contributor. You must
make it absolutely clear than any such warranty, support, indemnity or
liability obligation is offered by You alone, and You hereby agree to
indemnify the Initial Developer and every Contributor for any liability
incurred by the Initial Developer or such Contributor as a result of
warranty, support, indemnity or liability terms You offer.
3.6. Distribution of Executable Versions.
You may distribute Covered Code in Executable form only if the
requirements of Section 3.1-3.5 have been met for that Covered Code,
and if You include a notice stating that the Source Code version of the
Covered Code is available under the terms of this License, including a
description of how and where You have fulfilled the obligations of
Section 3.2. The notice must be conspicuously included in any notice in
an Executable version, related documentation or collateral in which You
describe recipients' rights relating to the Covered Code. You may
distribute the Executable version of Covered Code under a license of
Your choice, which may contain terms different from this License,
provided that You are in compliance with the terms of this License and
that the license for the Executable version does not attempt to limit
or alter the recipient's rights in the Source Code version from the
rights set forth in this License. If You distribute the Executable
version under a different license You must make it absolutely clear
that any terms which differ from this License are offered by You alone,
not by the Initial Developer or any Contributor. You hereby agree to
indemnify the Initial Developer and every Contributor for any liability
incurred by the Initial Developer or such Contributor as a result of
any such terms You offer.
3.7. Larger Works.
You may create a Larger Work by combining Covered Code with other code
not governed by the terms of this License and distribute the Larger
Work as a single product. In such a case, You must make sure the
requirements of this License are fulfilled for the Covered Code.
4. Inability to Comply Due to Statute or Regulation.
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Code due to statute
or regulation then You must: (a) comply with the terms of this License
to the maximum extent possible; and (b) describe the limitations and
the code they affect. Such description must be included in the LEGAL
file described in Section 3.4 and must be included with all
distributions of the Source Code. Except to the extent prohibited by
statute or regulation, such description must be sufficiently detailed
for a recipient of ordinary skill to be able to understand it.
5. Application of this License.
This License applies to code to which the Initial Developer has
attached the notice in Exhibit A, and to related Covered Code.
6. Versions of the License.
6.1. New Versions.
Netscape Communications Corporation (``Netscape'') may publish revised
and/or new versions of the License from time to time. Each version will
be given a distinguishing version number.
6.2. Effect of New Versions.
Once Covered Code has been published under a particular version of the
License, You may always continue to use it under the terms of that
version. You may also choose to use such Covered Code under the terms
of any subsequent version of the License published by Netscape. No one
other than Netscape has the right to modify the terms applicable to
Covered Code created under this License.
6.3. Derivative Works.
If you create or use a modified version of this License (which you may
only do in order to apply it to code which is not already Covered Code
governed by this License), you must (a) rename Your license so that the
phrases ``Mozilla'', ``MOZILLAPL'', ``MOZPL'', ``Netscape'', ``NPL'' or
any confusingly similar phrase do not appear anywhere in your license
and (b) otherwise make it clear that your version of the license
contains terms which differ from the Mozilla Public License and
Netscape Public License. (Filling in the name of the Initial Developer,
Original Code or Contributor in the notice described in Exhibit A shall
not of themselves be deemed to be modifications of this License.)
7. DISCLAIMER OF WARRANTY.
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN ``AS IS'' BASIS,
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
8. TERMINATION.
This License and the rights granted hereunder will terminate
automatically if You fail to comply with terms herein and fail to cure
such breach within 30 days of becoming aware of the breach. All
sublicenses to the Covered Code which are properly granted shall
survive any termination of this License. Provisions which, by their
nature, must remain in effect beyond the termination of this License
shall survive.
9. LIMITATION OF LIABILITY.
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER
PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF
GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND
ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE
BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT
EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
10. U.S. GOVERNMENT END USERS.
The Covered Code is a ``commercial item,'' as that term is defined in
48 C.F.R. 2.101 (Oct. 1995), consisting of ``commercial computer
software'' and ``commercial computer software documentation,'' as such
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
all U.S. Government End Users acquire Covered Code with only those
rights set forth herein.
11. MISCELLANEOUS.
This License represents the complete agreement concerning subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. This License shall be governed by
California law provisions (except to the extent applicable law, if any,
provides otherwise), excluding its conflict-of-law provisions. With
respect to disputes in which at least one party is a citizen of, or an
entity chartered or registered to do business in, the United States of
America: (a) unless otherwise agreed in writing, all disputes relating
to this License (excepting any dispute relating to intellectual
property rights) shall be subject to final and binding arbitration,
with the losing party paying all costs of arbitration; (b) any
arbitration relating to this Agreement shall be held in Santa Clara
County, California, under the auspices of JAMS/EndDispute; and (c) any
litigation relating to this Agreement shall be subject to the
jurisdiction of the Federal Courts of the Northern District of
California, with venue lying in Santa Clara County, California, with
the losing party responsible for costs, including without limitation,
court costs and reasonable attorneys fees and expenses. The application
of the United Nations Convention on Contracts for the International
Sale of Goods is expressly excluded. Any law or regulation which
provides that the language of a contract shall be construed against the
drafter shall not apply to this License.
12. RESPONSIBILITY FOR CLAIMS.
Except in cases where another Contributor has failed to comply with
Section 3.4, You are responsible for damages arising, directly or
indirectly, out of Your utilization of rights under this License, based
on the number of copies of Covered Code you made available, the
revenues you received from utilizing such rights, and other relevant
factors. You agree to work with affected parties to distribute
responsibility on an equitable basis.
EXHIBIT A.
``The contents of this file are subject to the Mozilla 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/MPL/
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 Initial Developer of the Original Code is ________________________.
Portions created by ______________________ are Copyright (C) ______
_______________________. All Rights Reserved.
Contributor(s): ______________________________________.''

View File

@@ -1,134 +0,0 @@
#############################################################################
# $Id: Makefile.PL,v 1.13 1998-08-14 21:45:39 leif%netscape.com Exp $
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 PerLDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# The Makefile "source".
#
#############################################################################
use ExtUtils::MakeMaker;
use Config;
$perlpath = $Config{'perlpath'};
$osname = $Config{'osname'};
$ldapsdk_loc = $ENV{"LDAPSDKDIR"}; # Full Path to C SDK Top-Level
$ldapsdk_ver = $ENV{"LDAPSDKVER"}; # 11 or 30
$ldapsdk_ssl = $ENV{"LDAPSDKSSL"}; # Y to include SSL
print "\nPerLDAP - Perl 5 Module for LDAP\n";
print "================================\n";
if (!$ldapsdk_loc)
{
print "Directory containing 'include' and 'lib' directory of the Netscape\n";
print "LDAP Software Developer Kit (default: /usr): ";
chomp ($ldapsdk_loc = <>);
$ldapsdk_loc = "/usr" unless $ldapsdk_loc =~ /\S/;
}
if ($osname =~ /mswin/i)
{
$dir_sep = "\\";
} else {
$dir_sep = "/";
}
$include_ldap = $ldapsdk_loc . $dir_sep . "include";
$lib_ldap = $ldapsdk_loc . $dir_sep . "lib";
if (!$ldapsdk_ver)
{
print "Using LDAPv3 Developer Kit (default: yes)? ";
chomp ($ver = <>);
if ($ver =~ /^n/i)
{
$ldapsdk_ver = "11";
} else {
$ldapsdk_ver = "30";
}
}
if ($ldapsdk_ver == "30")
{
$v3def = "-DLDAPV3";
}
if (!$ldapsdk_ssl)
{
print "Include SSL Support (default: yes)? ";
chomp ($ldapsdk_ssl = <>);
}
if ($ldapsdk_ssl =~ /^n/i)
{
$ssl_def = "";
} else {
$ssl_def = "-DUSE_SSL";
}
if ($osname =~ /mswin/i)
{
if ($ssl_def)
{
if ($ldapsdk_ver == "30")
{
$ldap_lib = "nsldapssl32v30";
} else {
$ldap_lib = "nsldap32v11";
}
} else {
$ldap_lib = "nsldap32v" . $ldapsdk_ver;
}
} else {
if ($ssl_def)
{
if ($ldapsdk_ver == "30")
{
$ldap_lib = "ldapssl30";
} else {
$ldap_lib = "ldap30";
}
} else {
$ldap_lib = "ldap" . $ldapsdk_ver;
}
}
if ($osname =~ /mswin/i)
{
$myextlib = "$lib_ldap\\$ldap_lib.lib";
} else {
$myextlib = "";
}
WriteMakefile(
'NAME' => 'Mozilla::LDAP::API',
'VERSION_FROM' => 'API.pm',
($include_ldap ne "/usr/include" ? (
'INC' => "-I$include_ldap",
) : (
'INC' => "",
)),
'LIBS' => ["-L$lib_ldap -l$ldap_lib"],
'MYEXTLIB' => $myextlib,
'DEFINE' => "$v3_def $ssl_def",
);

View File

@@ -1,165 +0,0 @@
#############################################################################
# #
# PerLDAP v1.0 - A Perl Developers' Kit for LDAP #
# #
#############################################################################
What is PerLDAP?
================
PerLDAP is a set of modules written in Perl and C that allow developers to
leverage their existing Perl knowledge to easily access and manage LDAP-
enabled directories. PerLDAP makes it very easy to search, add, delete,
and modify directory entries. For example, Perl developers can easily
build web applications to access information stored in a directory or
create directory sync tools between directories and other services.
PerLDAP is an open source development project, the result of a joint effort
between Netscape and Clayton Donley, an open source developer. PerLDAP
currently provides the basic functions to allow Perl users to access and
manipulate directories easily. Based on developer feedback and
involvement, PerLDAP will continue to evolve to include additional
functionality in future releases.
Installing PerLDAP Binaries
===========================
You will first need version 3.0 Beta 1 of the LDAP C SDK from Netscape. This
is available from the DevEdge page at:
http://developer.netscape.com/tech/directory/
You will also need Perl v5.004, available at http://www.perl.com/. Earlier
versions of Perl will NOT work with the binaries. If you wish to use v5.004,
you will need to compile PerLDAP from source.
On Unix (Solaris Only...HPUX, IRIX, AIX to follow):
1. Be sure that the libraries from the C SDK are installed in locations
referenced by the environment variable LD_LIBRARY_PATH.
2. Save the file in a temporary location
3. Unzip the file by entering the command:
gunzip <filename>.tar.gz
4. Untar the resulting tar file by entering the command:
tar xvof <filename>.tar
5. Change to the extract directory:
cd PerLDAP-1.0
6. Execute the following command in as the super-user (root):
perl install-bin
On Windows NT:
1. Be sure that the DLL from the C SDK is installed in your system32
directory. Or alternatively, put the SDK DLLs in the same directory
as your Perl-5 binary.
2. Save the file in a temporary location
3. Unzip the file by entering the command:
I don't have a tool for creating self-extracting archives...
4. Change to the extract directory:
cd PerLDAP-1.0
5. Execute the following command:
perl install-bin
Compiling the PerLDAP Sources
=============================
The source to PerLDAP is available on the Mozilla site at:
http://www.mozilla.org/directory/
You can either retrieve the .tar file with the source distribution, or use
CVS to checkout the module directly. The name of the CVS module is
PerLDAP, and it checks out the directory
mozilla/directory/perldap
Further instructions for using CVS and Mozilla is available at
http://www.mozilla.org/cvs.html
Instructions for building the source can be found in the INSTALL file
in the source distribution.
Getting Started
===============
Documentation for this module is in standard Perl 'pod' format. HTML
versions of this documentation can also be found on the Netscape DevEdge
site at: http://developer.netscape.com/tech/directory/.
Additionally, many good examples can be found in the 'examples' directory.
Modules and Examples Included
=============================
Mozilla::LDAP::API - Low level interface between Perl and the LDAP C API
Mozilla::LDAP::Entry - Perl methods for manipulating entry objects
Mozilla::LDAP::Conn - Perl methods for performing LDAP operations
Mozilla::LDAP::LDIF - Perl methods for utilizing LDIF
Mozilla::LDAP::Utils - Some convenient LDAP related utilities
test_api/search.pl - Tests low level API search calls
test_api/write.pl - Tests low level API write calls
test_api/api.pl - Tests ALL low level LDAPv2 calls
examples/lfinger.pl - LDAP version of the regular Unix finger command.
examples/qsearch.pl - Simple ldapsearch replacement.
examples/monitor.pl - Retrieve status information from an LDAP server.
examples/ldappasswd.pl - Change the LDAP password for a user.
examples/rmentry.pl - Remove an entire entry from the database.
examples/rename.pl - Rename (modRDN) an entry.
examples/tabdump.pl - Dump LDAP information into a tab separated file.
examples/psoftsync.pl - Synchronize LDAP with a PeopleSoft "dump" file.
All examples support the "standard" LDAP command line options, which are
-h hostname LDAP server name
-p port # LDAP port, default is 389 (or 636 for SSL)
-b base DN LDAP Base-DN
-D bind DN LDAP bind DN (connect to server as this "user")
-w bind pswd Password to bind to the server
-P certfile Use SSL, with the publick keys from this file
Note that the examples currently only support Simple Authentication
(passwords), the Client Authentication features (using certificates) will
be used in the next release. All examples also honors the environment
variable LDAP_BASEDN, set it to your systems base DN, e.g.
% setenv LDAP_BASEDN 'dc=netscape,dc=com'
or for Bourne shell
# LDAP_BASEDN='dc=netscape,dc=com'; export LDAP_BASEDN
Reporting problems and bugs
===========================
Address all bug reports and comments to the Mozilla newsgroups at:
news://news.mozilla.org/netscape.public.mozilla.general
License/Copyright
=================
Portions by Netscape (c) Copyright 1998 Netscape Communications Corp, Inc.
Portions by Clayton Donley (c) Copyright 1998 Clayton Donley
Please read the MPL-1.0.txt file included for information on the Mozilla
Public License, which covers all files in this distribution.
Known Bugs
==========
There are a number of issues still outstanding at the time of release. Most
of these are already in the process of being resolved.
- There is a possible memory leak in the search routines. The OO layer
is also more memory than it should.
- The Rebind operation on NT does NOT work properly when set to a Perl
function. This is being investigated.
- Some of the documentation is incomplete.

View File

@@ -1,360 +0,0 @@
#############################################################################
# $Id: Utils.pm,v 1.10 1998-08-13 21:32:29 leif Exp $
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 PerLDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# Lots of Useful Little Utilities, for LDAP related operations.
#
#############################################################################
package Mozilla::LDAP::Utils;
use Mozilla::LDAP::API qw(:constant);
use Mozilla::LDAP::Conn;
use vars qw(@ISA %EXPORT_TAGS);
require Exporter;
@ISA = qw(Exporter);
%EXPORT_TAGS = (
all => [qw(normalizeDN
isUrl
printEntry
printentry
encodeBase64
decodeBase64
str2Scope
askPassword
ldapArgs
unixCrypt
userCredentials
answer)]
);
# Add Everything in %EXPORT_TAGS to @EXPORT_OK
Exporter::export_ok_tags('all');
#############################################################################
# Normalize the DN string (first argument), and return the new, normalized,
# string (DN). This is useful to make sure that two syntactically
# identical DNs compare (eq) as the same string.
#
sub normalizeDN
{
my ($dn) = @_;
my (@vals);
return "" if ($dn eq "");
@vals = Mozilla::LDAP::API::ldap_explode_dn(lc $dn, 0);
return join(",", @vals);
}
#############################################################################
# Checks if a string is a properly formed LDAP URL.
#
sub isURL
{
return ldap_is_ldap_url($_[0]);
}
#############################################################################
# Print an entry, in LDIF format. This is sort of obsolete, we encourage
# you to use the :;LDAP::LDIF class instead.
#
sub printEntry
{
my $entry = $_[0];
my $attr;
local $_;
print "dn: ", $entry->{"dn"},"\n";
foreach $attr (@{$entry->{"_oc_order_"}})
{
next if ($attr =~ /^_.+_$/);
next if $entry->{"_${attr}_deleted_"};
foreach (@{$entry->{$attr}})
{
print "$attr: $_\n";
}
}
print "\n";
}
*printentry = \*printEntry;
#############################################################################
# Perform Base64 encoding, this is based on MIME::Base64.pm, written
# by Gisle Aas <gisle@aas.no>. If possible, use the MIME:: package instead.
#
sub encodeBase64
{
my $res = "";
my $eol = "$_[1]";
my $padding;
pos($_[0]) = 0; # ensure start at the beginning
while ($_[0] =~ /(.{1,45})/gs) {
$res .= substr(pack('u', $1), 1);
chop($res);
}
$res =~ tr|` -_|AA-Za-z0-9+/|; # `# help emacs
$padding = (3 - length($_[0]) % 3) % 3;
$res =~ s/.{$padding}$/'=' x $padding/e if $padding;
if (length $eol) {
$res =~ s/(.{1,76})/$1$eol/g;
}
return $res;
}
#############################################################################
# Perform Base64 decoding, this is based on MIME::Base64.pm, written
# by Gisle Aas <gisle@aas.no>. If possible, use the MIME:: package instead.
#
sub decodeBase64
{
my $str = shift;
my $res = "";
my $len;
$str =~ tr|A-Za-z0-9+=/||cd;
Carp::croak("Base64 decoder requires string length to be a multiple of 4")
if length($str) % 4;
$str =~ s/=+$//; # remove padding
$str =~ tr|A-Za-z0-9+/| -_|; # convert to uuencoded format
while ($str =~ /(.{1,60})/gs)
{
$len = chr(32 + length($1)*3/4);
$res .= unpack("u", $len . $1 ); # uudecode
}
return $res;
}
#############################################################################
# Convert a "human" readable string to an LDAP scope value
#
sub str2Scope
{
my $str = $_[0];
return $str if ($str =~ /^[0-9]+$/);
if ($str =~ /^sub/i)
{
return LDAP_SCOPE_SUBTREE;
}
elsif ($str =~ /^base/i)
{
return LDAP_SCOPE_BASE;
}
elsif ($str =~ /^one/i)
{
return LDAP_SCOPE_ONELEVEL;
}
# Default...
return LDAP_SCOPE_SUBTREE;
}
#############################################################################
# Ask for a password, without displaying it on the TTY. This is very non-
# portable, we need a better solution (using the term package perhaps?).
#
sub askPassword
{
system('/bin/stty -echo');
chop($_ = <STDIN>);
system('/bin/stty echo');
print "\n";
return $_;
}
#############################################################################
# Handle some standard LDAP options, and construct a nice little structure
# that we can use later on.
#
sub ldapArgs
{
my ($bind, $base) = @_;
my %ld;
$main::opt_v = $main::opt_n if defined($main::opt_n);
$main::opt_p = LDAPS_PORT unless (defined($main::opt_p) ||
($main::opt_p eq ""));
$ld{"host"} = $main::opt_h || "ldap";
$ld{"port"} = $main::opt_p || LDAP_PORT;
$ld{"root"} = $main::opt_b || $base || $ENV{'LDAP_BASEDN'};
$ld{"bind"} = $main::opt_D || $bind || "";
$ld{"pswd"} = $main::opt_w || "";
$ld{"cert"} = $main::opt_P || "";
$ld{"scope"} = $main::opt_s || LDAP_SCOPE_SUBTREE;
if (($ld{"bind"} ne "") && ($ld{"pswd"} eq ""))
{
print "LDAP password: ";
$ld{pswd} = askPassword();
}
return %ld;
}
#############################################################################
# Create a Unix-type password, using the "crypt" function. A random salt
# is always generated, perhaps it should be an optional argument?
#
sub unixCrypt
{
my $ascii =
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
my $salt = substr($ascii, rand(62), 1) . substr($ascii, rand(62), 1);
srand(time ^ $$);
crypt($_[0], $salt);
}
#############################################################################
# Try to find a user to bind as, and possibly ask for the password. Pass
# a pointer to the hash array with parameters to this function.
#
sub userCredentials
{
my ($ld) = @_;
my ($conn, $entry, $pswd);
if ($ld->{"bind"} eq "")
{
$conn = new Mozilla::LDAP::Conn($ld);
die "Could't connect to LDAP server " . $ld->{"host"} unless $conn;
$search = "(&(objectclass=inetOrgPerson)(uid=$ENV{USER}))";
$entry = $conn->search($ld->{"root"}, "subtree", $search, 0, ("uid"));
return 0 if (!$entry || $conn->nextEntry());
$conn->close();
$ld->{"bind"} = $entry->getDN();
print "Binding as ", $ld->{"bind"}, "\n\n" if $main::opt_v;
}
if ($ld->{"pswd"} eq "")
{
print "Enter bind password: ";
$ld->{"pswd"} = Mozilla::LDAP::Utils::askPassword();
}
}
#############################################################################
# Ask a Y/N question, return "Y" or "N".
#
sub answer
{
die "Default string must be Y or N."
unless (($_[0] eq "Y") || ($_[0] eq "N"));
chop($_ = <STDIN>);
return $_[0] if /^$/;
return "Y" if /^[yY]/;
return "N" if /^[nN]/;
}
#############################################################################
# POD documentation...
#
__END__
=head1 NAME
Mozilla::LDAP::Utils.pm - Collection of useful little utilities.
=head1 SYNOPSIS
use Mozilla::LDAP::Utils;
=head1 ABSTRACT
=head1 DESCRIPTION
=head1 OBJECT CLASS METHODS
=over 13
=item B<normalizeDN>
This function will remove all extraneous white spaces in the DN, and also
change all upper case characters to lower case. The only argument is the
DN string to normalize, and the return value is the new, clean DN.
=back
=head1 EXAMPLES
There are plenty of examples to look at, in the examples directory. We are
adding more examples every day (almost).
=head1 INSTALLATION
Installing this package is part of the Makefile supplied in the
package. See the installation procedures which are part of this package.
=head1 AVAILABILITY
This package can be retrieved from a number of places, including:
http://www.mozilla.org/directory/
Your local CPAN server
=head1 CREDITS
Most of this code was developed by Leif Hedstrom, Netscape Communications
Corporation.
=head1 BUGS
None. :)
=head1 SEE ALSO
L<Mozilla::LDAP::Conn>, L<Mozilla::LDAP::Entry>, L<Mozilla::LDAP::API>, and
of course L<Perl>.
=cut

View File

@@ -1,954 +0,0 @@
/*
*******************************************************************************
* $Id: constant.h,v 1.7 1998-08-13 09:14:14 leif Exp $
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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 PerLDAP. The Initial Developer of the Original
* Code is Netscape Communications Corp. and Clayton Donley. Portions
* created by Netscape are Copyright (C) Netscape Communications
* Corp., portions created by Clayton Donley are Copyright (C) Clayton
* Donley. All Rights Reserved.
*
* Contributor(s):
*
* DESCRIPTION
* Constants.
*
*******************************************************************************/
#ifdef __cplusplus
extern "C" {
#endif
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#ifdef __cplusplus
}
#endif
#include <ldap.h>
static int
not_here(s)
char *s;
{
croak("%s not implemented on this architecture", s);
return -1;
}
double
constant(name, arg)
char *name;
int arg;
{
errno = 0;
if (name[0] == 'L' && name[1] == 'D' && name[2] == 'A' && name[3] == 'P'
&& name[4] == '_')
{
switch (name[5]) {
case 'A':
if (strEQ(name, "LDAP_ADMINLIMIT_EXCEEDED"))
#ifdef LDAP_ADMINLIMIT_EXCEEDED
return LDAP_ADMINLIMIT_EXCEEDED;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_AFFECTS_MULTIPLE_DSAS"))
#ifdef LDAP_AFFECTS_MULTIPLE_DSAS
return LDAP_AFFECTS_MULTIPLE_DSAS;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_ALIAS_DEREF_PROBLEM"))
#ifdef LDAP_ALIAS_DEREF_PROBLEM
return LDAP_ALIAS_DEREF_PROBLEM;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_ALIAS_PROBLEM"))
#ifdef LDAP_ALIAS_PROBLEM
return LDAP_ALIAS_PROBLEM;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_ALREADY_EXISTS"))
#ifdef LDAP_ALREADY_EXISTS
return LDAP_ALREADY_EXISTS;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_AUTH_METHOD_NOT_SUPPORTED"))
#ifdef LDAP_AUTH_METHOD_NOT_SUPPORTED
return LDAP_AUTH_METHOD_NOT_SUPPORTED;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_AUTH_NONE"))
#ifdef LDAP_AUTH_NONE
return LDAP_AUTH_NONE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_AUTH_SASL"))
#ifdef LDAP_AUTH_SASL
return LDAP_AUTH_SASL;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_AUTH_SIMPLE"))
#ifdef LDAP_AUTH_SIMPLE
return LDAP_AUTH_SIMPLE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_AUTH_UNKNOWN"))
#ifdef LDAP_AUTH_UNKNOWN
return LDAP_AUTH_UNKNOWN;
#else
goto not_there;
#endif
break;
case 'B':
if (strEQ(name, "LDAP_BUSY"))
#ifdef LDAP_BUSY
return LDAP_BUSY;
#else
goto not_there;
#endif
break;
case 'C':
if (strEQ(name, "LDAP_CACHE_CHECK"))
#ifdef LDAP_CACHE_CHECK
return LDAP_CACHE_CHECK;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_CACHE_LOCALDB"))
#ifdef LDAP_CACHE_LOCALDB
return LDAP_CACHE_LOCALDB;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_CACHE_POPULATE"))
#ifdef LDAP_CACHE_POPULATE
return LDAP_CACHE_POPULATE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_CHANGETYPE_ADD"))
#ifdef LDAP_CHANGETYPE_ADD
return LDAP_CHANGETYPE_ADD;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_CHANGETYPE_ANY"))
#ifdef LDAP_CHANGETYPE_ANY
return LDAP_CHANGETYPE_ANY;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_CHANGETYPE_DELETE"))
#ifdef LDAP_CHANGETYPE_DELETE
return LDAP_CHANGETYPE_DELETE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_CHANGETYPE_MODDN"))
#ifdef LDAP_CHANGETYPE_MODDN
return LDAP_CHANGETYPE_MODDN;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_CHANGETYPE_MODIFY"))
#ifdef LDAP_CHANGETYPE_MODIFY
return LDAP_CHANGETYPE_MODIFY;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_CLIENT_LOOP"))
#ifdef LDAP_CLIENT_LOOP
return LDAP_CLIENT_LOOP;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_COMPARE_FALSE"))
#ifdef LDAP_COMPARE_FALSE
return LDAP_COMPARE_FALSE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_COMPARE_TRUE"))
#ifdef LDAP_COMPARE_TRUE
return LDAP_COMPARE_TRUE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_CONFIDENTIALITY_REQUIRED"))
#ifdef LDAP_CONFIDENTIALITY_REQUIRED
return LDAP_CONFIDENTIALITY_REQUIRED;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_CONNECT_ERROR"))
#ifdef LDAP_CONNECT_ERROR
return LDAP_CONNECT_ERROR;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_CONSTRAINT_VIOLATION"))
#ifdef LDAP_CONSTRAINT_VIOLATION
return LDAP_CONSTRAINT_VIOLATION;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_DECODING_ERROR"))
#ifdef LDAP_DECODING_ERROR
return LDAP_DECODING_ERROR;
#else
goto not_there;
#endif
break;
case 'D':
if (strEQ(name, "LDAP_DEREF_ALWAYS"))
#ifdef LDAP_DEREF_ALWAYS
return LDAP_DEREF_ALWAYS;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_DEREF_FINDING"))
#ifdef LDAP_DEREF_FINDING
return LDAP_DEREF_FINDING;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_DEREF_NEVER"))
#ifdef LDAP_DEREF_NEVER
return LDAP_DEREF_NEVER;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_DEREF_SEARCHING"))
#ifdef LDAP_DEREF_SEARCHING
return LDAP_DEREF_SEARCHING;
#else
goto not_there;
#endif
break;
case 'E':
if (strEQ(name, "LDAP_ENCODING_ERROR"))
#ifdef LDAP_ENCODING_ERROR
return LDAP_ENCODING_ERROR;
#else
goto not_there;
#endif
break;
case 'F':
if (strEQ(name, "LDAP_FILTER_ERROR"))
#ifdef LDAP_FILTER_ERROR
return LDAP_FILTER_ERROR;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_FILT_MAXSIZ"))
#ifdef LDAP_FILT_MAXSIZ
return LDAP_FILT_MAXSIZ;
#else
goto not_there;
#endif
break;
case 'I':
if (strEQ(name, "LDAP_INAPPROPRIATE_AUTH"))
#ifdef LDAP_INAPPROPRIATE_AUTH
return LDAP_INAPPROPRIATE_AUTH;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_INAPPROPRIATE_MATCHING"))
#ifdef LDAP_INAPPROPRIATE_MATCHING
return LDAP_INAPPROPRIATE_MATCHING;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_INSUFFICIENT_ACCESS"))
#ifdef LDAP_INSUFFICIENT_ACCESS
return LDAP_INSUFFICIENT_ACCESS;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_INVALID_CREDENTIALS"))
#ifdef LDAP_INVALID_CREDENTIALS
return LDAP_INVALID_CREDENTIALS;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_INVALID_DN_SYNTAX"))
#ifdef LDAP_INVALID_DN_SYNTAX
return LDAP_INVALID_DN_SYNTAX;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_INVALID_SYNTAX"))
#ifdef LDAP_INVALID_SYNTAX
return LDAP_INVALID_SYNTAX;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_IS_LEAF"))
#ifdef LDAP_IS_LEAF
return LDAP_IS_LEAF;
#else
goto not_there;
#endif
break;
case 'L':
if (strEQ(name, "LDAP_LOCAL_ERROR"))
#ifdef LDAP_LOCAL_ERROR
return LDAP_LOCAL_ERROR;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_LOOP_DETECT"))
#ifdef LDAP_LOOP_DETECT
return LDAP_LOOP_DETECT;
#else
goto not_there;
#endif
break;
case 'M':
if (strEQ(name, "LDAP_MOD_ADD"))
#ifdef LDAP_MOD_ADD
return LDAP_MOD_ADD;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_MOD_BVALUES"))
#ifdef LDAP_MOD_BVALUES
return LDAP_MOD_BVALUES;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_MOD_DELETE"))
#ifdef LDAP_MOD_DELETE
return LDAP_MOD_DELETE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_MOD_REPLACE"))
#ifdef LDAP_MOD_REPLACE
return LDAP_MOD_REPLACE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_MORE_RESULTS_TO_RETURN"))
#ifdef LDAP_MORE_RESULTS_TO_RETURN
return LDAP_MORE_RESULTS_TO_RETURN;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_MSG_ALL"))
#ifdef LDAP_MSG_ALL
return LDAP_MSG_ALL;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_MSG_ONE"))
#ifdef LDAP_MSG_ONE
return LDAP_MSG_ONE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_MSG_RECEIVED"))
#ifdef LDAP_MSG_RECEIVED
return LDAP_MSG_RECEIVED;
#else
goto not_there;
#endif
break;
case 'N':
if (strEQ(name, "LDAP_NAMING_VIOLATION"))
#ifdef LDAP_NAMING_VIOLATION
return LDAP_NAMING_VIOLATION;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_NOT_ALLOWED_ON_NONLEAF"))
#ifdef LDAP_NOT_ALLOWED_ON_NONLEAF
return LDAP_NOT_ALLOWED_ON_NONLEAF;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_NOT_ALLOWED_ON_RDN"))
#ifdef LDAP_NOT_ALLOWED_ON_RDN
return LDAP_NOT_ALLOWED_ON_RDN;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_NOT_SUPPORTED"))
#ifdef LDAP_NOT_SUPPORTED
return LDAP_NOT_SUPPORTED;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_NO_LIMIT"))
#ifdef LDAP_NO_LIMIT
return LDAP_NO_LIMIT;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_NO_MEMORY"))
#ifdef LDAP_NO_MEMORY
return LDAP_NO_MEMORY;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_NO_OBJECT_CLASS_MODS"))
#ifdef LDAP_NO_OBJECT_CLASS_MODS
return LDAP_NO_OBJECT_CLASS_MODS;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_NO_RESULTS_RETURNED"))
#ifdef LDAP_NO_RESULTS_RETURNED
return LDAP_NO_RESULTS_RETURNED;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_NO_SUCH_ATTRIBUTE"))
#ifdef LDAP_NO_SUCH_ATTRIBUTE
return LDAP_NO_SUCH_ATTRIBUTE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_NO_SUCH_OBJECT"))
#ifdef LDAP_NO_SUCH_OBJECT
return LDAP_NO_SUCH_OBJECT;
#else
goto not_there;
#endif
break;
case 'O':
if (strEQ(name, "LDAP_OBJECT_CLASS_VIOLATION"))
#ifdef LDAP_OBJECT_CLASS_VIOLATION
return LDAP_OBJECT_CLASS_VIOLATION;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPERATIONS_ERROR"))
#ifdef LDAP_OPERATIONS_ERROR
return LDAP_OPERATIONS_ERROR;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_CACHE_ENABLE"))
#ifdef LDAP_OPT_CACHE_ENABLE
return LDAP_OPT_CACHE_ENABLE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_CACHE_FN_PTRS"))
#ifdef LDAP_OPT_CACHE_FN_PTRS
return LDAP_OPT_CACHE_FN_PTRS;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_CACHE_STRATEGY"))
#ifdef LDAP_OPT_CACHE_STRATEGY
return LDAP_OPT_CACHE_STRATEGY;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_CLIENT_CONTROLS"))
#ifdef LDAP_OPT_CLIENT_CONTROLS
return LDAP_OPT_CLIENT_CONTROLS;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_DEREF"))
#ifdef LDAP_OPT_DEREF
return LDAP_OPT_DEREF;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_DESC"))
#ifdef LDAP_OPT_DESC
return LDAP_OPT_DESC;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_DNS"))
#ifdef LDAP_OPT_DNS
return LDAP_OPT_DNS;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_DNS_FN_PTRS"))
#ifdef LDAP_OPT_DNS_FN_PTRS
return LDAP_OPT_DNS_FN_PTRS;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_ERROR_NUMBER"))
#ifdef LDAP_OPT_ERROR_NUMBER
return LDAP_OPT_ERROR_NUMBER;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_ERROR_STRING"))
#ifdef LDAP_OPT_ERROR_STRING
return LDAP_OPT_ERROR_STRING;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_HOST_NAME"))
#ifdef LDAP_OPT_HOST_NAME
return LDAP_OPT_HOST_NAME;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_IO_FN_PTRS"))
#ifdef LDAP_OPT_IO_FN_PTRS
return LDAP_OPT_IO_FN_PTRS;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_MEMALLOC_FN_PTRS"))
#ifdef LDAP_OPT_MEMALLOC_FN_PTRS
return LDAP_OPT_MEMALLOC_FN_PTRS;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_PREFERRED_LANGUAGE"))
#ifdef LDAP_OPT_PREFERRED_LANGUAGE
return LDAP_OPT_PREFERRED_LANGUAGE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_PROTOCOL_VERSION"))
#ifdef LDAP_OPT_PROTOCOL_VERSION
return LDAP_OPT_PROTOCOL_VERSION;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_REBIND_ARG"))
#ifdef LDAP_OPT_REBIND_ARG
return LDAP_OPT_REBIND_ARG;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_REBIND_FN"))
#ifdef LDAP_OPT_REBIND_FN
return LDAP_OPT_REBIND_FN;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_RECONNECT"))
#ifdef LDAP_OPT_RECONNECT
return LDAP_OPT_RECONNECT;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_REFERRALS"))
#ifdef LDAP_OPT_REFERRALS
return LDAP_OPT_REFERRALS;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_REFERRAL_HOP_LIMIT"))
#ifdef LDAP_OPT_REFERRAL_HOP_LIMIT
return LDAP_OPT_REFERRAL_HOP_LIMIT;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_RESTART"))
#ifdef LDAP_OPT_RESTART
return LDAP_OPT_RESTART;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_RETURN_REFERRALS"))
#ifdef LDAP_OPT_RETURN_REFERRALS
return LDAP_OPT_RETURN_REFERRALS;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_SERVER_CONTROLS"))
#ifdef LDAP_OPT_SERVER_CONTROLS
return LDAP_OPT_SERVER_CONTROLS;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_SIZELIMIT"))
#ifdef LDAP_OPT_SIZELIMIT
return LDAP_OPT_SIZELIMIT;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_SSL"))
#ifdef LDAP_OPT_SSL
return LDAP_OPT_SSL;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_THREAD_FN_PTRS"))
#ifdef LDAP_OPT_THREAD_FN_PTRS
return LDAP_OPT_THREAD_FN_PTRS;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OPT_TIMELIMIT"))
#ifdef LDAP_OPT_TIMELIMIT
return LDAP_OPT_TIMELIMIT;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_OTHER"))
#ifdef LDAP_OTHER
return LDAP_OTHER;
#else
goto not_there;
#endif
break;
case 'P':
if (strEQ(name, "LDAP_PARAM_ERROR"))
#ifdef LDAP_PARAM_ERROR
return LDAP_PARAM_ERROR;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_PARTIAL_RESULTS"))
#ifdef LDAP_PARTIAL_RESULTS
return LDAP_PARTIAL_RESULTS;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_PORT"))
#ifdef LDAP_PORT
return LDAP_PORT;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_PORT_MAX"))
#ifdef LDAP_PORT_MAX
return LDAP_PORT_MAX;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_PROTOCOL_ERROR"))
#ifdef LDAP_PROTOCOL_ERROR
return LDAP_PROTOCOL_ERROR;
#else
goto not_there;
#endif
break;
case 'R':
if (strEQ(name, "LDAP_REFERRAL"))
#ifdef LDAP_REFERRAL
return LDAP_REFERRAL;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_REFERRAL_LIMIT_EXCEEDED"))
#ifdef LDAP_REFERRAL_LIMIT_EXCEEDED
return LDAP_REFERRAL_LIMIT_EXCEEDED;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_RESULTS_TOO_LARGE"))
#ifdef LDAP_RESULTS_TOO_LARGE
return LDAP_RESULTS_TOO_LARGE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_RES_ADD"))
#ifdef LDAP_RES_ADD
return LDAP_RES_ADD;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_RES_ANY"))
#ifdef LDAP_RES_ANY
return LDAP_RES_ANY;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_RES_BIND"))
#ifdef LDAP_RES_BIND
return LDAP_RES_BIND;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_RES_COMPARE"))
#ifdef LDAP_RES_COMPARE
return LDAP_RES_COMPARE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_RES_DELETE"))
#ifdef LDAP_RES_DELETE
return LDAP_RES_DELETE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_RES_EXTENDED"))
#ifdef LDAP_RES_EXTENDED
return LDAP_RES_EXTENDED;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_RES_MODIFY"))
#ifdef LDAP_RES_MODIFY
return LDAP_RES_MODIFY;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_RES_MODRDN"))
#ifdef LDAP_RES_MODRDN
return LDAP_RES_MODRDN;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_RES_RENAME"))
#ifdef LDAP_RES_RENAME
return LDAP_RES_RENAME;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_RES_SEARCH_ENTRY"))
#ifdef LDAP_RES_SEARCH_ENTRY
return LDAP_RES_SEARCH_ENTRY;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_RES_SEARCH_REFERENCE"))
#ifdef LDAP_RES_SEARCH_REFERENCE
return LDAP_RES_SEARCH_REFERENCE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_RES_SEARCH_RESULT"))
#ifdef LDAP_RES_SEARCH_RESULT
return LDAP_RES_SEARCH_RESULT;
#else
goto not_there;
#endif
break;
case 'S':
if (strEQ(name, "LDAP_SASL_BIND_IN_PROGRESS"))
#ifdef LDAP_SASL_BIND_IN_PROGRESS
return LDAP_SASL_BIND_IN_PROGRESS;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_SASL_SIMPLE"))
#ifdef LDAP_SASL_SIMPLE
return LDAP_SASL_SIMPLE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_SCOPE_BASE"))
#ifdef LDAP_SCOPE_BASE
return LDAP_SCOPE_BASE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_SCOPE_ONELEVEL"))
#ifdef LDAP_SCOPE_ONELEVEL
return LDAP_SCOPE_ONELEVEL;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_SCOPE_SUBTREE"))
#ifdef LDAP_SCOPE_SUBTREE
return LDAP_SCOPE_SUBTREE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_SECURITY_NONE"))
#ifdef LDAP_SECURITY_NONE
return LDAP_SECURITY_NONE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_SERVER_DOWN"))
#ifdef LDAP_SERVER_DOWN
return LDAP_SERVER_DOWN;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_SIZELIMIT_EXCEEDED"))
#ifdef LDAP_SIZELIMIT_EXCEEDED
return LDAP_SIZELIMIT_EXCEEDED;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_SORT_CONTROL_MISSING"))
#ifdef LDAP_SORT_CONTROL_MISSING
return LDAP_SORT_CONTROL_MISSING;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_STRONG_AUTH_NOT_SUPPORTED"))
#ifdef LDAP_STRONG_AUTH_NOT_SUPPORTED
return LDAP_STRONG_AUTH_NOT_SUPPORTED;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_STRONG_AUTH_REQUIRED"))
#ifdef LDAP_STRONG_AUTH_REQUIRED
return LDAP_STRONG_AUTH_REQUIRED;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_SUCCESS"))
#ifdef LDAP_SUCCESS
return LDAP_SUCCESS;
#else
goto not_there;
#endif
break;
case 'T':
if (strEQ(name, "LDAP_TIMELIMIT_EXCEEDED"))
#ifdef LDAP_TIMELIMIT_EXCEEDED
return LDAP_TIMELIMIT_EXCEEDED;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_TIMEOUT"))
#ifdef LDAP_TIMEOUT
return LDAP_TIMEOUT;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_TYPE_OR_VALUE_EXISTS"))
#ifdef LDAP_TYPE_OR_VALUE_EXISTS
return LDAP_TYPE_OR_VALUE_EXISTS;
#else
goto not_there;
#endif
break;
case 'U':
if (strEQ(name, "LDAP_UNAVAILABLE"))
#ifdef LDAP_UNAVAILABLE
return LDAP_UNAVAILABLE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_UNAVAILABLE_CRITICAL_EXTENSION"))
#ifdef LDAP_UNAVAILABLE_CRITICAL_EXTENSION
return LDAP_UNAVAILABLE_CRITICAL_EXTENSION;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_UNDEFINED_TYPE"))
#ifdef LDAP_UNDEFINED_TYPE
return LDAP_UNDEFINED_TYPE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_UNWILLING_TO_PERFORM"))
#ifdef LDAP_UNWILLING_TO_PERFORM
return LDAP_UNWILLING_TO_PERFORM;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_URL_ERR_BADSCOPE"))
#ifdef LDAP_URL_ERR_BADSCOPE
return LDAP_URL_ERR_BADSCOPE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_URL_ERR_MEM"))
#ifdef LDAP_URL_ERR_MEM
return LDAP_URL_ERR_MEM;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_URL_ERR_NODN"))
#ifdef LDAP_URL_ERR_NODN
return LDAP_URL_ERR_NODN;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_URL_ERR_NOTLDAP"))
#ifdef LDAP_URL_ERR_NOTLDAP
return LDAP_URL_ERR_NOTLDAP;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_URL_ERR_PARAM"))
#ifdef LDAP_URL_ERR_PARAM
return LDAP_URL_ERR_PARAM;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_URL_OPT_SECURE"))
#ifdef LDAP_URL_OPT_SECURE
return LDAP_URL_OPT_SECURE;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_USER_CANCELLED"))
#ifdef LDAP_USER_CANCELLED
return LDAP_USER_CANCELLED;
#else
goto not_there;
#endif
break;
case 'V':
if (strEQ(name, "LDAP_VERSION"))
#ifdef LDAP_VERSION
return LDAP_VERSION;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_VERSION1"))
#ifdef LDAP_VERSION1
return LDAP_VERSION1;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_VERSION2"))
#ifdef LDAP_VERSION2
return LDAP_VERSION2;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_VERSION3"))
#ifdef LDAP_VERSION3
return LDAP_VERSION3;
#else
goto not_there;
#endif
if (strEQ(name, "LDAP_VERSION_MAX"))
#ifdef LDAP_VERSION_MAX
return LDAP_VERSION_MAX;
#else
goto not_there;
#endif
break;
}
} else {
if (strEQ(name, "LDAPS_PORT"))
#ifdef LDAPS_PORT
return LDAPS_PORT;
#else
goto not_there;
#endif
}
errno = EINVAL;
return 0;
not_there:
errno = ENOENT;
return 0;
}

View File

@@ -1,17 +0,0 @@
1998-08-03 Leif Hedstrom <leif@netscape.com>
* psoftsync.pl: New file, also merged in some modules from
LdapUtils.pm, to make sure this works. NOTE: This script currently
doesn't work, since all "modify" operations are horked.
1998-07-30 Leif Hedstrom <leif@netscape.com>
* tabdump.pl: Actually works!
* ldappasswd.pl: Cleaned out some code, and moved it over to the
::Utils module.
1998-07-29 Leif Hedstrom <leif@netscape.com>
* qsearch.pl: First working version.

View File

@@ -1,104 +0,0 @@
#!/usr/bin/perl5
#############################################################################
# $Id: ldappasswd.pl,v 1.6 1998-08-13 09:13:23 leif Exp $
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 PerLDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# This is an LDAP version of the normal passwd/yppasswd command found
# on most Unix systems. Note that this will only use the {crypt}
# encryption/hash algorithm (at this point).
#
#############################################################################
use Getopt::Std; # To parse command line arguments.
use Mozilla::LDAP::Conn; # Main "OO" layer for LDAP
use Mozilla::LDAP::Utils; # LULU, utilities.
#############################################################################
# Constants, shouldn't have to edit these...
#
$APPNAM = "ldappasswd";
$USAGE = "$APPNAM [-nv] -b base -h host -D bind -w pswd -P cert search ...";
@ATTRIBUTES = ("uid", "userpassword");
#############################################################################
# Check arguments, and configure some parameters accordingly..
#
if (!getopts('nvb:s:h:D:w:P:')) {
print "usage: $APPNAM $USAGE\n";
exit;
}
%ld = Mozilla::LDAP::Utils::ldapArgs();
Mozilla::LDAP::Utils::userCredentials(\%ld) unless $opt_n;
#############################################################################
# Ask for the new password, and confirm it's correct.
#
do
{
print "New password: ";
$new = Mozilla::LDAP::Utils::askPassword();
print "New password (again): ";
$new2 = Mozilla::LDAP::Utils::askPassword();
print "Passwords didn't match, try again!\n\n" if ($new ne $new2);
} until ($new eq $new2);
print "\n";
$crypted = Mozilla::LDAP::Utils::unixCrypt("$new");
#############################################################################
# Now do all the searches, one by one. If there are no search criteria, we
# will change the password for the user running the script.
#
$conn = new Mozilla::LDAP::Conn(\%ld);
die "Could't connect to LDAP server $ld{host}" unless $conn;
foreach $search ($#ARGV >= $[ ? @ARGV : $ld{bind})
{
$entry = $conn->search($search, "subtree", "ALL", 0, @ATTRIBUTES);
$entry = $conn->search($ld{root}, "subtree", $search, 0, @ATTRIBUTES)
unless $entry;
print "No such user: $search\n" unless $entry;
while ($entry)
{
$entry->{userpassword} = ["{crypt}" . $crypted];
print "Changing password for: $entry->{dn}\n" if $opt_v;
if (!$opt_n)
{
$conn->update($entry);
$conn->printError() if $conn->getErrorCode();
}
$entry = $conn->nextEntry();
}
}
#############################################################################
# Close the connection.
#
$conn->close if $conn;

View File

@@ -1,128 +0,0 @@
#!/usr/bin/perl5
#############################################################################
# $Id: lfinger.pl,v 1.10 1998-08-13 09:13:08 leif Exp $
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 PerLDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# "finger" version using LDAP information (using RFC 2307 objectclass).
#
#############################################################################
use Getopt::Std; # To parse command line arguments.
use Mozilla::LDAP::Conn; # Main "OO" layer for LDAP
use Mozilla::LDAP::Utils; # LULU, utilities.
#############################################################################
# Constants, shouldn't have to edit these... The HIDE mechanism is a very
# Netscape internal specific feature. We use this objectclass to mark some
# entries to be "hidden", and some of our applications will honor this. With
# more recent versions of the Directory Server this can be accomplished more
# effectively with appropriate ACI/ACLs.
#
$APPNAM = "lfinger";
$USAGE = "$APPNAM -m -b base -h host -D bind -w pswd -P cert user_info";
@ATTRIBUTES = ("uid", "cn", "homedirectory", "loginshell", "pager",
"telephonenumber", "facsimiletelephonenumber", "mobile");
$HIDE = "(objectclass=nscphidethis)";
#############################################################################
# Print a "finger" entry.
#
sub printIt
{
my($entry) = @_;
print "Login name: $entry->{uid}[0]";
print " " x (39 - 11 - length($entry->{uid}[0]));
print "In real life: $entry->{cn}[0]\n";
if ($entry->{homedirectory}[0] || $entry->{loginshell}[0])
{
print "Directory: $entry->{homedirectory}[0]";
print " " x (39 - 10 - length($entry->{homedirectory}[0]));
print "Shell: $entry->{loginshell}[0]\n";
}
if ($entry->{telephonenumber}[0] || $entry->{pager}[0])
{
print "Phone: $entry->{telephonenumber}[0]";
print " " x (39 - 6 - length($entry->{telephonenumber}[0]));
print "Pager: $entry->{pager}[0]\n";
}
if ($entry->{mobile}[0] || $entry->{facsimiletelephonenumber}[0])
{
print "Mobile: $entry->{mobile}[0]";
print " " x (39 - 7 - length($entry->{mobile}[0]));
print "Fax: $entry->{facsimiletelephonenumber}[0]\n";
}
print "\n";
}
#############################################################################
# Check arguments, and configure some parameters accordingly..
#
if (!getopts('mb:h:D:p:w:P:') || !defined($ARGV[$[]))
{
print "usage: $APPNAM $USAGE\n";
exit;
}
%ld = Mozilla::LDAP::Utils::ldapArgs();
$user=$ARGV[$[];
#############################################################################
# Instantiate an LDAP object, which also binds to the LDAP server.
#
$conn = new Mozilla::LDAP::Conn(\%ld);
die "Could't connect to LDAP server $ld{host}" unless $conn;
#############################################################################
# Ok, lets generate the filter, and do the search!
#
if ($opt_m)
{
$search = "(&(uid=$user)(!$HIDE))";
}
else
{
$search = "(&(|(cn=*$user*)(uid=*$user*)(telephonenumber=*$user*))(!$HIDE))";
}
$entry = $conn->search($ld{root}, "subtree", $search, 0, @ATTRIBUTES);
$conn->printError() if $conn->getErrorCode();
while($entry)
{
printIt($entry);
$entry = $conn->nextEntry();
}
#############################################################################
# Close the connection.
#
$conn->close if $conn;

View File

@@ -1,321 +0,0 @@
#!/usr/bin/perl5
#############################################################################
# $Id: modattr.pl,v 1.7 1998-08-13 23:32:28 leif Exp $
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 PerLDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# This script can be used to do a number of different modification
# operations on a script. Like adding/deleting values, or entire
# attributes.
#
#############################################################################
use Getopt::Std; # To parse command line arguments.
use Mozilla::LDAP::Conn; # Main "OO" layer for LDAP
use Mozilla::LDAP::Utils; # LULU, utilities.
#############################################################################
# Constants, shouldn't have to edit these...
#
$APPNAM = "modattr";
$USAGE = "$APPNAM [-dnvW] -b base -h host -D bind -w pswd -P cert attr=value filter";
#############################################################################
# Check arguments, and configure some parameters accordingly..
#
if (!getopts('adnvWb:h:D:p:s:w:P:'))
{
print "usage: $APPNAM $USAGE\n";
exit;
}
%ld = Mozilla::LDAP::Utils::ldapArgs();
Mozilla::LDAP::Utils::userCredentials(\%ld) unless $opt_n;
#############################################################################
# Let's process the changes requested, and commit them unless the "-n"
# option was given.
#
$conn = new Mozilla::LDAP::Conn(\%ld);
die "Could't connect to LDAP server $ld{host}" unless $conn;
#$conn->setDefaultRebindProc($ld{bind}, $ld{pswd}, 128);
#$conn->setRebindProc(\&LdapUtils::rebindProc);
($change, $search) = @ARGV;
if (($change eq "") || ($search eq ""))
{
print "usage: $APPNAM $USAGE\n";
exit;
}
($attr, $value) = split(/=/, $change, 2);
$entry = $conn->search($ld{root}, $ld{scope}, $search);
while ($entry)
{
$changed = 0;
if ($opt_d && defined $entry->{$attr})
{
if ($value)
{
$changed = $entry->removeValue($attr, $value);
if ($changed && $opt_v)
{
print "Removed value from ", $entry->getDN(), "\n" if $opt_v;
}
}
else
{
delete $entry->{$attr};
print "Deleted attribute $attr for ", $entry->getDN(), "\n" if $opt_v;
$changed = 1;
}
}
else
{
if ($opt_a)
{
$changed = $entry->addValue($attr, $value);
if ($changed && $opt_v)
{
print "Added attribute to ", $entry->getDN(), "\n" if $opt_v;
}
}
else
{
if ($entry->{$attr}[0] ne $value)
{
$entry->{$attr} = [$value];
$changed = 1;
print "Set attribute for ", $entry->getDN(), "\n" if $opt_v;
}
}
}
if ($changed && ! $opt_n)
{
$conn->update($entry);
$conn->printError() if $conn->getErrorCode();
}
$entry = $conn->nextEntry();
}
#############################################################################
# Close the connection.
#
$conn->close if $conn;
#############################################################################
# POD documentation...
#
__END__
=head1 NAME
modattr - Modify an attribute for one or more LDAP entries
=head1 SYNOPSIS
modattr [-adnvW] -b base -h host -D bind DN -w pwd -P cert attr=value filter
=head1 ABSTRACT
This command line utility can be used to modify one attribute for one or
more LDAP entries. As simple as this sounds, this turns out to be a very
common operation. For instance, let's say you want to change "mailHost"
for all users on a machine named I<dredd>, to be I<judge>. With this
script all you have to do is
modattr mailHost=judge '(mailHost=dredd)'
=head1 DESCRIPTION
There are four primary operations that can be made with this utility:
=over 4
=item *
Set an attribute to a (single) specified value.
=item *
Add a value to an attribute (for multi-value attributes).
=item *
Delete a value from an attribute. If it's the last value (or if it's a
single value), this will remove the entire attribute.
=item *
Delete an entire attribute, even if it has multiple values.
=back
The first three requires an option of the form B<attr=value>, while the
last one only takes the name of the attribute as the option. The last
argument is always an LDAP search filter, specifying which entries the
operation should be applied to.
=head1 OPTIONS
All but the first two command line options for this tool are standard LDAP
options, to set parameters for the LDAP connection. The two new options
are I<-a> and I<-d> to add and remove attribute values.
Without either of these two options specified (they are both optional),
the default action is to set the attribute to the specified value. That
will effectively remove any existing values for this attribute.
=over 12
=item -a
Specify that the operation is an I<add>, to add a value to the
attribute. If there is no existing value for this attribute, we'll create
a new attribute, otherwise we add the new value if it's not already there.
=item -d
Delete the attribute value, or the entire attribute if there's no value
specified. As you can see this option has two forms, and it's function
depends on the last arguments. Be careful here, if you forget to specify
the value to delete, you will remove all of them.
=item -h <host>
Name of the LDAP server to connect to.
=item -p <port>
TCP port for the LDAP connection.
=item -b <DN>
Base DN for the search
=item -D <bind>
User (DN) to bind as. We support a few convenience shortcuts here, like
I<root>, I<user> and I<repl>.
=item -w <passwd>
This specifies the password to use when connecting to the LDAP
server. This is strongly discouraged, and without this option the script
will ask for the password interactively.
=item -s <scope>
Search scope, default is I<sub>, the other possible values are I<base> and
I<one>. You can also specify the numeric scopes, I<0>, I<1> or I<2>.
=item -P
Use SSL for the LDAP connection, using the specified cert.db file for
certificate information.
=item -n
Don't do anything, only show the changes that would have been made. This
is very convenient, and can save you from embarrassing mistakes.
=item -v
Verbose output.
=back
The last two arguments are special for this script. The first
argument specifies the attribute (and possibly the value) to operate on,
and the last argument is a properly formed LDAP search filter.
=head1 EXAMPLES
We'll give one example for each of the four operations this script can
currently handle. Since the script itself is quite flexible, you'll
probably find you can use this script for a lot of other applications, or
call it from other scripts. Note that we don't specify any LDAP specific
options here, we assume you have configured your defaults properly.
To set the I<description> attribute for user "leif", you would do
modattr 'description=Company Swede' '(uid=leif)'
The examples shows how to use this command without either of the I<-a> or
the I<-d> argument. To add an e-mail alias (alternate address) to the same
user, you would do
modattr -a 'mailAlternateAddress=theSwede@netscape.com' '(uid=leif)'
To remove an object class from all entries which uses it, you could do
modattr -d 'objectclass=dummyClass' '(objectclass=dummyClass)'
This example is not great, since unless you've assured that no entries
uses any of the attributes in this class, you'll get schema
violations. But don't despair, you can use this tool to clean up all
entries first! To completely remove all usage of an attribute named
I<dummyAttr>, you'd simply do
modattr -d dummyAttr '(dummyAttr=*)'
This shows the final format of this command, notice how we don't specify a
value, to assure that the entire attribute is removed. This is potentially
dangerous, so again be careful.
=head1 INSTALLATION
In order to use this script, you'll need Perl version 5.004 or later, the
LDAP SDK, and also the LDAP Perl module (aka PerLDAP). Once you've installed
these packages, just copy this file to where you keep your admin binaries,
e.g. /usr/local/bin.
In order to get good performance, you should make sure you have indexes on
the attributes you typically use with this script. Our experience has been
that in most cases the standard indexes in the Directory Server are
sufficient, e.g. I<CN>, I<UID> and I<MAIL>.
=head1 AVAILABILITY
This package can be retrieved from a number of places, including:
http://www.mozilla.org/directory/
Your local CPAN server
=head1 CREDITS
This little tool was developed internally at Netscape, by Leif Hedstrom.
=head1 BUGS
None, of course...
=head1 SEE ALSO
L<Mozilla::LDAP::API> and L<Perl>
=cut

View File

@@ -1,67 +0,0 @@
#!/usr/bin/perl5
#############################################################################
# $Id: monitor.pl,v 1.2 1998-08-13 09:12:05 leif Exp $
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 PerLDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# Ask the directory server for it's monitor entry, to see some
# performance and usage stats.
#
#############################################################################
use Getopt::Std; # To parse command line arguments.
use Mozilla::LDAP::Conn; # Main "OO" layer for LDAP
use Mozilla::LDAP::Utils; # LULU, utilities.
#################################################################################
# Constants, shouldn't have to edit these...
#
$APPNAM = "monitor";
$USAGE = "$APPNAM [-nv] -b base -h host -D bind -w pswd -P cert";
#################################################################################
# Check arguments, and configure some parameters accordingly..
#
if (!getopts('b:h:D:p:w:P:'))
{
print "usage: $APPNAM $USAGE\n";
exit;
}
%ld = Mozilla::LDAP::Utils::ldapArgs("", "cn=monitor");
#################################################################################
# Instantiate an LDAP object, which also binds to the LDAP server, and then
# do the simple search.
#
$conn = new Mozilla::LDAP::Conn(\%ld);
die "Could't connect to LDAP server $ld{host}" unless $conn;
$entry = $conn->search($ld{root}, "base", "objectclass=*");
Mozilla::LDAP::Utils::printEntry($entry)
if ($entry);
#################################################################################
# Close the connection.
#
$conn->close if $conn;

View File

@@ -1,616 +0,0 @@
#!/usr/bin/perl5
#############################################################################
# $Id: psoftsync.pl,v 1.4 1998-08-13 09:27:53 leif Exp $
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 PerLDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# Synchronise some LDAP info with a PeopleSoft "dump". This "dump" file
# is a "tab" separated file, as generated by an SQL utility on the
# Oracle server.
#
#############################################################################
use Getopt::Std; # To parse command line arguments.
use Mozilla::LDAP::Conn; # Main "OO" layer for LDAP
use Mozilla::LDAP::Utils; # LULU, utilities.
#############################################################################
# Local configurations, check these out . Note that SYNCS and ORDER has to
# have the same fields, this is because the hash array doesn't preserve
# the order of it's entries... :-( The "codes" are bit fields, where the
# three LSB are used as
#
# 1 Force the update, even if attribute is empty (i.e. delete it)
# 2 The attribute is the base for a DN (e.g. "manager").
# 4 The attribute should be deleted if the user is not in PeopleSoft.
# 8 Don't warn if the attribute is missing in the Psoft file (-W option).
# 16 Always delete this attribute in the PeopleSoft entry.
# 32 Delete this attribute if the account has "expired".
#
%SYNCS = (
"nscpharold" => 1 + 4,
"uid" => 0,
"" => 0,
"" => 0,
"employeenumber" => 1 + 4 + 32,
"departmentnumber" => 1 + 4,
"" => 0,
"" => 0,
"" => 0,
"manager" => 1 + 2,
"title" => 1 + 4 + 16 + 32,
"ou" => 1 + 4 + 32,
"businesscategory" => 1 + 4 + 32,
"employeetype" => 0,
"nscppersonexpdate" => 1 + 8
);
@ORDER = (
"nscpharold",
"uid",
"",
"",
"employeenumber",
"departmentnumber",
"",
"",
"",
"manager",
"title",
"ou",
"businesscategory",
"employeetype",
"nscppersonexpdate"
);
# This is used for mapping the employeeType attribute into a readable format.
%EMPCODES = (
"A" => "Applicant",
"C" => "Contractor",
"E" => "Employee",
"O" => "OEM Partner",
"T" => "Interim",
"V" => "Vendor"
);
# Expiration policy for other attributes, the EXPDELAY is a convenience
# default setting.
$EXPDELAY = 24 * 7;
%EXPIRES = (
"carlicense" => $EXPDELAY,
"mailautoreplymode" => $EXPDELAY,
"mailautoreplytext" => $EXPDELAY,
"mailforwardingaddress" => $EXPDELAY,
"facsimiletelephonenumber" => $EXPDELAY
);
$NOTYPE = "Unknown";
$DELIMITER = "%%";
$SENDMAIL = "/usr/lib/sendmail";
$SEARCH = "(&(uid=*)(!(objectclass=pseudoAccount)))";
$MAILTO = "leif\@netscape.com";
#$LDAP_DEBUG = 1;
#############################################################################
# Constants, shouldn't have to edit these...
#
$APPNAM = "psoftsync";
$USAGE = "$APPNAM [-nvW] -b base -h host -D bind -w passwd -P cert PS_file";
@ATTRIBUTES = uniq(@ORDER);
push(@ATTRIBUTES, "objectclass");
$TODAY = `/usr/bin/date '+%Y%m%d'`;
chop($TODAY);
#############################################################################
# Print an error for the PeopleSoft data. Note that we use the "__XXX__" fields
# here, to avoid the problem when an attribute is "expired" or modified.
#
sub psoftError
{
my($str, $entry) = @_;
print "Error: $str: ";
print $entry->key(), " (";
print $entry->{__employeenumber__}, ", ";
print $entry->{__employeetype__}, ", ";
print $entry->{__departmentnumber__}, ")\n";
}
#############################################################################
# Read in a PeopleSoft file, and create all the entries.
#
sub readDump
{
my($file) = @_;
my(@info);
my(%entries);
my($val);
if (!open(PSOFT, $file))
{
print "Error: Can't read file $file\n";
exit(1);
}
while (<PSOFT>)
{
next unless /$DELIMITER/;
@info = split(/\s*%%\s*/);
$entry = new PsoftEntry($info[$[]);
foreach $attr (@ORDER)
{
$val = shift(@info);
next if ($attr eq "");
$entry->add($attr, $val, $SYNCS{$attr});
}
#
# Perhaps we should do some sanity checks here on the PeopleSoft data?
#
# Clean up some data if the user has expired ("best before...")
if ($entry->expired($entry->{nscppersonexpdate}))
{
foreach $attr (@ORDER)
{
next unless $attr;
delete($entry->{$attr}) if ($SYNCS{$attr} & 32);
}
}
if ($entry->{uid})
{
$entries{$entry->{uid}} = $entry;
}
elsif ($opt_W)
{
psoftError("No UID", $entry);
}
}
close(PSOFT);
return %entries;
}
#############################################################################
# Make a list "uniq", just like the Unix command.
#
sub uniq { # uniq(elements[])
my(%tmp);
grep($tmp{$_}++, @_);
return sort(keys(%tmp));
}
#############################################################################
# Delete an attribute from an entry.
#
sub delAttr { # delAttr(ENTRY, ATTR)
($entry, $attr) = @_;
if (defined($entry->{$attr}))
{
$out->write("Deleted $attr for user: $entry->{uid}[0]") if $opt_v;
delete($entry->{$attr});
return 1;
}
return 0;
}
#############################################################################
# Check arguments, and configure some parameters accordingly..
#
if (!getopts('nvMWb:h:D:p:s:w:P:'))
{
print "usage: $APPNAM $USAGE\n";
exit;
}
%ld = Mozilla::LDAP::Utils::ldapArgs();
Mozilla::LDAP::Utils::userCredentials(\%ld) unless $opt_n;
$out = new Mail();
if ($opt_M)
{
$out->set("to", $MAILTO);
$out->set("subject", "Hoth: PeopleSoft synchronization report");
}
else
{
$out->echo();
$out->nomail();
}
#############################################################################
# Read in all the PeopleSoft entries, and then instantiate an LDAP object,
# which also binds to the LDAP server.
#
%psoft = readDump(@ARGV[$[]);
$conn = new Mozilla::LDAP::Conn(\%ld);
die "Could't connect to LDAP server $ld{host}" unless $conn;
#############################################################################
# Now process all the users, one by one.
#
$entry = $conn->search($ld{root}, "subtree", $SEARCH, 0, @ATTRIBUTES);
while ($entry)
{
$uid = $entry->{"uid"}[0];
$changed = 0;
$psent = $psoft{$uid};
if (!$psent)
{
print "Error: LDAP user $uid: No entry in PeopleSoft\n" if $opt_W;
foreach $attr (@ORDER)
{
next unless $attr;
$changed += delAttr($entry, $attr) if ($SYNCS{$attr} & 4);
}
if ($entry->{employeetype}[0] ne "$NOTYPE")
{
$entry->{employeetype} = ["$NOTYPE"];
$changed = 1;
$out->write("Set employeeType to $NOTYPE for user: $uid") if $opt_v;
}
}
else
{
$psent->handled(1);
foreach $attr (@ORDER)
{
next unless $attr;
if (!defined($psent->{$attr}) || ($psent->{$attr} eq ""))
{
$changed += delAttr($entry, $attr) if ($SYNCS{$attr} & 1);
}
elsif ($entry->{$attr}[0] ne $psent->{$attr})
{
$entry->{$attr} = [$psent->{$attr}];
$changed = 1;
$out->write("Set $attr to $psent->{$attr} for user: $uid") if $opt_v;
}
}
# Now handle the Expire date special case...
if ($psent->expired() ne "")
{
if ($entry->addValue("objectclass", "nscphidethis"))
{
$changed = 1;
$out->write("Expiring the user: $uid") if $opt_v;
}
# Expire other attributes, IFF the expire is over a certain
# treshhold (e.g. a week).
}
elsif ($entry->removeValue("objectclass", "nscphidethis"))
{
$changed = 1;
$out->write("Enabling the user: $uid") if $opt_v;
}
}
$conn->update($entry) if ($changed && ! $opt_n);
$entry = $conn->nextEntry();
}
#############################################################################
# Close the LDAP connection.
#
$conn->close if $conn;
#############################################################################
# Post process, figure out which PSoft entries have no entry in LDAP.
#
if ($opt_W)
{
foreach (keys(%psoft))
{
$ent=$psoft{$_};
psoftError("No LDAP entry", $ent) unless $ent->handled();
}
}
#############################################################################
# Package to an entry from the PeopleSoft database.
#
package PsoftEntry;
#############################################################################
# Creator.
#
sub new
{
my($class, $key) = @_;
my $self = {};
bless $self, ref $class || $class;
$self->{__key__} = $key;
return $self;
}
#############################################################################
# Add an attribute/field to the entry.
#
sub add
{
my($self, $attr, $val, $lev) = @_;
return if ($lev & 16);
$attr = lc $attr;
if ($attr eq "employeetype")
{
if (defined($main::EMPCODES{$val}))
{
$self->{$attr} = $main::EMPCODES{$val};
}
else
{
$self->{$attr} = $main::NOTYPE;
}
$self->{__employeetype__} = $val;
}
elsif ($val eq "")
{
main::psoftError("No attribute $attr", $self)
if ($main::opt_W && ($lev & 1) && !($lev & 8));
}
else
{
$self->{$attr} = ($lev & 2) ? "uid=$val,$main::ld{root}" : $val;
$self->{"__${attr}__"} = $val;
}
}
#############################################################################
# Return the value for an attribute/field.
#
sub get
{
my($self, $attr) = @_;
return $self->{$attr};
}
#############################################################################
# Mark the entry as "expired". If there is no "date" argument, we'll return
# the current entries expire status.
#
sub expired
{
my($self, $date) = @_;
if ($date)
{
# Only expire entries with reasonable expire dates...
if (length($date) != 8)
{
main::psoftError("Bad expire date", $self) if $main::opt_W;
return 0;
}
if ($date lt $main::TODAY)
{
$self->{employeetype} = "$NOTYPE";
$self->{__expired__} = 1;
return 1;
}
}
return $self->{__expired__};
}
#############################################################################
# Mark the entry as "handled", i.e. it exists in LDAP.
#
sub handled
{
my($self, $flag) = @_;
$self->{__handled__} = 1 if $flag;
return $self->{__handled__};
}
#############################################################################
# Return the "key" of this entry, typically the name field.
#
sub key
{
my($self) = @_;
return $self->{__key__};
}
#################################################################################
# This sub-package will send mail to some recipients, IFF there is anything to
# send, or your force it to send. Note that the Subject doesn't qualify it to
# send a message (force it to send if you have to).
#
package Mail;
#################################################################################
# The constructor, which optionally takes the TO, FROM and SUBJECT.
#
sub new
{
my($class, $to, $from, $subject) = @_;
my $self = {};
bless $self, ref $class || $class;
$self->{to} = $to || "root";
$self->{from} = $from || "ldap";
$self->{subject} = $subject || "Output from LDAP script\n";
@{$self->{message}} = ();
$self->{send} = 0;
$self->{nomail} = 0;
$self->{echo} = 0;
return $self;
}
#################################################################################
# Destructor, which will also send the message, if appropriate.
#
sub DESTROY
{
my($self) = @_;
if ($self->{send} && !$self->{nomail})
{
$self->send();
$self->{send} = 0;
}
}
#################################################################################
# Set a field for this entry, e.g. From:, To: etc.
#
sub set
{
my($self, $field, $string) = @_;
if ($field && $string)
{
$field = lc $field;
$self->{$field} = $string;
}
}
#################################################################################
# Add a line to the message, the argument is the string.
#
sub write
{
my($self, $string) = @_;
if ($string ne "")
{
push(@{$self->{message}}, $string);
print "$string\n" if $self->{echo};
$self->{send}++;
}
}
#################################################################################
# Force the object to send the message, no matter if there's anything in the
# body or not.
#
sub force
{
my($self) = @_;
$self->{send} = 1;
$self->{nomail} = 0;
}
#################################################################################
# Don't send the mail, this is the oppositte to "force...
#
sub nomail
{
my($self) = @_;
$self->{send} = 0;
$self->{nomail} = 1;
}
#################################################################################
# Enable echo-mode, where we will also print everything to STDOUT.
#
sub echo
{
my($self) = @_;
$self->{echo} = 1;
}
#################################################################################
# Actually send the message. This is automatically done by the DESTROY method,
# but we can force it to do it this way.
#
sub send
{
my($self) = @_;
if ($self->{send} && !$self->{nomail})
{
open(MAILER, "|$main::SENDMAIL -t");
print MAILER "From: $self->{from}\n";
print MAILER "To: $self->{to}\n";
print MAILER "Subject: $self->{subject}\n\n";
foreach (@{$self->{message}})
{
print MAILER "$_\n";
}
print MAILER ".\n";
close(MAILER);
$self->{send} = 0;
}
}

View File

@@ -1,95 +0,0 @@
#!/usr/bin/perl5
#############################################################################
# $Id: qsearch.pl,v 1.7 1998-08-13 09:28:05 leif Exp $
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 PerLDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# Quick Search, like ldapsearch, but in Perl. Look how simple it is.
#
#############################################################################
use Getopt::Std; # To parse command line arguments.
use Mozilla::LDAP::Conn; # Main "OO" layer for LDAP
use Mozilla::LDAP::Utils; # LULU, utilities.
#################################################################################
# Constants, shouldn't have to edit these...
#
$APPNAM = "qsearch";
$USAGE = "$APPNAM -b base -h host -D bind -w pswd -P cert filter [attr...]";
#################################################################################
# Check arguments, and configure some parameters accordingly..
#
if (!getopts('b:h:D:p:s:w:P:'))
{
print "usage: $APPNAM $USAGE\n";
exit;
}
%ld = Mozilla::LDAP::Utils::ldapArgs();
#################################################################################
# Now do all the searches, one by one.
#
$conn = new Mozilla::LDAP::Conn(\%ld);
die "Could't connect to LDAP server $ld{host}" unless $conn;
foreach (@ARGV)
{
if (/\=/)
{
push(@srch, $_);
}
else
{
push(@attr, $_);
}
}
foreach $search (@srch)
{
if ($#attr >= $[)
{
$entry = $conn->search($ld{root}, $ld{scope}, $search, 0, @attr);
}
else
{
$entry = $conn->search($ld{root}, $ld{scope}, "$search");
}
print "Searched for `$search':\n\n";
$conn->printError() if $conn->getErrorCode();
while($entry)
{
$entry->printLDIF();
$entry = $conn->nextEntry;
}
print "\n";
}
#################################################################################
# Close the connection.
#
$conn->close if $conn;

View File

@@ -1,100 +0,0 @@
#!/usr/bin/perl5
#############################################################################
# $Id: rename.pl,v 1.3 1998-08-13 09:56:03 leif Exp $
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 PerLDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# Rename an LDAP entry, changing it's DN. Note that currently this only
# works with RDNs.
#
#############################################################################
use Getopt::Std; # To parse command line arguments.
use Mozilla::LDAP::Conn; # Main "OO" layer for LDAP
use Mozilla::LDAP::Utils; # LULU, utilities.
#############################################################################
# Constants, shouldn't have to edit these...
#
$APPNAM = "rename";
$USAGE = "$APPNAM [-nvI] -b base -h host -D bind -w pswd -P cert filter new_rdn";
@ATTRIBUTES = ("objectclass");
#############################################################################
# Check arguments, and configure some parameters accordingly..
#
if (!getopts('nvIb:h:D:w:P:'))
{
print "usage: $APPNAM $USAGE\n";
exit;
}
%ld = Mozilla::LDAP::Utils::ldapArgs();
Mozilla::LDAP::Utils::userCredentials(\%ld) unless $opt_n;
($search, $rdn) = @ARGV;
if (($search eq "") || ($rdn eq ""))
{
print "usage: $APPNAM $USAGE\n";
exit;
}
#############################################################################
# Instantiate an LDAP object, which also binds to the LDAP server.
#
$conn = new Mozilla::LDAP::Conn(\%ld);
die "Could't connect to LDAP server $ld{host}" unless $conn;
$key = "Y" if $opt_I;
$entry = $conn->search($ld{root}, $ld{scope}, $search, 0, @ATTRIBUTES);
$conn->printError() if $conn->getErrorCode();
if (! $entry || $conn->nextEntry())
{
print "Error: The search did not return exactly one match, abort!\n";
exit;
}
if (! $opt_I)
{
print "Rename ", $entry->getDN(), " with $rdn [N]? ";
$key = Mozilla::LDAP::Utils::answer("N") unless $opt_I;
}
if ($key eq "Y")
{
# Note: I have to explicitly specify the original DN below, since the call
# to nextEntry() above blows the DN away from the ::Conn object.
if (! $opt_n)
{
$conn->modifyRDN($rdn, $entry->getDN());
$conn->printError() if $conn->getErrorCode();
}
print "Renamed $entry->{dn}\n" if $opt_v;
}
#################################################################################
# Close the connection.
#
$conn->close if $conn;

View File

@@ -1,94 +0,0 @@
#!/usr/bin/perl5
#############################################################################
# $Id: rmentry.pl,v 1.3 1998-08-13 09:10:57 leif Exp $
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 PerLDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# Remove one or several LDAP objects. By default this tool is
# interactive, which can be disabled with the "-I" option (but
# please be careful...).
#
#############################################################################
use Getopt::Std; # To parse command line arguments.
use Mozilla::LDAP::Conn; # Main "OO" layer for LDAP
use Mozilla::LDAP::Utils; # LULU, utilities.
#################################################################################
# Constants, shouldn't have to edit these...
#
$APPNAM = "rmentry";
$USAGE = "$APPNAM [-nvI] -b base -h host -D bind -w pswd -P cert filter ...";
@ATTRIBUTES = ("uid");
#################################################################################
# Check arguments, and configure some parameters accordingly..
#
if (!getopts('nvIb:h:D:w:P:'))
{
print "usage: $APPNAM $USAGE\n";
exit;
}
%ld = Mozilla::LDAP::Utils::ldapArgs();
Mozilla::LDAP::Utils::userCredentials(\%ld) unless $opt_n;
#################################################################################
# Do the search, and process all the entries.
#
$conn = new Mozilla::LDAP::Conn(\%ld);
die "Could't connect to LDAP server $ld{host}" unless $conn;
$key = "Y" if $opt_I;
foreach $search (@ARGV)
{
$entry = $conn->search($ld{root}, $ld{scope}, $search, 0, @ATTRIBUTES);
$conn->printError() if $conn->getErrorCode();
while ($entry)
{
if (! $opt_I)
{
print "Delete $entry->{dn} [N]? ";
$key = Mozilla::LDAP::Utils::answer("N") unless $opt_I;
}
if ($key eq "Y")
{
if (! $opt_n)
{
$conn->delete($entry->{dn});
$conn->printError() if $conn->getErrorCode();
}
print "Deleted $entry->{dn}\n" if $opt_v;
}
$entry = $conn->nextEntry();
}
}
#################################################################################
# Close the connection.
#
$conn->close if $conn;

View File

@@ -1,81 +0,0 @@
#!/usr/bin/perl5
#############################################################################
# $Id: tabdump.pl,v 1.3 1998-08-13 09:11:10 leif Exp $
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 PerLDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# Generate a TAB separate "dump" of entries matching the search criteria,
# using the list of attributes specified.
#
#############################################################################
use Getopt::Std; # To parse command line arguments.
use Mozilla::LDAP::Conn; # Main "OO" layer for LDAP
use Mozilla::LDAP::Utils; # LULU, utilities.
#################################################################################
# Constants, shouldn't have to edit these...
#
$APPNAM = "tabdump";
$USAGE = "$APPNAM [-nv] -b base -h host -D bind -w pswd -P cert attr1,attr2,.. srch";
#################################################################################
# Check arguments, and configure some parameters accordingly..
#
if (!getopts('nvb:h:D:p:s:w:P:'))
{
print "usage: $APPNAM $USAGE\n";
exit;
}
%ld = Mozilla::LDAP::Utils::ldapArgs();
$attributes = $ARGV[$[];
$search = $ARGV[$[ + 1];
die "Need to specify a list of attributes and the search filter.\n"
unless ($attributes && $search);
#################################################################################
# Do the searches, and produce the output.
#
$conn = new Mozilla::LDAP::Conn(\%ld);
die "Could't connect to LDAP server $ld{host}" unless $conn;
@attr = split(/,/, $attributes);
$entry = $conn->search($ld{root}, $ld{scope}, $search, 0, @attr);
$conn->printError() if $conn->getErrorCode();
while ($entry)
{
foreach (@attr)
{
print $entry->{$_}[0], "\t";
}
print "\n";
$entry = $conn->nextEntry;
}
#################################################################################
# Close the connection.
#
$conn->close if $conn;

View File

@@ -1,59 +0,0 @@
#!/usr/bin/perl -w
#############################################################################
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 PerLDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# Perl Script to Install PerLDAP Binaries without a Makefile.
# For use with the binary distribution of PerLDAP.
#
#############################################################################
use File::Path;
use File::Copy;
use Config;
print "\n##############################################\n";
print "# Installing Netscape PerLDAP v1.0 #\n";
print "##############################################\n\n";
$ARCH_LIB = $Config{'sitearchexp'} . "/auto/Mozilla/LDAP/API";
$PERL_LIB = $Config{'sitelibexp'};
print "Creating Directory '$ARCH_LIB'...\n";
File::Path::mkpath "$ARCH_LIB";
print "Creating Directory '$PERL_LIB/Mozilla/LDAP'...\n";
File::Path::mkpath "$PERL_LIB/Mozilla/LDAP";
print "Copying Architecture Dependent Files...\n";
foreach $file (glob "blib/arch/auto/Mozilla/LDAP/API/*")
{
copy($file,"$ARCH_LIB");
}
print "Copying Module Components...\n";
foreach $file (glob "blib/lib/Mozilla/LDAP/*")
{
copy($file,"$PERL_LIB/Mozilla/LDAP");
}
print "Finished!\n\n";
exit 0;

View File

@@ -1,162 +0,0 @@
#############################################################################
# $Id: test.pl,v 1.6 1998-08-13 09:14:44 leif Exp $
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 PerLDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'
#
#############################################################################
######################### We start with some black magic to print on failure.
# Change 1..1 below to 1..last_test_to_print .
# (It may become useful if the test is moved to ./t subdirectory.)
BEGIN { $| = 1; print "1..8\n"; }
END {print "modinit - not ok\n" unless $loaded;}
use Mozilla::LDAP::API qw(:constant :api :ssl);
$loaded = 1;
print "modinit - ok\n";
######################### End of black magic.
$attrs = [];
$ldap_host = $ENV{"LDAPHOST"};
$filter = $ENV{"TESTFILTER"};
$BASEDN = $ENV{"LDAPBASE"};
if (!$ldap_host)
{
print "\nEnter LDAP Server: ";
chomp($ldap_host = <>);
}
if (!$filter)
{
print "Enter Search Filter (ex. uid=abc123): ";
chomp($filter = <>);
}
if (!$BASEDN)
{
print "Enter LDAP Search Base (ex. o=Org, c=US): ";
chomp($BASEDN = <>);
}
print "\n";
##
## Initialize LDAP Connection
##
if (($ld = ldap_init($ldap_host,LDAP_PORT)) == -1)
{
print "open - not ok\n";
exit -1;
}
print "open - ok\n";
##
## Bind as DN, PASSWORD (NULL,NULL) on LDAP connection $ld
##
if (ldap_simple_bind_s($ld,"","") != LDAP_SUCCESS)
{
ldap_perror($ld,"bind_s");
print "bind - not ok\n";
exit -1;
}
print "bind - ok\n";
##
## ldap_search_s - Synchronous Search
##
if (ldap_search_s($ld,$BASEDN,LDAP_SCOPE_SUBTREE,$filter,$attrs,0,$result) != LDAP_SUCCESS)
{
ldap_perror($ld,"search_s");
print "search - not ok\n";
}
print "search - ok\n";
##
## ldap_count_entries - Count Matched Entries
##
if (($count = ldap_count_entries($ld,$result)) == -1)
{
ldap_perror($ld,"count_entry");
print "count - not ok\n";
}
print "count - ok - $count\n";
##
## first_entry - Get First Matched Entry
## next_entry - Get Next Matched Entry
##
for ($ent = ldap_first_entry($ld,$result); $ent; $ent = ldap_next_entry($ld,$ent))
{
##
## ldap_get_dn - Get DN for Matched Entries
##
if (($dn = ldap_get_dn($ld,$ent)) ne "")
{
print "getdn - ok - $dn\n";
} else {
ldap_perror($ld,"get_dn");
print "getdn - not ok\n";
}
for ($attr = ldap_first_attribute($ld,$ent,$ber); $attr; $attr = ldap_next_attribute($ld,$ent,$ber))
{
print "firstatt - ok - $attr\n";
##
## ldap_get_values
##
@vals = ldap_get_values($ld,$ent,$attr);
if ($#vals >= 0)
{
foreach $val (@vals)
{
print "getvals - ok - $val\n";
}
} else {
print "getvals - not ok\n";
}
}
}
##
## Unbind LDAP Connection
##
ldap_unbind($ld);

View File

@@ -1,275 +0,0 @@
#!/usr/bin/perl -w
#############################################################################
# $Id: api.pl,v 1.6 1998-08-13 04:40:00 clayton Exp $
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 PerlDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# api.pl - Test all LDAPv2 API function
# Author: Clayton Donley <donley@wwa.com>
#
# Performs all API calls directly in order to test for possible issues
# on a particular platform.
#
#############################################################################
use Mozilla::LDAP::API qw(:api :constant);
use strict;
my $BASE = "ou=Test,o=Test,c=US";
my $DN = "cn=Directory Manager";
my $PASS = "abcd1234";
my $HOST = "";
my $PORT = 389;
if (!$HOST)
{
print "Please edit the variables at the top of this file.\n";
exit -1;
}
my $howmany = 10;
# Initialize the Connection
{
my $ld = ldap_init($HOST,$PORT);
if ($ld <0)
{
print "init - Failed!\n";
die;
}
print "init - OK\n";
# Set an LDAP Session Option
if (ldap_set_option($ld,LDAP_OPT_PROTOCOL_VERSION,LDAP_VERSION3)
!= LDAP_SUCCESS)
{
print "set_option - Failed!\n";
} else {
print "set_option - OK\n";
}
# Get an LDAP Session Option
my $option;
ldap_get_option($ld,LDAP_OPT_REFERRALS,$option);
if ($option != 1)
{
print "get_option - Failed!\n";
} else {
print "get_option - OK\n";
}
# Anonymous Bind
if (ldap_simple_bind_s($ld,"","") != LDAP_SUCCESS)
{
print "anon_bind - Failed!\n";
} else {
print "anon_bind - OK\n";
}
# Authenticated Simple Bind
if (ldap_simple_bind_s($ld,$DN,$PASS) != LDAP_SUCCESS)
{
print "simple_bind - Failed!\n";
} else {
print "simple_bind - OK\n";
}
# Set Rebind Process
my $rebindproc = sub { return($DN,$PASS,LDAP_AUTH_SIMPLE); };
ldap_set_rebind_proc($ld,$rebindproc);
print "set_rebind - OK\n";
# Add an OrgUnit Entry
my $entry = {
"objectclass" => ["top","organizationalUnit"],
"ou" => "Test",
};
if (ldap_add_s($ld,$BASE,$entry) != LDAP_SUCCESS)
{
print "add_org - Failed!\n";
} else {
print "add_org - OK\n";
}
# Add People
foreach my $number (1..$howmany)
{
$entry = {
"objectclass" => ["top","person"],
"cn" => "Mozilla $number",
"sn" => ["$number"],
};
if (ldap_add_s($ld,"cn=Mozilla $number,$BASE",$entry)
!= LDAP_SUCCESS)
{
print "add_user_$number - Failed!\n";
} else {
print "add_user_$number - OK\n";
}
}
# Modify People
foreach my $number (1..$howmany)
{
$entry = {
"sn" => {"a",["Test"]},
"telephoneNumber" => "800-555-111$number",
};
if (ldap_modify_s($ld,"cn=Mozilla $number,$BASE",$entry)
!= LDAP_SUCCESS)
{
print "mod_user_$number - Failed!\n";
} else {
print "mod_user_$number - OK\n";
}
}
# Search People
my $filter = "(sn=Test)";
my $attrs = ["cn","sn"];
my $res;
if (ldap_search_s($ld,$BASE,LDAP_SCOPE_SUBTREE,$filter,$attrs,0,$res)
!= LDAP_SUCCESS)
{
print "search_user - Failed!\n";
} else {
print "search_user - OK\n";
}
# Count Results
if (ldap_count_entries($ld,$res) != $howmany)
{
print "count_res - Failed!\n";
} else {
print "count_res - OK\n";
}
# Sort Results
if (ldap_sort_entries($ld,$res,"sn") != LDAP_SUCCESS)
{
print "sort_ent - Failed!\n";
} else {
print "sort_ent - OK\n";
}
# Multisort Results
if (ldap_multisort_entries($ld,$res,["sn","telephoneNumber"]) != LDAP_SUCCESS)
{
print "multisort - Failed!\n";
} else {
print "multisort - OK\n";
}
# Get First Entry
my $ent = ldap_first_entry($ld,$res);
if (!$ent)
{
print "first_entry - Failed!\n";
} else {
print "first_entry - OK\n";
}
# Get Next Entry
$ent = ldap_next_entry($ld,$ent);
if (!$ent)
{
print "next_entry - Failed!\n";
} else {
print "next_entry - OK\n";
}
# Get DN
my $dn = ldap_get_dn($ld,$ent);
if (!$dn)
{
print "get_dn - Failed!\n";
} else {
print "get_dn - OK\n";
}
# Get First Attribute
my $ber;
my $attr = ldap_first_attribute($ld,$ent,$ber);
if (!$attr)
{
print "first_attr - Failed!\n";
} else {
print "first_attr - OK\n";
}
# Get Next Attribute
$attr = ldap_next_attribute($ld,$ent,$ber);
if (!$attr)
{
print "next_attr - Failed!\n";
} else {
print "next_attr - OK\n";
}
# Get Attribute Values
my @vals = ldap_get_values($ld,$ent,$attr);
if ($#vals < 0)
{
print "get_values - Failed!\n";
} else {
print "get_values - OK\n";
}
# Free structures pointed to by $ber and $res to prevent memory leak
ldap_ber_free($ber,1);
ldap_msgfree($res);
# Compare Attribute Values
foreach my $number (1..$howmany)
{
if(ldap_compare_s($ld,"cn=Mozilla $number,$BASE","sn",$number)
!= LDAP_COMPARE_TRUE)
{
print "comp_user_$number - Failed!\n";
} else {
print "comp_user_$number - OK\n";
}
}
# Delete Users
foreach my $number (1..$howmany)
{
if (ldap_delete_s($ld,"cn=Mozilla $number,$BASE") != LDAP_SUCCESS)
{
print "del_user_$number - Failed!\n";
} else {
print "del_user_$number - OK\n";
}
}
if (ldap_delete_s($ld,"$BASE") != LDAP_SUCCESS)
{
print "del_org - Failed!\n";
} else {
print "del_org - OK\n";
}
# Unbind
ldap_unbind($ld);
}

View File

@@ -1,131 +0,0 @@
#!/usr/bin/perl
#############################################################################
# $Id: search.pl,v 1.4 1998-08-13 04:40:01 clayton Exp $
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 PerlDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# Test the search capabilities of the API, similar to write.pl.
#
#############################################################################
use Mozilla::LDAP::API qw(:api :constant);
use strict;
my $ldap_host = "";
my $BASEDN = "o=Org,c=US";
my $filter = $ARGV[0];
if (!$ldap_host)
{
print "Edit the top portion of this file before continuing.\n";
exit -1;
}
my $attrs = [];
my ($ld,$result,$count);
##
## Initialize LDAP Connection
##
if (($ld = ldap_init($ldap_host,LDAP_PORT)) == -1)
{
die "Can not open LDAP connection to $ldap_host";
}
##
## Bind as DN, PASSWORD (NULL,NULL) on LDAP connection $ld
##
if (ldap_simple_bind_s($ld,"","") != LDAP_SUCCESS)
{
ldap_perror($ld,"bind_s");
die;
}
##
## ldap_search_s - Synchronous Search
##
if (ldap_search_s($ld,$BASEDN,LDAP_SCOPE_SUBTREE,$filter,$attrs,0,$result) != LDAP_SUCCESS)
{
ldap_perror($ld,"search_s");
die;
}
##
## ldap_count_entries - Count Matched Entries
##
if (($count = ldap_count_entries($ld,$result)) == -1)
{
ldap_perror($ld,"count_entry");
die;
}
##
## first_entry - Get First Matched Entry
## next_entry - Get Next Matched Entry
##
for (my $ent = ldap_first_entry($ld,$result); $ent; $ent = ldap_next_entry($ld,$ent))
{
##
## ldap_get_dn - Get DN for Matched Entries
##
my ($dn,$attr,@vals,$val,$ber);
if (($dn = ldap_get_dn($ld,$ent)) ne "")
{
print "dn: $dn\n";
} else {
ldap_perror($ld,"get_dn");
die;
}
for ($attr = ldap_first_attribute($ld,$ent,$ber); $attr; $attr = ldap_next_attribute($ld,$ent,$ber))
{
##
## ldap_get_values
##
@vals = ldap_get_values($ld,$ent,$attr);
if ($#vals >= 0)
{
foreach $val (@vals)
{
print "$attr: $val\n";
}
}
}
ldap_ber_free($ber,0);
}
ldap_msgfree($result);
##
## Unbind LDAP Connection
##
ldap_unbind($ld);

View File

@@ -1,110 +0,0 @@
#!/usr/bin/perl -w
#############################################################################
# $Id: write.pl,v 1.4 1998-08-13 04:40:02 clayton Exp $
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 PerlDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# write.pl - Test of LDAP Modify Operations in Perl5
# Author: Clayton Donley <donley@wwa.com>
#
# This utility is mostly to demonstrate all the write operations
# that can be done with LDAP through this PERL5 module.
#
#############################################################################
use strict;
use Mozilla::LDAP::API qw(:constant :api);
# This is the entry we will be adding. Do not use a pre-existing entry.
my $ENTRYDN = "cn=Test Guy, o=Org, c=US";
# This is the DN and password for an Administrator
my $ROOTDN = "cn=DSManager,o=Org,c=US";
my $ROOTPW = "";
my $ldap_server = "";
if (!$ldap_server)
{
print "Edit the top portion of this file before continuing.\n";
exit -1;
}
my $ld = ldap_init($ldap_server,LDAP_PORT);
if ($ld == -1)
{
die "Connection to LDAP Server Failed";
}
if (ldap_simple_bind_s($ld,$ROOTDN,$ROOTPW) != LDAP_SUCCESS)
{
ldap_perror($ld,"bind_s");
die;
}
my %testwrite = (
"cn" => "Test User",
"sn" => "User",
"givenName" => "Test",
"telephoneNumber" => "8475551212",
"objectClass" => ["top","person","organizationalPerson",
"inetOrgPerson"],
"mail" => "tuser\@my.org",
);
if (ldap_add_s($ld,$ENTRYDN,\%testwrite) != LDAP_SUCCESS)
{
ldap_perror($ld,"add_s");
die;
}
print "Entry Added.\n";
%testwrite = (
"telephoneNumber" => "7085551212",
"mail" => {"a",["Test_User\@my.org"]},
);
if (ldap_modify_s($ld,$ENTRYDN,\%testwrite) != LDAP_SUCCESS)
{
ldap_perror($ld,"modify_s");
die;
}
print "Entry Modified.\n";
#
# Delete the entry for $ENTRYDN
#
if (ldap_delete_s($ld,$ENTRYDN) != LDAP_SUCCESS)
{
ldap_perror($ld,"delete_s");
die;
}
print "Entry Deleted.\n";
# Unbind to LDAP server
ldap_unbind($ld);
exit;

View File

@@ -1,70 +0,0 @@
#############################################################################
# $Id: typemap,v 1.4 1998-08-13 09:15:00 leif Exp $
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 PerLDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# Typemap to declare XSUB data types.
#
#############################################################################
const int T_IV
char * T_PV
const char * T_PV
char ** T_charptrptr
LDAP * T_PTR
LDAPMessage * T_PTR
LDAPMessage ** T_PTR
BerElement * T_PTR
LDAPControl * T_PTR
LDAPVersion * T_PTR
struct berval T_berval
struct berval ** T_bervalptrptr
FriendlyMap * T_PTR
LDAPsortkey ** T_PTR
LDAPVirtualList * T_PTR
LDAPURLDesc * T_PTR
LDAPControl ** T_PTR
LDAPFiltDesc * T_PTR
LDAPFiltInfo * T_PTR
LDAPMemCache * T_PTR
LDAPMemCache ** T_PTR
struct ldap_thread_fns * T_PTR
LDAPMod ** T_PTR
LDAP_CMP_CALLBACK * T_PTR
LDAP_REBINDPROC_CALLBACK * T_PTR
struct timeval T_timeval
#########
INPUT
T_timeval
$var.tv_sec = atof((char *)SvPV($arg,na));
$var.tv_usec = 0
T_berval
$var.bv_val = (char *)SvPV($arg,na);
$var.bv_len = na
T_charptrptr
$var = (char **)avref2charptrptr($arg)
T_bervalptrptr
$var = (struct berval **)avref2berptrptr($arg)
OUTPUT
T_charptrptr
$arg = charptrptr2avref($var);
T_bervalptrptr
$arg = berptrptr2avref((struct berval **)$var);

48
mozilla/mozilla.kdevprj Normal file
View File

@@ -0,0 +1,48 @@
# KDE Config File
[mozilla.lsm]
install_location=
dist=true
install=false
type=DATA
[Config for BinMakefileAm]
ldflags=
cxxflags=-O0 -g3 -Wall
bin_program=mozilla
[po/Makefile.am]
sub_dirs=
type=po
[LFV Groups]
Dialogs=*.kdevdlg,
Others=*,
Translations=*.po,
groups=Headers,Sources,Dialogs,Translations,Others,
Sources=*.cpp,*.c,*.cc,*.C,*.cxx,*.ec,*.ecpp,*.lxx,*.l++,*.ll,*.l,
Headers=*.h,*.hh,*.hxx,*.hpp,*.H,
[mozilla.kdevprj]
install_location=
dist=true
install=false
type=DATA
[mozilla/docs/en/Makefile.am]
sub_dirs=
type=normal
[mozilla/Makefile.am]
sub_dirs=
type=prog_main
[General]
makefiles=Makefile.am,mozilla/Makefile.am,mozilla/docs/Makefile.am,mozilla/docs/en/Makefile.am,po/Makefile.am,
version_control=CVS
author=Heikki Toivonen
project_type=normal_empty
sub_dir=mozilla/
version=0.1
project_name=Mozilla
email=heikki@netscape.com
kdevprj_version=1.2
[Makefile.am]
files=mozilla.kdevprj,mozilla.lsm,
sub_dirs=mozilla,
type=normal
[mozilla/docs/Makefile.am]
sub_dirs=
type=normal

14
mozilla/mozilla.lsm Normal file
View File

@@ -0,0 +1,14 @@
Begin3
Title: Mozilla
Version: 0.1
Entered-date:
Description:
Keywords:
Author: Heikki Toivonen <heikki@netscape.com>
Maintained-by: Heikki Toivonen <heikki@netscape.com>
Primary-site:
Home-page: http://
Original-site:
Platforms: Linux and other Unices
Copying-policy: GNU Public License
End

View File

@@ -0,0 +1,20 @@
/*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (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 Mozilla Communicator client code.
*
* 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.
*
* Contributor(s):
*/

View File

@@ -0,0 +1,20 @@
/*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (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 Mozilla Communicator client code.
*
* 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.
*
* Contributor(s):
*/