Compare commits
20 Commits
RELEASE-0.
...
RELEASE-1.
Author | SHA1 | Date | |
---|---|---|---|
|
f990f72eb5 | ||
|
dd581eb5c8 | ||
|
a08bc4e9e1 | ||
|
5f261ded38 | ||
|
eccabca011 | ||
|
c3713350e2 | ||
|
c131e8b479 | ||
|
a01f7c8289 | ||
|
7741110caf | ||
|
abc62c7fdc | ||
|
fdee1bdbd1 | ||
|
1f7f96122f | ||
|
b443271175 | ||
|
bbcd2cb3b6 | ||
|
df48b8ff9b | ||
|
d12096bbd3 | ||
|
0a07abd27a | ||
|
92be67a1bf | ||
|
082c6b5fee | ||
|
ed7caca53b |
49
INSTALL
@@ -1,40 +1,23 @@
|
||||
These instructions assume that you have a working install of:
|
||||
a. A web server (Apache, IIS, etc).
|
||||
b. PHP (with LDAP support)
|
||||
For install instructions in non-English languages, see the wiki:
|
||||
http://phpldapadmin.wiki.sourceforge.net
|
||||
|
||||
Installing phpLDAPAdmin in 4 easy steps:
|
||||
* Requirements
|
||||
|
||||
1. Untar the archive (if you're reading this, you've already done that).
|
||||
2. Put the resulting phpldapadmin directory somewhere in your webroot.
|
||||
3. Copy 'config.php.example' to 'config.php' and edit to taste.
|
||||
4. Then, point your browser to the phpldapadmin directory.
|
||||
phpLDAPadmin requires the following:
|
||||
a. A web server (Apache, IIS, etc).
|
||||
b. PHP 5.0.0 or newer (with LDAP support)
|
||||
|
||||
Browsers
|
||||
* To install
|
||||
|
||||
phpLDAPAdmin was developed on Mozilla, and will most likely run best thereon.
|
||||
However, testing has been done on Internet Explorer, and it should work
|
||||
well also. No testing has been done on either Konqueror (or any khtml-based
|
||||
browser like Safari) or Opera. If you find a browser incompatibility,
|
||||
please report it.
|
||||
1. Unpack the archive (if you're reading this, you already did that).
|
||||
2. Put the resulting 'phpldapadmin' directory somewhere in your webroot.
|
||||
3. Copy 'config.php.example' to 'config.php' and edit to taste (this is in the config/ directory).
|
||||
4. Then, point your browser to the phpldapadmin directory.
|
||||
|
||||
Contributors (thank you!)
|
||||
|
||||
Patch writers:
|
||||
* For additional help
|
||||
|
||||
- Mario Valdez jpegPhoto support, localization (not yet in 0.8.x), html fixes
|
||||
- Bayu Irawan userPassword encryption support, html fixes, ldap_modify fixes
|
||||
- Uwe Ebel short_open_tags fix-it script
|
||||
- Philippe Broussard form auth_type bug report
|
||||
- Andrew Tipton SUP support in schema-fetching
|
||||
- Eigil Bj<42>rgum UTF-8 support
|
||||
- Brandon Lederer DNS entry template
|
||||
Nathan Rotschafer
|
||||
- Steve Rigler Password hash patch
|
||||
- Chric Jackson Blowfish and md5crypt passwords
|
||||
|
||||
Bug reporters:
|
||||
|
||||
- Colin Tinker (short_open_tags bug report)
|
||||
- Greg Felix (multi-value update bug report)
|
||||
- Moritz Mertinkat (creation bug report)
|
||||
See the wiki:
|
||||
http://phpldapadmin.wiki.sourceforge.net
|
||||
|
||||
Join our mailing list:
|
||||
https://lists.sourceforge.net/lists/listinfo/phpldapadmin-devel
|
||||
|
@@ -1,55 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* add_oclass.php
|
||||
* Adds an objectClass to the specified dn.
|
||||
* Variables that come in as POST vars:
|
||||
*
|
||||
* Note, this does not do any schema violation checking. That is
|
||||
* performed in add_oclass_form.php.
|
||||
*
|
||||
* Vars that come in as POST:
|
||||
* - dn (rawurlencoded)
|
||||
* - server_id
|
||||
* - new_oclass
|
||||
* - new_attrs (array, if any)
|
||||
*/
|
||||
|
||||
require 'config.php';
|
||||
require 'functions.php';
|
||||
|
||||
$dn = stripslashes( rawurldecode( $_POST['dn'] ) );
|
||||
$encoded_dn = rawurlencode( $dn );
|
||||
$new_oclass = stripslashes( $_POST['new_oclass'] );
|
||||
$server_id = $_POST['server_id'];
|
||||
$new_attrs = $_POST['new_attrs'];
|
||||
|
||||
check_server_id( $server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $server_id ) );
|
||||
have_auth_info( $server_id ) or pla_error( "Not enough information to login to server. Please check your configuration." );
|
||||
|
||||
$new_entry = array();
|
||||
$new_entry['objectClass'] = $new_oclass;
|
||||
|
||||
$new_attrs_entry = array();
|
||||
$new_oclass_entry = array( 'objectClass' => $new_oclass );
|
||||
|
||||
if( is_array( $new_attrs ) && count( $new_attrs ) > 0 )
|
||||
foreach( $new_attrs as $attr => $val )
|
||||
$new_entry[ $attr ] = $val;
|
||||
|
||||
//echo "<pre>";
|
||||
//print_r( $new_entry );
|
||||
//exit;
|
||||
|
||||
$ds = pla_ldap_connect( $server_id ) or pla_error( "Could not connect to LDAP server." );
|
||||
$add_res = @ldap_mod_add( $ds, $dn, $new_entry );
|
||||
|
||||
if( ! $add_res )
|
||||
{
|
||||
pla_error( "Could not perform ldap_mod_add operation", ldap_error( $ds ), ldap_errno( $ds ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
header( "Location: edit.php?server_id=$server_id&dn=$encoded_dn" );
|
||||
}
|
||||
|
||||
?>
|
@@ -1,108 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* add_oclass_form.php
|
||||
* This page may simply add the objectClass and take you back to the edit page,
|
||||
* but, in one condition it may prompt the user for input. That condition is this:
|
||||
*
|
||||
* If the user has requested to add an objectClass that requires a set of
|
||||
* attributes with 1 or more not defined by the object. In that case, we will
|
||||
* present a form for the user to add those attributes to the object.
|
||||
*
|
||||
* Variables that come in as POST vars:
|
||||
* - dn (rawurlencoded)
|
||||
* - server_id
|
||||
* - new_oclass
|
||||
*/
|
||||
|
||||
require 'config.php';
|
||||
require_once 'functions.php';
|
||||
|
||||
$dn = stripslashes( rawurldecode( $_POST['dn'] ) );
|
||||
$encoded_dn = rawurlencode( $dn );
|
||||
$new_oclass = stripslashes( $_POST['new_oclass'] );
|
||||
$server_id = $_POST['server_id'];
|
||||
|
||||
check_server_id( $server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $server_id ) );
|
||||
have_auth_info( $server_id ) or pla_error( "Not enough information to login to server. Please check your configuration." );
|
||||
|
||||
/* Ensure that the object has defined all MUST attrs for this objectClass.
|
||||
* If it hasn't, present a form to have the user enter values for all the
|
||||
* newly required attrs. */
|
||||
|
||||
$entry = get_object_attrs( $server_id, $dn, true );
|
||||
$current_attrs = array();
|
||||
foreach( $entry as $attr => $junk )
|
||||
$current_attrs[] = strtolower($attr);
|
||||
// grab the required attributes for the new objectClass
|
||||
$must_attrs = get_schema_objectclasses( $server_id );
|
||||
$must_attrs = $must_attrs[ strtolower($new_oclass) ]['must_attrs'];
|
||||
sort( $must_attrs );
|
||||
// build a list of the attributes that this new objectClass requires,
|
||||
// but that the object does not currently contain
|
||||
$needed_attrs = array();
|
||||
foreach( $must_attrs as $attr )
|
||||
if( ! in_array( strtolower($attr), $current_attrs ) )
|
||||
$needed_attrs[] = $attr;
|
||||
|
||||
if( count( $needed_attrs ) > 0 )
|
||||
{
|
||||
?>
|
||||
|
||||
|
||||
<?php include 'header.php'; ?>
|
||||
<body>
|
||||
|
||||
<h3 class="title">New Required Attributes</h3>
|
||||
<h3 class="subtitle">This action requires you to add <?php echo count($needed_attrs); ?> new attribute<?php echo (count($needed_attrs)>1?'s':''); ?></h3>
|
||||
|
||||
<small>
|
||||
Instrucitons: In order to add the objectClass <b><?php echo $new_oclass; ?></b> to the object <b><?php echo htmlspecialchars($dn); ?></b>,
|
||||
you must specify <?php echo count( $needed_attrs ); ?> new attribute<?php echo (count($needed_atts)>1?'s':''); ?> that this
|
||||
objectClass requires. You can do so in this form.</small>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<form action="add_oclass.php" method="post">
|
||||
<input type="hidden" name="new_oclass" value="<?php echo htmlspecialchars( $new_oclass ); ?>" />
|
||||
<input type="hidden" name="dn" value="<?php echo $encoded_dn; ?>" />
|
||||
<input type="hidden" name="server_id" value="<?php echo $server_id; ?>" />
|
||||
|
||||
<table class="edit_dn" cellspacing="0">
|
||||
<tr><th colspan="2">New Required Attributes</th></tr>
|
||||
|
||||
<?php foreach( $needed_attrs as $count => $attr ) { ?>
|
||||
<?php if( $count % 2 == 0 ) { ?>
|
||||
<tr class="row1">
|
||||
<?php } else { ?>
|
||||
<tr class="row2">
|
||||
<?php } ?>
|
||||
<td class="attr"><b><?php echo htmlspecialchars($attr); ?></b></td>
|
||||
<td class="val"><input type="text" name="new_attrs[<?php echo htmlspecialchars($attr); ?>]" value="" size="40" />
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
</table>
|
||||
<br />
|
||||
<br />
|
||||
<center><input type="submit" value="Add ObjectClass and Attributes" /></center>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
$ds = pla_ldap_connect( $server_id ) or pla_error( "Could not connect to LDAP server." );
|
||||
$add_res = @ldap_mod_add( $ds, $dn, array( 'objectClass' => $new_oclass ) );
|
||||
if( ! $add_res )
|
||||
pla_error( "Could not perform ldap_mod_add operation.", ldap_error( $ds ), ldap_errno( $ds ) );
|
||||
else
|
||||
header( "Location: edit.php?server_id=$server_id&dn=$encoded_dn" );
|
||||
|
||||
}
|
||||
|
||||
?>
|
@@ -1,52 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* add_value.php
|
||||
* Adds a value to an attribute for a given dn.
|
||||
* Variables that come in as POST vars:
|
||||
* - dn (rawurlencoded)
|
||||
* - attr (rawurlencoded) the attribute to which we are adding a value
|
||||
* - server_id
|
||||
* - new_value (form element)
|
||||
*
|
||||
* On success, redirect to the edit_dn page.
|
||||
* On failure, echo an error.
|
||||
*/
|
||||
|
||||
require 'config.php';
|
||||
require_once 'functions.php';
|
||||
|
||||
$dn = stripslashes( rawurldecode( $_POST['dn'] ) );
|
||||
$encoded_dn = rawurlencode( $dn );
|
||||
$attr = stripslashes( $_POST['attr'] );
|
||||
$encoded_attr = rawurlencode( $attr );
|
||||
$server_id = $_POST['server_id'];
|
||||
$new_value = stripslashes( $_POST['new_value'] );
|
||||
$new_value = utf8_encode($new_value);
|
||||
|
||||
check_server_id( $server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $server_id ) );
|
||||
have_auth_info( $server_id ) or pla_error( "Not enough information to login to server. Please check your configuration." );
|
||||
|
||||
$ds = pla_ldap_connect( $server_id ) or pla_error( "Could not connect to LDAP server" );
|
||||
|
||||
// special case for jpegPhoto attributes:
|
||||
// we must go read the data from the file.
|
||||
if( 0 == strcasecmp( $attr, 'jpegPhoto' ) )
|
||||
{
|
||||
$file = $_FILES['jpeg_photo_file']['tmp_name'];
|
||||
$f = fopen( $file, 'r' );
|
||||
$jpeg_data = fread( $f, filesize( $file ) );
|
||||
fclose( $f );
|
||||
$new_value = $jpeg_data;
|
||||
}
|
||||
|
||||
$new_entry = array( $attr => $new_value );
|
||||
|
||||
$add_result = @ldap_mod_add( $ds, $dn, $new_entry );
|
||||
|
||||
if( ! $add_result )
|
||||
pla_error( "Could not perform ldap_mod_add operation.", ldap_error( $ds ), ldap_errno( $ds ) );
|
||||
|
||||
header( "Location: edit.php?server_id=$server_id&dn=$encoded_dn&updated_attr=$encoded_attr" );
|
||||
|
||||
?>
|
@@ -1,133 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* add_value_form.php
|
||||
* Displays a form to allow the user to enter a new value to add
|
||||
* to the existing list of values for a multi-valued attribute.
|
||||
* Variables that come in as GET vars:
|
||||
* - dn (rawurlencoded)
|
||||
* - attr (rawurlencoded) the attribute to which we are adding a value
|
||||
* - server_id
|
||||
*
|
||||
*/
|
||||
|
||||
require 'config.php';
|
||||
require_once 'functions.php';
|
||||
|
||||
$dn = stripslashes( $_GET['dn'] );
|
||||
$encoded_dn = rawurlencode( $dn );
|
||||
$server_id = $_GET['server_id'];
|
||||
$rdn = ldap_explode_dn( $dn, 0 );
|
||||
$rdn = $rdn[0];
|
||||
$server_name = $servers[$server_id]['name'];
|
||||
$attr = stripslashes( $_GET['attr'] );
|
||||
$encoded_attr = rawurlencode( $attr );
|
||||
$current_values = get_object_attr( $server_id, $dn, $attr );
|
||||
$num_current_values = ( is_array($current_values) ? count($current_values) : 1 );
|
||||
$is_object_class = ( 0 == strcasecmp( $attr, 'objectClass' ) ) ? true : false;
|
||||
$is_jpeg_photo = ( 0 == strcasecmp( $attr, 'jpegPhoto' ) ) ? true : false;
|
||||
|
||||
check_server_id( $server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $server_id ) );
|
||||
have_auth_info( $server_id ) or pla_error( "Not enough information to login to server. Please check your configuration." );
|
||||
|
||||
if( $is_object_class ) {
|
||||
// fetch all available objectClasses and remove those from the list that are already defined in the entry
|
||||
$schema_oclasses = get_schema_objectclasses( $server_id );
|
||||
if( ! is_array( $current_values ) )
|
||||
$current_values = array( $current_values );
|
||||
foreach( $current_values as $oclass )
|
||||
unset( $schema_oclasses[ strtolower( $oclass ) ] );
|
||||
} else {
|
||||
$schema_attrs = get_schema_attributes( $server_id );
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php include 'header.php'; ?>
|
||||
|
||||
<body>
|
||||
|
||||
<h3 class="title">New <b><?php echo htmlspecialchars($attr); ?></b> value for <b><?php echo htmlentities($rdn); ?></b></h3>
|
||||
<h3 class="subtitle">Server: <b><?php echo $server_name; ?></b> Distinguished Name: <b><?php echo $dn; ?></b></h3>
|
||||
|
||||
Current list of <b><?php echo $num_current_values; ?></b> value<?php echo $num_current_values>1?'s':''; ?>
|
||||
for attribute <b><?php echo htmlspecialchars($attr); ?></b>:
|
||||
|
||||
<?php if( $is_jpeg_photo ) { ?>
|
||||
|
||||
<table><td>
|
||||
<?php draw_jpeg_photos( $server_id, $dn ); ?>
|
||||
</td></table>
|
||||
|
||||
<!-- Temporary warning until we find a way to add jpegPhoto values without an INAPROPRIATE_MATCHING error -->
|
||||
<p><small>
|
||||
Note: You will get an "inappropriate matching" error if you have not<br />
|
||||
setup an <tt>EQUALITY</tt> rule on your LDAP server for <tt>jpegPhoto</tt> attributes.
|
||||
</small></p>
|
||||
<!-- End of temporary warning -->
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<ul class="current_values">
|
||||
<?php if( is_array( $current_values ) ) /*$num_current_values > 1 )*/ {
|
||||
foreach( $current_values as $val ) { ?>
|
||||
|
||||
<li><nobr><?php echo htmlspecialchars(utf8_decode($val)); ?></nobr></li>
|
||||
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
|
||||
<li><nobr><?php echo htmlspecialchars(utf8_decode($current_values)); ?></nobr></li>
|
||||
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
Enter the value you would like to add:<br />
|
||||
<br />
|
||||
|
||||
<?php if( $is_object_class ) { ?>
|
||||
|
||||
<form action="add_oclass_form.php" method="post" class="new_value">
|
||||
<input type="hidden" name="server_id" value="<?php echo $server_id; ?>" />
|
||||
<input type="hidden" name="dn" value="<?php echo $encoded_dn; ?>" />
|
||||
<select name="new_oclass">
|
||||
|
||||
<?php foreach( $schema_oclasses as $oclass => $desc ) { ?>
|
||||
|
||||
<option value="<?php echo $desc['name']; ?>"><?php echo $desc['name']; ?></option>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</select> <input type="submit" value="Add new objectClass" />
|
||||
|
||||
<br /><small>Note: you may be required to enter new attributes<br />
|
||||
that this objectClass requires (MUST attrs)</small>
|
||||
|
||||
<?php } elseif( $is_jpeg_photo ) { ?>
|
||||
|
||||
<form action="add_value.php" method="post" class="new_value" enctype="multipart/form-data">
|
||||
<input type="hidden" name="server_id" value="<?php echo $server_id; ?>" />
|
||||
<input type="hidden" name="dn" value="<?php echo $encoded_dn; ?>" />
|
||||
<input type="hidden" name="attr" value="<?php echo $encoded_attr; ?>" />
|
||||
<input type="file" name="jpeg_photo_file" value="" /><br />
|
||||
<br />
|
||||
<input type="submit" name="submit" value="Add new jpeg >>" />
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<form action="add_value.php" method="post" class="new_value">
|
||||
<input type="hidden" name="server_id" value="<?php echo $server_id; ?>" />
|
||||
<input type="hidden" name="dn" value="<?php echo $encoded_dn; ?>" />
|
||||
<input type="hidden" name="attr" value="<?php echo $encoded_attr; ?>" />
|
||||
<input type="text" name="new_value" size="40" value="" />
|
||||
<input type="submit" name="submit" value="Add New Value" />
|
||||
<br />
|
||||
<small>Syntax: <?php echo $schema_attrs[ strtolower($attr) ]['type']; ?></small>
|
||||
</form>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</body>
|
||||
</html>
|
43
collapse.php
@@ -1,43 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* collapse.php
|
||||
* This script alters the session variable 'tree', collapsing it
|
||||
* at the dn specified in the query string.
|
||||
*
|
||||
* Variables that come in as GET vars:
|
||||
* - dn (rawurlencoded)
|
||||
* - server_id
|
||||
*
|
||||
* Note: this script is equal and opposite to expand.php
|
||||
*/
|
||||
|
||||
require 'config.php';
|
||||
require_once 'functions.php';
|
||||
|
||||
$dn = stripslashes( $_GET['dn'] );
|
||||
$encoded_dn = rawurlencode( $dn );
|
||||
$server_id = $_GET['server_id'];
|
||||
|
||||
check_server_id( $server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $server_id ) );
|
||||
|
||||
session_start();
|
||||
session_is_registered( 'tree' ) or pla_error( "Your session tree is not registered. That's weird. Shouldn't ever happen".
|
||||
". Just go back and it should be fixed automagically." );
|
||||
$tree = $_SESSION['tree'];
|
||||
|
||||
// and remove this instance of the dn as well
|
||||
unset( $tree[$server_id][$dn] );
|
||||
|
||||
$_SESSION['tree'] = $tree;
|
||||
session_write_close();
|
||||
|
||||
// This is for Opera. By putting "random junk" in the query string, it thinks
|
||||
// that it does not have a cached version of the page, and will thus
|
||||
// fetch the page rather than display the cached version
|
||||
$time = gettimeofday();
|
||||
$random_junk = md5( strtotime( 'now' ) . $time['usec'] );
|
||||
|
||||
header( "Location: tree.php?foo=$random_junk#{$server_id}_{$encoded_dn}" );
|
||||
|
||||
; ?>
|
@@ -1,163 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* The phpLDAPAdmin config file
|
||||
* This is where you customize phpLDAPAdmin. The most important
|
||||
* part is immediately below: The "LDAP Servers" section.
|
||||
* You must specify at least one LDAP server there.
|
||||
*/
|
||||
|
||||
// Required Configuration
|
||||
|
||||
// Your LDAP servers
|
||||
$i=0;
|
||||
$servers = array();
|
||||
$servers[$i]['name'] = 'My LDAP Server'; /* A convenient name that will appear in the tree viewer */
|
||||
$servers[$i]['host'] = 'ldap.example.com'; /* Examples: 'ldap.example.com', 'ldaps://ldap.example.com/'
|
||||
Note: Leave blank to remove it from the list of servers in the
|
||||
tree viewer*/
|
||||
$servers[$i]['base'] = 'dc=example,dc=com';/* The base DN of your LDAP server. Leave this blank to have phpLDAPAdmin
|
||||
auto-detect it for you. */
|
||||
$servers[$i]['port'] = 389; /* The port your LDAP server listens on (no quotes) */
|
||||
$servers[$i]['auth_type'] = 'config'; /* 2 options: 'form': you will be prompted, and a cookie stored
|
||||
with your login dn and password. 'config': specify your login dn
|
||||
and password here. In both cases, use caution! */
|
||||
$servers[$i]['login_dn'] = 'cn=Manager,dc=example,dc=com'; /* For anonymous binds, leave the login_dn and
|
||||
login_pass blank */
|
||||
$servers[$i]['login_pass'] = 'secret'; /* Your password (only if you specified 'config' for 'auth_type' */
|
||||
$servers[$i]['tls'] = false; /* Use TLS to connect. Requires PHP 4.2 or greater */
|
||||
|
||||
/* If you want to configure an additional LDAP server, do so below. */
|
||||
$i++;
|
||||
$servers[$i]['name'] = 'Another server';
|
||||
$servers[$i]['host'] = '';
|
||||
$servers[$i]['base'] = 'dc=example,dc=com';
|
||||
$servers[$i]['port'] = 389;
|
||||
$servers[$i]['auth_type'] = 'config';
|
||||
$servers[$i]['login_dn'] = '';
|
||||
$servers[$i]['login_pass'] = '';
|
||||
$servers[$i]['tls'] = false;
|
||||
|
||||
$i++;
|
||||
$servers[$i]['name'] = 'Another server';
|
||||
$servers[$i]['host'] = '';
|
||||
$servers[$i]['base'] = 'dc=example,dc=com';
|
||||
$servers[$i]['port'] = 389;
|
||||
$servers[$i]['auth_type'] = 'config';
|
||||
$servers[$i]['login_dn'] = '';
|
||||
$servers[$i]['login_pass'] = '';
|
||||
$servers[$i]['tls'] = false;
|
||||
|
||||
/* If you want to configure more LDAP servers, copy and paste the sections above (including the "$i++;") */
|
||||
|
||||
|
||||
// The temporary storage directory where we will put jpegPhoto data
|
||||
// This directory must be readable and writable by your web server
|
||||
$jpeg_temp_dir = "/tmp"; // for Unix systems
|
||||
//$jpeg_temp_dir = "c:\\temp"; // for Windows systems
|
||||
|
||||
|
||||
// Optional Configuration Below
|
||||
|
||||
/** **/
|
||||
/** Appearance and Behavior **/
|
||||
/** **/
|
||||
|
||||
// If you used auth_type 'form' in the servers list, you can adjust how long the cookie will last
|
||||
// (default is 0 seconds, which expires when you close the browser)
|
||||
$cookie_time = 0;
|
||||
|
||||
// How many pixels wide do you want your left frame view (for the tree browser)
|
||||
$tree_width = 300;
|
||||
|
||||
// Do you want phpLDAPAdmin to check the schema of the server when you edit a DN and draw
|
||||
// specialized for elements based on that schema (ie, for booleans, draw a true/false
|
||||
// drop-down instead of a text box). This may cause a performance slow-down.
|
||||
// Note:
|
||||
// This will have problems with non-LDAP compliant servers that do not properly represent
|
||||
// their schema.
|
||||
$edit_dn_schema_lookup = true;
|
||||
|
||||
// How long to keep jpegPhoto temporary files around (in seconds)
|
||||
$jpeg_tmp_keep_time = 120;
|
||||
|
||||
/** **/
|
||||
/** Simple Search Form Config **/
|
||||
/** **/
|
||||
|
||||
// Which attributes to include in the drop-down menu of the simple search form (comma-separated)
|
||||
$search_attributes = "uid, cn, gidNumber";
|
||||
|
||||
// This list correlates to the list directly above. If you want to present more readable names
|
||||
// for your search attributes, do so here. Both lists must have the same number of entries.
|
||||
$search_attributes_display = "User Name, Full Name, Group ID";
|
||||
|
||||
// The list of attributes to display in each search result entry summary
|
||||
$search_result_attributes = "dn, cn";
|
||||
|
||||
// Search methods in the drop down box for the simple search form
|
||||
// (if you change this, you will also have to edit search.php to properly handle the new option)
|
||||
$search_criteria_options = "equals, starts with, contains, ends with, sounds like";
|
||||
|
||||
/** **/
|
||||
/** Templates for entry creation **/
|
||||
/** **/
|
||||
|
||||
$templates = array();
|
||||
|
||||
// Fill in this array with templates that you can create to suit your needs.
|
||||
// Each entry defines a description (for display in the template list) and
|
||||
// a handler, which is a file that will be executed with certain POST vars set.
|
||||
// See the templates provided here for an example of how to make your own template.
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => 'User',
|
||||
'icon' => 'images/user.png',
|
||||
'handler' => 'new_user_template.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => 'inetOrgPerson',
|
||||
'icon' => 'images/user.png',
|
||||
'handler' => 'new_address_template.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => 'Organizational Unit',
|
||||
'icon' => 'images/ou.png',
|
||||
'handler' => 'new_ou_template.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => 'Samba NT Machine',
|
||||
'icon' => 'images/terminal.png',
|
||||
'handler' => 'new_nt_machine.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => 'DNS Entry',
|
||||
'icon' => 'images/dc.png',
|
||||
'handler' => 'new_dns_entry.php' );
|
||||
|
||||
/** **/
|
||||
/** User-friendly attribute translation **/
|
||||
/** **/
|
||||
|
||||
$friendly_attrs = array();
|
||||
|
||||
// Use this array to map attribute names to user friendly names. For example, if you
|
||||
// don't want to see "facsimileTelephoneNumber" but rather "Fax".
|
||||
|
||||
$friendly_attrs[ 'facsimileTelephoneNumber' ] = 'Fax';
|
||||
$friendly_attrs[ 'telephoneNumber' ] = 'Phone';
|
||||
|
||||
/** **/
|
||||
/** Some phpLDAPAdmin code to be executed. No touchy. **/
|
||||
/** **/
|
||||
|
||||
// Turn off notices about referencing arrays and such, but leave everything else on.
|
||||
error_reporting( E_ALL ^ E_NOTICE );
|
||||
|
||||
// Always including the 'custom' template (the most generic and flexible)
|
||||
$templates['custom'] =
|
||||
array( 'desc' => 'Custom',
|
||||
'icon' => 'images/object.png',
|
||||
'handler' => 'custom.php' );
|
||||
|
||||
?>
|
527
config/config.php.example
Normal file
@@ -0,0 +1,527 @@
|
||||
<?php
|
||||
/** NOTE **
|
||||
** Make sure that <?php is the FIRST line of this file!
|
||||
** IE: There should NOT be any blank lines or spaces BEFORE <?php
|
||||
**/
|
||||
|
||||
/**
|
||||
* The phpLDAPadmin config file
|
||||
*
|
||||
* This is where you can customise some of the phpLDAPadmin defaults
|
||||
* that are defined in config_default.php.
|
||||
*
|
||||
* To override a default, use the $config->custom variable to do so.
|
||||
* For example, the default for defining the language in config_default.php
|
||||
*
|
||||
* $this->default->appearance['lang'] = array(
|
||||
* 'desc'=>'Language',
|
||||
* 'default'=>'auto');
|
||||
*
|
||||
* to override this, use $config->custom->appearance['lang'] = 'en';
|
||||
*
|
||||
* This file is also used to configure your LDAP server connections.
|
||||
*
|
||||
* You must specify at least one LDAP server there. You may add
|
||||
* as many as you like. You can also specify your language, and
|
||||
* many other options.
|
||||
*
|
||||
* NOTE: Commented out values in this file prefixed by //, represent the
|
||||
* defaults that have been defined in config_default.php.
|
||||
* Commented out values prefixed by #, dont reflect their default value, you can
|
||||
* check config_default.php if you want to see what the default is.
|
||||
*
|
||||
* DONT change config_default.php, you changes will be lost by the next release
|
||||
* of PLA. Instead change this file - as it will NOT be replaced by a new
|
||||
* version of phpLDAPadmin.
|
||||
*/
|
||||
|
||||
/*********************************************/
|
||||
/* Useful important configuration overrides */
|
||||
/*********************************************/
|
||||
|
||||
/* If you are asked to put pla in debug mode, this is how you do it: */
|
||||
# $config->custom->debug['level'] = 255;
|
||||
# $config->custom->debug['syslog'] = true;
|
||||
# $config->custom->debug['file'] = '/tmp/pla_debug.log';
|
||||
|
||||
/* phpLDAPadmin can encrypt the content of sensitive cookies if you set this
|
||||
to a big random string. */
|
||||
$config->custom->session['blowfish'] = '';
|
||||
|
||||
/* The language setting. If you set this to 'auto', phpLDAPadmin will attempt
|
||||
to determine your language automatically. Otherwise, available lanaguages
|
||||
are: 'ct', 'de', 'en', 'es', 'fr', 'it', 'nl', and 'ru'
|
||||
Localization is not complete yet, but most strings have been translated.
|
||||
Please help by writing language files. See lang/en.php for an example. */
|
||||
// $config->custom->appearance['language'] = 'auto';
|
||||
|
||||
/* The temporary storage directory where we will put jpegPhoto data
|
||||
This directory must be readable and writable by your web server. */
|
||||
// $config->custom->jpeg['tmpdir'] = "/tmp"; // Example for Unix systems
|
||||
# $config->custom->jpeg['tmpdir'] = "c:\\temp"; // Example for Windows systems
|
||||
|
||||
/* Set this to (bool)true if you do NOT want a random salt used when
|
||||
calling crypt(). Instead, use the first two letters of the user's
|
||||
password. This is insecure but unfortunately needed for some older
|
||||
environments. */
|
||||
# $config->custom->password['no_random_crypt_salt'] = true;
|
||||
|
||||
/*********************************************/
|
||||
/* Commands */
|
||||
/*********************************************/
|
||||
|
||||
/* Command availability ; if you don't authorize a command the command
|
||||
links will not be shown and the command action will not be permitted.
|
||||
For better security, set also ACL in your ldap directory. */
|
||||
|
||||
/*
|
||||
$config->custom->commands['all'] = array(
|
||||
'home' => true,
|
||||
'external_links' => array('feature' => true,
|
||||
'bug' => true,
|
||||
'donation' => true,
|
||||
'help' => true,
|
||||
'credits' => true),
|
||||
'purge' => true,
|
||||
'schema' => true,
|
||||
'import' => false,
|
||||
'export' => true,
|
||||
'search' => array('simple_search' => true,
|
||||
'predefined_search' => false,
|
||||
'advanced_search' => false),
|
||||
'server_refresh' => false,
|
||||
'server_info' => false,
|
||||
'entry_refresh' => true,
|
||||
'entry_move' => true,
|
||||
'entry_internal_attributes_show' => true,
|
||||
'entry_delete' => array('simple_delete' => true,
|
||||
'mass_delete' => false),
|
||||
'entry_rename' => true,
|
||||
'entry_compare' => true,
|
||||
'entry_create' => true,
|
||||
'attribute_add' => true,
|
||||
'attribute_add_value' => true,
|
||||
'attribute_delete' => true,
|
||||
'attribute_delete_value' => true);
|
||||
*/
|
||||
|
||||
/*********************************************/
|
||||
/* Appearance */
|
||||
/*********************************************/
|
||||
|
||||
/* If you want to choose the appearance of the tree, specify a class name which
|
||||
inherits from the Tree class. */
|
||||
// $config->custom->appearance['tree'] = "HTMLTree";
|
||||
# $config->custom->appearance['tree'] = "PLMTree";
|
||||
|
||||
/* If you want to customise the entry view/edition, specify your factory name which
|
||||
inherits from the EntryFactory class.
|
||||
The 'DefaultEntryFactory' draws all the attributes of an entry according this
|
||||
config file and the ldap schema definition ; the 'TemplateEntryFactory' draws
|
||||
an entry according to the template whose regexp matches with the dn. */
|
||||
# $config->custom->appearance['entry_factory'] = "DefaultEntryFactory";
|
||||
// $config->custom->appearance['entry_factory'] = "TemplateEntryFactory";
|
||||
|
||||
/* If you want to customise an attribute view/edition, specify your factory name which
|
||||
inherits from the AttributeFactory class.
|
||||
An AttributeFactory defines which class to use to represent a given attribute */
|
||||
// $config->custom->appearance['attribute_factory'] = "AttributeFactory";
|
||||
|
||||
/* Configure what objects are shown in left hand tree */
|
||||
// $config->custom->appearance['tree_filter'] = '(objectclass=*)';
|
||||
|
||||
/*********************************************/
|
||||
/* Define your LDAP servers in this section */
|
||||
/*********************************************/
|
||||
|
||||
$i=0;
|
||||
$ldapservers = new LDAPServers;
|
||||
|
||||
/* A convenient name that will appear in the tree viewer and throughout
|
||||
phpLDAPadmin to identify this LDAP server to users. */
|
||||
$ldapservers->SetValue($i,'server','name','My LDAP Server');
|
||||
|
||||
/* Examples:
|
||||
'ldap.example.com',
|
||||
'ldaps://ldap.example.com/',
|
||||
'ldapi://%2fusr%local%2fvar%2frun%2fldapi'
|
||||
(Unix socket at /usr/local/var/run/ldap) */
|
||||
// $ldapservers->SetValue($i,'server','host','127.0.0.1');
|
||||
|
||||
/* The port your LDAP server listens on (no quotes). 389 is standard. */
|
||||
// $ldapservers->SetValue($i,'server','port','389');
|
||||
|
||||
/* Array of base DNs of your LDAP server. Leave this blank to have phpLDAPadmin
|
||||
auto-detect it for you. */
|
||||
// $ldapservers->SetValue($i,'server','base',array(''));
|
||||
|
||||
/* Four options for auth_type:
|
||||
1. 'cookie': you will login via a web form, and a client-side cookie will
|
||||
store your login dn and password.
|
||||
2. 'session': same as cookie but your login dn and password are stored on the
|
||||
web server in a persistent session variable.
|
||||
3. 'http': same as session but your login dn and password are retrieved via
|
||||
HTTP authentication.
|
||||
4. 'config': specify your login dn and password here in this config file. No
|
||||
login will be required to use phpLDAPadmin for this server.
|
||||
|
||||
Choose wisely to protect your authentication information appropriately for
|
||||
your situation. If you choose 'cookie', your cookie contents will be
|
||||
encrypted using blowfish and the secret your specify above as
|
||||
session['blowfish']. */
|
||||
// $ldapservers->SetValue($i,'server','auth_type','cookie');
|
||||
|
||||
/* The DN of the user for phpLDAPadmin to bind with. For anonymous binds or
|
||||
'cookie' or 'session' auth_types, LEAVE THE LOGIN_DN AND LOGIN_PASS BLANK. If
|
||||
you specify a login_attr in conjunction with a cookie or session auth_type,
|
||||
then you can also specify the login_dn/login_pass here for searching the
|
||||
directory for users (ie, if your LDAP server does not allow anonymous binds. */
|
||||
// $ldapservers->SetValue($i,'login','dn','');
|
||||
# $ldapservers->SetValue($i,'login','dn','cn=Manager,dc=example,dc=com');
|
||||
|
||||
/* Your LDAP password. If you specified an empty login_dn above, this MUST also
|
||||
be blank. */
|
||||
// $ldapservers->SetValue($i,'login','pass','');
|
||||
# $ldapservers->SetValue($i,'login','pass','secret');
|
||||
|
||||
/* Use TLS (Transport Layer Security) to connect to the LDAP server. */
|
||||
// $ldapservers->SetValue($i,'server','tls',false);
|
||||
|
||||
/************************************
|
||||
* SASL Authentication *
|
||||
************************************/
|
||||
|
||||
/* Enable SASL authentication LDAP SASL authentication requires PHP 5.x
|
||||
configured with --with-ldap-sasl=DIR. If this option is disabled (ie, set to
|
||||
false), then all other sasl options are ignored. */
|
||||
// $ldapservers->SetValue($i,'server','sasl_auth',false);
|
||||
|
||||
/* SASL auth mechanism */
|
||||
// $ldapservers->SetValue($i,'server','sasl_mech','PLAIN');
|
||||
|
||||
/* SASL authentication realm name */
|
||||
// $ldapservers->SetValue($i,'server','sasl_realm','');
|
||||
# $ldapservers->SetValue($i,'server','sasl_realm',"example.com");
|
||||
|
||||
/* SASL authorization ID name
|
||||
If this option is undefined, authorization id will be computed from bind DN,
|
||||
using sasl_authz_id_regex and sasl_authz_id_replacement. */
|
||||
// $ldapservers->SetValue($i,'server','sasl_authz_id', null);
|
||||
|
||||
/* SASL authorization id regex and replacement
|
||||
When sasl_authz_id property is not set (default), phpLDAPAdmin will try to
|
||||
figure out authorization id by itself from bind distinguished name (DN).
|
||||
|
||||
This procedure is done by calling preg_replace() php function in the
|
||||
following way:
|
||||
|
||||
$authz_id = preg_replace($sasl_authz_id_regex,$sasl_authz_id_replacement,
|
||||
$bind_dn);
|
||||
|
||||
For info about pcre regexes, see:
|
||||
- pcre(3), perlre(3)
|
||||
- http://www.php.net/preg_replace */
|
||||
// $ldapservers->SetValue($i,'server','sasl_authz_id_regex',null);
|
||||
// $ldapservers->SetValue($i,'server','sasl_authz_id_replacement',null);
|
||||
# $ldapservers->SetValue($i,'server','sasl_authz_id_regex','/^uid=([^,]+)(.+)/i');
|
||||
# $ldapservers->SetValue($i,'server','sasl_authz_id_replacement','$1');
|
||||
|
||||
/* SASL auth security props.
|
||||
See http://beepcore-tcl.sourceforge.net/tclsasl.html#anchor5 for explanation.
|
||||
*/
|
||||
// $ldapservers->SetValue($i,'server','sasl_props',null);
|
||||
|
||||
/* If the link between your web server and this LDAP server is slow, it is
|
||||
recommended that you set 'low_bandwidth' to true. This will enable
|
||||
phpLDAPadmin to forego some "fancy" features to conserve bandwidth. */
|
||||
// $ldapservers->SetValue($i,'server','low_bandwidth',false);
|
||||
|
||||
/* Default password hashing algorithm. One of md5, ssha, sha, md5crpyt, smd5,
|
||||
blowfish, crypt or leave blank for now default algorithm. */
|
||||
// $ldapservers->SetValue($i,'appearance','password_hash','md5');
|
||||
|
||||
/* If you specified 'cookie' or 'session' as the auth_type above, you can
|
||||
optionally specify here an attribute to use when logging in. If you enter
|
||||
'uid' and login as 'dsmith', phpLDAPadmin will search for (uid=dsmith)
|
||||
and log in as that user.
|
||||
Leave blank or specify 'dn' to use full DN for logging in. Note also that if
|
||||
your LDAP server requires you to login to perform searches, you can enter the
|
||||
DN to use when searching in 'login_dn' and 'login_pass' above. You may also
|
||||
specify 'string', in which case you can provide a string to use for logging
|
||||
users in. See 'login_string' directly below. */
|
||||
// $ldapservers->SetValue($i,'login','attr','dn');
|
||||
|
||||
/* If you specified something different from 'dn', for example 'uid', as the
|
||||
login_attr above, you can optionally specify here to fall back to
|
||||
authentication with dn.
|
||||
This is useful, when users should be able to log in with their uid, but
|
||||
the ldap administrator wants to log in with his root-dn, that does not
|
||||
necessarily have the uid attribute. */
|
||||
// $ldapservers->SetValue($i,'login','fallback_dn',false);
|
||||
|
||||
/* If you specified 'cookie' or 'session' as the auth_type above, and you
|
||||
specified 'string' for 'login_attr' above, you must provide a string here for
|
||||
logging users in. If, for example, I have a lot of user entries with DNs like
|
||||
"uid=dsmith,ou=People,dc=example,dc=com", then I can specify a string
|
||||
"uid=<username>,ou=People,dc=example,dc=com" and my users can login with
|
||||
their user names alone, ie: "dsmith" in this case. */
|
||||
# $ldapservers->SetValue($i,'login','string','uid=<username>,ou=People,dc=example,dc=com');
|
||||
|
||||
/* If 'login_attr' is used above such that phpLDAPadmin will search for your DN
|
||||
at login, you may restrict the search to a specific objectClass. EG, set this
|
||||
to 'posixAccount' or 'inetOrgPerson', depending upon your setup. */
|
||||
// $ldapservers->SetValue($i,'login','class',null);
|
||||
|
||||
/* Specify true If you want phpLDAPadmin to not display or permit any
|
||||
modification to the LDAP server. */
|
||||
// $ldapservers->SetValue($i,'server','read_only',false);
|
||||
|
||||
/* Specify false if you do not want phpLDAPadmin to draw the 'Create new' links
|
||||
in the tree viewer. */
|
||||
// $ldapservers->SetValue($i,'appearance','show_create',true);
|
||||
|
||||
/* This feature allows phpLDAPadmin to automatically determine the next
|
||||
available uidNumber for a new entry. */
|
||||
// $ldapservers->SetValue($i,'auto_number','enable',true);
|
||||
|
||||
/* The mechanism to use when finding the next available uidNumber. Two possible
|
||||
values: 'uidpool' or 'search'.
|
||||
The 'uidpool' mechanism uses an existing uidPool entry in your LDAP server to
|
||||
blindly lookup the next available uidNumber. The 'search' mechanism searches
|
||||
for entries with a uidNumber value and finds the first available uidNumber
|
||||
(slower). */
|
||||
// $ldapservers->SetValue($i,'auto_number','mechanism','search');
|
||||
|
||||
/* The DN of the search base when the 'search' mechanism is used above. */
|
||||
# $ldapservers->SetValue($i,'auto_number','search_base','ou=People,dc=example,dc=com');
|
||||
|
||||
/* The minimum number to use when searching for the next available UID number
|
||||
(only when 'search' is used for auto_uid_number_mechanism' */
|
||||
// $ldapservers->SetValue($i,'auto_number','min','1000');
|
||||
|
||||
/* The DN of the uidPool entry when 'uidpool' mechanism is used above. */
|
||||
# $servers[$i]['auto_uid_number_uid_pool_dn'] = 'cn=uidPool,dc=example,dc=com';
|
||||
|
||||
/* If you set this, then phpldapadmin will bind to LDAP with this user ID when
|
||||
searching for the uidnumber. The idea is, this user id would have full
|
||||
(readonly) access to uidnumber in your ldap directory (the logged in user
|
||||
may not), so that you can be guaranteed to get a unique uidnumber for your
|
||||
directory. */
|
||||
// $ldapservers->SetValue($i,'auto_number','dn',null);
|
||||
|
||||
/* The password for the dn above. */
|
||||
// $ldapservers->SetValue($i,'auto_number','pass',null);
|
||||
|
||||
/* Enable anonymous bind login. */
|
||||
// $ldapservers->SetValue($i,'login','anon_bind',true);
|
||||
|
||||
/* Use customized page with prefix when available. */
|
||||
# $ldapservers->SetValue($i,'custom','pages_prefix','custom_');
|
||||
|
||||
/* If you set this, then phpldapadmin will bind to LDAP with this user when
|
||||
testing for unique attributes (as set in unique_attrs array). If you want to
|
||||
enforce unique attributes, than this id should have full (readonly) access
|
||||
to the attributes in question (the logged in user may not have enough access)
|
||||
*/
|
||||
// $ldapservers->SetValue($i,'unique_attrs','dn',null);
|
||||
|
||||
/* The password for the dn above */
|
||||
// $ldapservers->SetValue($i,'unique_attrs','pass',null);
|
||||
|
||||
/* If you set this, then only these DNs are allowed to log in. This array can
|
||||
contain individual users, groups or ldap search filter(s). Keep in mind that
|
||||
the user has not authenticated yet, so this will be an anonymous search to
|
||||
the LDAP server, so make your ACLs allow these searches to return results! */
|
||||
# $ldapservers->SetValue($i,'login','allowed_dns',array(
|
||||
# 'uid=stran,ou=People,dc=example,dc=com',
|
||||
# '(&(gidNumber=811)(objectClass=groupOfNames))',
|
||||
# '(|(uidNumber=200)(uidNumber=201))',
|
||||
# 'cn=callcenter,ou=Group,dc=example,dc=com'));
|
||||
|
||||
/* Set this if you dont want this LDAP server to show in the tree */
|
||||
// $ldapservers->SetValue($i,'appearance','visible',true);
|
||||
|
||||
/* This is the time out value in minutes for the server. After as many minutes
|
||||
of inactivity you will be automatically logged out. If not set, the default
|
||||
value will be ( session_cache_expire()-1 ) */
|
||||
# $ldapservers->SetValue($i,'login','timeout',30);
|
||||
|
||||
/* Set this if you want phpldapadmin to perform rename operation on entry which
|
||||
has children. Certain servers are known to allow it, certain are not */
|
||||
// $ldapservers->SetValue($i,'server','branch_rename',false);
|
||||
|
||||
/**************************************************************************
|
||||
* If you want to configure additional LDAP servers, do so below. *
|
||||
* Remove the commented lines and use this section as a template for all *
|
||||
* your other LDAP servers. *
|
||||
**************************************************************************/
|
||||
|
||||
/*
|
||||
$i++;
|
||||
$ldapservers->SetValue($i,'server','name','LDAP Server');
|
||||
$ldapservers->SetValue($i,'server','host','127.0.0.1');
|
||||
$ldapservers->SetValue($i,'server','port','389');
|
||||
$ldapservers->SetValue($i,'server','base',array(''));
|
||||
$ldapservers->SetValue($i,'server','auth_type','cookie');
|
||||
$ldapservers->SetValue($i,'login','dn','');
|
||||
$ldapservers->SetValue($i,'login','pass','');
|
||||
$ldapservers->SetValue($i,'server','tls',false);
|
||||
$ldapservers->SetValue($i,'server','low_bandwidth',false);
|
||||
$ldapservers->SetValue($i,'appearance','password_hash','md5');
|
||||
$ldapservers->SetValue($i,'login','attr','dn');
|
||||
$ldapservers->SetValue($i,'login','string',null);
|
||||
$ldapservers->SetValue($i,'login','class',null);
|
||||
$ldapservers->SetValue($i,'server','read_only',false);
|
||||
$ldapservers->SetValue($i,'appearance','show_create',true);
|
||||
$ldapservers->SetValue($i,'auto_number','enable',true);
|
||||
$ldapservers->SetValue($i,'auto_number','mechanism','search');
|
||||
$ldapservers->SetValue($i,'auto_number','search_base',null);
|
||||
$ldapservers->SetValue($i,'auto_number','min','1000');
|
||||
$ldapservers->SetValue($i,'auto_number','dn',null);
|
||||
$ldapservers->SetValue($i,'auto_number','pass',null);
|
||||
$ldapservers->SetValue($i,'login','anon_bind',true);
|
||||
$ldapservers->SetValue($i,'custom','pages_prefix','custom_');
|
||||
$ldapservers->SetValue($i,'unique_attrs','dn',null);
|
||||
$ldapservers->SetValue($i,'unique_attrs','pass',null);
|
||||
|
||||
# SASL auth
|
||||
$ldapservers->SetValue($i,'server','sasl_auth',true);
|
||||
$ldapservers->SetValue($i,'server','sasl_mech','PLAIN');
|
||||
$ldapservers->SetValue($i,'server','sasl_realm','EXAMPLE.COM');
|
||||
$ldapservers->SetValue($i,'server','sasl_authz_id',null);
|
||||
$ldapservers->SetValue($i,'server','sasl_authz_id_regex','/^uid=([^,]+)(.+)/i');
|
||||
$ldapservers->SetValue($i,'server','sasl_authz_id_replacement','$1');
|
||||
$ldapservers->SetValue($i,'server','sasl_props',null);
|
||||
*/
|
||||
|
||||
/*********************************************/
|
||||
/* User-friendly attribute translation */
|
||||
/*********************************************/
|
||||
|
||||
/* Use this array to map attribute names to user friendly names. For example, if
|
||||
you don't want to see "facsimileTelephoneNumber" but rather "Fax". */
|
||||
$friendly_attrs = array();
|
||||
|
||||
$friendly_attrs['facsimileTelephoneNumber'] = 'Fax';
|
||||
$friendly_attrs['telephoneNumber'] = 'Phone';
|
||||
|
||||
/*********************************************/
|
||||
/* Support for attrs display order */
|
||||
/*********************************************/
|
||||
|
||||
/* Use this array if you want to have your attributes displayed in a specific
|
||||
order. You can use default attribute names or their fridenly names.
|
||||
For example, "sn" will be displayed right after "givenName". All the other
|
||||
attributes that are not specified in this array will be displayed after in
|
||||
alphabetical order. */
|
||||
# $attrs_display_order = array(
|
||||
# 'givenName',
|
||||
# 'sn',
|
||||
# 'cn',
|
||||
# 'displayName',
|
||||
# 'uid',
|
||||
# 'uidNumber',
|
||||
# 'gidNumber',
|
||||
# 'homeDirectory',
|
||||
# 'mail',
|
||||
# 'userPassword'
|
||||
# );
|
||||
|
||||
/*********************************************/
|
||||
/* Hidden attributes */
|
||||
/*********************************************/
|
||||
|
||||
/* You may want to hide certain attributes from being displayed in the editor
|
||||
screen. Do this by adding the desired attributes to this list (and uncomment
|
||||
it). This only affects the editor screen. Attributes will still be visible in
|
||||
the schema browser and elsewhere. An example is provided below:
|
||||
NOTE: The user must be able to read the hidden_except_dn entry to be
|
||||
excluded. */
|
||||
# $hidden_attrs = array( 'jpegPhoto', 'objectClass' );
|
||||
# $hidden_except_dn = "cn=PLA UnHide,ou=Groups,c=AU";
|
||||
|
||||
/* Hidden attributes in read-only mode. If undefined, it will be equal to
|
||||
$hidden_attrs. */
|
||||
# $hidden_attrs_ro = array(
|
||||
# 'objectClass','shadowWarning', 'shadowLastChange', 'shadowMax',
|
||||
# 'shadowFlag', 'shadowInactive', 'shadowMin', 'shadowExpire');
|
||||
|
||||
/** **/
|
||||
/** Read-only attributes **/
|
||||
/** **/
|
||||
|
||||
/* You may want to phpLDAPadmin to display certain attributes as read only,
|
||||
meaning that users will not be presented a form for modifying those
|
||||
attributes, and they will not be allowed to be modified on the "back-end"
|
||||
either. You may configure this list here:
|
||||
NOTE: The user must be able to read the read_only_except_dn entry to be
|
||||
excluded. */
|
||||
# $read_only_attrs = array( 'objectClass' );
|
||||
# $read_only_except_dn = "cn=PLA ReadWrite,ou=Groups,c=AU";
|
||||
|
||||
/* An example of how to specify multiple read-only attributes: */
|
||||
# $read_only_attrs = array( 'jpegPhoto', 'objectClass', 'someAttribute' );
|
||||
|
||||
/*********************************************/
|
||||
/* Unique attributes */
|
||||
/*********************************************/
|
||||
|
||||
/* You may want phpLDAPadmin to enforce some attributes to have unique values
|
||||
(ie: not belong to other entries in your tree. This (together with
|
||||
unique_attrs['dn'] and unique_attrs['pass'] option will not let updates to
|
||||
occur with other attributes have the same value.
|
||||
NOTE: Currently the unique_attrs is NOT enforced when copying a dn. (Need to
|
||||
present a user with the option of changing the unique attributes. */
|
||||
# $unique_attrs = array('uid','uidNumber','mail');
|
||||
|
||||
/*********************************************/
|
||||
/* Group attributes */
|
||||
/*********************************************/
|
||||
|
||||
/* Add "modify group members" link to the attribute. */
|
||||
// $config->custom->modify_member['groupattr'] = array('member','uniqueMember','memberUid')
|
||||
|
||||
/* Configure filter for member search. This only applies to "modify group members" feature */
|
||||
// $config->custom->modify_member['filter'] = '(objectclass=Person)';
|
||||
|
||||
/* Attribute that is added to the group member attribute. */
|
||||
// $config->custom->modify_member['attr'] = 'dn';
|
||||
|
||||
/*********************************************/
|
||||
/* Predefined Queries (canned views) */
|
||||
/*********************************************/
|
||||
|
||||
/* To make searching easier, you may setup predefined queries below: */
|
||||
$q=0;
|
||||
$queries = array();
|
||||
|
||||
/* The name that will appear in the simple search form */
|
||||
$queries[$q]['name'] = 'User List';
|
||||
|
||||
/* The base to search on */
|
||||
$queries[$q]['base'] = 'dc=example,dc=com';
|
||||
|
||||
/* The search scope (sub, base, one) */
|
||||
$queries[$q]['scope'] = 'sub';
|
||||
|
||||
/* The LDAP filter to use */
|
||||
$queries[$q]['filter'] = '(&(objectClass=posixAccount)(uid=*))';
|
||||
|
||||
/* The attributes to return */
|
||||
$queries[$q]['attributes'] = 'cn, uid, homeDirectory, telephonenumber, jpegphoto';
|
||||
|
||||
/* If you want to configure more pre-defined queries, copy and paste the above (including the "$q++;") */
|
||||
$q++;
|
||||
$queries[$q]['name'] = 'Samba Users';
|
||||
$queries[$q]['base'] = 'dc=example,dc=com';
|
||||
$queries[$q]['scope'] = 'sub';
|
||||
$queries[$q]['filter'] = '(&(|(objectClass=sambaAccount)(objectClass=sambaSamAccount))(objectClass=posixAccount)(!(uid=*$)))';
|
||||
$queries[$q]['attributes'] = 'uid, smbHome, uidNumber';
|
||||
|
||||
$q++;
|
||||
$queries[$q]['name'] = 'Samba Computers';
|
||||
$queries[$q]['base'] = 'dc=example,dc=com';
|
||||
$queries[$q]['scope'] = 'sub';
|
||||
$queries[$q]['filter'] = '(&(objectClass=sambaAccount)(uid=*$))';
|
||||
$queries[$q]['attributes'] = 'uid, homeDirectory';
|
||||
?>
|
167
copy.php
@@ -1,167 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* copy.php
|
||||
* Copies a given object to create a new one.
|
||||
*
|
||||
* Vars that come in as POST vars
|
||||
* - source_dn (rawurlencoded)
|
||||
* - new_dn (form element)
|
||||
* - server_id
|
||||
*/
|
||||
|
||||
require 'config.php';
|
||||
require_once 'functions.php';
|
||||
|
||||
session_start();
|
||||
|
||||
$source_dn = stripslashes( rawurldecode( $_POST['old_dn'] ) );
|
||||
$dest_dn = stripslashes( $_POST['new_dn'] );
|
||||
$encoded_dn = rawurlencode( $old_dn );
|
||||
$source_server_id = $_POST['server_id'];
|
||||
$dest_server_id = $_POST['dest_server_id'];
|
||||
$do_recursive = $_POST['recursive'] == 'on' ? true : false;
|
||||
|
||||
check_server_id( $source_server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $source_server_id ) );
|
||||
have_auth_info( $source_server_id ) or pla_error( "Not enough information to login to server. Please check your configuration." );
|
||||
check_server_id( $dest_server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $dest_server_id ) );
|
||||
have_auth_info( $dest_server_id ) or pla_error( "Not enough information to login to server. Please check your configuration." );
|
||||
|
||||
include 'header.php';
|
||||
|
||||
/* Error checking */
|
||||
if( 0 == strlen( trim( $dest_dn ) ) )
|
||||
pla_error( "You left the destination DN blank." );
|
||||
|
||||
if( strcasecmp( $source_dn,$dest_dn ) == 0 && $source_server_id == $dest_server_id )
|
||||
pla_error( "The source and destination DN are the same." );
|
||||
|
||||
if( $do_recursive ) {
|
||||
// build a tree similar to that of the tree browser to give to r_copy_dn
|
||||
$snapshot_tree = array();
|
||||
include 'header.php';
|
||||
echo "<body>\n";
|
||||
echo "<h3 class=\"title\">Copying " . htmlspecialchars( $source_dn ) . "</h3>\n";
|
||||
echo "<h3 class=\"subtitle\">Recursive copy progress</h3>\n";
|
||||
echo "<br /><br />";
|
||||
echo "<small>\n";
|
||||
echo "Building snapshot of tree to copy... ";
|
||||
flush();
|
||||
build_tree( $source_server_id, $source_dn, $snapshot_tree );
|
||||
echo " <span style=\"color:green\">Success</span><br />\n";
|
||||
flush();
|
||||
|
||||
// prevent script from bailing early on a long delete
|
||||
@set_time_limit( 0 );
|
||||
|
||||
$copy_result = r_copy_dn( $source_server_id, $dest_server_id, $snapshot_tree, $source_dn, $dest_dn );
|
||||
echo "</small>\n";
|
||||
} else {
|
||||
$copy_result = copy_dn( $source_server_id, $source_dn, $dest_server_id, $dest_dn );
|
||||
}
|
||||
|
||||
if( $copy_result )
|
||||
{
|
||||
$edit_url="edit.php?server_id=$dest_server_id&dn=" . rawurlencode( $dest_dn );
|
||||
$new_rdn = get_rdn( $dest_dn );
|
||||
$container = get_container( $dest_dn );
|
||||
if( session_is_registered( 'tree' ) )
|
||||
{
|
||||
$tree = $_SESSION['tree'];
|
||||
$tree_icons = $_SESSION['tree_icons'];
|
||||
if( isset( $tree[$dest_server_id][$container] ) )
|
||||
{
|
||||
$tree[$dest_server_id][$container][] = $dest_dn;
|
||||
$tree_icons[$dest_server_id][$dest_dn] = get_icon( $dest_server_id, $dest_dn );
|
||||
$_SESSION['tree'] = $tree;
|
||||
$_SESSION['tree_icons'] = $tree_icons;
|
||||
session_write_close();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<!-- refresh the tree view (with the new DN renamed)
|
||||
and redirect to the edit_dn page -->
|
||||
<script language="javascript">
|
||||
parent.left_frame.location.reload();
|
||||
</script>
|
||||
<br />
|
||||
Copy successful! Would you like to <a href="<?php echo $edit_url; ?>">view the new entry</a>?
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
function r_copy_dn( $source_server_id, $dest_server_id, &$tree, $root_dn, $dest_dn )
|
||||
{
|
||||
echo "<nobr>Copying " . htmlspecialchars( utf8_decode( $root_dn ) ) . "...";
|
||||
flush();
|
||||
$copy_result = copy_dn( $source_server_id, $root_dn, $dest_server_id, $dest_dn );
|
||||
|
||||
if( ! $copy_result ) {
|
||||
global $R_COPY_ERROR;
|
||||
return false;
|
||||
}
|
||||
|
||||
echo "<span style=\"color:green\">Success</span></nobr><br />\n";
|
||||
flush();
|
||||
|
||||
$children = $tree[ $root_dn ];
|
||||
if( is_array( $children ) && count( $children ) > 0 )
|
||||
{
|
||||
foreach( $children as $child_dn ) {
|
||||
$child_rdn = get_rdn( $child_dn );
|
||||
$new_dest_dn = $child_rdn . ',' . $dest_dn;
|
||||
r_copy_dn( $source_server_id, $dest_server_id, $tree, $child_dn, $new_dest_dn );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function copy_dn( $source_server_id, $source_dn, $dest_server_id, $dest_dn )
|
||||
{
|
||||
global $ds;
|
||||
$ds = pla_ldap_connect( $dest_server_id ) or pla_error( "Could not connect to LDAP server" );
|
||||
$attrs = get_object_attrs( $source_server_id, $source_dn );
|
||||
$new_entry = $attrs;
|
||||
// modify the prefix-value (ie "bob" in cn=bob) to match the destination DN's value.
|
||||
$rdn_attr = substr( $dest_dn, 0, strpos( $dest_dn, '=' ) );
|
||||
$rdn_value = get_rdn( $dest_dn );
|
||||
$rdn_value = substr( $rdn_value, strpos( $rdn_value, '=' ) + 1 );
|
||||
$new_entry[ $rdn_attr ] = $rdn_value;
|
||||
// don't need a dn attribute in the new entry
|
||||
unset( $new_entry['dn'] );
|
||||
$add_result = @ldap_add( $ds, $dest_dn, $new_entry );
|
||||
if( ! $add_result ) {
|
||||
echo "</small><br /><br />";
|
||||
pla_error( "Failed to copy $source_dn (server: $source_server_id) to " .
|
||||
"$dest_dn (server: $dest_server_id)", ldap_error( $ds ), ldap_errno( $ds ) );
|
||||
}
|
||||
|
||||
return $add_result;
|
||||
}
|
||||
|
||||
function build_tree( $source_server_id, $root_dn, &$tree )
|
||||
{
|
||||
$children = get_container_contents( $source_server_id, $root_dn );
|
||||
if( is_array( $children ) && count( $children ) > 0 )
|
||||
{
|
||||
$tree[ $root_dn ] = $children;
|
||||
foreach( $children as $child_dn )
|
||||
build_tree( $source_server_id, $child_dn, $tree );
|
||||
}
|
||||
|
||||
}
|
@@ -1,86 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* copy_form.php
|
||||
* Copies a given object to create a new one.
|
||||
*
|
||||
* - dn (rawurlencoded)
|
||||
* - server_id
|
||||
*/
|
||||
|
||||
require 'config.php';
|
||||
require_once 'functions.php';
|
||||
|
||||
$dn = stripslashes( rawurldecode( $_GET['dn'] ) );
|
||||
$encoded_dn = rawurlencode( $dn );
|
||||
$server_id = $_GET['server_id'];
|
||||
$rdn = ldap_explode_dn( $dn, 0 );
|
||||
$container = $rdn[ 1 ];
|
||||
for( $i=2; $i<count($rdn)-1; $i++ )
|
||||
$container .= ',' . $rdn[$i];
|
||||
$rdn = $rdn[0];
|
||||
|
||||
check_server_id( $server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $server_id ) );
|
||||
have_auth_info( $server_id ) or pla_error( "Not enough information to login to server. Please check your configuration." );
|
||||
|
||||
$attrs = get_object_attrs( $server_id, $dn );
|
||||
$server_name = $servers[$server_id]['name'];
|
||||
|
||||
$select_server_html = "";
|
||||
foreach( $servers as $id => $server )
|
||||
{
|
||||
if( $server['host'] )
|
||||
{
|
||||
$select_server_html .= "<option value=\"$id\"". ($id==$server_id?" selected":"") .">" . $server['name'] . "</option>\n";
|
||||
}
|
||||
}
|
||||
|
||||
$children = get_container_contents( $server_id, $dn );
|
||||
|
||||
?>
|
||||
|
||||
<?php include 'header.php'; ?>
|
||||
<body>
|
||||
|
||||
<h3 class="title">Copy <?php echo $rdn; ?></h3>
|
||||
<h3 class="subtitle">Server: <b><?php echo $server_name; ?></b> Distinguished Name: <b><?php echo $dn; ?></b></h3>
|
||||
|
||||
<center>
|
||||
Copy <b><?php echo htmlspecialchars($rdn); ?></b> to a new object:<br />
|
||||
<br />
|
||||
<form action="copy.php" method="post" name="copy_form">
|
||||
<input type="hidden" name="old_dn" value="<?php echo $encoded_dn; ?>" />
|
||||
<input type="hidden" name="server_id" value="<?php echo $server_id; ?>" />
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>Destination DN:</td>
|
||||
<td>
|
||||
<input type="text" name="new_dn" size="45" value="<?php echo htmlspecialchars($dn); ?>" />
|
||||
<?php draw_chooser_link( 'copy_form.new_dn' ); ?></td>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Destination Server:</td>
|
||||
<td><select name="dest_server_id"><?php echo $select_server_html; ?></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><small>Note: Copying between different servers only works if there are no schema violations</small></td>
|
||||
</tr>
|
||||
<?php if( is_array( $children ) && count( $children ) > 0 ) { ?>
|
||||
<tr>
|
||||
<td colspan="2"><input type="checkbox" name="recursive" />
|
||||
Recursively copy all children of this object as well.</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" align="right"><input type="submit" value="Copy" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
114
create.php
@@ -1,114 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* create.php
|
||||
* Creates a new object.
|
||||
*
|
||||
* Variables that come in as POST vars:
|
||||
* - new_dn
|
||||
* - attrs (an array of attributes)
|
||||
* - vals (an array of values for the above attrs)
|
||||
* - required_attrs (an array with indices being the attributes,
|
||||
* and the values being their respective values)
|
||||
* - object_classes (rawurlencoded, and serialized array of objectClasses)
|
||||
* - server_id
|
||||
*/
|
||||
|
||||
require 'config.php';
|
||||
require_once 'functions.php';
|
||||
|
||||
$new_dn = stripslashes( $_POST['new_dn'] );
|
||||
$new_dn = utf8_encode( $new_dn );
|
||||
$encoded_dn = rawurlencode( $new_dn );
|
||||
$server_id = $_POST['server_id'];
|
||||
$vals = $_POST['vals'];
|
||||
$attrs = $_POST['attrs'];
|
||||
$required_attrs = $_POST['required_attrs'];
|
||||
$object_classes = unserialize( rawurldecode( $_POST['object_classes'] ) );
|
||||
$container = get_container( $new_dn );
|
||||
|
||||
check_server_id( $server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $server_id ) );
|
||||
have_auth_info( $server_id ) or pla_error( "Not enough information to login to server. Please check your configuration." );
|
||||
|
||||
// build the new entry
|
||||
$new_entry = array();
|
||||
if( isset( $required_attrs ) && is_array( $required_attrs ) )
|
||||
{
|
||||
foreach( $required_attrs as $attr => $val )
|
||||
{
|
||||
if( $val == '' )
|
||||
pla_error( "Error, you left the value for required attribute <b>" .
|
||||
htmlspecialchars( $attr ) . "</b> blank." );
|
||||
|
||||
$attr = stripslashes( $attr );
|
||||
$val = stripslashes( $val );
|
||||
$new_entry[ $attr ][] = utf8_encode( $val );
|
||||
}
|
||||
}
|
||||
|
||||
if( isset( $vals ) && is_array( $vals ) )
|
||||
{
|
||||
foreach( $vals as $i => $val )
|
||||
{
|
||||
$val = stripslashes( $val );
|
||||
$attr = $attrs[$i];
|
||||
$attr = stripslashes( $attr );
|
||||
if( trim($val) )
|
||||
$new_entry[ $attr ][] = utf8_encode( $val );
|
||||
}
|
||||
}
|
||||
|
||||
$new_entry['objectClass'] = $object_classes;
|
||||
if( ! in_array( 'top', $new_entry['objectClass'] ) )
|
||||
$new_entry['objectClass'][] = 'top';
|
||||
|
||||
$ds = pla_ldap_connect( $server_id );
|
||||
$add_result = @ldap_add( $ds, $new_dn, $new_entry );
|
||||
if( $add_result )
|
||||
{
|
||||
$edit_url="edit.php?server_id=$server_id&dn=" . rawurlencode( $new_dn );
|
||||
|
||||
// update the session tree to reflect the change
|
||||
session_start();
|
||||
if( session_is_registered( 'tree' ) )
|
||||
{
|
||||
$tree = $_SESSION['tree'];
|
||||
$tree_icons = $_SESSION['tree_icons'];
|
||||
|
||||
if( isset( $tree[$server_id][$container] ) ) {
|
||||
$tree[$server_id][$container][] = $new_dn;
|
||||
$tree_icons[$server_id][$new_dn] = get_icon( $server_id, $new_dn );
|
||||
}
|
||||
|
||||
$_SESSION['tree'] = $tree;
|
||||
$_SESSION['tree_icons'] = $tree_icons;
|
||||
session_write_close();
|
||||
}
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<?php if( isset( $tree[$server_id][$container] ) ) { ?>
|
||||
|
||||
<!-- refresh the tree view (with the new DN renamed)
|
||||
and redirect to the edit_dn page -->
|
||||
<script language="javascript">
|
||||
parent.left_frame.location.reload();
|
||||
</script>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<meta http-equiv="refresh" content="0; url=<?php echo $edit_url; ?>" />
|
||||
</head>
|
||||
<body>
|
||||
Redirecting... <a href="<?php echo $edit_url; ?>">here</a>.
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
pla_error( "Could not add the object to the LDAP server.", ldap_error( $ds ), ldap_errno( $ds ) );
|
||||
}
|
||||
|
||||
?>
|
@@ -1,81 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* create_form.php
|
||||
* The menu where the user chooses an RDN, Container, and Template for creating a new entry.
|
||||
* After submitting this form, the user is taken to their chosen Template handler.
|
||||
*
|
||||
* Variables that come in as GET vars
|
||||
* - server_id (optional)
|
||||
* - container (rawurlencoded) (optional)
|
||||
*/
|
||||
|
||||
require 'config.php';
|
||||
require_once 'functions.php';
|
||||
|
||||
$server_id = $_REQUEST['server_id'];
|
||||
$step = $_REQUEST['step'] ? $_REQUEST['step'] : 1; // defaults to 1
|
||||
$container = stripslashes( $_REQUEST['container'] );
|
||||
|
||||
check_server_id( $server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $server_id ) );
|
||||
have_auth_info( $server_id ) or pla_error( "Not enough information to login to server. Please check your configuration." );
|
||||
$server_name = $servers[$server_id]['name'];
|
||||
|
||||
// build the server drop-down html
|
||||
$server_menu_html = '<select name="server_id">';
|
||||
$js_dn_list = '';
|
||||
foreach( $servers as $id => $server ) {
|
||||
if( $server['host'] ) {
|
||||
$server_menu_html .= '<option value="'.$id.'"' . ( $id==$server_id? ' selected' : '' ) . '>';
|
||||
$server_menu_html .= $server['name'] . '</option>';
|
||||
}
|
||||
}
|
||||
$server_menu_html .= '</select>';
|
||||
|
||||
?>
|
||||
|
||||
<?php include 'header.php'; ?>
|
||||
|
||||
<body>
|
||||
|
||||
<h3 class="title">Create Object</h3>
|
||||
<h3 class="subtitle">Choose a template</h3>
|
||||
<center><h3>Select a template for the creation process</h3></center>
|
||||
<form action="creation_template.php" method="post">
|
||||
<input type="hidden" name="container" value="<?php echo htmlspecialchars( $container ); ?>" />
|
||||
<table class="create">
|
||||
<tr>
|
||||
<td class="heading">Server:</td>
|
||||
<td><?php echo $server_menu_html; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="heading">Template:</td>
|
||||
<td>
|
||||
<table class="templates">
|
||||
|
||||
<?php foreach( $templates as $name => $template ) { ?>
|
||||
<tr>
|
||||
<td><input type="radio"
|
||||
name="template"
|
||||
value="<?php echo htmlspecialchars($name);?>"
|
||||
id="<?php echo htmlspecialchars($name); ?>" /></td>
|
||||
<td><label for="<?php echo htmlspecialchars($name);?>">
|
||||
<img src="<?php echo $template['icon']; ?>" /></label></td>
|
||||
<td><label for="<?php echo htmlspecialchars($name);?>">
|
||||
<?php echo htmlspecialchars( $template['desc'] ); ?></label></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"><center><input type="submit" name="submit" value="Proceed >>" /></center></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -1,45 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
/* file: creation_template.php
|
||||
* This file simply acts as a plugin grabber for the creator templates in
|
||||
* the directory templates/creation/
|
||||
*
|
||||
* Expected POST vars:
|
||||
* server_id
|
||||
* template
|
||||
*/
|
||||
|
||||
require 'config.php';
|
||||
require_once 'functions.php';
|
||||
|
||||
|
||||
$template = stripslashes( $_POST['template'] );
|
||||
$template = $templates[$template];
|
||||
$server_id = $_POST['server_id'];
|
||||
check_server_id( $server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $server_id ) );
|
||||
have_auth_info( $server_id ) or pla_error( "Not enough information to login to server. Please check your configuration." );
|
||||
$server_name = $servers[ $server_id ][ 'name' ];
|
||||
|
||||
include 'header.php';
|
||||
|
||||
?>
|
||||
|
||||
<body>
|
||||
<h3 class="title">Create Object</h3>
|
||||
<h3 class="subtitle">On server '<?php echo htmlspecialchars( $server_name ); ?>',
|
||||
using template '<?php echo htmlspecialchars( $template['desc'] ); ?>'</h3>
|
||||
|
||||
<?php
|
||||
|
||||
if( ! isset( $_POST['template'] ) )
|
||||
pla_error( "No template specified in POST variables.\n" );
|
||||
|
||||
$handler = 'templates/creation/' . $template['handler'];
|
||||
if( file_exists( $handler ) )
|
||||
include $handler;
|
||||
else
|
||||
pla_error( "Your config specifies a handler of <b>" . htmlspecialchars( $template['handler'] ) .
|
||||
"</b> for this template. But, this handler does not exist in the 'templates/creation' directory." );
|
||||
|
||||
|
65
delete.php
@@ -1,65 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* delete.php
|
||||
* Deletes a DN and presents a "job's done" message.
|
||||
*
|
||||
* Variables that come in as POST vars:
|
||||
* - dn (rawurlencoded)
|
||||
* - server_id
|
||||
*/
|
||||
|
||||
require 'config.php';
|
||||
require_once 'functions.php';
|
||||
|
||||
$encoded_dn = $_POST['dn'];
|
||||
$dn = stripslashes( rawurldecode( $encoded_dn ) );
|
||||
$server_id = $_POST['server_id'];
|
||||
|
||||
if( $dn === null )
|
||||
pla_error( "You must specify a DN." );
|
||||
|
||||
check_server_id( $server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $server_id ) );
|
||||
have_auth_info( $server_id ) or pla_error( "Not enough information to login to server. Please check your configuration." );
|
||||
|
||||
$ds = pla_ldap_connect( $server_id ) or pla_error( "Could not connect to LDAP server" );
|
||||
$del_result = @ldap_delete( $ds, $dn );
|
||||
|
||||
if( $del_result )
|
||||
{
|
||||
// kill the DN from the tree browser session variable and
|
||||
// refresh the tree viewer frame (left_frame)
|
||||
|
||||
session_start();
|
||||
if( session_is_registered( 'tree' ) )
|
||||
{
|
||||
$tree = $_SESSION['tree'];
|
||||
|
||||
// does it have children? (it shouldn't, but hey, you never know)
|
||||
if( isset( $tree[$server_id][$dn] ) )
|
||||
unset( $tree[$server_id][$dn] );
|
||||
|
||||
// search and destroy
|
||||
foreach( $tree[$server_id] as $tree_dn => $subtree )
|
||||
foreach( $subtree as $key => $sub_tree_dn )
|
||||
if( 0 == strcasecmp( $sub_tree_dn, $dn ) )
|
||||
unset( $tree[$server_id][$tree_dn][$key] );
|
||||
}
|
||||
|
||||
$_SESSION['tree'] = $tree;
|
||||
session_write_close();
|
||||
|
||||
?>
|
||||
|
||||
<script language="javascript">
|
||||
parent.left_frame.location.reload();
|
||||
</script>
|
||||
|
||||
Object deleted successfully.
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
} else {
|
||||
pla_error( "Could not delete the object: " . htmlspecialchars( utf8_decode( $dn ) ), ldap_error( $ds ), ldap_errno( $ds ) );
|
||||
}
|
157
delete_form.php
@@ -1,157 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* delete_form.php
|
||||
* Displays a last chance confirmation form to delete a dn.
|
||||
*
|
||||
* Variables that come in as GET vars:
|
||||
* - dn (rawurlencoded)
|
||||
* - server_id
|
||||
*/
|
||||
|
||||
require 'config.php';
|
||||
require_once 'functions.php';
|
||||
|
||||
$dn = stripslashes( $_GET['dn'] );
|
||||
$encoded_dn = rawurlencode( $dn );
|
||||
$server_id = $_GET['server_id'];
|
||||
$rdn = ldap_explode_dn( $dn, 0 );
|
||||
$rdn = $rdn[0];
|
||||
$server_name = $servers[$server_id]['name'];
|
||||
|
||||
check_server_id( $server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $server_id ) );
|
||||
have_auth_info( $server_id ) or pla_error( "Not enough information to login to server. Please check your configuration." );
|
||||
|
||||
$children = get_container_contents( $server_id, $dn );
|
||||
$has_children = count($children)>0 ? true : false;
|
||||
|
||||
?>
|
||||
|
||||
<?php include 'header.php'; ?>
|
||||
<body>
|
||||
|
||||
<h3 class="title">Delete <b><?php echo htmlspecialchars( utf8_decode( $rdn ) ); ?></b></h3>
|
||||
<h3 class="subtitle">Server: <b><?php echo $server_name; ?></b> Distinguished Name: <b><?php echo htmlspecialchars( utf8_decode( $dn ) ); ?></b></h3>
|
||||
|
||||
<?php if( 0 == strcasecmp( $dn, $servers[$server_id]['base'] ) ) { ?>
|
||||
|
||||
<center><b>You cannot delete the base <acronym title="Distinguished Name">DN</acronym> entry of the LDAP server.</b></center>
|
||||
</body>
|
||||
</html>
|
||||
<?php exit; ?>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php if( $has_children ) { ?>
|
||||
|
||||
<center><b>Permanently delete all children also?</b><br /><br />
|
||||
|
||||
<?php
|
||||
flush(); // so the user can get something on their screen while we figure out how many children this object has
|
||||
if( $has_children ) {
|
||||
// get the total number of child objects (whole sub-tree)
|
||||
$s = pla_ldap_search( $server_id, 'objectClass=*', $dn, array('dn'), 'sub' );
|
||||
$sub_tree_count = count( $s );
|
||||
}
|
||||
?>
|
||||
|
||||
<table class="delete_confirm">
|
||||
<td>
|
||||
|
||||
<p>This object is the root of a sub-tree containing <a href="search.php?search=true&server_id=<?php echo $server_id; ?>&filter=<?php echo rawurlencode('objectClass=*'); ?>&base_dn=<?php echo $encoded_dn; ?>&form=advanced&scope=sub"><?php echo ($sub_tree_count); ?> objects</a>
|
||||
|
||||
phpLDAPAdmin can recursively delete this object and all <?php echo ($sub_tree_count-1); ?> of its children. See below for a list of DNs
|
||||
that this will delete. Do you want to do this?<br />
|
||||
<br />
|
||||
<small>Note: This is potentially very dangerous and you do this at your own risk. This operation cannot be undone.
|
||||
Take into consideration aliases and other such things that may cause problems.</small>
|
||||
<br />
|
||||
<br />
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<center>
|
||||
<form action="rdelete.php" method="post">
|
||||
<input type="hidden" name="dn" value="<?php echo $encoded_dn; ?>" />
|
||||
<input type="hidden" name="server_id" value="<?php echo $server_id; ?>" />
|
||||
<input type="submit" class="scary" value="Delete all <?php echo ($sub_tree_count); ?> objects" />
|
||||
</form>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<center>
|
||||
<form action="edit.php" method="get">
|
||||
<input type="hidden" name="dn" value="<?php echo $encoded_dn; ?>" />
|
||||
<input type="hidden" name="server_id" value="<?php echo $server_id; ?>" />
|
||||
<input type="submit" name="submit" value="Cancel" class="cancel" />
|
||||
</form>
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</table>
|
||||
<?php flush(); ?>
|
||||
<br />
|
||||
<br />
|
||||
A list of all the <?php echo ($sub_tree_count); ?> <acronym title="Distinguished Name">DN</acronym>s that this action will delete:<br />
|
||||
<select size="<?php echo min( 10, $sub_tree_count );?>" multiple disabled style="background:white; color:black;width:500px" >
|
||||
<?php $i=0; ?>
|
||||
<?php foreach( $s as $dn => $junk ) { ?>
|
||||
<?php $i++; ?>
|
||||
<option><?php echo $i; ?>. <?php echo htmlspecialchars( utf8_decode( $dn ) ); ?></option>
|
||||
<?php } ?>
|
||||
|
||||
</select>
|
||||
|
||||
<br />
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<center>
|
||||
|
||||
<table class="delete_confirm">
|
||||
<td>
|
||||
|
||||
Are you sure you want to permanently delete this object?<br />
|
||||
<br />
|
||||
<nobr><acronym title="Distinguished Name">DN</acronym>: <b><?php echo htmlspecialchars(utf8_decode($dn)); ?></b><nobr><br />
|
||||
<nobr>Server: <b><?php echo htmlspecialchars($server_name); ?></b></nobr><br />
|
||||
<br />
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<center>
|
||||
<form action="delete.php" method="post">
|
||||
<input type="hidden" name="dn" value="<?php echo $encoded_dn; ?>" />
|
||||
<input type="hidden" name="server_id" value="<?php echo $server_id; ?>" />
|
||||
<input type="submit" name="submit" value="Delete It" class="scary" />
|
||||
</center>
|
||||
</form>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<center>
|
||||
<form action="edit.php" method="get">
|
||||
<input type="hidden" name="dn" value="<?php echo $encoded_dn; ?>" />
|
||||
<input type="hidden" name="server_id" value="<?php echo $server_id; ?>" />
|
||||
<input type="submit" name="submit" value="Cancel" class="cancel" />
|
||||
</form>
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</table>
|
||||
|
||||
</center>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
2
doc/README-translation.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
Please see http://wiki.phpldapadmin.info/Translating now for information on
|
||||
translating PLA.
|
4567
doc/certs/ca-bundle.crt
Normal file
17
doc/certs/slapd.crt
Normal file
@@ -0,0 +1,17 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICtTCCAh6gAwIBAgIBADANBgkqhkiG9w0BAQQFADBMMQswCQYDVQQGEwJHQjES
|
||||
MBAGA1UECBMJQmVya3NoaXJlMRAwDgYDVQQHEwdOZX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VI7Vw2G
|
||||
bqWnVZ1fJa0wV2pcy/e10HzZX+RpIwKOZUQvbH1jHJyZ/0bt7on8jmI5o+p+rLVs
|
||||
pci5yVNcgu1tQttpyKnTrDSDkLVbQ6VX8FKLnKnZ7+dk8SNibt0KbzKnOQIDAQAB
|
||||
AoGAdfKYpag3WOiFhpwFyJe1aV5tt79CBI+36lZicHDQw4fXqLkYoYSnCYFXQSHT
|
||||
ithfNJ4JLeiG0InXaD9KELLwLU2C7rr7mgOBczzmVBGCYUDNuV3bMcNDOQk/drum
|
||||
GLGqHhxU6W0dlCUnoBZoEHK6dvtDZnxCa+cUBozvFbuLOTUCQQDZJf+Mz7vc78nn
|
||||
Cc7nnHFfO+79NQi9h0ydW6kb2LLSGB/f3oqwary8eqCs7RVinG21PMWbjrh0lGOJ
|
||||
DjYP6dLDAkEAyqrs8pgxcxSTcJiaU4/sxGCeaS4fvoeCbYvKLlS5k5Km6DmA3nY+
|
||||
KwxQyLHg64g1ImDSuLy3P/E2lZGCPhZGUwJAMVUxpqL3Mi2D+CpBSFtBYnpyRDJN
|
||||
Rwm6/TD6zWnAznxOmYSsi4HkWQmfAUpnhly1i+w/lKSrAUlJB7Uj0R+1EwJAOADv
|
||||
pUIFOCXRcGXbD4hQBxwj6jDCuOW9VwQwBImJFoyJ7tYlFFRcbYzjrfHpk2x6MlvL
|
||||
Hx2XDeZcDQy+juWc3QJAHOpmlHuWqS07i5UIXVl5ohhoWkFd9Qs7/TowyFQF3zpO
|
||||
BqnwfHZRpySjSUlNE0QpoJRJQPq7p3BWtS3PWMj0/A==
|
||||
-----END RSA PRIVATE KEY-----
|
13
doc/demo-reset.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
for i in $(grep directory phpldapadmin-demo.conf|awk '{print $2}'); do
|
||||
rm -f $i/*dbb $i/alock $i/log.*
|
||||
done
|
||||
|
||||
slapadd -b "dc=example.com" -l ldif-example.com
|
||||
slapadd -b "dc=example,dc=com" -l ldif-example-com
|
||||
slapadd -b "o=Simpsons" -l ldif-Simpsons
|
||||
|
||||
for i in $(grep directory phpldapadmin-demo.conf|awk '{print $2}'); do
|
||||
chown -R ldap:ldap $i
|
||||
done
|
461
doc/ldif-Simpsons
Normal file
@@ -0,0 +1,461 @@
|
||||
# extended LDIF
|
||||
#
|
||||
# LDAPv3
|
||||
# base <o=Simpsons> with scope subtree
|
||||
# filter: (objectclass=*)
|
||||
# requesting: ALL
|
||||
#
|
||||
|
||||
# Simpsons
|
||||
dn: o=Simpsons
|
||||
o: Simpsons
|
||||
objectClass: organization
|
||||
objectClass: top
|
||||
|
||||
# People, Simpsons
|
||||
dn: ou=People,o=Simpsons
|
||||
ou: People
|
||||
objectClass: organizationalUnit
|
||||
objectClass: top
|
||||
|
||||
# Pets, Simpsons
|
||||
dn: ou=Pets,o=Simpsons
|
||||
ou: Pets
|
||||
objectClass: organizationalUnit
|
||||
objectClass: top
|
||||
|
||||
# Santas Little Helper, Pets, Simpsons
|
||||
dn: cn=Santas Little Helper,ou=Pets,o=Simpsons
|
||||
givenName: Santas Little Helper
|
||||
sn: Simpson
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: top
|
||||
jpegPhoto:: /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0VFh
|
||||
EYIx8lJCIfIiEmKzcvJik0KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/2wBDAQoLCw4NDhwQEBw7KCI
|
||||
oOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozv/wAARCABn
|
||||
AEsDASIAAhEBAxEB/8QAGwABAAIDAQEAAAAAAAAAAAAAAAQGAgUHAwH/xAA8EAACAQMCAwYDAwkJA
|
||||
AAAAAABAgMABBEFIQYSMRMiQVFhcTKBkRRCogcVI5KhsbLB0TM0U2JygoPw8f/EABoBAAIDAQEAAA
|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7m
|
||||
3jnicNHIoZSPEGtBVYWyrbj5mUViBcMux+YnrWLorqVYZB6isqVNIpp7fhXR7W9+2RWaCXOc+tVPj
|
||||
jTp4dVa9NvPPbS8j/oPiR1GN+mRsD710SvjIrjDKCPUVFbUtq8LSSqxq24llU4azxHpA/PNmZGhci
|
||||
NpkAYr4Zxtmt7HommRLypYwgf6RU5VVBhQAPICvtSAYGJwTk5kMaTp4P8Ac4f1RUmOKOJeWNFQeQG
|
||||
KzpXs8lc45WMaAJXKgxXEbKT5c3e/DzVr+F5p14asFy20WBt4Z2qJxleNrOswaHbEssbfpMdOY9fo
|
||||
Dj/c3lVzsbGKzsobdVGI1A6VCgzYz+Hln3xJXOEC+Pnj2kulKVNIopSlEIpSlEIpSlEJVOFtCktb2
|
||||
6vb0rJcGRsMDnOT1q10pXgAAwJ6SScmf//Z
|
||||
o: The Simpsons
|
||||
cn: Santas Little Helper
|
||||
|
||||
# Bart Simpson, People, Simpsons
|
||||
dn: cn=Bart Simpson,ou=People,o=Simpsons
|
||||
cn: Bart Simpson
|
||||
gidNumber: 1000
|
||||
givenName: Bart
|
||||
homeDirectory: /home/users/simpsons/bart
|
||||
jpegPhoto:: /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw
|
||||
8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRw
|
||||
hMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAB1
|
||||
AEEDASIAAhEBAxEB/8QAHAAAAgIDAQEAAAAAAAAAAAAAAAcFBgIDBAEI/8QARxAAAgEDAwIEAgQIC
|
||||
A8AAAAAAQIDAAQRBRIhBjETQVFxImEUgYKRBxUzQlOhscIWUnKSk8HS4RcjJTI2Q1RVYnSistHw8f
|
||||
/EABsBAAEFAQEAAAAAAA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5nk4sJJGkWbyiLHJV/QZJIPbnHHGdEkEF3HuI3K643oxBKn5jnFdHX2rrY9LvAk0
|
||||
Ub6hKtiJXPwxCTO5j7KGNL606zZIAL7p3Rr+Qj4pjEImb5sNrZP3ewqnVbJfWSunp3bpOZFuPdmE5
|
||||
+KxUwDJiuzrC1tBY2F06HdHqBtS8QXxJLfYGYZPDFWBUZ7Zx61ZPwbX802nRwznMjQ/F83jbYT/MM
|
||||
Q+zSt1HUZp7xJpvgtgBFDCJHZLcei7ieCQM9ucfU0/wd2MkEBeRSDDFtbIxiSRt5X3CeFn5kjyrVi
|
||||
mdTUkcUjt5w9tfyhNNVCorHvjH2W15n5dXuiiiq6Korj1PTbfVbJra43AZDI6HDIw7MD6j+48Giiu
|
||||
EAixSUFpPRkWn363Vxevc7HZ44hGERWYEFsZJzgnzAyScZqyLbQoMLEgHtRRTIomRN3WCwSXHqujw
|
||||
aparE2I2Rt6MEVhnBXBVgQwIYgg+vkcGlPrP4lsNdk0u40UNOnJns7l4EPtGd4H30UVM17m/pNkx8
|
||||
bJBZ4B6rXpFjonUGsro8OmTW0uVk+lS3bSlQrBuEwq547nOPQ05bKyt9PtEtrWPZEuSBkkkk5JJPJ
|
||||
JJJJPJJoopOc5xu43SZGyMWYLDuXRRRRTU9f//Z
|
||||
mail: bart.simpson@example.com
|
||||
o: The Simpsons
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: posixAccount
|
||||
objectClass: top
|
||||
objectClass: shadowAccount
|
||||
roomNumber: 45
|
||||
sn: Simpson
|
||||
telephoneNumber: +15551234567
|
||||
uid: bart
|
||||
uidNumber: 1000
|
||||
userPassword:: ZWF0bXlzaG9ydHM=
|
||||
|
||||
# Homer Simpson, People, Simpsons
|
||||
dn: cn=Homer Simpson,ou=People,o=Simpsons
|
||||
cn: Homer Simpson
|
||||
gidNumber: 1000
|
||||
givenName: Homer
|
||||
homeDirectory: /home/users/simpsons/homer
|
||||
jpegPhoto:: /9j/4AAQSkZJRgABAQAAA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I3jlnd1NrXBYkYzD1Kv/9
|
||||
k=
|
||||
mail: homer.simpson@example.com
|
||||
o: The Simpsons
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: posixAccount
|
||||
objectClass: top
|
||||
objectClass: shadowAccount
|
||||
roomNumber: 45
|
||||
sn: Simpson
|
||||
telephoneNumber: +15551234567
|
||||
uid: homer
|
||||
uidNumber: 1001
|
||||
userPassword:: ZWF0bXlzaG9ydHM=
|
||||
|
||||
# Lisa Simpson, People, Simpsons
|
||||
dn: cn=Lisa Simpson,ou=People,o=Simpsons
|
||||
cn: Lisa Simpson
|
||||
gidNumber: 1000
|
||||
givenName: Lisa
|
||||
homeDirectory: /home/users/simpsons/lisa
|
||||
jpegPhoto:: /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0VFh
|
||||
EYIx8lJCIfIiEmKzcvJik0KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/2wBDAQoLCw4NDhwQEBw7KCI
|
||||
oOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozv/wAARCACA
|
||||
AEwDASIAAhEBAxEB/8QAHAAAAQUBAQEAAAAAAAAAAAAABgEDBAUHAAII/8QAORAAAgECBAQEAwYGA
|
||||
QUAAAAAAQIDBBEABRIhBjFBURMUImEycYEHFTNCYqEjUnKCkbEkU4OSsvD/xAAaAQACAwEBAAAAAA
|
||||
AAAAAAAAAEBQADBgIB/8QAMREAAQMCBAMFCAMBAAAAAAAAAQACAwQRBRIhMUFRYROB0eHwBhQicZG
|
||||
hwfEVQrFS/9oADAMBAAIRAxEAPwDZcR66siy+gnrJgxjgjaRgouSAL2Hvh/FNxY1sheO/400MfzBk
|
||||
W/7XxxI/Iwu5C69aLkBe4eKMokYJLVeUc7aapTFv2BawP0JwmdZ4tFGlPRlJayddUY5rGv8A1G9uw
|
||||
/MduVyB07gg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AzSbX1fp+o
|
||||
DH+33x4WhnrKWrqYmCxUMfjSMb2O/wAOx7am+gB540GHh+PhuSpyWabx0ngFQZyujWGGhx7BSBbsH
|
||||
HM3Jz6rzMSUrUFJS+HREkQo7amkBAu7X/MerG+kWC2O5RB0omdFa2Uj6evWiefyM9XnEINnEW6AeO
|
||||
n+BRWqacQyyFZmlDIINOysLnXe532tawO4xpX2XVVBk/DuZ11ZmKQ05lR38ayCNivqHv6tSjuFHPG
|
||||
cRwhGMjnXIRuxH7DsMNR1VUsUkKOpWclFBG6qGfVbsDq3PM8rgHc6GTI64VmK0E8zRZ2pN7cth4aa
|
||||
961rMftdyell8Okoqur32awjDfIH1f5AwR8McUUvE+WNWwwyUxjlMUkUxW4YANzBIIswxhEcSx3O7
|
||||
M3xOeZxsv2cZSaDhOOWZPXXSGpseikAL/lVU/XBkE7pXEHZKMWwqGhga5pOYnbpx/HmizC47HYMWc
|
||||
XYYraSKvopaScHw5VKkqbEdiD0IO4PQgYfx2Ios541q5RkS1VUwFZSrUZdUFRa7yRgowHQMUjI7a7
|
||||
cwcZhAA7vL7lF9gDb/d/2xtnGuSHMaCVotvMIsE2xNrNqicgb2STn+l3PQYySm4dzxak5d9z1nm0d
|
||||
lMYiJA3Njr+G36r298LaqE5s7RutV7PVMMWYSuA469P2VBlkVFF3RCxChnNgCep9uv0wzSKLuRq0p
|
||||
6E121aee/vvv8sa/wAM/ZzTUeWVP3zpnq62FoWCHaBGG4U9W/V7C3UkeoPskzdaloqvMaRKYSMfGi
|
||||
DNI4Jv8JACm3ube+OfdXhmm5R4x2mfVF7yQ1o0035+XyVRwfw2/E2crFIh8jTkPVN0I6R/Nv2Fz2v
|
||||
t6gKoVQAALADpiHk+TUWRZbHQUEWiJNyTuzt1Zj1J/wDtsTcHQxCJtll8Rr3105kOg4DkF//Z
|
||||
mail: lisa.simpson@example.com
|
||||
o: The Simpsons
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: posixAccount
|
||||
objectClass: top
|
||||
objectClass: shadowAccount
|
||||
roomNumber: 45
|
||||
sn: Simpson
|
||||
telephoneNumber: +15551234567
|
||||
uid: lisa
|
||||
uidNumber: 1002
|
||||
userPassword:: YnJhaW5z
|
||||
|
||||
# Maggie Simpson, People, Simpsons
|
||||
dn: cn=Maggie Simpson,ou=People,o=Simpsons
|
||||
cn: Maggie Simpson
|
||||
gidNumber: 1000
|
||||
givenName: Maggie
|
||||
homeDirectory: /home/users/simpsons/maggie
|
||||
jpegPhoto:: /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0VFh
|
||||
EYIx8lJCIfIiEmKzcvJik0KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/2wBDAQoLCw4NDhwQEBw7KCI
|
||||
oOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozv/wAARCABm
|
||||
AE0DASIAAhEBAxEB/8QAGwAAAgIDAQAAAAAAAAAAAAAAAAUEBgIDBwH/xAA8EAACAQMDAgUCBAIGC
|
||||
wAAAAABAgMABBEFEiExQQYTUWFxIoEUMpGhQoIHFRYkkqIjM0NEUlVicpSx0//EABoBAAIDAQEAAA
|
||||
AAAAAAAAAAAAUGAgMEAAH/xAAwEQACAgIABAMGBQUAAAAAAAABAgADBBEFEiExE1GBIjJBcbHBFBV
|
||||
SYfAjkaHR8f/aAAwDAQACEQMRAD8A7LRRRXToUV4x2qWwTgZwOpqtx+Jb+4iSaGwthHIoZd9y27BG
|
||||
ecIRWbIyqccA2trcmlbP7ojHXNRlsooYbZlFxcPhWYZ2KBlmx37D5YfBh2mvzwsE1JIzGf8AeYgVC
|
||||
/8Acpzge4J9wBUCaa5vb03d0kUZEYjSONywAySTkgdfp7fw+9FK+XxyxcrdB2g/z95vrxQa/b7zPU
|
||||
btdZuN3W0hYiEA/nYEgyZHx9JHTk9xhppGrB4GgvplWeDYDI5C+a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uUcKJGUAP3lyooooFG+FFa5p4baJpp5UijXq7sFUfc0qbxZoqkgX
|
||||
TyY6GOCRw3wQuD9q9Ck9hIs6r7x1HDMFBLEAepNc/1G+k1LUp55GJSOV4oV7IqttOPclck/A7Csta
|
||||
vl1u+MjIWtIwFhjmTGT/ExU9DzjnsvvUUKqqFUBVAwAOABRbExiv8AUaLfEs8WA019t9/OaXsrdwQ
|
||||
YwNxJbBIznIIOOxycjpyfWt9FFEAiqdgQMXZhomRpGaK/hO47JlaMjPG4DcD+gf8Ab2rc1w1kUvUO
|
||||
GtWE2R6Lyw+65H3rXNG8lzbsB9EbM5Oe+0qB/mJ+1biMgg96iV5gVPxklcoyuO4/3OkA5AINe1UtF
|
||||
8SfgoYLK/jVYI1EaXKHAUAYG8Hp0/MDjuQoq2jnkGl2ytqzphHem+u5eas7ErfiDw/falfpdW0kEw
|
||||
VAqxXDlBEeclSFbrnnjPHXtSLU9M1LSbdbi9itdjPsHlXDOc4J6FB6HvRRWmi6xQFB6TBl4lLsXYd
|
||||
fmZX38UWEbsjx3G5Tg4RSM/4q3W2uW94GMEUmF67wF/8ARNFFEDa4HeA66ay+iJjceIbS0k8uaObd
|
||||
jP0KCP3IqZot5/aG7NrpyYkAyTcHYAPtuz+1FFRe5whIMsqx62vCEdNyzJ4OuTGWk1VVk9Et/oHzl
|
||||
sn7EfasP7H3v/Nbf/wm/wDrRRQ38Td+qMH5fi/oE2w+DBJlb7UWljPDRwwiMMO4JJY889CPtVoUBV
|
||||
CgYAGAKKKqexnO2O5oqorpGqxqf//Z
|
||||
mail: maggie.simpson@example.com
|
||||
o: The Simpsons
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: posixAccount
|
||||
objectClass: top
|
||||
objectClass: shadowAccount
|
||||
roomNumber: 45
|
||||
sn: Simpson
|
||||
telephoneNumber: +15551234567
|
||||
uid: maggie
|
||||
uidNumber: 1003
|
||||
userPassword:: ZHVtbXk=
|
||||
|
||||
# Marge Simpson, People, Simpsons
|
||||
dn: cn=Marge Simpson,ou=People,o=Simpsons
|
||||
gidNumber: 1000
|
||||
givenName: Marg
|
||||
homeDirectory: /home/users/simpsons/marg
|
||||
mail: marg.simpson@example.com
|
||||
o: The Simpsons
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: posixAccount
|
||||
objectClass: top
|
||||
objectClass: shadowAccount
|
||||
roomNumber: 45
|
||||
sn: Simpson
|
||||
telephoneNumber: +15551234567
|
||||
uid: marg
|
||||
uidNumber: 1004
|
||||
userPassword:: Ymx1ZWhhaXI=
|
||||
cn: Marge Simpson
|
||||
jpegPhoto:: R0lGODlhhABwAIcAAAAAAAICBQIEAgUFAQUFBAICCwYICw4EBAsJAgkJCAgJDQ4NCA
|
||||
0NDQECEgEDGwsMEA4QDhMEAhILAhANARANBBYODhwCARoJARMQAhIQBBURARQRBBcVAhIQCBEQDRQ
|
||||
SDhgSABkUARwTARwVAB0YARISERsbGwIEIgIEKgEENAAEPAQINAQIOiMBASwCAiIbATUDAz0CAicg
|
||||
AiogASsjBCskAS0jAS0kAS4oBTEnATQqAjkuATswAz0xATwxBj80BCIiIikpKS8vLzQ0NDk5OT09P
|
||||
QIFQwEGTAQJRAMITQEFUQEGWwMIUwMIWgIIYwIIbAAGcQAGfwEIdAEIfEICAksBAVIBAV8AAEAzAU
|
||||
E1AUU2AUU3BEU4AUw8AVA+AWEBAWsCAnIBAXwBAU5ABFRDAlhGAVxHAltJAWFNAWBNBGJQBGVRAmp
|
||||
UAW1YAW1YBHFZAHFaBHFcAnRaAnVdAXVeBHleAHdgAntiAURERElJSU1NTVJSUllZWV1dXWFhYWVl
|
||||
ZWxsbHJycnV1dXt7ewAIg4QBAYwBAZIAAJsCAqICAqsCArQDA7sCAoFlAYRpAohqAIptAIxuAo1wA
|
||||
pN0AZZ5Bph3AJp7AaB/AYF/f8ECAssBAdMEBNwBAeICAuwBAfIBAf4AAJ6AAqGAAaODBKaCAKSCBK
|
||||
aEAKqGAayHAK2JAbKMAraRAruTAcKZAcO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tIDxOCNrtQHb9CPrVIDplAnr+ABwlZu+LgS5kABnIiQdVIKMoBoa2C
|
||||
EBBeRKhEI6GWRqxIMclInurABrDgveohM+iSSq/IKGIALlNIIGmWMeGQMWizwjnbWBnUjDL7AASJy
|
||||
eR55EUEQhi6JLiMACf0SCbsklBDxlFAZlVI5lVIZEAA7
|
||||
|
||||
# search result
|
||||
search: 2
|
||||
result: 0 Success
|
||||
|
||||
# numResponses: 10
|
||||
# numEntries: 9
|
588
doc/ldif-example-com
Normal file
@@ -0,0 +1,588 @@
|
||||
# extended LDIF
|
||||
#
|
||||
# LDAPv3
|
||||
# base <dc=example,dc=com> with scope subtree
|
||||
# filter: (objectclass=*)
|
||||
# requesting: ALL
|
||||
#
|
||||
|
||||
# example.com
|
||||
dn: dc=example,dc=com
|
||||
dc: example
|
||||
objectClass: dNSDomain
|
||||
|
||||
# AU, example.com
|
||||
dn: c=AU,dc=example,dc=com
|
||||
c: AU
|
||||
objectClass: country
|
||||
objectClass: top
|
||||
description: Australia
|
||||
|
||||
# DE, example.com
|
||||
dn: c=DE,dc=example,dc=com
|
||||
c: DE
|
||||
objectClass: country
|
||||
objectClass: top
|
||||
description: Germany
|
||||
|
||||
# GB, example.com
|
||||
dn: c=GB,dc=example,dc=com
|
||||
c: GB
|
||||
objectClass: country
|
||||
objectClass: top
|
||||
description: Great Britain
|
||||
|
||||
# FR, example.com
|
||||
dn: c=FR,dc=example,dc=com
|
||||
c: FR
|
||||
objectClass: country
|
||||
objectClass: top
|
||||
description: France
|
||||
|
||||
# NO, example.com
|
||||
dn: c=NO,dc=example,dc=com
|
||||
c: NO
|
||||
description: Norway
|
||||
objectClass: country
|
||||
objectClass: top
|
||||
|
||||
# SE, example.com
|
||||
dn: c=SE,dc=example,dc=com
|
||||
c: SE
|
||||
objectClass: country
|
||||
objectClass: top
|
||||
|
||||
# US, example.com
|
||||
dn: c=US,dc=example,dc=com
|
||||
c: US
|
||||
description: United States of America
|
||||
objectClass: country
|
||||
objectClass: top
|
||||
|
||||
# RU, example.com
|
||||
dn: c=RU,dc=example,dc=com
|
||||
c: RU
|
||||
objectClass: country
|
||||
objectClass: top
|
||||
|
||||
# \D0\A7\D0\B5\D0\BB\D0\BE\D0\B2\D0\B5\D0\BA\D0\B8, RU, example.com
|
||||
dn:: Y2490KfQtdC70L7QstC10LrQuCxjPVJVLGRjPWV4YW1wbGUsZGM9Y29t
|
||||
cn:: 0KfQtdC70L7QstC10LrQuA==
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: top
|
||||
sn:: 0KfQtdC70L7QstC10LrQuA==
|
||||
|
||||
# \D0\94\D0\B5\D0\B4 \D0\9B\D0\BE\D0\B3\D0\BE\D0\BF\D0\B5\D0\B4, \D0\A7\D0\B5
|
||||
\D0\BB\D0\BE\D0\B2\D0\B5\D0\BA\D0\B8, RU, example.com
|
||||
dn:: Y2490JTQtdC0INCb0L7Qs9C+0L/QtdC0LGNuPdCn0LXQu9C+0LLQtdC60LgsYz1SVSxkYz1le
|
||||
GFtcGxlLGRjPWNvbQ==
|
||||
cn:: 0JTQtdC0INCb0L7Qs9C+0L/QtdC0
|
||||
givenName:: 0JTQtdC0
|
||||
jpegPhoto:: /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBw
|
||||
YIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQs
|
||||
NFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAw
|
||||
AEADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEA
|
||||
wUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKS
|
||||
o0NTY3ODk6Q0RFRkdISUp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9QAeK1PiQi614n1LUlbi4neXn3Ymud0m9l0G6jlVC6E5OOoPqKAIPFPhq88O+Mr7V9J1i
|
||||
/trC4kMyWaiRHyf4Sn3BjpnJGKpT6yNe0lk1W0jN2DgTBAN49T716NqOrXXiC1807dm3rIcV5j4mb
|
||||
7KrZYbsHkUAeW+JIEt7hIYwCqtvwPb/ACKwXBySec1v39nPc3DTshCNwmR1HrVGfT2jIJHFAH9Gkf
|
||||
xQspdds7KKOWaGZtr3CITHEMcMzdAM4/OuR/aP1qLXPhtqOiaVdQzXV4hQ/PhQMcknFeXeAdRnSzR
|
||||
xG88UxGx9mVJPTnHGcGuk1+4h1LSnijRHkYlVjk4kVvQHHrQB+f8A4m/Zy8Y380kOnapokEZGS91c
|
||||
vk+wAQ1zq/svfEC5/cp4i0O2KHaR5UzsT/3yM19ea9aW8R3y3ElndKSWhdBtkB6HBxj6g1w+tarcx
|
||||
RRXLxS3mmxuE3ohCA9SNwwwP1oA8Ksv2WvHGAl143s40xjba6cznn/eYVFrX7LRuYUjbxa817nkTW
|
||||
B2MPqrEj9a9jXxZqt4DEkqoVb93DKN3b+8MEHjjI9Kq6j421mwSNL64ESSqytuYOj+gYdvqKAPAvF
|
||||
/wOv9EtR5z2tyEG3fDuX9GUYryPXfB15axs62ryxhtu+Ebxn6rmvpXW9cilF00+piYDO17cOVK9Mc
|
||||
9vqO1eQ+LNVSOd3g3NAvJMmUJ+vP9aAP/9k=
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: top
|
||||
sn:: 0JvQvtCz0L7Qv9C10LQ=
|
||||
|
||||
# IT, example.com
|
||||
dn: c=IT,dc=example,dc=com
|
||||
c: IT
|
||||
objectClass: country
|
||||
objectClass: top
|
||||
|
||||
# ES, example.com
|
||||
dn: c=ES,dc=example,dc=com
|
||||
c: ES
|
||||
objectClass: country
|
||||
objectClass: top
|
||||
|
||||
# Simpsons, US, example.com
|
||||
dn: o=Simpsons,c=US,dc=example,dc=com
|
||||
o: Simpsons
|
||||
objectClass: organization
|
||||
objectClass: top
|
||||
|
||||
# People, Simpsons, US, example.com
|
||||
dn: ou=People,o=Simpsons,c=US,dc=example,dc=com
|
||||
objectClass: organizationalUnit
|
||||
objectClass: top
|
||||
ou: People
|
||||
|
||||
# Bart Simpson, People, Simpsons, US, example.com
|
||||
dn: cn=Bart Simpson,ou=People,o=Simpsons,c=US,dc=example,dc=com
|
||||
cn: Bart Simpson
|
||||
gidNumber: 1000
|
||||
givenName: Bart
|
||||
homeDirectory: /home/users/simpsons/bart
|
||||
jpegPhoto:: /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw
|
||||
8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRw
|
||||
hMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAB1
|
||||
AEEDASIAAhEBAxEB/8QAHAAAAgIDAQEAAAAAAAAAAAAAAAcFBgIDBAEI/8QARxAAAgEDAwIEAgQIC
|
||||
A8AAAAAAQIDAAQRBRIhBjETQVFxImEUgYKRBxUzQlOhscIWUnKSk8HS4RcjJTI2Q1RVYnSistHw8f
|
||||
/EABsBAAEFAQEAAAAAAAAAAAAAAAUAAgMEBgEH/8QAMBEAAQMCAwUHAwUAAAAAAAAAAQACAwQRBSE
|
||||
xBhJBUXETYaGxwdHwFCKBMkJSkeH/2gAMAwEAAhEDEQA/AH/RRRSSRUFrWs3FnJPaW9rIZDbho51I
|
||||
O12LAfCe4BUE+44qdqv9QIV1HT5/zSssPuTtYfqRqoYnNJBSPli1aL+/gpImhzwCow3GtM/iC+USQ
|
||||
gJCTyko5JMijAycgcdtuRjJFcx06UxmI3szRA+JGHO5lm/SZz34yB6knz4kKK83fjFc/WQ/Le3nzK
|
||||
JCCMcFG/iuVZTLHeOkpxLuC8fSP0xGeT5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yhNNVCorHvjH2W15n5dXuiiiq6Korj1PTbfVbJra43AZDI6HDIw7MD6j+48Giiu
|
||||
EAixSUFpPRkWn363Vxevc7HZ44hGERWYEFsZJzgnzAyScZqyLbQoMLEgHtRRTIomRN3WCwSXHqujw
|
||||
aparE2I2Rt6MEVhnBXBVgQwIYgg+vkcGlPrP4lsNdk0u40UNOnJns7l4EPtGd4H30UVM17m/pNkx8
|
||||
bJBZ4B6rXpFjonUGsro8OmTW0uVk+lS3bSlQrBuEwq547nOPQ05bKyt9PtEtrWPZEuSBkkkk5JJPJ
|
||||
JJJJPJJoopOc5xu43SZGyMWYLDuXRRRRTU9f//Z
|
||||
mail: bart.simpson@example.com
|
||||
o: The Simpsons
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: posixAccount
|
||||
objectClass: top
|
||||
objectClass: shadowAccount
|
||||
roomNumber: 45
|
||||
sn: Simpson
|
||||
telephoneNumber: +15551234567
|
||||
uid: bart
|
||||
uidNumber: 1000
|
||||
userPassword:: ZWF0bXlzaG9ydHM=
|
||||
|
||||
# Homer Simpson, People, Simpsons, US, example.com
|
||||
dn: cn=Homer Simpson,ou=People,o=Simpsons,c=US,dc=example,dc=com
|
||||
cn: Homer Simpson
|
||||
gidNumber: 1000
|
||||
givenName: Homer
|
||||
homeDirectory: /home/users/simpsons/homer
|
||||
jpegPhoto:: /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0VFh
|
||||
EYIx8lJCIfIiEmKzcvJik0KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/2wBDAQoLCw4NDhwQEBw7KCI
|
||||
oOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozv/wAARCABP
|
||||
AHIDASIAAhEBAxEB/8QAGwAAAgIDAQAAAAAAAAAAAAAABAUDBgACBwH/xABHEAACAQIEBAEHBgoIB
|
||||
w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kamtfpqPrxDm4EeVpL
|
||||
uQR/HcL2OUx3SsuQUUGQVs2UBQ3NTyiGoYfjJwCA4durMpI3P5LqOxxWc2qKWXPKmqojrpKhlXnrv
|
||||
G9QAQ6q3S9gnvN7X3tJX/Kd8nOZrEtbV89Ym1IHo5CAbW/N3Fj0OxwJ/xM4FavrYpazmZfWQprjNJ
|
||||
Jp5i3U+HT3UR/wYu0iqQB1G1uvnD34Byf0RS/s/8AE4VScccMU1bJFT5nLUUos0MjwPrAPVWuLki3
|
||||
XuCL7gki5dxvw/T5fBDLWOHRbMOS5t92FaSnhwKt+XGp+cNC9JSGsenDyvEHCaVKlQ2o7X3IAPUk+
|
||||
okXNeIsvjISuMuXSdNNYnLF/UH8xvgxxQuHvlM4MybKXkmrpZK6e8s6JTPctbwxgkW8IsvW17nucb
|
||||
H5VsmqVMsnE8dIzdKePLJJUX2MzAFveNPuw1ooJDjZtX+pybJc2tPUZfR1RYXErRKx94br9Rwi4h4
|
||||
SyemyOsrIRVwSUsLzRFKyXSrqp0nQWK/C3fFYo/lD4AZ5PK2WknU/9Tl0M0AmB7+CzA+sG/axPbeu
|
||||
484FzClaiqOKc0ejcjmQNASHAN7FjHrtcD8rHxaDuQvASFML9+vfHvfFYp+PMiECLUVzNKoszCF7M
|
||||
Rtq6d+vxxJ8/eHP66/2D/5YVpKp1N81zDOvTlf+8yfzHGYjzOZKnNKueI3jlnd1NrXBYkYzD1Kv/9
|
||||
k=
|
||||
mail: homer.simpson@example.com
|
||||
o: The Simpsons
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: posixAccount
|
||||
objectClass: top
|
||||
objectClass: shadowAccount
|
||||
roomNumber: 45
|
||||
sn: Simpson
|
||||
telephoneNumber: +15551234567
|
||||
uid: homer
|
||||
uidNumber: 1001
|
||||
userPassword:: ZWF0bXlzaG9ydHM=
|
||||
|
||||
# Lisa Simpson, People, Simpsons, US, example.com
|
||||
dn: cn=Lisa Simpson,ou=People,o=Simpsons,c=US,dc=example,dc=com
|
||||
cn: Lisa Simpson
|
||||
gidNumber: 1000
|
||||
givenName: Lisa
|
||||
homeDirectory: /home/users/simpsons/lisa
|
||||
jpegPhoto:: /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0VFh
|
||||
EYIx8lJCIfIiEmKzcvJik0KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/2wBDAQoLCw4NDhwQEBw7KCI
|
||||
oOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozv/wAARCACA
|
||||
AEwDASIAAhEBAxEB/8QAHAAAAQUBAQEAAAAAAAAAAAAABgEDBAUHAAII/8QAORAAAgECBAQEAwYGA
|
||||
QUAAAAAAQIDBBEABRIhBjFBURMUImEycYEHFTNCYqEjUnKCkbEkU4OSsvD/xAAaAQACAwEBAAAAAA
|
||||
AAAAAAAAAEBQADBgIB/8QAMREAAQMCBAMFCAMBAAAAAAAAAQACAwQRBRIhMUFRYROB0eHwBhQicZG
|
||||
hwfEVQrFS/9oADAMBAAIRAxEAPwDZcR66siy+gnrJgxjgjaRgouSAL2Hvh/FNxY1sheO/400MfzBk
|
||||
W/7XxxI/Iwu5C69aLkBe4eKMokYJLVeUc7aapTFv2BawP0JwmdZ4tFGlPRlJayddUY5rGv8A1G9uw
|
||||
/MduVyB07gg8jzHfDUNNT02rwIIodZu3hoF1HubYyp9oJDGRks7nw+iY+5jNvorPJ86ly+daXMKiS
|
||||
amma0dRK12jcn4WP8AKxOx6E25FQCmSWOFC8rqijmzGwH1wDOiSxtHIodHBVlYXBB5gjDPkaTUGNN
|
||||
E7DkzoGb/ACd8eUuOujiyytzEcfFSSkDnXabI8pa2lrY2kpKmKoRWKlopA4B7XHXcYewO8IWCZoB0
|
||||
rBt/2IsEWNRBL20TZLWuAfql725XFvJdhMLhMXLlDvFL1sE1HJFWTRUkpaKRYm0nWd0OoC9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Dq3PM8rgHc6GTI64VmK0E8zRZ2pN7cth4aa
|
||||
961rMftdyell8Okoqur32awjDfIH1f5AwR8McUUvE+WNWwwyUxjlMUkUxW4YANzBIIswxhEcSx3O7
|
||||
M3xOeZxsv2cZSaDhOOWZPXXSGpseikAL/lVU/XBkE7pXEHZKMWwqGhga5pOYnbpx/HmizC47HYMWc
|
||||
XYYraSKvopaScHw5VKkqbEdiD0IO4PQgYfx2Ios541q5RkS1VUwFZSrUZdUFRa7yRgowHQMUjI7a7
|
||||
cwcZhAA7vL7lF9gDb/d/2xtnGuSHMaCVotvMIsE2xNrNqicgb2STn+l3PQYySm4dzxak5d9z1nm0d
|
||||
lMYiJA3Njr+G36r298LaqE5s7RutV7PVMMWYSuA469P2VBlkVFF3RCxChnNgCep9uv0wzSKLuRq0p
|
||||
6E121aee/vvv8sa/wAM/ZzTUeWVP3zpnq62FoWCHaBGG4U9W/V7C3UkeoPskzdaloqvMaRKYSMfGi
|
||||
DNI4Jv8JACm3ube+OfdXhmm5R4x2mfVF7yQ1o0035+XyVRwfw2/E2crFIh8jTkPVN0I6R/Nv2Fz2v
|
||||
t6gKoVQAALADpiHk+TUWRZbHQUEWiJNyTuzt1Zj1J/wDtsTcHQxCJtll8Rr3105kOg4DkF//Z
|
||||
mail: lisa.simpson@example.com
|
||||
o: The Simpsons
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: posixAccount
|
||||
objectClass: top
|
||||
objectClass: shadowAccount
|
||||
roomNumber: 45
|
||||
sn: Simpson
|
||||
telephoneNumber: +15551234567
|
||||
uid: lisa
|
||||
uidNumber: 1002
|
||||
userPassword:: YnJhaW5z
|
||||
|
||||
# Maggie Simpson, People, Simpsons, US, example.com
|
||||
dn: cn=Maggie Simpson,ou=People,o=Simpsons,c=US,dc=example,dc=com
|
||||
cn: Maggie Simpson
|
||||
gidNumber: 1000
|
||||
givenName: Maggie
|
||||
homeDirectory: /home/users/simpsons/maggie
|
||||
jpegPhoto:: /9j/4AAQSkZJRgAB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+gf8Ab2rc1w1kUvUO
|
||||
GtWE2R6Lyw+65H3rXNG8lzbsB9EbM5Oe+0qB/mJ+1biMgg96iV5gVPxklcoyuO4/3OkA5AINe1UtF
|
||||
8SfgoYLK/jVYI1EaXKHAUAYG8Hp0/MDjuQoq2jnkGl2ytqzphHem+u5eas7ErfiDw/falfpdW0kEw
|
||||
VAqxXDlBEeclSFbrnnjPHXtSLU9M1LSbdbi9itdjPsHlXDOc4J6FB6HvRRWmi6xQFB6TBl4lLsXYd
|
||||
fmZX38UWEbsjx3G5Tg4RSM/4q3W2uW94GMEUmF67wF/8ARNFFEDa4HeA66ay+iJjceIbS0k8uaObd
|
||||
jP0KCP3IqZot5/aG7NrpyYkAyTcHYAPtuz+1FFRe5whIMsqx62vCEdNyzJ4OuTGWk1VVk9Et/oHzl
|
||||
sn7EfasP7H3v/Nbf/wm/wDrRRQ38Td+qMH5fi/oE2w+DBJlb7UWljPDRwwiMMO4JJY889CPtVoUBV
|
||||
CgYAGAKKKqexnO2O5oqorpGqxqf//Z
|
||||
mail: maggie.simpson@example.com
|
||||
o: The Simpsons
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: posixAccount
|
||||
objectClass: top
|
||||
objectClass: shadowAccount
|
||||
roomNumber: 45
|
||||
sn: Simpson
|
||||
telephoneNumber: +15551234567
|
||||
uid: maggie
|
||||
uidNumber: 1003
|
||||
userPassword:: ZHVtbXk=
|
||||
|
||||
# Marge Simpson, People, Simpsons, US, example.com
|
||||
dn: cn=Marge Simpson,ou=People,o=Simpsons,c=US,dc=example,dc=com
|
||||
cn: Marge Simpson
|
||||
gidNumber: 1000
|
||||
givenName: Marg
|
||||
homeDirectory: /home/users/simpsons/marg
|
||||
jpegPhoto:: R0lGODlhhABwAIcAAAAAAAICBQIEAgUFAQUFBAICCwYICw4EBAsJAgkJCAgJDQ4NCA
|
||||
0NDQECEgEDGwsMEA4QDhMEAhILAhANARANBBYODhwCARoJARMQAhIQBBURARQRBBcVAhIQCBEQDRQ
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
||||
/RB0MWETiEQEARCy/EGjwAhW27glDSIAVjXBB+D/xhSo8XQwU53KuBxjWgAEhYAWIcAgxIAMIsAnL
|
||||
lwkCQAWctwgvQAHhx3UuoAiHUAFbVH4DOBf7Iwq8MAlrwAaW8As4kAnLpwgAoIKc5wISyHmFQACNd
|
||||
nUfqBZ9ED+rQgfKx3lWAH7LZwUxmHiH4AdjF3LERg0hYFuWkgsi4H5cVwgv8AOxl3gWEAGIl3hVwA
|
||||
CkFncVtz+ogCywIAMwIHkukAO2oAoWcIGgEAZccAZX8AlchwgjIAlBUFnEZn4Y4QcohyzAcAqN4Ah
|
||||
GJQyQEAFiwAiJEAM4kAu/0AUu/yAGhlAFJKABvsAF5OOBxJYNGMBuuOUKbGBtlWAuwbAKdfAGJ0gD
|
||||
q2ALFMBmeXiDTNEPQjAJj5dec+AGwuAIKmJ8rrgUx2BmCGcprCADwcBErMdwu9gT9FACvPOLlvICH
|
||||
9MKH+BgredmgWAGzMgqcNAGlMIGYteKPWYOC6Bg11gpsQACquILIaBk0whifsAGs6hiPWAJdXIJQI
|
||||
CH/HaML1EOFNBY47gqo5AD5tIDxOCNrtQHb9CPrVIDplAnr+ABwlZu+LgS5kABnIiQdVIKMoBoa2C
|
||||
EBBeRKhEI6GWRqxIMclInurABrDgveohM+iSSq/IKGIALlNIIGmWMeGQMWizwjnbWBnUjDL7AASJy
|
||||
eR55EUEQhi6JLiMACf0SCbsklBDxlFAZlVI5lVIZEAA7
|
||||
mail: marg.simpson@example.com
|
||||
o: The Simpsons
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: posixAccount
|
||||
objectClass: top
|
||||
objectClass: shadowAccount
|
||||
roomNumber: 45
|
||||
sn: Simpson
|
||||
telephoneNumber: +15551234567
|
||||
uid: marg
|
||||
uidNumber: 1004
|
||||
userPassword:: Ymx1ZWhhaXI=
|
||||
|
||||
# Pets, Simpsons, US, example.com
|
||||
dn: ou=Pets,o=Simpsons,c=US,dc=example,dc=com
|
||||
objectClass: organizationalUnit
|
||||
objectClass: top
|
||||
ou: Pets
|
||||
|
||||
# Santas Little Helper, Pets, Simpsons, US, example.com
|
||||
dn: cn=Santas Little Helper,ou=Pets,o=Simpsons,c=US,dc=example,dc=com
|
||||
cn: Santas Little Helper
|
||||
givenName: Santas Little Helper
|
||||
jpegPhoto:: /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0VFh
|
||||
EYIx8lJCIfIiEmKzcvJik0KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/2wBDAQoLCw4NDhwQEBw7KCI
|
||||
oOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozv/wAARCABn
|
||||
AEsDASIAAhEBAxEB/8QAGwABAAIDAQEAAAAAAAAAAAAAAAQGAgUHAwH/xAA8EAACAQMCAwYDAwkJA
|
||||
AAAAAABAgMABBEFIQYSMRMiQVFhcTKBkRRCogcVI5KhsbLB0TM0U2JygoPw8f/EABoBAAIDAQEAAA
|
||||
AAAAAAAAAAAAAEAwUGAgH/xAArEQACAgECAwcEAwAAAAAAAAABAgADEQQxEhMhBXGBkbHR8BQyQWF
|
||||
R4fH/2gAMAwEAAhEDEQA/AOwXNzDZ273FxIsUSDLOxwBXPdS46vYb+WeC4SOJMGK0lQASKTygsSOY
|
||||
EnyPd8tjm+6lp8Op2MlpcKGjfHUZwQcg+4IqkrwRpdlqsrzS3sskcSFRAOaR+duUkbE4XAzjpk52p
|
||||
bUV2uBy2xj55Rih6kJ5i5+es834l1uWTtRfiLO4ijhQoP1gWP1+le4451N4RIlnbARFhIDzEzcpwe
|
||||
XfuZx481e+ncP6d2WpT3ctxfrZzSRrHCzBsKoOCExzOc/uwBVbu9CWfigWFleXFurElO0O4Zo1bDA
|
||||
/eAYg59M771WrVrk3sGSfn4j5s0T7Iek6nY3cV9ZxXUBzHKgZfY171A0TT20vSLeyZ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
objectClass: inetOrgPerson
|
||||
objectClass: top
|
||||
sn: Simpson
|
||||
|
||||
# simpsons, Simpsons, US, example.com
|
||||
dn: cn=simpsons,o=Simpsons,c=US,dc=example,dc=com
|
||||
cn: simpsons
|
||||
objectClass: groupOfUniqueNames
|
||||
objectClass: top
|
||||
uniqueMember: cn=Bart Simpson,ou=People,o=Simpsons
|
||||
uniqueMember: cn=Homer Simpson,ou=People,o=Simpsons
|
||||
uniqueMember: cn=Lisa Simpson,ou=People,o=Simpsons
|
||||
uniqueMember: cn=Maggie Simpson,ou=People,o=Simpsons
|
||||
uniqueMember: cn=Marge Simpson,ou=People,o=Simpsons
|
||||
|
||||
# search result
|
||||
search: 2
|
||||
result: 0 Success
|
||||
|
||||
# numResponses: 24
|
||||
# numEntries: 23
|
215
doc/ldif-example.com
Normal file
@@ -0,0 +1,215 @@
|
||||
# extended LDIF
|
||||
#
|
||||
# LDAPv3
|
||||
# base <dc=example.com> with scope subtree
|
||||
# filter: (objectclass=*)
|
||||
# requesting: ALL
|
||||
#
|
||||
|
||||
# example.com
|
||||
dn: dc=example.com
|
||||
dc: example.com
|
||||
objectClass: dNSDomain
|
||||
|
||||
# Bad DNs, example.com
|
||||
dn: ou=Bad DNs,dc=example.com
|
||||
ou: Bad DNs
|
||||
objectClass: organizationalUnit
|
||||
|
||||
# double plus \2B\2B, Bad DNs, example.com
|
||||
dn: c=double plus \2B\2B,ou=Bad DNs,dc=example.com
|
||||
c: double plus ++
|
||||
objectClass: country
|
||||
|
||||
# end dollar$, Bad DNs, example.com
|
||||
dn: c=end dollar$,ou=Bad DNs,dc=example.com
|
||||
c: end dollar$
|
||||
objectClass: country
|
||||
|
||||
# multi + value, Bad DNs, example.com
|
||||
dn: uid=multi+uid=value,ou=Bad DNs,dc=example.com
|
||||
cn: Test
|
||||
sn: Test
|
||||
uid: multi
|
||||
uid: value
|
||||
objectClass: inetOrgPerson
|
||||
|
||||
# quote\22double, Bad DNs, example.com
|
||||
dn: uid=quote\22double,ou=Bad DNs,dc=example.com
|
||||
cn: Test
|
||||
sn: Test
|
||||
uid: quote"double
|
||||
objectClass: inetOrgPerson
|
||||
|
||||
# quote'single, Bad DNs, example.com
|
||||
dn: uid=quote'single,ou=Bad DNs,dc=example.com
|
||||
cn: Test
|
||||
sn: Test
|
||||
uid: quote'single
|
||||
objectClass: inetOrgPerson
|
||||
|
||||
# angle\3Cleft, Bad DNs, example.com
|
||||
dn: uid=angle\3Cleft,ou=Bad DNs,dc=example.com
|
||||
cn: Test
|
||||
sn: Test
|
||||
uid: angle<left
|
||||
objectClass: inetOrgPerson
|
||||
|
||||
# angle\3Eright, Bad DNs, example.com
|
||||
dn: uid=angle\3Eright,ou=Bad DNs,dc=example.com
|
||||
cn: Test
|
||||
sn: Test
|
||||
uid: angle>right
|
||||
objectClass: inetOrgPerson
|
||||
|
||||
# sign@at, Bad DNs, example.com
|
||||
dn: uid=sign@at,ou=Bad DNs,dc=example.com
|
||||
cn: Test
|
||||
sn: Test
|
||||
uid: sign@at
|
||||
objectClass: inetOrgPerson
|
||||
|
||||
# sign\3Bsemicolon@at, Bad DNs, example.com
|
||||
dn: uid=sign\3Bsemicolon@at,ou=Bad DNs,dc=example.com
|
||||
cn: Test
|
||||
sn: Test
|
||||
uid: sign;semicolon@at
|
||||
objectClass: inetOrgPerson
|
||||
|
||||
# sign?question, Bad DNs, example.com
|
||||
dn: uid=sign?question,ou=Bad DNs,dc=example.com
|
||||
cn: Test
|
||||
sn: Test
|
||||
uid: sign?question
|
||||
objectClass: inetOrgPerson
|
||||
|
||||
# sign\2Ccomma, Bad DNs, example.com
|
||||
dn: uid=sign\2Ccomma,ou=Bad DNs,dc=example.com
|
||||
cn: Test
|
||||
sn: Test
|
||||
uid: sign,comma
|
||||
objectClass: inetOrgPerson
|
||||
|
||||
# brace(left, Bad DNs, example.com
|
||||
dn: uid=brace(left,ou=Bad DNs,dc=example.com
|
||||
cn: Test
|
||||
sn: Test
|
||||
uid: brace(left
|
||||
objectClass: inetOrgPerson
|
||||
|
||||
# brace)right, Bad DNs, example.com
|
||||
dn: uid=brace)right,ou=Bad DNs,dc=example.com
|
||||
cn: Test
|
||||
sn: Test
|
||||
uid: brace)right
|
||||
objectClass: inetOrgPerson
|
||||
|
||||
# sign%percent, Bad DNs, example.com
|
||||
dn: uid=sign%percent,ou=Bad DNs,dc=example.com
|
||||
cn: Test
|
||||
sn: Test
|
||||
uid: sign%percent
|
||||
objectClass: inetOrgPerson
|
||||
|
||||
# sign\3Dequal, Bad DNs, example.com
|
||||
dn: uid=sign\3Dequal,ou=Bad DNs,dc=example.com
|
||||
uid: sign=equal
|
||||
cn: Test
|
||||
sn: Test
|
||||
objectClass: inetOrgPerson
|
||||
|
||||
# sign\2Bplus, Bad DNs, example.com
|
||||
dn: uid=sign\2Bplus,ou=Bad DNs,dc=example.com
|
||||
cn: Test
|
||||
sn: Test
|
||||
uid: sign+plus
|
||||
objectClass: inetOrgPerson
|
||||
|
||||
# colon\3Bsemi, Bad DNs, example.com
|
||||
dn: uid=colon\3Bsemi,ou=Bad DNs,dc=example.com
|
||||
cn: Test
|
||||
sn: Test
|
||||
uid: colon;semi
|
||||
objectClass: inetOrgPerson
|
||||
|
||||
# colon:full, Bad DNs, example.com
|
||||
dn: uid=colon:full,ou=Bad DNs,dc=example.com
|
||||
cn: Test
|
||||
sn: Test
|
||||
uid: colon:full
|
||||
objectClass: inetOrgPerson
|
||||
|
||||
# multi + sign@at, Bad DNs, example.com
|
||||
dn: uid=multi+uid=sign@at,ou=Bad DNs,dc=example.com
|
||||
cn: Test
|
||||
sn: Test
|
||||
uid: multi
|
||||
uid: sign@at
|
||||
objectClass: inetOrgPerson
|
||||
|
||||
# sign@at + multi-mixed, Bad DNs, example.com
|
||||
dn: sn=sign@at+uid=multi-mixed,ou=Bad DNs,dc=example.com
|
||||
cn: Test
|
||||
uid: multi-mixed
|
||||
sn: sign@at
|
||||
objectClass: inetOrgPerson
|
||||
|
||||
# Non English Chars, example.com
|
||||
dn: ou=Non English Chars,dc=example.com
|
||||
ou: Non English Chars
|
||||
objectClass: organizationalUnit
|
||||
objectClass: top
|
||||
|
||||
# \D0\A7\D0\B5\D0\BB\D0\BE\D0\B2\D0\B5\D0\BA\D0\B8, Non English Chars, exampl
|
||||
e.com
|
||||
dn:: Y2490KfQtdC70L7QstC10LrQuCxvdT1Ob24gRW5nbGlzaCBDaGFycyxkYz1leGFtcGxlLmNvb
|
||||
Q==
|
||||
cn:: 0KfQtdC70L7QstC10LrQuA==
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: top
|
||||
sn:: 0KfQtdC70L7QstC10LrQuA==
|
||||
|
||||
# \D0\94\D0\B5\D0\B4 \D0\9B\D0\BE\D0\B3\D0\BE\D0\BF\D0\B5\D0\B4, \D0\A7\D0\B5
|
||||
\D0\BB\D0\BE\D0\B2\D0\B5\D0\BA\D0\B8, Non English Chars, example.com
|
||||
dn:: Y2490JTQtdC0INCb0L7Qs9C+0L/QtdC0LGNuPdCn0LXQu9C+0LLQtdC60Lgsb3U9Tm9uIEVuZ
|
||||
2xpc2ggQ2hhcnMsZGM9ZXhhbXBsZS5jb20=
|
||||
cn:: 0JTQtdC0INCb0L7Qs9C+0L/QtdC0
|
||||
givenName:: 0JTQtdC0
|
||||
jpegPhoto:: /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBw
|
||||
YIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQs
|
||||
NFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAw
|
||||
AEADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEA
|
||||
wUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2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b2VY4lPAAY4FefeGbx9Q1yzlu7f+0r
|
||||
bdmSEt8x9QAeK1PiQi614n1LUlbi4neXn3Ymud0m9l0G6jlVC6E5OOoPqKAIPFPhq88O+Mr7V9J1i
|
||||
/trC4kMyWaiRHyf4Sn3BjpnJGKpT6yNe0lk1W0jN2DgTBAN49T716NqOrXXiC1807dm3rIcV5j4mb
|
||||
7KrZYbsHkUAeW+JIEt7hIYwCqtvwPb/ACKwXBySec1v39nPc3DTshCNwmR1HrVGfT2jIJHFAH9Gkf
|
||||
xQspdds7KKOWaGZtr3CITHEMcMzdAM4/OuR/aP1qLXPhtqOiaVdQzXV4hQ/PhQMcknFeXeAdRnSzR
|
||||
xG88UxGx9mVJPTnHGcGuk1+4h1LSnijRHkYlVjk4kVvQHHrQB+f8A4m/Zy8Y380kOnapokEZGS91c
|
||||
vk+wAQ1zq/svfEC5/cp4i0O2KHaR5UzsT/3yM19ea9aW8R3y3ElndKSWhdBtkB6HBxj6g1w+tarcx
|
||||
RRXLxS3mmxuE3ohCA9SNwwwP1oA8Ksv2WvHGAl143s40xjba6cznn/eYVFrX7LRuYUjbxa817nkTW
|
||||
B2MPqrEj9a9jXxZqt4DEkqoVb93DKN3b+8MEHjjI9Kq6j421mwSNL64ESSqytuYOj+gYdvqKAPAvF
|
||||
/wOv9EtR5z2tyEG3fDuX9GUYryPXfB15axs62ryxhtu+Ebxn6rmvpXW9cilF00+piYDO17cOVK9Mc
|
||||
9vqO1eQ+LNVSOd3g3NAvJMmUJ+vP9aAP/9k=
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: top
|
||||
sn:: 0JvQvtCz0L7Qv9C10LQ=
|
||||
|
||||
# search result
|
||||
search: 2
|
||||
result: 0 Success
|
||||
|
||||
# numResponses: 26
|
||||
# numEntries: 25
|
59
doc/phpldapadmin-demo.conf
Normal file
@@ -0,0 +1,59 @@
|
||||
TLSCACertificateFile /etc/openldap/pla/ca-bundle.crt
|
||||
TLSCertificateFile /etc/openldap/pla/slapd.crt
|
||||
TLSCertificateKeyFile /etc/openldap/pla/slapd.key
|
||||
|
||||
access to dn.regex="dc=example.com$"
|
||||
by * write
|
||||
access to dn.regex="dc=example,dc=com$"
|
||||
by * write
|
||||
access to dn.regex="o=Simpsons$"
|
||||
by self write
|
||||
by dn.regex="cn=.*,ou=People,o=Simpsons" write
|
||||
by * read
|
||||
access to *
|
||||
by * read
|
||||
|
||||
database ldbm
|
||||
suffix "dc=example.com"
|
||||
rootdn "cn=Manager,dc=example.com"
|
||||
rootpw NotAllowed
|
||||
directory /var/lib/ldap/pla-1
|
||||
dirtyread
|
||||
cachesize 2000
|
||||
checkpoint 32 1
|
||||
# Indices to maintain for this database
|
||||
index objectClass eq,pres
|
||||
index ou,cn,mail,surname,givenname eq,pres,sub
|
||||
index uidNumber,gidNumber,loginShell eq,pres
|
||||
index uid,memberUid eq,pres,sub
|
||||
index nisMapName,nisMapEntry eq,pres,sub
|
||||
|
||||
database ldbm
|
||||
suffix "dc=example,dc=com"
|
||||
rootdn "cn=Manager,dc=example,dc=com"
|
||||
rootpw NotAllowed
|
||||
directory /var/lib/ldap/pla-2
|
||||
dirtyread
|
||||
cachesize 2000
|
||||
checkpoint 32 1
|
||||
# Indices to maintain for this database
|
||||
index objectClass eq,pres
|
||||
index ou,cn,mail,surname,givenname eq,pres,sub
|
||||
index uidNumber,gidNumber,loginShell eq,pres
|
||||
index uid,memberUid eq,pres,sub
|
||||
index nisMapName,nisMapEntry eq,pres,sub
|
||||
|
||||
database ldbm
|
||||
suffix "o=Simpsons"
|
||||
rootdn "cn=Manager,o=Simpsons"
|
||||
rootpw NotAllowed
|
||||
directory /var/lib/ldap/pla-3
|
||||
dirtyread
|
||||
cachesize 2000
|
||||
checkpoint 32 1
|
||||
# Indices to maintain for this database
|
||||
index objectClass eq,pres
|
||||
index ou,cn,mail,surname,givenname eq,pres,sub
|
||||
index uidNumber,gidNumber,loginShell eq,pres
|
||||
index uid,memberUid eq,pres,sub
|
||||
index nisMapName,nisMapEntry eq,pres,sub
|
67
doc/pla-test-i18n.ldif
Normal file
@@ -0,0 +1,67 @@
|
||||
# $Header: /cvsroot/phpldapadmin/phpldapadmin/doc/pla-test-i18n.ldif,v 1.4 2004/03/19 20:22:54 i18phpldapadmin Exp $
|
||||
# This is a Test-File for characters / encoding
|
||||
# 1. Change the
|
||||
# ,dc=example,dc=com
|
||||
# to avalue for your organisation
|
||||
# 2. Import it with phpldapadmin
|
||||
#
|
||||
# pla-i18n, example.com
|
||||
#
|
||||
dn: ou=pla-i18n,dc=example,dc=com
|
||||
ou: pla-i18n
|
||||
objectClass: top
|
||||
objectClass: organizationalUnit
|
||||
|
||||
# pl, pla-i18n, example.com
|
||||
dn: ou=pl,ou=pla-i18n,dc=example,dc=com
|
||||
description:: IGRvcMOza2k=
|
||||
description:: xITFu8WaxbnEhsWDxYHDk8SYIMSFxbzFm8W6xIfFhMWCw7PEmQ==
|
||||
description:: V3NrYXrDs3drYQ==
|
||||
objectClass: top
|
||||
objectClass: organizationalUnit
|
||||
ou: pl
|
||||
|
||||
# ru, pla-i18n, example.com
|
||||
dn: ou=ru,ou=pla-i18n,dc=example,dc=com
|
||||
description:: 0LfQstGD0YfQuNGCINC/0L7QtNC+0LHQvdC+
|
||||
description:: 0J/RgNC+0YHRgtCw0Y8g0YTQvtGA0LzQsCDQv9C+0LjRgdC6
|
||||
objectClass: top
|
||||
objectClass: organizationalUnit
|
||||
ou: ru
|
||||
|
||||
# jp, pla-i18n, example.com
|
||||
dn: ou=jp,ou=pla-i18n,dc=example,dc=com
|
||||
ou: jp
|
||||
objectClass: top
|
||||
objectClass: organizationalUnit
|
||||
description:: SVNPLTIwMjItSlDjga7lpJrlm73nsY3oqIDoqp7jgbjjga7mi6HlvLXmgKc=
|
||||
|
||||
# pt-br, pla-i18n, example.com
|
||||
dn: ou=pt-br,ou=pla-i18n,dc=example,dc=com
|
||||
ou: pt-br
|
||||
objectClass: top
|
||||
objectClass: organizationalUnit
|
||||
description:: VmVyIGFzIHJlcXVpc2nDp8O1ZXMgZW0gYWJlcnRv
|
||||
|
||||
# de, pla-i18n, example.com
|
||||
dn: ou=de,ou=pla-i18n,dc=example,dc=com
|
||||
ou: de
|
||||
objectClass: top
|
||||
objectClass: organizationalUnit
|
||||
description:: U29uZGVyemVpY2hlbiDDtsOkw7zDnyDDlsOEw5w=
|
||||
description:: w5bDliDDnMOcIMOEw4Q=
|
||||
|
||||
# sv, pla-i18n, example.com
|
||||
dn: ou=sv,ou=pla-i18n,dc=example,dc=com
|
||||
ou: sv
|
||||
objectClass: top
|
||||
objectClass: organizationalUnit
|
||||
description:: U8O2a29tZsOlbmc=
|
||||
description:: bMOldGVyIHNvbQ==
|
||||
|
||||
# ca, pla-i18n, example.com
|
||||
dn: ou=ca,ou=pla-i18n,dc=example,dc=com
|
||||
ou: ca
|
||||
objectClass: top
|
||||
objectClass: organizationalUnit
|
||||
description:: RXMgdGluZHLDoSBxdWUgY29uZmlybWFyIGFxdWVzdGEgZGVjaXNpw7M=
|
472
edit.php
@@ -1,472 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* edit.php
|
||||
* Displays the specified dn from the specified server for editing
|
||||
*
|
||||
* Variables that come in as GET vars:
|
||||
* - dn (rawurlencoded)
|
||||
* - server_id
|
||||
*/
|
||||
|
||||
/** If an entry has more children than this, stop searching and display this amount with a '+' */
|
||||
$max_children = 100;
|
||||
|
||||
require 'config.php';
|
||||
require_once 'functions.php';
|
||||
|
||||
$dn = stripslashes( rawurldecode( $_GET['dn'] ) );
|
||||
$encoded_dn = rawurlencode( $dn );
|
||||
$updated_attr = stripslashes( $_GET['updated_attr'] );
|
||||
$server_id = $_GET['server_id'];
|
||||
$show_internal_attrs = isset( $_GET['show_internal_attrs'] ) ? true : false;
|
||||
$rdn = ldap_explode_dn( $dn, 0 );
|
||||
$rdn = $rdn[0];
|
||||
|
||||
check_server_id( $server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $server_id ) );
|
||||
have_auth_info( $server_id ) or pla_error( "Not enough information to login to server. Please check your configuration." );
|
||||
pla_ldap_connect( $server_id ) or pla_error( "Coult not connect to LDAP server." );
|
||||
$friendly_attrs = process_friendly_attr_table();
|
||||
$attrs = get_object_attrs( $server_id, $dn );
|
||||
|
||||
pla_ldap_connect( $server_id ) or pla_error( "Could not connect to LDAP server" );
|
||||
$system_attrs = get_entry_system_attrs( $server_id, $dn );
|
||||
if( ! $attrs )
|
||||
pla_error( "No such dn, " . htmlspecialchars( utf8_decode( $dn ) ) );
|
||||
|
||||
$server_name = $servers[$server_id]['name'];
|
||||
|
||||
// build a list of attributes available for this object based on its objectClasses
|
||||
$oclasses = get_object_attr( $server_id, $dn, 'objectClass' );
|
||||
if( ! is_array( $oclasses ) )
|
||||
$oclasses = array( $oclasses );
|
||||
$avail_attrs = array();
|
||||
$schema_oclasses = get_schema_objectclasses( $server_id, true );
|
||||
foreach( $oclasses as $oclass )
|
||||
$avail_attrs = array_merge( $schema_oclasses[ strtolower( $oclass ) ]['must_attrs'],
|
||||
$schema_oclasses[ strtolower( $oclass ) ]['may_attrs'],
|
||||
$avail_attrs );
|
||||
|
||||
$avail_attrs = array_unique( $avail_attrs );
|
||||
$avail_attrs = array_filter( $avail_attrs, "not_an_attr" );
|
||||
|
||||
sort( $avail_attrs );
|
||||
|
||||
/* A boolean flag to indicate whether this entry has a jpegPhoto associated with it.
|
||||
* TODO If it does, the jpegPhotos will be drawn at the bottom of the form */
|
||||
$has_jpeg_photo = false;
|
||||
|
||||
?>
|
||||
|
||||
<?php include 'header.php'; ?>
|
||||
<body>
|
||||
|
||||
<h3 class="title"><?php echo htmlspecialchars( utf8_decode( $rdn ) ); ?></h3>
|
||||
<h3 class="subtitle">Server: <b><?php echo $server_name; ?></b> Distinguished Name: <b><?php echo htmlspecialchars( utf8_decode( $dn ) ); ?></b></h3>
|
||||
|
||||
<table class="edit_dn_menu">
|
||||
|
||||
<tr>
|
||||
<?php $time = gettimeofday(); $random_junk = md5( strtotime( 'now' ) . $time['usec'] ); ?>
|
||||
<td><img src="images/refresh.png" /></td>
|
||||
<td><a href="edit.php?server_id=<?php echo $server_id; ?>&dn=<?php echo $encoded_dn; ?>&random=<?php
|
||||
echo $random_junk; ?>"
|
||||
title="Refresh this entry">Refresh</a></td>
|
||||
</tr>
|
||||
|
||||
<?php if( 0 != strcasecmp( $dn, $servers[$server_id]['base'] ) ) { ?>
|
||||
<?php /* We won't allow them to delete the base dn of the server */ ?>
|
||||
<tr>
|
||||
<td><img src="images/trash.png" /></td>
|
||||
<td><a href="delete_form.php?server_id=<?php echo $server_id; ?>&dn=<?php echo $encoded_dn; ?>"
|
||||
title="You will be prompted to confirm this decision">Delete this entry</a></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<tr>
|
||||
<td><img src="images/cut.png" /></td>
|
||||
<td><a href="copy_form.php?server_id=<?php echo $server_id; ?>&dn=<?php echo $encoded_dn?>"
|
||||
title="Copy this object to another location, a new DN, or another server">Copy this entry</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="images/save.png" /></td>
|
||||
<?php $ldif_url = "ldif_export.php?server_id=$server_id&dn=$encoded_dn&scope=base"; ?>
|
||||
<td><a href="<?php echo $ldif_url; ?>" title="Save an LDIF dump of this object">Export to LDIF</a>
|
||||
(<a href="<?php echo $ldif_url; ?>&format=mac" title="Macintosh style carriage returns">mac</a>)
|
||||
(<a href="<?php echo $ldif_url; ?>&format=win" title="Windows style carriage returns">win</a>)
|
||||
(<a href="<?php echo $ldif_url; ?>&format=unix" title="Unix style carriage returns">unix</a>)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="images/star.png" /></td>
|
||||
<td><a href="<?php echo "create_form.php?server_id=$server_id&container=$encoded_dn"; ?>">Create a child entry</a></td>
|
||||
</tr>
|
||||
|
||||
<?php flush(); ?>
|
||||
<?php $children = get_container_contents( $server_id, $dn, $max_children );
|
||||
|
||||
if( ($children_count = count( $children ) ) > 0 ) {
|
||||
if( $children_count == $max_children )
|
||||
$children_count = $children_count . '+';
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><img src="images/children.png" /></td>
|
||||
<td><a href="search.php?search=true&server_id=<?php echo $server_id; ?>&filter=<?php echo rawurlencode('objectClass=*'); ?>&base_dn=<?php echo $encoded_dn; ?>&form=advanced&scope=one">View <?php echo $children_count; ?> <?php echo ($children_count==1?'child':'children');?></a></td>
|
||||
</tr>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if( $children_count > 0 ) { ?>
|
||||
|
||||
<tr>
|
||||
<td><img src="images/save.png" /></td>
|
||||
<?php $ldif_url = "ldif_export.php?server_id=$server_id&dn=$encoded_dn&scope=sub"; ?>
|
||||
<td><a href="<?php echo $ldif_url; ?>" title="Save an LDIF dump of this object and all of its children">Export subtree to LDIF</a>
|
||||
(<a href="<?php echo $ldif_url; ?>&format=mac" title="Macintosh style carriage returns">mac</a>)
|
||||
(<a href="<?php echo $ldif_url; ?>&format=win" title="Windows style carriage returns">win</a>)
|
||||
(<a href="<?php echo $ldif_url; ?>&format=unix" title="Unix style carriage returns">unix</a>)
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if( in_array( 'jpegPhoto', $avail_attrs ) ) { ?>
|
||||
|
||||
<?php $new_jpeg_href = "new_jpeg_photo_form.php?server_id=$server_id&dn=$encoded_dn&attr=jpegPhoto"; ?>
|
||||
<tr>
|
||||
<td><img src="images/photo.png" /></td>
|
||||
<td><a href="<?php echo $new_jpeg_href; ?>">Add a jpegPhoto</a></td>
|
||||
</tr>
|
||||
|
||||
<?php } ?>
|
||||
</table>
|
||||
<br />
|
||||
|
||||
<table class="edit_dn" cellspacing="0">
|
||||
|
||||
|
||||
<!-- Form to rename this entry -->
|
||||
<tr class="row1">
|
||||
<td class="heading"><acronym title="Change this entry's RDN">Rename Entry</acronym></td>
|
||||
<td class="heading" align="right">
|
||||
<nobr>
|
||||
<form action="rename.php" method="post" class="edit_dn" />
|
||||
<input type="hidden" name="server_id" value="<?php echo $server_id; ?>" />
|
||||
<input type="hidden" name="dn" value="<?php echo $encoded_dn; ?>" />
|
||||
<input type="text" name="new_rdn" size="40" value="<?php echo htmlspecialchars( utf8_decode( $rdn ) ); ?>" />
|
||||
<input class="update_dn" type="submit" value="Rename" />
|
||||
</form>
|
||||
</nobr>
|
||||
</td>
|
||||
|
||||
<tr class="spacer"><td colspan="2"></td></tr>
|
||||
|
||||
<form action="new_attr.php" method="post">
|
||||
<input type="hidden" name="server_id" value="<?php echo $server_id; ?>" />
|
||||
<input type="hidden" name="dn" value="<?php echo $encoded_dn; ?>" />
|
||||
|
||||
<!-- Form to add a new attribute to this entry -->
|
||||
<tr class="row1">
|
||||
<td class="heading">
|
||||
<nobr>
|
||||
<acronym title="Add a new attribute/value to this entry">Add New Attribute</acronym>
|
||||
</nobr>
|
||||
</td>
|
||||
<td class="heading" align="right"><nobr>
|
||||
<?php if( is_array( $avail_attrs ) && count( $avail_attrs ) > 0 ) { ?>
|
||||
|
||||
<select name="attr">
|
||||
<?php foreach( $avail_attrs as $a ) {
|
||||
// is there a user-friendly translation available for this attribute?
|
||||
if( isset( $friendly_attrs[ strtolower( $a ) ] ) ) {
|
||||
$attr_display = htmlspecialchars( $friendly_attrs[ strtolower( $a ) ] ) . " (" .
|
||||
htmlspecialchars($a) . ")";
|
||||
} else {
|
||||
$attr_display = htmlspecialchars( $a );
|
||||
}
|
||||
|
||||
echo $attr_display;
|
||||
$attr_select_html .= "<option>$attr_display</option>\n";
|
||||
echo "<option value=\"" . htmlspecialchars($a) . "\">$attr_display</option>";
|
||||
} ?>
|
||||
</select>
|
||||
<input type="text" name="val" size="20" />
|
||||
<input type="submit" name="submit" value="Add" class="update_dn" />
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<small>(no new attributes available for this entry)</small>
|
||||
|
||||
<?php } ?>
|
||||
</nobr></td>
|
||||
</form>
|
||||
</tr>
|
||||
|
||||
<?php flush(); ?>
|
||||
<tr class="spacer"><td colspan="2"></td></tr>
|
||||
|
||||
<tr class="row1">
|
||||
<td class="heading" colspan="2">
|
||||
<nobr>
|
||||
<?php if( $show_internal_attrs ) { ?>
|
||||
|
||||
<a href="edit.php?server_id=<?php echo $server_id; ?>&dn=<?php echo $encoded_dn; ?>"
|
||||
><img src="images/minus.png" title="Hide internal attributes" /></a>
|
||||
<acronym title="Attributes set automatically by the system">Internal Attriubtes</acronym>
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<a href="edit.php?server_id=<?php echo $server_id; ?>&dn=<?php echo $encoded_dn; ?>&show_internal_attrs=true">
|
||||
<img src="images/plus.png" title="Show internal attributes" /></a>
|
||||
<acronym title="Attributes set automatically by the system (click + to display)">Internal Attriubtes</acronym>
|
||||
<small>(hidden)</small>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</nobr>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if( $show_internal_attrs ) {
|
||||
$counter = 0;
|
||||
foreach( get_entry_system_attrs( $server_id, $dn ) as $attr => $val ) {
|
||||
$counter++
|
||||
?>
|
||||
<tr class="<?php echo ($counter%2==0?'row1':'row2');?>">
|
||||
<td class="attr"><b><?php echo htmlspecialchars( $attr ); ?></b></td>
|
||||
<td class="val"><?php echo htmlspecialchars( $val ); ?></td>
|
||||
</tr>
|
||||
<?php }
|
||||
if( $counter == 0 )
|
||||
echo "<tr class=\"row2\"><td colspan=\"2\"><center>(none)</center></td></tr>\n";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php flush(); ?>
|
||||
<tr class="spacer"><td colspan="2"></td></tr>
|
||||
|
||||
<!-- Table of attributes/values to edit -->
|
||||
<tr class="row1">
|
||||
<td class="heading" colspan="2">
|
||||
<nobr>
|
||||
<acronym title="Edit the contents of the form below and click Save.">Modify Attributes</acronym>
|
||||
</nobr>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<form action="update_confirm.php" method="post">
|
||||
<input type="hidden" name="server_id" value="<?php echo $server_id; ?>" />
|
||||
<input type="hidden" name="dn" value="<?php echo rawurlencode($dn); ?>" />
|
||||
|
||||
<?php if( $edit_dn_schema_lookup ) $schema_attrs = get_schema_attributes( $server_id ); ?>
|
||||
|
||||
<?php $counter=0; ?>
|
||||
<?php foreach( $attrs as $attr => $vals ) {
|
||||
flush();
|
||||
if( $attr == 'dn' )
|
||||
continue;
|
||||
|
||||
// is there a user-friendly translation available for this attribute?
|
||||
if( isset( $friendly_attrs[ strtolower( $attr ) ] ) ) {
|
||||
$attr_display = "<acronym title=\"Alias for $attr\">" .
|
||||
$friendly_attrs[ strtolower( $attr ) ] . "</acronym>";
|
||||
} else {
|
||||
$attr_display = $attr;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php if( $attr == $updated_attr ) { ?>
|
||||
<tr class="updated_attr">
|
||||
<?php } else { ?>
|
||||
<?php if( $counter++ % 2 == 0 ) { ?>
|
||||
<tr class="row2">
|
||||
<?php } else { ?>
|
||||
<tr class="row1">
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php $add_href = "add_value_form.php?server_id=$server_id&dn=$encoded_dn&attr=" . rawurlencode( $attr ); ?>
|
||||
|
||||
<td class="attr">
|
||||
<b><?php echo $attr_display; ?></b><br />
|
||||
<small>(<a href="<?php echo $add_href; ?>"
|
||||
title="Add an additional value to this attribute">add value</a>)</small>
|
||||
</td>
|
||||
|
||||
<td class="val">
|
||||
|
||||
<?php if( 0==strcasecmp( $attr, 'jpegPhoto' ) ) {
|
||||
|
||||
$has_jpeg_photo = true;
|
||||
|
||||
// Don't draw the delete buttons if there is more than one jpegPhoto
|
||||
// (phpLDAPAdmin can't handle this case yet)
|
||||
if( is_array( $vals ) )
|
||||
draw_jpeg_photos( $server_id, $dn, false );
|
||||
else
|
||||
draw_jpeg_photos( $server_id, $dn, true );
|
||||
|
||||
// proceed to the next attribute
|
||||
continue;
|
||||
|
||||
} ?>
|
||||
|
||||
<?php /*
|
||||
* This is next IF statement is a KLUGE!! If anyone knows a better way to check for
|
||||
* binary data that works with UTF-8 encoded strings, please help
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php if( 0==strcasecmp( $attr, 'networkAddress' ) ) { ?>
|
||||
|
||||
<small>This attribute contains binary data,<br />
|
||||
which cannot be safely displayed<br />
|
||||
or edited in a web-browser.</small>
|
||||
</td>
|
||||
|
||||
<?php continue; ?>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php /* is this a multi-valued attribute? */ ?>
|
||||
<?php if( is_array( $vals ) ) { ?>
|
||||
<?php foreach( $vals as $i => $val ) { ?>
|
||||
|
||||
<?php $val = utf8_decode( $val ); ?>
|
||||
|
||||
<nobr>
|
||||
<!-- The old_values array will let update.php know if the entry contents changed
|
||||
between the time the user loaded this page and saved their changes. -->
|
||||
<input type="hidden"
|
||||
name="old_values[<?php echo htmlspecialchars( $attr ); ?>][<?php echo $i; ?>]"
|
||||
value="<?php echo htmlspecialchars($val); ?>" />
|
||||
|
||||
<input type="text"
|
||||
size="60"
|
||||
name="new_values[<?php echo htmlspecialchars( $attr ); ?>][<?php echo $i; ?>]"
|
||||
value="<?php echo htmlspecialchars($val); ?>" /></nobr><br />
|
||||
<?php } ?>
|
||||
<?php /* this a single-valued attribute */ ?>
|
||||
<?php } else { ?>
|
||||
<?php $val = $vals; ?>
|
||||
|
||||
<?php $val = utf8_decode( $val ); ?>
|
||||
|
||||
<nobr>
|
||||
<?php /* This series of if/elseif/else is for special cases of attributes (userPassword, boolean, etc) */ ?>
|
||||
<?php if( 0 == strcasecmp( $attr, 'userpassword' ) ) { ?>
|
||||
|
||||
<?php /* Capture the stuff in the { } if any */
|
||||
preg_match( "/{([^}]+)}/", $val, $enc_type); $enc_type = strtolower($enc_type[1]); ?>
|
||||
|
||||
<?php /* handle crypt types */
|
||||
if($enc_type == "crypt") {
|
||||
preg_match( '/{[^}]+}\$(.)\$/', $val, $salt);
|
||||
switch( $salt[1] ) {
|
||||
case '': // CRYPT_STD_DES
|
||||
$enc_type = "crypt";
|
||||
break;
|
||||
case '1': // CRYPT_MD5
|
||||
$enc_type = "md5crypt";
|
||||
break;
|
||||
case '2': // CRYPT_BLOWFISH
|
||||
$enc_type = "blowfish";
|
||||
break;
|
||||
default:
|
||||
$enc_type = "crypt";
|
||||
}
|
||||
} ?>
|
||||
|
||||
|
||||
<input type="hidden"
|
||||
name="old_values[userpassword]"
|
||||
value="<?php echo htmlspecialchars($val); ?>" />
|
||||
|
||||
<input size="48"
|
||||
type="text"
|
||||
name="new_values[userpassword]"
|
||||
value="<?php echo htmlspecialchars($val); ?>" />
|
||||
|
||||
<select name="enc_type">
|
||||
<option>clear</option>
|
||||
<option<?php echo $enc_type=='crypt'?' selected':''; ?>>crypt</option>
|
||||
<option<?php echo $enc_type=='md5'?' selected':''; ?>>md5</option>
|
||||
<option<?php echo $enc_type=='md5crypt'?' selected':''; ?>>md5crypt</option>
|
||||
<option<?php echo $enc_type=='blowfish'?' selected':''; ?>>blowfish</option>
|
||||
<option<?php echo $enc_type=='sha'?' selected':''; ?>>sha</option>
|
||||
</select>
|
||||
|
||||
<?php } elseif( $edit_dn_schema_lookup &&
|
||||
'Boolean' == $schema_attrs[ strtolower($attr) ]['type'] ) { ?>
|
||||
|
||||
<input type="hidden"
|
||||
name="old_values[<?php echo htmlspecialchars( $attr ); ?>]"
|
||||
value="<?php echo htmlspecialchars($val); ?>" />
|
||||
|
||||
<select name="new_values[<?php echo htmlspecialchars( $attr ); ?>]">
|
||||
<option value="TRUE"<?php echo ($val=='TRUE' ? ' selected' : ''); ?>>TRUE</option>
|
||||
<option value="FALSE"<?php echo ($val=='FALSE' ? ' selected' : ''); ?>>FALSE</option>
|
||||
<option value="">(none -- remove value)</option>
|
||||
</select>
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<input type="hidden"
|
||||
name="old_values[<?php echo htmlspecialchars( $attr ); ?>]"
|
||||
value="<?php echo htmlspecialchars($val); ?>" />
|
||||
|
||||
<input size="60"
|
||||
type="text"
|
||||
name="new_values[<?php echo htmlspecialchars( $attr ); ?>]"
|
||||
value="<?php echo htmlspecialchars($val); ?>" />
|
||||
|
||||
<?php } ?>
|
||||
</nobr>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<tr><td colspan="2"><center><input type="submit" value="Save Changes" /></center></form></td></tr>
|
||||
|
||||
<?php
|
||||
?>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
<?php /* If this entry has a jpegPhoto, we need to provide a form for it to submit when deleting it. */ ?>
|
||||
<?php if( $has_jpeg_photo ) { ?>
|
||||
<script language="javascript">
|
||||
<!--
|
||||
function deleteJpegPhoto()
|
||||
{
|
||||
if( confirm( "Really delete jpegPhoto?" ) )
|
||||
document.delete_jpeg_photo_form.submit();
|
||||
}
|
||||
|
||||
-->
|
||||
</script>
|
||||
<!-- TODO: Go to update_confirm.php instead of directly to update.php -->
|
||||
<form name="delete_jpeg_photo_form" action="update.php" method="post">
|
||||
<input type="hidden" name="server_id" value="<?php echo $server_id; ?>" />
|
||||
<input type="hidden" name="dn" value="<?php echo $encoded_dn; ?>" />
|
||||
<input type="hidden" name="update_array[jpegPhoto]" value="" />
|
||||
</form>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
|
||||
function not_an_attr( $x )
|
||||
{
|
||||
global $attrs;
|
||||
return ! isset( $attrs[ strtolower( $x ) ] );
|
||||
}
|
||||
|
||||
?>
|
@@ -1,73 +0,0 @@
|
||||
<?php
|
||||
|
||||
require 'config.php';
|
||||
require_once 'functions.php';
|
||||
$container = isset( $_GET['container'] ) ? rawurldecode( $_GET['container'] ) : false;
|
||||
$server_id = isset( $_GET['server_id'] ) ? $_GET['server_id'] : false;
|
||||
$return_form_element = $_GET['form_element'];
|
||||
|
||||
include "header.php";
|
||||
|
||||
echo "<h3 class=\"subtitle\">Automagic Entry Chooser</h3>\n";
|
||||
|
||||
if( $container ) {
|
||||
echo "Server: <b>" . htmlspecialchars( $servers[ $server_id ][ 'name' ] ) . "</b><br />\n";
|
||||
echo "Looking in: <b>" . htmlspecialchars( $container ) . "</b><br />\n";
|
||||
}
|
||||
|
||||
if( $server_id !== false && $container !== false )
|
||||
{
|
||||
check_server_id( $server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $server_id ) );
|
||||
have_auth_info( $server_id ) or pla_error( "Not enough information to login to server. ".
|
||||
"Please check your configuration." );
|
||||
pla_ldap_connect( $server_id ) or pla_error( "Coult not connect to LDAP server." );
|
||||
$dn_list = get_container_contents( $server_id, $container );
|
||||
|
||||
$base_dn = $servers[ $server_id ][ 'base' ];
|
||||
if( ! $base_dn )
|
||||
$base_dn = try_to_get_root_dn( $server_id );
|
||||
|
||||
if( $container == $base_dn ) {
|
||||
$parent_container = false;
|
||||
$up_href = "entry_chooser.php?form_element=$return_form_element";
|
||||
} else {
|
||||
$parent_container = get_container( $container );
|
||||
$up_href = "entry_chooser.php?form_element=$return_form_element&server_id=$server_id&container=" .
|
||||
rawurlencode( $parent_container );
|
||||
}
|
||||
echo " <a href=\"$up_href\" style=\"text-decoration:none\">" .
|
||||
"<img src=\"images/up.png\"> Back Up...</a><br />\n";
|
||||
|
||||
if( count( $dn_list ) == 0 )
|
||||
echo " (no entries)<br />\n";
|
||||
else
|
||||
foreach( $dn_list as $dn ) {
|
||||
$href = "javascript:returnDN( '$dn' )";
|
||||
echo " <a href=\"entry_chooser.php?form_element=$return_form_element&server_id=$server_id&container=" .
|
||||
rawurlencode( $dn ) . "\"><img src=\"images/plus.png\" /></a> " .
|
||||
"<a href=\"$href\">" . htmlspecialchars( $dn ) . "</a><br />\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach( $servers as $id => $server ) {
|
||||
if( $server['host'] ) {
|
||||
echo htmlspecialchars( $server['name'] ) . "<br />\n";
|
||||
$dn = ( $server['base'] ? $server['base'] : try_to_get_root_dn( $id ) );
|
||||
$href = "javascript:returnDN( '$dn' )";
|
||||
echo " <a href=\"entry_chooser.php?form_element=$return_form_element&server_id=$id&container=" .
|
||||
rawurlencode( $dn ) . "\"><img src=\"images/plus.png\" /></a> " .
|
||||
"<a href=\"$href\">" . htmlspecialchars( $dn ) . "</a><br />\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<script language="javascript">
|
||||
function returnDN( dn )
|
||||
{
|
||||
opener.document.<?php echo $return_form_element; ?>.value = dn;
|
||||
close();
|
||||
}
|
||||
</script>
|
60
expand.php
@@ -1,60 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* expand.php
|
||||
* This script alters the session variable 'tree', expanding it
|
||||
* at the dn specified in the query string.
|
||||
*
|
||||
* Variables that come in as GET vars:
|
||||
* - dn (rawurlencoded)
|
||||
* - server_id
|
||||
*
|
||||
* Note: this script is equal and opposite to collapse.php
|
||||
*/
|
||||
|
||||
require 'config.php';
|
||||
require_once 'functions.php';
|
||||
|
||||
// no expire header stuff
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
$dn = stripslashes( $_GET['dn'] );
|
||||
$encoded_dn = rawurlencode( $dn );
|
||||
$server_id = $_GET['server_id'];
|
||||
|
||||
check_server_id( $server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $server_id ) );
|
||||
have_auth_info( $server_id ) or pla_error( "Not enough information to login to server. Please check your configuration." );
|
||||
|
||||
session_start();
|
||||
|
||||
session_is_registered( 'tree' ) or pla_error( "Your session tree is not registered. That's weird. Shouldn't ever happen".
|
||||
". Just go back and it should be fixed automagically." );
|
||||
$tree = $_SESSION['tree'];
|
||||
$tree_icons = $_SESSION['tree_icons'];
|
||||
|
||||
pla_ldap_connect( $server_id ) or pla_error( "Could not connect to LDAP server" );
|
||||
$contents = get_container_contents( $server_id, $dn );
|
||||
|
||||
sort( $contents );
|
||||
$tree[$server_id][$dn] = $contents;
|
||||
|
||||
foreach( $contents as $dn )
|
||||
$tree_icons[$server_id][$dn] = get_icon( $server_id, $dn );
|
||||
|
||||
$_SESSION['tree'] = $tree;
|
||||
$_SESSION['tree_icons'] = $tree_icons;
|
||||
session_write_close();
|
||||
|
||||
// This is for Opera. By putting "random junk" in the query string, it thinks
|
||||
// that it does not have a cached version of the page, and will thus
|
||||
// fetch the page rather than display the cached version
|
||||
$time = gettimeofday();
|
||||
$random_junk = md5( strtotime( 'now' ) . $time['usec'] );
|
||||
|
||||
header( "Location: tree.php?foo=$random_junk#{$server_id}_{$encoded_dn}" );
|
||||
|
||||
?>
|
1174
functions.php
11
header.php
@@ -1,11 +0,0 @@
|
||||
<?php echo "<?xml version=\"1.0\" encoding=\"utf-8\?>\n"; ?>
|
||||
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
|
||||
"http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="no-NO">
|
||||
<head>
|
||||
<title>phpLDAPAdmin</title>
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<script src="entry_chooser.js"></script>
|
||||
</head>
|
3
hooks/classes/README
Normal file
@@ -0,0 +1,3 @@
|
||||
Put your hook class files here.
|
||||
|
||||
A file wich contains "class MyClass" definition must be called "MyClass.php".
|
1
hooks/functions/README
Normal file
@@ -0,0 +1 @@
|
||||
Put your hook function files here.
|
163
htdocs/add_attr.php
Normal file
@@ -0,0 +1,163 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/add_attr.php,v 1.20 2007/12/15 07:50:30 wurley Exp $
|
||||
|
||||
/**
|
||||
* Adds an attribute/value pair to an object
|
||||
*
|
||||
* Variables that come in as POST vars:
|
||||
* - dn
|
||||
* - attr
|
||||
* - val
|
||||
* - binary
|
||||
*
|
||||
* @package phpLDAPadmin
|
||||
* @todo: For boolean attributes, convert the response to TRUE/FALSE.
|
||||
*/
|
||||
/**
|
||||
*/
|
||||
|
||||
require './common.php';
|
||||
|
||||
if ($ldapserver->isReadOnly())
|
||||
pla_error(_('You cannot perform updates while server is in read-only mode'));
|
||||
|
||||
if (! $_SESSION['plaConfig']->isCommandAvailable('attribute_add'))
|
||||
pla_error(sprintf('%s%s %s',_('This operation is not permitted by the configuration'),_(':'),_('add attribute')));
|
||||
|
||||
$entry['val'] = get_request('val','POST');
|
||||
$entry['binary'] = get_request('binary','POST');
|
||||
|
||||
$entry['dn']['string'] = get_request('dn','POST');
|
||||
$entry['dn']['encode'] = rawurlencode($entry['dn']['string']);
|
||||
|
||||
$entry['attr']['string'] = get_request('attr','POST');
|
||||
$entry['attr']['encode'] = rawurlencode($entry['attr']['string']);
|
||||
|
||||
if ((strlen($entry['binary']) <= 0) && (strlen($entry['val']) <= 0))
|
||||
pla_error(_('You left the attribute value blank. Please go back and try again.'));
|
||||
|
||||
/*
|
||||
* Special case for binary attributes (like jpegPhoto and userCertificate):
|
||||
* we must go read the data from the file and override $val with the binary data
|
||||
* Secondly, we must check if the ";binary" option has to be appended to the name
|
||||
* of the attribute.
|
||||
*/
|
||||
|
||||
# Check to see if this is a unique Attribute
|
||||
if ($badattr = $ldapserver->checkUniqueAttr($entry['dn']['string'],$entry['attr']['string'],array($entry['val']))) {
|
||||
$href = htmlspecialchars(sprintf('cmd.php?cmd=search&search=true&form=advanced&server_id=%s&filter=%s=%s',
|
||||
$ldapserver->server_id,$entry['attr']['string'],$badattr));
|
||||
|
||||
pla_error(sprintf(_('Your attempt to add <b>%s</b> (<i>%s</i>) to <br><b>%s</b><br> is NOT allowed. That attribute/value belongs to another entry.<p>You might like to <a href=\'%s\'>search</a> for that entry.'),$entry['attr']['string'],$badattr,$entry['dn']['string'],$href));
|
||||
}
|
||||
|
||||
if (strlen($entry['binary']) > 0) {
|
||||
if ($_FILES['val']['size'] == 0)
|
||||
pla_error(_('The file you chose is either empty or does not exist. Please go back and try again.'));
|
||||
|
||||
if (! is_uploaded_file($_FILES['val']['tmp_name'])) {
|
||||
if (isset($_FILES['val']['error']))
|
||||
|
||||
switch($_FILES['val']['error']) {
|
||||
case 0: # No error; possible file attack!
|
||||
pla_error(_('Security error: The file being uploaded may be malicious.'));
|
||||
break;
|
||||
|
||||
case 1: # Uploaded file exceeds the upload_max_filesize directive in php.ini
|
||||
pla_error(_('The file you uploaded is too large. Please check php.ini, upload_max_size setting'));
|
||||
break;
|
||||
|
||||
case 2: # Uploaded file exceeds the MAX_FILE_SIZE directive specified in the html form
|
||||
pla_error(_('The file you uploaded is too large. Please check php.ini, upload_max_size setting'));
|
||||
break;
|
||||
|
||||
case 3: # Uploaded file was only partially uploaded
|
||||
pla_error(_('The file you selected was only partially uploaded, likley due to a network error.'));
|
||||
break;
|
||||
|
||||
case 4: # No file was uploaded
|
||||
pla_error(_('You left the attribute value blank. Please go back and try again.'));
|
||||
break;
|
||||
|
||||
default: # A default error, just in case! :)
|
||||
pla_error(_('Security error: The file being uploaded may be malicious.'));
|
||||
break;
|
||||
}
|
||||
|
||||
else
|
||||
pla_error(_('Security error: The file being uploaded may be malicious.'));
|
||||
}
|
||||
|
||||
$binaryfile['name'] = $_FILES['val']['tmp_name'];
|
||||
$binaryfile['handle'] = fopen($binaryfile['name'],'r');
|
||||
$binaryfile['data'] = fread($binaryfile['handle'],filesize($binaryfile['name']));
|
||||
fclose($binaryfile['handle']);
|
||||
|
||||
$entry['val'] = $binaryfile['data'];
|
||||
|
||||
if (is_binary_option_required($ldapserver,$entry['attr']['string']))
|
||||
$entry['attr']['string'] .= ';binary';
|
||||
}
|
||||
|
||||
/* Automagically hash new userPassword attributes according to the
|
||||
chosen in config.php. */
|
||||
if (strcasecmp($entry['attr']['string'],'userpassword') == 0) {
|
||||
if (trim($ldapserver->default_hash) != '' ) {
|
||||
$enc_type = $ldapserver->default_hash;
|
||||
$entry['val'] = password_hash($entry['val'],$enc_type);
|
||||
}
|
||||
|
||||
} elseif (strcasecmp($entry['attr']['string'],'sambaNTPassword') == 0) {
|
||||
$sambapassword = new smbHash;
|
||||
$entry['val'] = $sambapassword->nthash($entry['val']);
|
||||
|
||||
} elseif (strcasecmp($entry['attr']['string'],'sambaLMPassword') == 0) {
|
||||
$sambapassword = new smbHash;
|
||||
$entry['val'] = $sambapassword->lmhash($entry['val']);
|
||||
}
|
||||
|
||||
$new_entry = array($entry['attr']['string'] => $entry['val']);
|
||||
$result = $ldapserver->attrModify($entry['dn']['string'],$new_entry);
|
||||
|
||||
if ($result) {
|
||||
header(sprintf('Location: cmd.php?cmd=template_engine&server_id=%s&dn=%s&modified_attrs[]=%s',
|
||||
$ldapserver->server_id,$entry['dn']['encode'],$entry['attr']['encode']));
|
||||
die();
|
||||
|
||||
} else {
|
||||
pla_error(_('Failed to add the attribute.'),$ldapserver->error(),$ldapserver->errno());
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if we need to append the ;binary option to the name
|
||||
* of some binary attribute
|
||||
*
|
||||
* @param object $ldapserver Server Object that the attribute is in.
|
||||
* @param attr $attr Attribute to test to see if it requires ;binary added to it.
|
||||
* @return bool
|
||||
*/
|
||||
|
||||
function is_binary_option_required($ldapserver,$attr) {
|
||||
# List of the binary attributes which need the ";binary" option
|
||||
$binary_attributes_with_options = array(
|
||||
# Superior: Ldapv3 Syntaxes (1.3.6.1.4.1.1466.115.121.1)
|
||||
'1.3.6.1.4.1.1466.115.121.1.8' => 'userCertificate',
|
||||
'1.3.6.1.4.1.1466.115.121.1.8' => 'caCertificate',
|
||||
'1.3.6.1.4.1.1466.115.121.1.10' => 'crossCertificatePair',
|
||||
'1.3.6.1.4.1.1466.115.121.1.9' => 'certificateRevocationList',
|
||||
'1.3.6.1.4.1.1466.115.121.1.9' => 'authorityRevocationList',
|
||||
# Superior: Netscape Ldap attributes types (2.16.840.1.113730.3.1)
|
||||
'2.16.840.1.113730.3.1.40' => 'userSMIMECertificate'
|
||||
);
|
||||
|
||||
$schema_attr = $ldapserver->getSchemaAttribute($attr);
|
||||
if (! $schema_attr)
|
||||
return false;
|
||||
|
||||
$syntax = $schema_attr->getSyntaxOID();
|
||||
if (isset($binary_attributes_with_options[$syntax]))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
?>
|
182
htdocs/add_attr_form.php
Normal file
@@ -0,0 +1,182 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/add_attr_form.php,v 1.16 2007/12/15 07:50:30 wurley Exp $
|
||||
|
||||
/**
|
||||
* Displays a form for adding an attribute/value to an LDAP entry.
|
||||
*
|
||||
* Variables that come in as GET vars:
|
||||
* - dn (rawurlencoded)
|
||||
*
|
||||
* @package phpLDAPadmin
|
||||
*/
|
||||
/**
|
||||
*/
|
||||
|
||||
require './common.php';
|
||||
|
||||
if ($ldapserver->isReadOnly())
|
||||
pla_error(_('You cannot perform updates while server is in read-only mode'));
|
||||
|
||||
$entry['dn']['string'] = get_request('dn','GET');
|
||||
$entry['rdn'] = get_rdn($entry['dn']['string']);
|
||||
|
||||
printf('<h3 class="title">%s <b>%s</b></h3>',_('Add new attribute'),htmlspecialchars($entry['rdn']));
|
||||
printf('<h3 class="subtitle">%s: <b>%s</b> %s: <b>%s</b></h3>',
|
||||
_('Server'),$ldapserver->name,_('Distinguished Name'),htmlspecialchars($entry['dn']['string']));
|
||||
|
||||
$dn['attrs'] = $ldapserver->getDNAttrs($entry['dn']['string']);
|
||||
$dn['oclasses'] = $ldapserver->getDNAttr($entry['dn']['string'],'objectClass');
|
||||
|
||||
if (! is_array($dn['oclasses']))
|
||||
$dn['oclasses'] = array($dn['oclasses']);
|
||||
|
||||
$ldap['attrs']['avail'] = array();
|
||||
|
||||
if (array_search('extensibleObject',$dn['oclasses']) !== false) {
|
||||
$ldap['attrs']['ldap'] = $ldapserver->SchemaAttributes();
|
||||
|
||||
foreach ($ldap['attrs']['ldap'] as $attr)
|
||||
$ldap['attrs']['avail'][] = $attr->getName();
|
||||
|
||||
} else {
|
||||
$ldap['oclasses'] = $ldapserver->SchemaObjectClasses($entry['dn']['string']);
|
||||
|
||||
foreach ($dn['oclasses'] as $oclass) {
|
||||
$ldap['oclass'] = $ldapserver->getSchemaObjectClass($oclass,$entry['dn']['string']);
|
||||
|
||||
if ($ldap['oclass'] && strcasecmp('objectclass',get_class($ldap['oclass'])) == 0)
|
||||
$ldap['attrs']['avail'] = array_merge($ldap['oclass']->getMustAttrNames($ldap['oclasses']),
|
||||
$ldap['oclass']->getMayAttrNames($ldap['oclasses']),
|
||||
$ldap['attrs']['avail']);
|
||||
}
|
||||
}
|
||||
|
||||
$ldap['attrs']['avail'] = array_unique($ldap['attrs']['avail']);
|
||||
$ldap['attrs']['avail'] = array_filter($ldap['attrs']['avail'],'not_an_attr');
|
||||
sort($ldap['attrs']['avail']);
|
||||
|
||||
$ldap['binattrs']['avail'] = array();
|
||||
|
||||
foreach ($ldap['attrs']['avail'] as $i => $attr) {
|
||||
if ($ldapserver->isAttrBinary($attr)) {
|
||||
$ldap['binattrs']['avail'][] = $attr;
|
||||
unset($ldap['attrs']['avail'][$i]);
|
||||
}
|
||||
}
|
||||
|
||||
echo '<center>';
|
||||
|
||||
if (is_array($ldap['attrs']['avail']) && count($ldap['attrs']['avail']) > 0) {
|
||||
echo '<br />';
|
||||
echo _('Add new attribute');
|
||||
echo '<br />';
|
||||
echo '<br />';
|
||||
|
||||
echo '<form action="cmd.php" method="post">';
|
||||
echo '<input type="hidden" name="cmd" value="add_attr" />';
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
|
||||
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($entry['dn']['string']));
|
||||
|
||||
echo '<select name="attr">';
|
||||
|
||||
$attr_select_html = '';
|
||||
usort($ldap['attrs']['avail'],'sortAttrs');
|
||||
|
||||
foreach ($ldap['attrs']['avail'] as $a) {
|
||||
|
||||
# is there a user-friendly translation available for this attribute?
|
||||
if (isset($_SESSION['plaConfig']->friendly_attrs[strtolower($a)])) {
|
||||
$attr_display = sprintf('%s (%s)',
|
||||
htmlspecialchars($_SESSION['plaConfig']->friendly_attrs[strtolower($a)]),
|
||||
htmlspecialchars($a));
|
||||
|
||||
} else {
|
||||
$attr_display = htmlspecialchars($a);
|
||||
}
|
||||
|
||||
printf('<option value="%s">%s</option>',htmlspecialchars($a),$attr_display);
|
||||
}
|
||||
|
||||
echo '</select>';
|
||||
|
||||
echo '<input type="text" name="val" size="20" />';
|
||||
printf('<input type="submit" name="submit" value="%s" class="update_dn" />',_('Add'));
|
||||
echo '</form>';
|
||||
|
||||
} else {
|
||||
echo '<br />';
|
||||
printf('<small>(%s)</small>',_('no new attributes available for this entry'));
|
||||
}
|
||||
|
||||
if (count($ldap['binattrs']['avail']) > 0) {
|
||||
echo '<br />';
|
||||
echo _('Add new binary attribute');
|
||||
echo '<br />';
|
||||
echo '<br />';
|
||||
|
||||
echo '<!-- Form to add a new BINARY attribute to this entry -->';
|
||||
echo '<form action="cmd.php" method="post" enctype="multipart/form-data">';
|
||||
echo '<input type="hidden" name="cmd" value="add_attr" />';
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
|
||||
printf('<input type="hidden" name="dn" value="%s" />',$entry['dn']['string']);
|
||||
echo '<input type="hidden" name="binary" value="true" />';
|
||||
|
||||
echo '<select name="attr">';
|
||||
|
||||
$attr_select_html = '';
|
||||
usort($ldap['binattrs']['avail'],'sortAttrs');
|
||||
|
||||
foreach ($ldap['binattrs']['avail'] as $a) {
|
||||
|
||||
# is there a user-friendly translation available for this attribute?
|
||||
if (isset($_SESSION['plaConfig']->friendly_attrs[strtolower($a)])) {
|
||||
$attr_display = sprintf('%s (%s)',
|
||||
htmlspecialchars($_SESSION['plaConfig']->friendly_attrs[strtolower($a)]),
|
||||
htmlspecialchars($a));
|
||||
|
||||
} else {
|
||||
$attr_display = htmlspecialchars($a);
|
||||
}
|
||||
|
||||
printf('<option value="%s">%s</option>',htmlspecialchars($a),$attr_display);
|
||||
}
|
||||
|
||||
echo '</select>';
|
||||
|
||||
echo '<input type="file" name="val" size="20" />';
|
||||
printf('<input type="submit" name="submit" value="%s" class="update_dn" />',_('Add'));
|
||||
|
||||
if (! ini_get('file_uploads'))
|
||||
printf('<br /><small><b>%s</b></small><br />',
|
||||
_('Your PHP configuration has disabled file uploads. Please check php.ini before proceeding.'));
|
||||
|
||||
else
|
||||
printf('<br /><small><b>%s: %s</b></small><br />',_('Maximum file size'),ini_get('upload_max_filesize'));
|
||||
|
||||
echo '</form>';
|
||||
|
||||
} else {
|
||||
echo '<br />';
|
||||
printf('<small>(%s)</small>',_('no new binary attributes available for this entry'));
|
||||
}
|
||||
|
||||
echo '</center>';
|
||||
|
||||
/**
|
||||
* Given an attribute $x, this returns true if it is NOT already specified
|
||||
* in the current entry, returns false otherwise.
|
||||
*
|
||||
* @param attr $x
|
||||
* @return bool
|
||||
* @ignore
|
||||
*/
|
||||
function not_an_attr($x) {
|
||||
global $dn;
|
||||
|
||||
foreach ($dn['attrs'] as $attr => $values)
|
||||
if (strcasecmp($attr,$x) == 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
?>
|
66
htdocs/add_oclass.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/add_oclass.php,v 1.19 2007/12/15 07:50:30 wurley Exp $
|
||||
|
||||
/**
|
||||
* Adds an objectClass to the specified dn.
|
||||
*
|
||||
* Note, this does not do any schema violation checking. That is
|
||||
* performed in add_oclass_form.php.
|
||||
*
|
||||
* Variables that come in as POST vars:
|
||||
* - dn (rawurlencoded)
|
||||
* - new_oclass
|
||||
* - new_attrs (array, if any)
|
||||
*
|
||||
* @package phpLDAPadmin
|
||||
*/
|
||||
/**
|
||||
*/
|
||||
|
||||
require './common.php';
|
||||
|
||||
if ($ldapserver->isReadOnly())
|
||||
pla_error(_('You cannot perform updates while server is in read-only mode'));
|
||||
|
||||
if ($ldapserver->isAttrReadOnly('objectClass'))
|
||||
pla_error(_('ObjectClasses are flagged as read only in the phpLDAPadmin configuration.'));
|
||||
|
||||
$entry['dn']['encode'] = get_request('dn');
|
||||
$entry['dn']['string'] = urldecode($entry['dn']['encode']);
|
||||
|
||||
$entry['new']['oclass'] = unserialize(rawurldecode(get_request('new_oclass')));
|
||||
$entry['new']['attrs'] = get_request('new_attrs');
|
||||
|
||||
$new_entry = array();
|
||||
$new_entry['objectClass'] = $entry['new']['oclass'];
|
||||
|
||||
if (is_array($entry['new']['attrs']) && count($entry['new']['attrs']) > 0)
|
||||
foreach ($entry['new']['attrs'] as $attr => $val) {
|
||||
|
||||
# Check to see if this is a unique Attribute
|
||||
if ($badattr = $ldapserver->checkUniqueAttr($entry['dn']['string'],$attr,array($val))) {
|
||||
$href['search'] = htmlspecialchars(sprintf('cmd.php?cmd=search&search=true&form=advanced&server_id=%s&filter=%s=%s',
|
||||
$ldapserver->server_id,$attr,$badattr));
|
||||
|
||||
pla_error(sprintf(_('Your attempt to add <b>%s</b> (<i>%s</i>) to <br><b>%s</b><br> is NOT allowed. That attribute/value belongs to another entry.<p>You might like to <a href=\'%s\'>search</a> for that entry.'),$attr,$badattr,$entry['dn']['string'],$href['search']));
|
||||
}
|
||||
|
||||
$new_entry[$attr] = $val;
|
||||
}
|
||||
|
||||
$result = $ldapserver->attrModify($entry['dn']['string'],$new_entry);
|
||||
|
||||
if (! $result)
|
||||
pla_error(_('Could not perform ldap_mod_add operation.'),$ldapserver->error(),$ldapserver->errno());
|
||||
|
||||
else {
|
||||
$modified_attrs = array_keys($entry['new']['attrs']);
|
||||
$modified_attrs[] = 'objectclass';
|
||||
|
||||
$href['complete'] = sprintf('cmd.php?cmd=template_engine&server_id=%s&dn=%s&modified_attrs=%s',
|
||||
$ldapserver->server_id,$entry['dn']['encode'],serialize($modified_attrs));
|
||||
|
||||
header(sprintf('Location: %s',$href['complete']));
|
||||
die();
|
||||
}
|
||||
?>
|
121
htdocs/add_oclass_form.php
Normal file
@@ -0,0 +1,121 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/add_oclass_form.php,v 1.25 2007/12/15 07:50:30 wurley Exp $
|
||||
|
||||
/**
|
||||
* This page may simply add the objectClass and take you back to the edit page,
|
||||
* but, in one condition it may prompt the user for input. That condition is this:
|
||||
*
|
||||
* If the user has requested to add an objectClass that requires a set of
|
||||
* attributes with 1 or more not defined by the object. In that case, we will
|
||||
* present a form for the user to add those attributes to the object.
|
||||
*
|
||||
* Variables that come in as REQUEST vars:
|
||||
* - dn (rawurlencoded)
|
||||
* - new_oclass
|
||||
*
|
||||
* @package phpLDAPadmin
|
||||
* @todo If an attribute expects a DN, show the dn browser.
|
||||
*/
|
||||
/**
|
||||
*/
|
||||
require './common.php';
|
||||
|
||||
$entry['oclass']['new'] = get_request('new_oclass','REQUEST');
|
||||
$entry['dn']['string'] = get_request('dn','REQUEST');
|
||||
|
||||
if ($ldapserver->isReadOnly())
|
||||
pla_error(_('You cannot perform updates while server is in read-only mode'));
|
||||
|
||||
if (! $entry['oclass']['new'])
|
||||
pla_error(_('You did not select any ObjectClasses for this object. Please go back and do so.'));
|
||||
|
||||
/* Ensure that the object has defined all MUST attrs for this objectClass.
|
||||
* If it hasn't, present a form to have the user enter values for all the
|
||||
* newly required attrs.
|
||||
*/
|
||||
|
||||
$entry['dn']['attrs'] = $ldapserver->getDNAttrs($entry['dn']['string'],true);
|
||||
|
||||
$entry['attrs']['current'] = array();
|
||||
foreach ($entry['dn']['attrs'] as $attr => $junk)
|
||||
$entry['attrs']['current'][] = strtolower($attr);
|
||||
|
||||
# Grab the required attributes for the new objectClass
|
||||
$ldap['oclasses'] = $ldapserver->SchemaObjectClasses();
|
||||
$ldap['attrs']['must'] = array();
|
||||
foreach ($entry['oclass']['new'] as $oclass_name) {
|
||||
$ldap['oclass'] = $ldapserver->getSchemaObjectClass($oclass_name);
|
||||
|
||||
if ($ldap['oclass'])
|
||||
$ldap['attrs']['must'] = array_merge($ldap['attrs']['must'],$ldap['oclass']->getMustAttrNames($ldap['oclasses']));
|
||||
}
|
||||
$ldap['attrs']['must'] = array_unique($ldap['attrs']['must']);
|
||||
|
||||
/* Build a list of the attributes that this new objectClass requires,
|
||||
* but that the object does not currently contain
|
||||
*/
|
||||
$ldap['attrs']['need'] = array();
|
||||
foreach ($ldap['attrs']['must'] as $attr) {
|
||||
$attr = $ldapserver->getSchemaAttribute($attr);
|
||||
|
||||
# First, check if one of this attr's aliases is already an attribute of this entry
|
||||
foreach ($attr->getAliases() as $alias_attr_name)
|
||||
if (in_array(strtolower($alias_attr_name),$entry['attrs']['current']))
|
||||
continue;
|
||||
|
||||
if (in_array(strtolower($attr->getName()),$entry['attrs']['current']))
|
||||
continue;
|
||||
|
||||
/* We made it this far, so the attribute needs to be added to this entry in order
|
||||
* to add this objectClass */
|
||||
$ldap['attrs']['need'][] = $attr;
|
||||
}
|
||||
|
||||
if (count($ldap['attrs']['need']) > 0) {
|
||||
printf('<h3 class="title">%s</h3>',_('New Required Attributes'));
|
||||
printf('<h3 class="subtitle">%s %s %s</h3>',_('This action requires you to add'),count($ldap['attrs']['need']),_('new attributes'));
|
||||
|
||||
printf('<small><b>%s: </b>%s <b>%s</b> %s %s</small>',
|
||||
_('Instructions'),
|
||||
_('In order to add these objectClass(es) to this entry, you must specify'),
|
||||
count($ldap['attrs']['need']),_('new attributes'),
|
||||
_('that this objectClass requires.'));
|
||||
|
||||
echo '<br /><br />';
|
||||
|
||||
echo '<form action="cmd.php" method="post">';
|
||||
echo '<input type="hidden" name="cmd" value="add_oclass" />';
|
||||
printf('<input type="hidden" name="new_oclass" value="%s" />',rawurlencode(serialize($entry['oclass']['new'])));
|
||||
printf('<input type="hidden" name="dn" value="%s" />',rawurlencode($entry['dn']['string']));
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
|
||||
|
||||
echo '<table class="edit_dn" cellspacing="0">';
|
||||
printf('<tr><th colspan="2">%s</th></tr>',_('New Required Attributes'));
|
||||
|
||||
foreach ($ldap['attrs']['need'] as $count => $attr) {
|
||||
printf('<tr><td class="attr">%s</td></tr>',htmlspecialchars($attr->getName()));
|
||||
printf('<tr><td class="val"><input type="text" name="new_attrs[%s]" value="" size="40" /></td></tr>',htmlspecialchars($attr->getName()));
|
||||
}
|
||||
|
||||
echo '</table>';
|
||||
|
||||
echo '<br /><br />';
|
||||
|
||||
printf('<center><input type="submit" value="%s" /></center>',_('Add ObjectClass and Attributes'));
|
||||
echo '</form>';
|
||||
|
||||
} else {
|
||||
$result = $ldapserver->attrModify($entry['dn']['string'],array('objectClass'=>$entry['oclass']['new']));
|
||||
|
||||
if (! $result)
|
||||
pla_error('Could not perform ldap_mod_add operation.',$ldapserver->error(),$ldapserver->errno());
|
||||
|
||||
else {
|
||||
$href = sprintf('cmd.php?cmd=template_engine&server_id=%s&dn=%s&modified_attrs[]=objectClass',
|
||||
$ldapserver->server_id,rawurlencode($entry['dn']['string']));
|
||||
|
||||
header(sprintf('Location: %s',$href));
|
||||
die();
|
||||
}
|
||||
}
|
||||
?>
|
84
htdocs/add_value.php
Normal file
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/add_value.php,v 1.21 2007/12/15 07:50:30 wurley Exp $
|
||||
|
||||
/**
|
||||
* Adds a value to an attribute for a given dn.
|
||||
*
|
||||
* Variables that come in as POST vars:
|
||||
* - dn (rawurlencoded)
|
||||
* - attr (rawurlencoded) the attribute to which we are adding a value
|
||||
* - new_value (form element)
|
||||
* - binary
|
||||
*
|
||||
* On success, redirect to the edit_dn page. On failure, echo an error.
|
||||
*
|
||||
* @package phpLDAPadmin
|
||||
*/
|
||||
/**
|
||||
*/
|
||||
|
||||
if ($ldapserver->isReadOnly())
|
||||
pla_error(_('You cannot perform updates while server is in read-only mode'));
|
||||
|
||||
if (! $_SESSION['plaConfig']->isCommandAvailable('attribute_add_value'))
|
||||
pla_error(sprintf('%s%s %s',_('This operation is not permitted by the configuration'),_(':'),_('add attribute value')));
|
||||
|
||||
# The DN and ATTR we are working with.
|
||||
$entry['dn']['encode'] = get_request('dn','POST',true);
|
||||
$entry['dn']['string'] = rawurldecode($entry['dn']['encode']);
|
||||
$entry['attr']['encode'] = get_request('attr','POST',true);
|
||||
$entry['attr']['string'] = rawurldecode($entry['attr']['encode']);
|
||||
$entry['attr']['html'] = htmlspecialchars($entry['attr']['string']);
|
||||
|
||||
$entry['value']['string'] = get_request('new_value','POST',true);
|
||||
$entry['value']['bin'] = get_request('binary','POST') ? true : false;
|
||||
|
||||
if ($ldapserver->isAttrReadOnly($entry['attr']['string']))
|
||||
pla_error(sprintf(_('The attribute "%s" is flagged as read-only in the phpLDAPadmin configuration.'),$entry['attr']['html']));
|
||||
|
||||
/*
|
||||
* Special case for binary attributes:
|
||||
* we must go read the data from the file.
|
||||
*/
|
||||
if ($entry['value']['bin']) {
|
||||
$binaryfile['name'] = $_FILES['new_value']['tmp_name'];
|
||||
$binaryfile['handle'] = fopen($binaryfile['name'],'r');
|
||||
$binaryfile['data'] = fread($binaryfile['handle'],filesize($binaryfile['name']));
|
||||
fclose($binaryfile['handle']);
|
||||
|
||||
$entry['value']['string'] = $binaryfile['data'];
|
||||
}
|
||||
|
||||
$new_entry = array($entry['attr']['string']=>$entry['value']['string']);
|
||||
|
||||
# Check to see if this is a unique Attribute
|
||||
if ($badattr = $ldapserver->checkUniqueAttr($entry['dn']['string'],$entry['attr']['string'],$new_entry)) {
|
||||
$href = htmlspecialchars(sprintf('cmd.php?cmd=search&search=true&form=advanced&server_id=%s&filter=%s=%s',
|
||||
$ldapserver->server_id,$entry['attr']['string'],$badattr));
|
||||
|
||||
pla_error(sprintf(_('Your attempt to add <b>%s</b> (<i>%s</i>) to <br><b>%s</b><br> is NOT allowed. That attribute/value belongs to another entry.<p>You might like to <a href=\'%s\'>search</a> for that entry.'),$entry['attr']['string'],$badattr,$entry['dn']['string'],$href));
|
||||
}
|
||||
|
||||
# Call the custom callback for each attribute modification and verify that it should be modified.
|
||||
if (run_hook('pre_attr_add',
|
||||
array('server_id'=>$ldapserver->server_id,'dn'=> $entry['dn']['string'],'attr_name'=>$entry['attr']['string'],'new_value'=>$new_entry))) {
|
||||
|
||||
if (run_hook('pre_attr_modify',
|
||||
array('server_id'=>$ldapserver->server_id,'dn'=>$entry['dn']['string'],'attr_name'=>$entry['attr']['string'],'new_value'=>$new_entry))) {
|
||||
|
||||
$add_result = $ldapserver->attrModify($entry['dn']['string'],$new_entry);
|
||||
|
||||
if (! $add_result) {
|
||||
pla_error(_('Could not perform ldap_mod_add operation.'),
|
||||
$ldapserver->error(),$ldapserver->errno());
|
||||
} else {
|
||||
run_hook('post_attr_modify',
|
||||
array('server_id'=>$ldapserver->server_id,'dn'=>$entry['dn']['string'],'attr_name'=>$entry['attr']['string'],'new_value'=>$new_entry));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
header(sprintf('Location: cmd.php?cmd=template_engine&server_id=%s&dn=%s&modified_attrs[]=%s',
|
||||
$ldapserver->server_id,$entry['dn']['encode'],$entry['attr']['encode']));
|
||||
die();
|
||||
?>
|
379
htdocs/add_value_form.php
Normal file
@@ -0,0 +1,379 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/add_value_form.php,v 1.39 2007/12/15 07:50:30 wurley Exp $
|
||||
|
||||
/**
|
||||
* Displays a form to allow the user to enter a new value to add
|
||||
* to the existing list of values for a multi-valued attribute.
|
||||
*
|
||||
* @package phpLDAPadmin
|
||||
*/
|
||||
/**
|
||||
*/
|
||||
|
||||
require './common.php';
|
||||
|
||||
if ($ldapserver->isReadOnly())
|
||||
pla_error(_('You cannot perform updates while server is in read-only mode'));
|
||||
|
||||
# The DN and ATTR we are working with.
|
||||
$entry['dn']['encode'] = get_request('dn','GET',true);
|
||||
$entry['dn']['string'] = urldecode($entry['dn']['encode']);
|
||||
$entry['dn']['html'] = htmlspecialchars($entry['dn']['string']);
|
||||
$entry['attr']['string'] = get_request('attr','GET',true);
|
||||
$entry['attr']['encode'] = rawurlencode($entry['attr']['string']);
|
||||
$entry['attr']['html'] = htmlspecialchars($entry['attr']['string']);
|
||||
|
||||
if (! is_null($entry['dn']['string']))
|
||||
$entry['rdn']['string'] = get_rdn($entry['dn']['string']);
|
||||
else
|
||||
$entry['rdn']['string'] = null;
|
||||
$entry['rdn']['html'] = htmlspecialchars($entry['rdn']['string']);
|
||||
|
||||
/***************/
|
||||
/* get entry */
|
||||
/***************/
|
||||
|
||||
if (! $entry['dn']['string'] || ! $ldapserver->dnExists($entry['dn']['string']))
|
||||
pla_error(sprintf(_('The entry (%s) does not exist.'),$entry['dn']['html']),null,-1,true);
|
||||
|
||||
$tree = get_cached_item($ldapserver->server_id,'tree');
|
||||
$entry['ldap'] = null;
|
||||
if ($tree) {
|
||||
$entry['ldap'] = $tree->getEntry($entry['dn']['string']);
|
||||
|
||||
if (! $entry['ldap'])
|
||||
$tree->addEntry($entry['dn']['string']);
|
||||
|
||||
$entry['ldap'] = $tree->getEntry($entry['dn']['string']);
|
||||
}
|
||||
|
||||
// define the template of the entry if possible
|
||||
eval('$reader = new '.$_SESSION['plaConfig']->GetValue('appearance','entry_reader').'($ldapserver);');
|
||||
$reader->visit('Start', $entry['ldap']);
|
||||
|
||||
if (! $entry['ldap'] || $entry['ldap']->isReadOnly())
|
||||
pla_error(sprintf(_('The entry (%s) is in readonly mode.'),$entry['dn']['html']),null,-1,true);
|
||||
|
||||
/*********************/
|
||||
/* attribute values */
|
||||
/*********************/
|
||||
|
||||
eval('$writer = new '.$_SESSION['plaConfig']->GetValue('appearance','entry_writer').'($ldapserver);');
|
||||
|
||||
$ldap['attr'] = $entry['ldap']->getAttribute($entry['attr']['string']);
|
||||
if (!$ldap['attr']) {
|
||||
// define a new attribute for the entry
|
||||
$attributefactoryclass = $_SESSION['plaConfig']->GetValue('appearance','attribute_factory');
|
||||
eval('$attribute_factory = new '.$attributefactoryclass.'();');
|
||||
$ldap['attr'] = $attribute_factory->newAttribute($entry['attr']['string'], array());
|
||||
$ldap['attr']->setEntry($entry['ldap']);
|
||||
}
|
||||
$ldap['count'] = $ldap['attr']->getValueCount();
|
||||
|
||||
if ($ldap['attr']->isReadOnly())
|
||||
pla_error(sprintf(_('The attribute (%s) is in readonly mode.'),$entry['attr']['html']),null,-1,true);
|
||||
if (! $_SESSION['plaConfig']->isCommandAvailable('attribute_add_value'))
|
||||
pla_error(sprintf('%s%s %s',_('This operation is not permitted by the configuration'),_(':'),_('add attribute value')));
|
||||
if (($ldap['attr']->getValueCount() == 0) && ! $_SESSION['plaConfig']->isCommandAvailable('attribute_add'))
|
||||
pla_error(sprintf('%s%s %s',_('This operation is not permitted by the configuration'),_(':'),_('add attribute')));
|
||||
|
||||
/*
|
||||
$ldap['attrs'] = $ldapserver->getDNAttr($entry['dn']['string'],$entry['attr']['string']);
|
||||
$ldap['count'] = count($ldap['attrs']);
|
||||
*/
|
||||
|
||||
$entry['attr']['oclass'] = (strcasecmp($entry['attr']['string'],'objectClass') == 0) ? true : false;
|
||||
|
||||
if ($entry['attr']['oclass']) {
|
||||
# Fetch all available objectClasses and remove those from the list that are already defined in the entry
|
||||
$ldap['oclasses'] = $ldapserver->SchemaObjectClasses();
|
||||
|
||||
foreach($ldap['attr']->getValues() as $oclass)
|
||||
unset($ldap['oclasses'][strtolower($oclass)]);
|
||||
} else {
|
||||
$ldap['schema'] = $ldapserver->getSchemaAttribute($entry['attr']['string']);
|
||||
}
|
||||
|
||||
printf('<h3 class="title">%s <b>%s</b> %s <b>%s</b></h3>',
|
||||
_('Add new'),$entry['attr']['html'],_('value to'),$entry['rdn']['html']);
|
||||
printf('<h3 class="subtitle">%s <b>%s</b> %s: <b>%s</b></h3>',
|
||||
_('Server'),$ldapserver->name,_('Distinguished Name'),$entry['dn']['html']);
|
||||
|
||||
if ($ldap['count']) {
|
||||
printf('%s <b>%s</b> %s <b>%s</b>%s',
|
||||
_('Current list of'),$ldap['count'],_('values for attribute'),$ldap['attr']->getFriendlyName(),_(':'));
|
||||
} else {
|
||||
printf('%s <b>%s</b>.',
|
||||
_('No current value for attribute'),$ldap['attr']->getFriendlyName());
|
||||
}
|
||||
|
||||
if ($entry['attr']['oclass']) {
|
||||
echo '<form action="cmd.php" method="post" class="new_value" name="entry_form">';
|
||||
echo '<input type="hidden" name="cmd" value="add_oclass_form" />';
|
||||
} else {
|
||||
echo '<form action="cmd.php" method="post" class="new_value" name="entry_form" enctype="multipart/form-data" onSubmit="return submitForm(this)">';
|
||||
echo '<input type="hidden" name="cmd" value="update_confirm" />';
|
||||
|
||||
//printf('<input type="hidden" name="attr" value="%s" />',$entry['attr']['encode']);
|
||||
|
||||
}
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
|
||||
printf('<input type="hidden" name="dn" value="%s" />',$entry['dn']['encode']);
|
||||
|
||||
if ($ldap['count']) {
|
||||
// display current attribute values
|
||||
echo '<table class="edit_dn" cellspacing="0" cellpadding="0" align="center"><tr><td>';
|
||||
for ($i = 0; $i < $ldap['count']; $i++) {
|
||||
$writer->draw('OldValue', $ldap['attr'], $i);
|
||||
$writer->draw('ReadOnlyValue', $ldap['attr'], $i);
|
||||
}
|
||||
echo '</td></tr></table>';
|
||||
/*
|
||||
if ($ldapserver->isJpegPhoto($entry['attr']['string'])) {
|
||||
printf('<table><tr><td>%s</td></tr></table>',
|
||||
draw_jpeg_photos($ldapserver,$entry['dn']['string'],$entry['attr']['string'],false));
|
||||
|
||||
# <!-- Temporary warning until we find a way to add jpegPhoto values without an INAPROPRIATE_MATCHING error -->
|
||||
printf('<p><small>%s</small></p>',
|
||||
_('Note: You will get an "inappropriate matching" error if you have not setup an EQUALITY rule on your LDAP server for this attribute.'));
|
||||
# <!-- End of temporary warning -->
|
||||
|
||||
} elseif ($ldapserver->isAttrBinary($entry['attr']['string'])) {
|
||||
echo '<ul>';
|
||||
for ($i=1; $i<=count($vals); $i++) {
|
||||
$href = sprintf('download_binary_attr.php?server_id=%s&dn=%s&attr=%s&value_num=%s',
|
||||
$ldapserver->server_id,$entry['dn']['encode'],$entry['attr']['string'],$i-1);
|
||||
|
||||
printf('<li><a href="%s"><img src="images/save.png" alt="Save" />%s (%s)</a></li>',
|
||||
$href,_('download value'),$i);
|
||||
}
|
||||
echo '</ul>';
|
||||
|
||||
# <!-- Temporary warning until we find a way to add jpegPhoto values without an INAPROPRIATE_MATCHING error -->
|
||||
printf('<p><small>%s</small></p>',
|
||||
_('Note: You will get an "inappropriate matching" error if you have not setup an EQUALITY rule on your LDAP server for this attribute.'));
|
||||
# <!-- End of temporary warning -->
|
||||
|
||||
} else {
|
||||
echo '<ul class="current_values">';
|
||||
if (strcasecmp($entry['attr']['string'],'userPassword') == 0) {
|
||||
foreach ($ldap['attrs'] as $key => $value) {
|
||||
if (obfuscate_password_display(get_enc_type($value)))
|
||||
echo '<li><span style="white-space: nowrap;">'.preg_replace('/./','*',$value).'<br /></li>';
|
||||
else
|
||||
echo '<li><span style="white-space: nowrap;">'.htmlspecialchars($value).'<br /></li>';
|
||||
}
|
||||
|
||||
} else {
|
||||
foreach ($ldap['attrs'] as $val)
|
||||
printf('<li><span style="white-space: nowrap;">%s</span></li>',htmlspecialchars($val));
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
*/
|
||||
} else {
|
||||
echo '<br /><br />';
|
||||
}
|
||||
|
||||
echo _('Enter the value you would like to add:');
|
||||
echo '<br /><br />';
|
||||
|
||||
if ($entry['attr']['oclass']) {
|
||||
// draw objectClass selection
|
||||
echo '<table class="edit_dn" cellspacing="0" cellpadding="0" align="center"><tr><td>';
|
||||
echo '<select name="new_oclass[]" multiple="true" size="15">';
|
||||
foreach ($ldap['oclasses'] as $name => $oclass) {
|
||||
# exclude any structural ones, as they'll only generate an LDAP_OBJECT_CLASS_VIOLATION
|
||||
if ($oclass->getType() == 'structural')
|
||||
continue;
|
||||
|
||||
printf('<option value="%s">%s</option>',$oclass->getName(),$oclass->getName());
|
||||
}
|
||||
echo '</select>';
|
||||
echo '</td></tr><tr><td>';
|
||||
|
||||
echo '<br />';
|
||||
printf('<input id="save_button" type="submit" value="%s" />',_('Add new ObjectClass'));
|
||||
echo '</td></tr></table>';
|
||||
echo '<br />';
|
||||
|
||||
if ($_SESSION['plaConfig']->GetValue('appearance','show_hints'))
|
||||
printf('<small><br /><img src="images/light.png" alt="Hint" /><span class="hint">%s</span></small>',
|
||||
_('Note: You may be required to enter new attributes that these objectClass(es) require'));
|
||||
echo '</form>';
|
||||
|
||||
} else {
|
||||
// draw a blank field
|
||||
echo '<table class="edit_dn" cellspacing="0" cellpadding="0" align="center"><tr><td>';
|
||||
$writer->draw('BlankValue', $ldap['attr'], $ldap['count']);
|
||||
echo '</td></tr><tr><td>';
|
||||
/*
|
||||
if ($ldapserver->isAttrBinary($entry['attr']['string'])) {
|
||||
echo '<input type="file" name="new_value" />';
|
||||
echo '<input type="hidden" name="binary" value="true" />';
|
||||
|
||||
} else {
|
||||
if ($ldapserver->isMultiLineAttr($entry['attr']['string'])) {
|
||||
echo '<textarea name="new_value" rows="3" cols="30"></textarea>';
|
||||
} else {
|
||||
printf('<input type="text"%s name="new_value" size="40" value="" />',
|
||||
($ldap['attr']->getMaxLength() ? sprintf(' maxlength="%s"',$ldap['attr']->getMaxLength()) : ''));
|
||||
|
||||
# Draw the "browse" button next to this input box if this attr houses DNs:
|
||||
if ($ldapserver->isDNAttr($entry['attr']['string']))
|
||||
draw_chooser_link("new_value_form.new_value", false);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if ($ldap['schema']->getDescription())
|
||||
printf('<small><b>%s:</b> %s</small><br />',_('Description'),$ldap['schema']->getDescription());
|
||||
|
||||
if ($ldap['schema']->getType())
|
||||
printf('<small><b>%s:</b> %s</small><br />',_('Syntax'),$ldap['schema']->getType());
|
||||
|
||||
if ($ldap['schema']->getMaxLength())
|
||||
printf('<small><b>%s:</b> %s %s</small><br />',
|
||||
_('Maximum Length'),number_format($ldap['schema']->getMaxLength()),_('characters'));
|
||||
|
||||
echo '<br />';
|
||||
printf('<input type="submit" id="save_button" name="submit" value="%s" />',_('Add New Value'));
|
||||
echo '</td></tr></table>';
|
||||
|
||||
echo '</form>';
|
||||
|
||||
// javascript
|
||||
echo '<script type="text/javascript" language="javascript">
|
||||
function pla_getComponentById(id) {
|
||||
return document.getElementById(id);
|
||||
}
|
||||
|
||||
function pla_getComponentsByName(name) {
|
||||
return document.getElementsByName(name);
|
||||
}
|
||||
|
||||
function pla_getComponentValue(component) {
|
||||
if (component.type == "checkbox") {
|
||||
if (component.checked) return component.value;
|
||||
} else if (component.type == "select-one") {
|
||||
if (component.selectedIndex >= 0) return component.options[component.selectedIndex].value;
|
||||
} else if (component.type == "select-multiple") {
|
||||
if (component.selectedIndex >= 0) return component.options[component.selectedIndex].value;
|
||||
} else if (component.type == undefined) { // option
|
||||
if (component.selected) return component.value;
|
||||
} else {
|
||||
return component.value;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
function pla_setComponentValue(component, value) {
|
||||
if (component.type == "checkbox") {
|
||||
if (component.value == value) component.checked = true;
|
||||
else component.checked = false;
|
||||
} else if (component.type == "select-one") {
|
||||
for (var i = 0; i < component.options.length; i++) {
|
||||
if (component.options[i].value == value) component.options[i].selected = true;
|
||||
}
|
||||
} else if (component.type == "select-multiple") {
|
||||
for (var i = 0; i < component.options.length; i++) {
|
||||
if (component.options[i].value == value) component.options[i].selected = true;
|
||||
}
|
||||
} else if (component.type == undefined) { // option
|
||||
if (component.value == value) component.selected = true;
|
||||
else component.selected = false;
|
||||
} else { // text, textarea
|
||||
component.value = value;
|
||||
}
|
||||
}</script>';
|
||||
|
||||
echo '<script type="text/javascript" language="javascript">
|
||||
function getAttributeComponents(prefix, name) {
|
||||
var components = new Array();
|
||||
var i = 0;
|
||||
var j = 0;
|
||||
var c = pla_getComponentsByName(prefix + "_values[" + name + "][" + j + "]");
|
||||
while (c && (c.length > 0)) {
|
||||
for (var k = 0; k < c.length; k++) {
|
||||
components[i++] = c[k];
|
||||
}
|
||||
++j;
|
||||
c = pla_getComponentsByName(prefix + "_values[" + name + "][" + j + "]");
|
||||
}
|
||||
c = pla_getComponentsByName(prefix + "_values[" + name + "][]");
|
||||
if (c && (c.length > 0)) {
|
||||
for (var k = 0; k < c.length; k++) {
|
||||
components[i++] = c[k];
|
||||
}
|
||||
}
|
||||
return components;
|
||||
}
|
||||
function getAttributeValues(prefix, name) {
|
||||
var components = getAttributeComponents(prefix, name);
|
||||
var values = new Array();
|
||||
for (var k = 0; k < components.length; k++) {
|
||||
var val = pla_getComponentValue(components[k]);
|
||||
if (val) values[values.length] = val;
|
||||
}
|
||||
return values;
|
||||
}</script>';
|
||||
|
||||
echo '<script type="text/javascript" language="javascript">
|
||||
function validateForm(silence) {
|
||||
var i = 0;
|
||||
var valid = true;
|
||||
var components = null;
|
||||
components = getAttributeComponents("new", "'.$ldap['attr']->getName().'");
|
||||
for (i = 0; i < components.length; i++) {
|
||||
if (window.validate_'.$ldap['attr']->getName().') {
|
||||
valid = (!validate_'.$ldap['attr']->getName().'(components[i], silence) || !valid) ? false : true;
|
||||
}
|
||||
}
|
||||
return valid;
|
||||
}
|
||||
</script>';
|
||||
|
||||
echo '<script type="text/javascript" language="javascript">
|
||||
function submitForm(form) {
|
||||
for (var i = 0; i < form.elements.length; i++) {
|
||||
form.elements[i].blur();
|
||||
}
|
||||
return validateForm(true);
|
||||
}
|
||||
function alertError(err, silence) {
|
||||
if (!silence) alert(err);
|
||||
}
|
||||
</script>';
|
||||
|
||||
echo '<script type="text/javascript" language="javascript">
|
||||
var attrTrace;
|
||||
function fill(id, value) {
|
||||
attrTrace = new Array();
|
||||
fillRec(id, value);
|
||||
}
|
||||
function fillRec(id, value) {
|
||||
if (attrTrace[id] == 1) {
|
||||
return;
|
||||
} else {
|
||||
var pre = "";
|
||||
var suf = "";
|
||||
var i;
|
||||
attrTrace[id] = 1;
|
||||
pla_setComponentValue(pla_getComponentById(id), value);
|
||||
// here comes template-specific implementation, generated by php
|
||||
if (false) {}';
|
||||
$attr = $ldap['attr']->getName();
|
||||
echo "\t\t\telse if ((i = id.indexOf('_".$attr."_')) >= 0) {\n";
|
||||
echo "\t\t\t\tpre = id.substring(0, i+1);\n";
|
||||
echo "\t\t\t\tsuf = id.substring(i + 1 + '$attr'.length, id.length);\n";
|
||||
$writer->draw('FillJavascript', $ldap['attr'], 'id', 'value');
|
||||
echo "\t\t\t}\n";
|
||||
echo '}}</script>';
|
||||
|
||||
$writer->draw('Javascript', $ldap['attr']);
|
||||
|
||||
echo '<script type="text/javascript" language="javascript">
|
||||
validateForm(true);
|
||||
</script>';
|
||||
}
|
||||
?>
|
53
htdocs/cmd.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/cmd.php,v 1.3.2.1 2007/12/21 12:11:55 wurley Exp $
|
||||
|
||||
/**
|
||||
* @package phpLDAPadmin
|
||||
*/
|
||||
|
||||
require_once './common.php';
|
||||
|
||||
$body = new block();
|
||||
$file = '';
|
||||
$cmd = get_request('cmd','REQUEST');
|
||||
$meth = get_request('meth','REQUEST');
|
||||
|
||||
ob_start();
|
||||
|
||||
if (is_null($cmd)) {
|
||||
$cmd = 'welcome';
|
||||
}
|
||||
|
||||
switch ($cmd) {
|
||||
case '_debug' :
|
||||
debug_dump($_REQUEST,1);
|
||||
$file = '';
|
||||
break;
|
||||
|
||||
default :
|
||||
if (file_exists(HOOKSDIR.$cmd.'.php'))
|
||||
$file = HOOKSDIR.$cmd.'.php';
|
||||
elseif (file_exists(HTDOCDIR.$cmd.'.php'))
|
||||
$file = HTDOCDIR.$cmd.'.php';
|
||||
else
|
||||
$file = 'welcome.php';
|
||||
}
|
||||
|
||||
if ($file) {
|
||||
include $file;
|
||||
}
|
||||
|
||||
$body->SetBody(ob_get_contents());
|
||||
ob_end_clean();
|
||||
|
||||
if (DEBUG_ENABLED)
|
||||
debug_log('Ready to render page for command [%s,%s].',128,__FILE__,__LINE__,__METHOD__,$cmd,$file);
|
||||
|
||||
$www = new page($ldapserver->server_id);
|
||||
$www->block_add('body',$body);
|
||||
|
||||
if ($meth == 'get_body')
|
||||
$www->body(true);
|
||||
else
|
||||
$www->display();
|
||||
?>
|
26
htdocs/collapse.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/collapse.php,v 1.16 2007/12/15 07:50:30 wurley Exp $
|
||||
|
||||
/**
|
||||
* This script alters the session variable 'tree', collapsing it
|
||||
* at the dn specified in the query string.
|
||||
*
|
||||
* Note: this script is equal and opposite to expand.php
|
||||
* @package phpLDAPadmin
|
||||
* @see expand.php
|
||||
*/
|
||||
/**
|
||||
*/
|
||||
|
||||
require './common.php';
|
||||
|
||||
$dn = get_request('dn','GET',true);
|
||||
$tree = get_cached_item($ldapserver->server_id,'tree');
|
||||
$entry = $tree->getEntry($dn);
|
||||
$entry->close();
|
||||
set_cached_item($ldapserver->server_id,'tree','null',$tree);
|
||||
|
||||
header(sprintf('Location:index.php?server_id=%s&junk=%s#%s%s',
|
||||
$ldapserver->server_id,random_junk(),htmlid($ldapserver->server_id,$dn),pla_session_param()));
|
||||
die();
|
||||
?>
|
10
htdocs/common.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/common.php,v 1.3.2.1 2007/12/21 12:11:55 wurley Exp $
|
||||
|
||||
/**
|
||||
* @package phpLDAPadmin
|
||||
*/
|
||||
|
||||
@define('LIBDIR',sprintf('%s/',realpath('../lib/')));
|
||||
require_once LIBDIR.'common.php';
|
||||
?>
|
579
htdocs/compare.php
Normal file
@@ -0,0 +1,579 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/compare.php,v 1.16 2007/12/15 07:50:30 wurley Exp $
|
||||
|
||||
/**
|
||||
* Compare two DNs - the destination DN is editable.
|
||||
* @package phpLDAPadmin
|
||||
*/
|
||||
/**
|
||||
* @todo: Must fix dc/domainComponent evaluation.
|
||||
*/
|
||||
|
||||
require_once './common.php';
|
||||
|
||||
$dn_src = isset($_POST['dn_src']) ? $_POST['dn_src'] : null;
|
||||
$dn_dst = isset($_POST['dn_dst']) ? $_POST['dn_dst'] : null;
|
||||
|
||||
$encoded_dn_src = rawurlencode($dn_src);
|
||||
$encoded_dn_dst = rawurlencode($dn_dst);
|
||||
|
||||
$server_id_src = (isset($_POST['server_id_src']) ? $_POST['server_id_src'] : '');
|
||||
$server_id_dst = (isset($_POST['server_id_dst']) ? $_POST['server_id_dst'] : '');
|
||||
|
||||
$ldapserver_src = $_SESSION['plaConfig']->ldapservers->Instance($server_id_src);
|
||||
if (! $ldapserver_src->haveAuthInfo())
|
||||
pla_error(_('Not enough information to login to server. Please check your configuration.'));
|
||||
|
||||
$ldapserver_dst = $_SESSION['plaConfig']->ldapservers->Instance($server_id_dst);
|
||||
if (! $ldapserver_src->haveAuthInfo())
|
||||
pla_error(_('Not enough information to login to server. Please check your configuration.'));
|
||||
|
||||
if (! $ldapserver_src->dnExists($dn_src))
|
||||
pla_error(sprintf(_('No such entry: %s'),pretty_print_dn($dn_src)));
|
||||
if (! $ldapserver_dst->dnExists($dn_dst))
|
||||
pla_error(sprintf(_('No such entry: %s'),pretty_print_dn($dn_dst)));
|
||||
|
||||
$_SESSION['plaConfig']->friendly_attrs = process_friendly_attr_table();
|
||||
|
||||
$attrs_src = $ldapserver_src->getDNAttrs($dn_src,false,$_SESSION['plaConfig']->GetValue('deref','view'));
|
||||
$attrs_dst = $ldapserver_dst->getDNAttrs($dn_dst,false,$_SESSION['plaConfig']->GetValue('deref','view'));
|
||||
|
||||
# Get a list of all attributes.
|
||||
$attrs_all = array_keys($attrs_src);
|
||||
foreach ($attrs_dst as $key => $val)
|
||||
if (! in_array($key,$attrs_all))
|
||||
$attrs_all[] = $key;
|
||||
?>
|
||||
|
||||
<table class="comp_dn" border=0>
|
||||
<tr><td colspan=6>
|
||||
<h3 class="title"><?php echo _('Comparing the following DNs'); ?></h3>
|
||||
</td></tr>
|
||||
|
||||
<tr>
|
||||
<td colspan=2 width=20%>
|
||||
<h3 class="subtitle"><?php echo _('Attribute'); ?><br /> </h3>
|
||||
</td>
|
||||
<td colspan=2 width=40%>
|
||||
<h3 class="subtitle"><?php echo _('Server'); ?>: <b><?php echo $ldapserver_src->name; ?></b><br /><?php echo _('Distinguished Name');?>: <b><?php echo htmlspecialchars(($dn_src)); ?></b></h3>
|
||||
</td>
|
||||
<td colspan=2 width=40%>
|
||||
<h3 class="subtitle"><?php echo _('Server'); ?>: <b><?php echo $ldapserver_dst->name; ?></b><br /><?php echo _('Distinguished Name');?>: <b><?php echo htmlspecialchars(($dn_dst)); ?></b></h3>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=6 align=right>
|
||||
<form action="cmd.php?cmd=compare" method="post" name="compare_form">
|
||||
<input type="hidden" name="server_id" value="<?php echo $ldapserver->server_id; ?>" />
|
||||
<input type="hidden" name="server_id_src" value="<?php echo $ldapserver_dst->server_id; ?>" />
|
||||
<input type="hidden" name="server_id_dst" value="<?php echo $ldapserver_src->server_id; ?>" />
|
||||
<input type="hidden" name="dn_src" value="<?php echo htmlspecialchars($dn_dst); ?>" />
|
||||
<input type="hidden" name="dn_dst" value="<?php echo htmlspecialchars($dn_src); ?>" />
|
||||
<input type="submit" value="<?php echo _('Switch Entry'); ?>" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
if (! $attrs_all || ! is_array($attrs_all)) {
|
||||
printf('<tr><td colspan="2">(%s)</td></tr>',_('This entry has no attributes'));
|
||||
print '</table>';
|
||||
return;
|
||||
}
|
||||
|
||||
sort($attrs_all);
|
||||
|
||||
# Work through each of the attributes.
|
||||
foreach ($attrs_all as $attr) {
|
||||
flush();
|
||||
|
||||
# If this is the DN, get the next attribute.
|
||||
if (! strcasecmp($attr,'dn'))
|
||||
continue;
|
||||
|
||||
# Has the config.php specified that this attribute is to be hidden or shown?
|
||||
if ($ldapserver_src->isAttrHidden($attr) || $ldapserver_dst->isAttrHidden($attr))
|
||||
continue;
|
||||
?>
|
||||
|
||||
<!-- Begin Attribute -->
|
||||
<tr>
|
||||
|
||||
<?php foreach (array('src','dst') as $side) { ?>
|
||||
|
||||
<?php
|
||||
if ($side == 'dst' && ! $ldapserver_dst->isReadOnly()) { ?>
|
||||
|
||||
<form action="cmd.php?cmd=update_confirm" method="post" name="edit_form">
|
||||
<input type="hidden" name="server_id" value="<?php echo $ldapserver_dst->server_id; ?>" />
|
||||
<input type="hidden" name="dn" value="<?php echo $dn_dst; ?>" />
|
||||
|
||||
<?php }
|
||||
|
||||
$schema_attr_src = $ldapserver_src->getSchemaAttribute($attr,$dn_src);
|
||||
$schema_attr_dst = $ldapserver_dst->getSchemaAttribute($attr,$dn_dst);
|
||||
|
||||
# Setup the $attr_note, which will be displayed to the right of the attr name (if any)
|
||||
$attr_note = '';
|
||||
$required_note = '';
|
||||
|
||||
# is there a user-friendly translation available for this attribute?
|
||||
if (isset($_SESSION['plaConfig']->friendly_attrs[strtolower($attr)])) {
|
||||
$attr_display = $_SESSION['plaConfig']->friendly_attrs[strtolower($attr)];
|
||||
$attr_note = sprintf('<acronym title="%s">alias</acronym>',sprintf(_('Note: \'%s\' is an alias for \'%s\''),$attr_display,$attr));
|
||||
|
||||
} else {
|
||||
$attr_note = '';
|
||||
$attr_display = $attr;
|
||||
}
|
||||
|
||||
# is this attribute required by an objectClass?
|
||||
$required_by = '';
|
||||
switch ($side) {
|
||||
case 'src':
|
||||
$ldapserver = $ldapserver_src;
|
||||
if ($schema_attr_src)
|
||||
foreach ($schema_attr_src->getRequiredByObjectClasses() as $required)
|
||||
if (isset($attrs_src['objectClass']) && in_array(strtolower($required),arrayLower($attrs_src['objectClass'])))
|
||||
$required_by .= $required . ' ';
|
||||
|
||||
# It seems that some LDAP servers (Domino) returns attributes in lower case?
|
||||
elseif (isset($attrs_src['objectclass']) && in_array(strtolower($required),arrayLower($attrs_src['objectclass'])))
|
||||
$required_by .= $required . ' ';
|
||||
|
||||
break;
|
||||
|
||||
case 'dst':
|
||||
$ldapserver = $ldapserver_dst;
|
||||
if ($schema_attr_dst)
|
||||
foreach ($schema_attr_dst->getRequiredByObjectClasses() as $required)
|
||||
if (isset($attrs_dst['objectClass']) && in_array(strtolower($required),arrayLower($attrs_dst['objectClass'])))
|
||||
$required_by .= $required . ' ';
|
||||
|
||||
# It seems that some LDAP servers (Domino) returns attributes in lower case?
|
||||
elseif (isset($attrs_dst['objectclass']) && in_array(strtolower($required),arrayLower($attrs_dst['objectclass'])))
|
||||
$required_by .= $required . ' ';
|
||||
break;
|
||||
}
|
||||
|
||||
if ($side == 'src') { ?>
|
||||
<td class="attr">
|
||||
<?php $schema_href="cmd.php?cmd=schema&server_id=$server_id_src&view=attributes&viewvalue=".real_attr_name($attr); ?>
|
||||
<a title="<?php echo sprintf(_('Click to view the schema definition for attribute type \'%s\''),$attr) ?>" href="<?php echo $schema_href; ?>"><?php echo $attr_display; ?></a>
|
||||
</td>
|
||||
|
||||
<td class="attr_note">
|
||||
<sup><small><?php echo $attr_note; ?></small></sup>
|
||||
</td>
|
||||
<?php }
|
||||
|
||||
if ($required_by) {
|
||||
$required_note .= sprintf('<acronym title="%s">%s</acronym>',sprintf(_('Required attribute for objectClass(es) %s'),$required_by),_('required'));
|
||||
?>
|
||||
<td colspan=2 class="attr_note">
|
||||
<sup><small><?php echo $required_note; ?></small></sup>
|
||||
</td>
|
||||
<?php } else { ?>
|
||||
<td colspan=2 class="attr_note"> </td>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($ldapserver->isAttrReadOnly($attr)) { ?>
|
||||
<small>(<acronym title="<?php echo _('This attribute has been flagged as read only by the phpLDAPadmin administrator'); ?>"><?php echo _('read only'); ?></acronym>)</small>
|
||||
<?php } ?>
|
||||
</td>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</tr>
|
||||
<!-- End of Attribute -->
|
||||
|
||||
<!-- Begin Values -->
|
||||
<tr>
|
||||
|
||||
<?php
|
||||
foreach (array('src','dst') as $side) {
|
||||
$vals = null; ?>
|
||||
|
||||
|
||||
<?php
|
||||
# If this attribute isnt set, then show a blank.
|
||||
$toJump = 0;
|
||||
switch ($side) {
|
||||
case 'src':
|
||||
print '<td colspan=2> </td><td class="val">';
|
||||
|
||||
if (! isset($attrs_src[$attr])) {
|
||||
echo "<small><". _('No Value')."></small></td>";
|
||||
$toJump = 1;
|
||||
continue;
|
||||
} else
|
||||
$vals = $attrs_src[$attr];
|
||||
|
||||
$ldapserver = $ldapserver_src;
|
||||
break;
|
||||
|
||||
case 'dst':
|
||||
print '<td colspan=2> </td><td class="val">';
|
||||
|
||||
if (! isset($attrs_dst[$attr])) {
|
||||
echo "<small><". _('No Value')."></small></td>";
|
||||
$toJump = 1;
|
||||
continue;
|
||||
} else
|
||||
$vals = $attrs_dst[$attr];
|
||||
|
||||
$ldapserver = $ldapserver_dst;
|
||||
break;
|
||||
}
|
||||
|
||||
if ($toJump) continue;
|
||||
if (! is_array($vals))
|
||||
$vals = array($vals);
|
||||
|
||||
/*
|
||||
* Is this attribute a jpegPhoto?
|
||||
*/
|
||||
if ($ldapserver->isJpegPhoto($attr)) {
|
||||
|
||||
switch ($side) {
|
||||
case 'src':
|
||||
// Don't draw the delete buttons if there is more than one jpegPhoto
|
||||
// (phpLDAPadmin can't handle this case yet)
|
||||
draw_jpeg_photos($ldapserver,$dn_src,$attr,false);
|
||||
break;
|
||||
|
||||
case 'dst':
|
||||
if ($ldapserver_dst->isReadOnly() || $ldapserver_dst->isAttrReadOnly($attr))
|
||||
draw_jpeg_photos($ldapserver,$dn_dst,$attr,false);
|
||||
else
|
||||
draw_jpeg_photos($ldapserver,$dn_dst,$attr,true);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
// proceed to the next attribute
|
||||
echo "</td>\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Is this attribute binary?
|
||||
*/
|
||||
if ($ldapserver->isAttrBinary($attr)) {
|
||||
switch ($side) {
|
||||
case 'src':
|
||||
$href = sprintf("download_binary_attr.php?server_id=%s&dn=%s&attr=%s",$ldapserver->server_id,$encoded_dn_src,$attr);
|
||||
break;
|
||||
|
||||
case 'dst':
|
||||
$href = sprintf("download_binary_attr.php?server_id=%s&dn=%s&attr=%s",$ldapserver->server_id,$encoded_dn_dst,$attr);
|
||||
break;
|
||||
}
|
||||
?>
|
||||
|
||||
<small>
|
||||
|
||||
<?php echo _('Binary value'); ?><br />
|
||||
|
||||
<?php if (count($vals) > 1) { for($i=1; $i<=count($vals); $i++) { ?>
|
||||
<a href="<?php echo $href . "&value_num=$i"; ?>"><img
|
||||
src="images/save.png" /> <?php echo _('download value'); ?>(<?php echo $i; ?>)</a><br />
|
||||
|
||||
<?php } } else { ?>
|
||||
<a href="<?php echo $href; ?>"><img src="images/save.png" /> <?php echo _('download value'); ?></a><br />
|
||||
|
||||
<?php }
|
||||
|
||||
if ($side == 'dst' && ! $ldapserver_dst->isReadOnly() && ! $ldapserver->isAttrReadOnly($attr)) { ?>
|
||||
|
||||
<a href="javascript:deleteAttribute('<?php echo $attr; ?>');" style="color:red;"><img src="images/trash.png" /> <?php echo _('delete attribute'); ?></a>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</small>
|
||||
</td>
|
||||
|
||||
<?php continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Note: at this point, the attribute must be text-based (not binary or jpeg)
|
||||
*/
|
||||
|
||||
/*
|
||||
* If this server is in read-only mode or this attribute is configured as read_only,
|
||||
* simply draw the attribute values and continue.
|
||||
*/
|
||||
|
||||
if ($side == 'dst' && ($ldapserver->isReadOnly() || $ldapserver->isAttrReadOnly($attr))) {
|
||||
if (is_array($vals)) {
|
||||
foreach ($vals as $i => $val) {
|
||||
if (trim($val) == "")
|
||||
echo "<span style=\"color:red\">[" . _('empty') . "]</span><br />\n";
|
||||
|
||||
elseif (0 == strcasecmp($attr,'userPassword') && $_SESSION['plaConfig']->GetValue('appearance','obfuscate_password_display'))
|
||||
echo preg_replace('/./','*',$val) . "<br />";
|
||||
|
||||
else
|
||||
echo htmlspecialchars($val) . "<br />";
|
||||
}
|
||||
|
||||
// @todo: redundant - $vals is always an array.
|
||||
} else {
|
||||
if (0 == strcasecmp($attr,'userPassword') && $_SESSION['plaConfig']->GetValue('appearance','obfuscate_password_display'))
|
||||
echo preg_replace('/./','*',$vals) . "<br />";
|
||||
else
|
||||
echo $vals . "<br />";
|
||||
}
|
||||
echo "</td>";
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Is this a userPassword attribute?
|
||||
*/
|
||||
if (! strcasecmp($attr,'userpassword')) {
|
||||
$user_password = $vals[0];
|
||||
$enc_type = get_enc_type($user_password);
|
||||
|
||||
// Set the default hashing type if the password is blank (must be newly created)
|
||||
if ($user_password == '') {
|
||||
$enc_type = get_default_hash($server_id);
|
||||
}
|
||||
|
||||
if ($side == 'dst') { ?>
|
||||
|
||||
<input type="hidden" name="old_values[userpassword]" value="<?php echo htmlspecialchars($user_password); ?>" />
|
||||
|
||||
<!-- Special case of enc_type to detect changes when user changes enc_type but not the password value -->
|
||||
<input size="38" type="hidden" name="old_enc_type" value="<?php echo ($enc_type==''?'clear':$enc_type); ?>" />
|
||||
|
||||
<?php }
|
||||
|
||||
if (obfuscate_password_display($enc_type)) {
|
||||
echo htmlspecialchars(preg_replace('/./','*',$user_password));
|
||||
} else {
|
||||
echo htmlspecialchars($user_password);
|
||||
} ?>
|
||||
|
||||
<br />
|
||||
|
||||
<?php if ($side == 'dst') { ?>
|
||||
|
||||
<input style="width: 260px" type="password" name="new_values[userpassword]" value="<?php echo htmlspecialchars($user_password); ?>" />
|
||||
|
||||
<?php echo enc_type_select_list($enc_type);
|
||||
|
||||
} ?>
|
||||
|
||||
<br />
|
||||
|
||||
<script language="javascript">
|
||||
<!--
|
||||
function passwordComparePopup()
|
||||
{
|
||||
mywindow = open('password_checker.php','myname','resizable=no,width=450,height=200,scrollbars=1');
|
||||
mywindow.location.href = 'password_checker.php?hash=<?php echo base64_encode($user_password); ?>&base64=true';
|
||||
if (mywindow.opener == null)
|
||||
mywindow.opener = self;
|
||||
}
|
||||
-->
|
||||
</script>
|
||||
|
||||
<small><a href="javascript:passwordComparePopup()"><?php echo _('Check password'); ?></a></small>
|
||||
|
||||
</td>
|
||||
|
||||
<?php continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Is this a boolean attribute?
|
||||
*/
|
||||
if ($ldapserver->isAttrBoolean($attr)) {
|
||||
$val = $vals[0];
|
||||
|
||||
if ($side = 'dst') {?>
|
||||
|
||||
<input type="hidden" name="old_values[<?php echo htmlspecialchars($attr); ?>]" value="<?php echo htmlspecialchars($val); ?>" />
|
||||
|
||||
<select name="new_values[<?php echo htmlspecialchars($attr); ?>]">
|
||||
<option value="TRUE"<?php echo ($val=='TRUE' ? ' selected' : ''); ?>><?php echo _('true'); ?></option>
|
||||
<option value="FALSE"<?php echo ($val=='FALSE' ? ' selected' : ''); ?>><?php echo _('false'); ?></option>
|
||||
<option value="">(<?php echo _('none, remove value'); ?>)</option>
|
||||
</select>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</td>
|
||||
|
||||
<?php continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* End of special case attributes (non plain text).
|
||||
*/
|
||||
|
||||
foreach ($vals as $i => $val) {
|
||||
|
||||
if ($side == 'dst') {
|
||||
$input_name = "new_values[" . htmlspecialchars($attr) . "][$i]";
|
||||
// We smack an id="..." tag in here that doesn't have [][] in it to allow the
|
||||
// draw_chooser_link() to identify it after the user clicks.
|
||||
$input_id = "new_values_" . htmlspecialchars($attr) . "_" . $i; ?>
|
||||
|
||||
<!-- The old_values array will let update.php know if the entry contents changed
|
||||
between the time the user loaded this page and saved their changes. -->
|
||||
<input type="hidden" name="old_values[<?php echo htmlspecialchars($attr); ?>][<?php echo $i; ?>]" value="<?php echo htmlspecialchars($val); ?>" />
|
||||
<?php }
|
||||
|
||||
// Is this value is a structural objectClass, make it read-only
|
||||
if (0 == strcasecmp($attr,'objectClass')) { ?>
|
||||
|
||||
<a title="<?php echo _('View the schema description for this objectClass'); ?>" href="cmd.php?cmd=schema&server_id=<?php echo $ldapserver->server_id; ?>&view=objectClasses&viewvalue=<?php echo htmlspecialchars($val); ?>"><img src="images/info.png" /></a>
|
||||
|
||||
<?php $schema_object = $ldapserver->getSchemaObjectClass($val);
|
||||
|
||||
if ($schema_object->getType() == 'structural') {
|
||||
echo "$val <small>(<acronym title=\"" . sprintf(_('This is a structural ObjectClass and cannot be removed.')) . "\">" . _('structural') . "</acronym>)</small><br />";
|
||||
|
||||
if ($side == 'dst') {?>
|
||||
|
||||
<input type="hidden" name="<?php echo $input_name; ?>" id="<?php echo $input_id; ?>" value="<?php echo htmlspecialchars($val); ?>" />
|
||||
|
||||
<?php }
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_dn_string($val) || $ldapserver->isDNAttr($attr)) { ?>
|
||||
|
||||
<a title="<?php echo sprintf(_('Go to %s'),htmlspecialchars($val)); ?>" href="cmd.php?cmd=template_engine&server_id=<?php echo $ldapserver->server_id; ?>&dn=<?php echo rawurlencode($val); ?>"><img style="vertical-align: top" src="images/go.png" /></a>
|
||||
|
||||
<?php } elseif (is_mail_string($val)) { ?>
|
||||
|
||||
<a href="mailto:<?php echo htmlspecialchars($val); ?>"><img style="vertical-align: center" src="images/mail.png" /></a>
|
||||
|
||||
<?php } elseif (is_url_string($val)) { ?>
|
||||
|
||||
<a href="<?php echo htmlspecialchars($val); ?>" target="new"><img style="vertical-align: center" src="images/dc.png" /></a>
|
||||
|
||||
<?php }
|
||||
|
||||
if ($ldapserver->isMultiLineAttr($attr,$val)) {
|
||||
|
||||
if ($side == 'dst') {?>
|
||||
<textarea class="val" rows="3" cols="30" name="<?php echo $input_name; ?>" id="<?php echo $input_id; ?>"><?php echo htmlspecialchars($val); ?></textarea>
|
||||
|
||||
<?php } else {
|
||||
echo htmlspecialchars($val);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if ($side == 'dst') {?>
|
||||
|
||||
<input type="text" class="val" name="<?php echo $input_name; ?>" id="<?php echo $input_id; ?>" value="<?php echo htmlspecialchars($val); ?>" />
|
||||
|
||||
<?php } else {
|
||||
echo htmlspecialchars($val);
|
||||
}
|
||||
}
|
||||
|
||||
// draw a link for popping up the entry browser if this is the type of attribute
|
||||
// that houses DNs.
|
||||
if ($ldapserver->isDNAttr($attr))
|
||||
draw_chooser_link("edit_form.$input_id",false); ?>
|
||||
|
||||
<br />
|
||||
<?php } ?>
|
||||
|
||||
</td>
|
||||
|
||||
<?php } /* end foreach value */ ?>
|
||||
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
/* Draw the "add value" link under the list of values for this attributes */
|
||||
if (! $ldapserver_dst->isReadOnly()) {
|
||||
|
||||
// First check if the required objectClass is in this DN
|
||||
$isOK = 0;
|
||||
$src_oclass = array();
|
||||
$attr_object = $ldapserver_dst->getSchemaAttribute($attr,$dn_dst);
|
||||
foreach ($attr_object->used_in_object_classes as $oclass) {
|
||||
if (in_array(strtolower($oclass),arrayLower($attrs_dst['objectClass']))) {
|
||||
$isOK = 1;
|
||||
break;
|
||||
} else {
|
||||
// Find oclass that the source has that provides this attribute.
|
||||
if (in_array($oclass,$attrs_src['objectClass']))
|
||||
$src_oclass[] = $oclass;
|
||||
}
|
||||
}
|
||||
|
||||
print "<tr><td colspan=2></td><td colspan=2> </td><td> </td><td>";
|
||||
if (! $isOK) {
|
||||
|
||||
if (count($src_oclass) == 1) {
|
||||
$add_href = sprintf('cmd.php?cmd=add_oclass_form&server_id=%s&dn=%s&new_oclass=%s',
|
||||
$ldapserver_dst->server_id,$encoded_dn_dst,$src_oclass[0]);
|
||||
} else {
|
||||
$add_href = sprintf('cmd.php?cmd=add_value_form&server_id=%s&dn=%s&attr=objectClass',
|
||||
$ldapserver_dst->server_id,$encoded_dn_dst);
|
||||
}
|
||||
|
||||
if ($attr == 'objectClass')
|
||||
printf('<div class="add_oclass">(<a href="%s" title="%s">%s</a>)</div>',$add_href,_('Add ObjectClass and Attributes'),_('add value'));
|
||||
else
|
||||
printf('<div class="add_oclass">(<a href="%s" title="%s">%s</a>)</div>',$add_href,sprintf(_('You need one of the following ObjectClass(es) to add this attribute %s.'),implode(" ",$src_oclass)),_('Add new ObjectClass'));
|
||||
|
||||
} else {
|
||||
if (! $schema_attr_dst->getIsSingleValue() || (! isset($vals))) {
|
||||
|
||||
$add_href = sprintf('cmd.php?cmd=add_value_form&server_id=%s&dn=%s&attr=%s',
|
||||
$ldapserver_dst->server_id,$encoded_dn_dst,rawurlencode($attr));
|
||||
|
||||
printf('<div class="add_value">(<a href="%s" title="%s">%s</a>)</div>',
|
||||
$add_href,sprintf(_('Add an additional value to attribute \'%s\''),$attr),_('add value'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print "</td></tr>"; ?>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?php } /* End foreach ($attrs as $attr => $vals) */
|
||||
|
||||
if (! $ldapserver_dst->isReadOnly()) { ?>
|
||||
|
||||
<td colspan="2"> </td><td colspan=2><center><input type="submit" value="<?php echo _('Save Changes'); ?>" /></center></td></tr></form>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</table>
|
||||
|
||||
<?php /* If this entry has a binary attribute,we need to provide a form for it to submit when deleting it. */ ?>
|
||||
|
||||
<script language="javascript">
|
||||
//<!--
|
||||
function deleteAttribute(attrName)
|
||||
{
|
||||
if (confirm("<?php echo _('Really delete attribute'); ?> '" + attrName + "'?")) {
|
||||
document.delete_attribute_form.attr.value = attrName;
|
||||
document.delete_attribute_form.submit();
|
||||
}
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<!-- This form is submitted by JavaScript when the user clicks "Delete attribute" on a binary attribute -->
|
||||
<form name="delete_attribute_form" action="cmd.php?cmd=delete_attr" method="post">
|
||||
<input type="hidden" name="server_id" value="<?php echo $ldapserver_dst->server_id; ?>" />
|
||||
<input type="hidden" name="dn" value="<?php echo $dn_dst; ?>" />
|
||||
<input type="hidden" name="attr" value="FILLED IN BY JAVASCRIPT" />
|
||||
</form>
|
70
htdocs/compare_form.php
Normal file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/compare_form.php,v 1.5 2007/12/15 07:50:30 wurley Exp $
|
||||
|
||||
/**
|
||||
* Compares to DN entries side by side.
|
||||
*
|
||||
* - dn (rawurlencoded)
|
||||
* - server_id
|
||||
*
|
||||
* @package phpLDAPadmin
|
||||
*/
|
||||
/**
|
||||
*/
|
||||
|
||||
require_once './common.php';
|
||||
|
||||
$dn = (isset($_GET['dn']) ? $_GET['dn'] : '');
|
||||
$rdn = get_rdn($dn);
|
||||
$select_server_html = server_select_list($ldapserver->server_id,true,'server_id_dst');
|
||||
|
||||
printf('<h3 class="title">%s %s</h3>',_('Compare another DN with'),htmlspecialchars($rdn));
|
||||
printf('<h3 class="subtitle">%s: <b>%s</b>',_('Server'),$ldapserver->name);
|
||||
if ($dn)
|
||||
printf(' %s: <b>%s</b>',_('Distinguished Name'),htmlspecialchars($dn));
|
||||
echo '</h3>';
|
||||
echo "\n";
|
||||
|
||||
echo '<center>';
|
||||
printf('%s <b>%s</b> %s<br />',_('Compare'),htmlspecialchars($rdn),_('with '));
|
||||
|
||||
echo '<form action="cmd.php?cmd=compare" method="post" name="compare_form">';
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
|
||||
printf('<input type="hidden" name="server_id_src" value="%s" />',$ldapserver->server_id);
|
||||
echo "\n";
|
||||
|
||||
echo '<table style="border-spacing: 10px">';
|
||||
echo "\n";
|
||||
echo '<tr><td>';
|
||||
|
||||
if (! $dn) {
|
||||
printf('<acronym title="%s">%s</acronym>:',_('Compare this DN with another'),_('Source DN'));
|
||||
echo '</td><td>';
|
||||
printf('<input type="text" name="dn_src" size="45" value="%s" />',htmlspecialchars($dn));
|
||||
draw_chooser_link('compare_form.dn_src','true',$rdn);
|
||||
|
||||
} else
|
||||
printf('<input type="hidden" name="dn_src" value="%s" />',htmlspecialchars($dn));
|
||||
|
||||
echo '</td></tr>';
|
||||
echo "\n";
|
||||
|
||||
echo '<tr>';
|
||||
printf('<td><acronym title="%s">%s</acronym>:</td>',_('Compare this DN with another'),_('Destination DN'));
|
||||
echo '<td>';
|
||||
echo '<input type="text" name="dn_dst" size="45" value="" />';
|
||||
draw_chooser_link('compare_form.dn_dst','true','');
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
echo "\n";
|
||||
|
||||
printf('<tr><td>%s:</td><td>%s</td></tr>',_('Destination Server'),$select_server_html);
|
||||
echo "\n";
|
||||
|
||||
printf('<tr><td colspan="2" align="right"><input type="submit" value="%s" /></td></tr>',_('Compare'));
|
||||
echo "\n";
|
||||
|
||||
echo '</table>';
|
||||
echo '</form>';
|
||||
echo '</center>';
|
||||
?>
|
182
htdocs/copy.php
Normal file
@@ -0,0 +1,182 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/copy.php,v 1.44 2007/12/15 07:50:30 wurley Exp $
|
||||
|
||||
/**
|
||||
* Copies a given object to create a new one.
|
||||
*
|
||||
* Vars that come in as POST vars
|
||||
* - source_dn (rawurlencoded)
|
||||
* - new_dn (form element)
|
||||
* - server_id
|
||||
*
|
||||
* @package phpLDAPadmin
|
||||
*/
|
||||
/**
|
||||
*/
|
||||
|
||||
require './common.php';
|
||||
|
||||
if (! $_SESSION['plaConfig']->isCommandAvailable('entry_move'))
|
||||
pla_error(sprintf('%s%s %s',_('This operation is not permitted by the configuration'),_(':'),_('copy entry')));
|
||||
|
||||
$entry['src']['id'] = get_request('server_id');
|
||||
$entry['dst']['id'] = get_request('dest_server_id');
|
||||
|
||||
$entry['src']['ldapserver'] = $_SESSION['plaConfig']->ldapservers->Instance($entry['src']['id']);
|
||||
$entry['dst']['ldapserver'] = $_SESSION['plaConfig']->ldapservers->Instance($entry['dst']['id']);
|
||||
|
||||
if ($entry['dst']['ldapserver']->isReadOnly())
|
||||
pla_error(_('Destination server is currently READ-ONLY.'));
|
||||
|
||||
if (! $entry['src']['ldapserver']->haveAuthInfo() || ! $entry['dst']['ldapserver']->haveAuthInfo())
|
||||
pla_error(_('Not enough information to login to server. Please check your configuration.'));
|
||||
|
||||
$entry['src']['dn'] = get_request('old_dn');
|
||||
$entry['dst']['dn'] = get_request('new_dn');
|
||||
$entry['src']['recursive'] = (get_request('recursive') == 'on') ? true : false;
|
||||
$entry['src']['remove'] = (get_request('remove') == 'yes') ? true : false;
|
||||
|
||||
# Error checking
|
||||
if (strlen(trim($entry['dst']['dn'])) == 0)
|
||||
pla_error(_('You left the destination DN blank.'));
|
||||
|
||||
if (pla_compare_dns($entry['src']['dn'],$entry['dst']['dn']) == 0 && $entry['src']['id'] == $entry['dst']['id'])
|
||||
pla_error(_('The source and destination DN are the same.'));
|
||||
|
||||
if ($entry['dst']['ldapserver']->dnExists($entry['dst']['dn']))
|
||||
pla_error(sprintf(_('The destination entry (%s) already exists.'),pretty_print_dn($entry['dst']['dn'])));
|
||||
|
||||
if (! $entry['dst']['ldapserver']->dnExists(get_container($entry['dst']['dn'])))
|
||||
pla_error(sprintf(_('The destination container (%s) does not exist.'),pretty_print_dn(get_container($entry['dst']['dn']))));
|
||||
|
||||
if ($entry['src']['recursive']) {
|
||||
$filter = isset($_POST['filter']) ? $_POST['filter'] : '(objectClass=*)';
|
||||
|
||||
# Build a tree similar to that of the tree browser to give to r_copy_dn
|
||||
$snapshot_tree = array();
|
||||
printf('<h3 class="title">%s%s</h3>',_('Copying '),htmlspecialchars($entry['src']['dn']));
|
||||
printf('<h3 class="subtitle">%s</h3>',_('Recursive copy progress'));
|
||||
print '<br /><br />';
|
||||
print '<small>';
|
||||
print _('Building snapshot of tree to copy... ');
|
||||
|
||||
$snapshot_tree = build_tree($entry['src']['ldapserver'],$entry['src']['dn'],array(),$filter);
|
||||
printf('<span style="color:green">%s</span><br />',_('Success'));
|
||||
|
||||
# Prevent script from bailing early on a long delete
|
||||
@set_time_limit(0);
|
||||
|
||||
$copy_result = r_copy_dn($entry['src']['ldapserver'],$entry['dst']['ldapserver'],$snapshot_tree,$entry['src']['dn'],$entry['dst']['dn']);
|
||||
# @todo: This is not showing the complete results - only the children of the dst - need to look at.
|
||||
$copy_message = $copy_result;
|
||||
print '</small>';
|
||||
|
||||
} else {
|
||||
$copy_result = copy_dn($entry['src']['ldapserver'],$entry['dst']['ldapserver'],$entry['src']['dn'],$entry['dst']['dn']);
|
||||
$copy_message = sprintf('%s DN%s <b>%s</b> %s',_('Copy successful!'),_(':'),htmlspecialchars($entry['dst']['dn']),_('has been created.'));
|
||||
}
|
||||
|
||||
if ($copy_result) {
|
||||
$redirect_url = sprintf('cmd.php?cmd=template_engine&server_id=%s&dn=%s',$entry['dst']['id'],rawurlencode($entry['dst']['dn']));
|
||||
$new_rdn = get_rdn($entry['dst']['dn']);
|
||||
$container = get_container($entry['dst']['dn']);
|
||||
|
||||
if ($entry['src']['remove'])
|
||||
$redirect_url = sprintf('cmd.php?cmd=delete_form&server_id=%s&dn=%s',$entry['src']['id'],rawurlencode($entry['src']['dn']));
|
||||
|
||||
system_message(array(
|
||||
'title'=>_('Copy Entry'),
|
||||
'body'=>$copy_message,
|
||||
'type'=>'info'),
|
||||
$redirect_url);
|
||||
}
|
||||
|
||||
function r_copy_dn($ldapserver_src,$ldapserver_dst,$snapshottree,$root_dn,$dn_dst) {
|
||||
if (DEBUG_ENABLED)
|
||||
debug_log('Entered with (%s,%s,%s,%s,%s)',1,__FILE__,__LINE__,__METHOD__,
|
||||
$ldapserver_src->server_id,$ldapserver_dst->server_id,$snapshottree,$root_dn,$dn_dst);
|
||||
|
||||
$copy_message = array();
|
||||
|
||||
$copy_result = copy_dn($ldapserver_src,$ldapserver_dst,$root_dn,$dn_dst);
|
||||
|
||||
if (! $copy_result)
|
||||
return false;
|
||||
|
||||
$copy_message[] = sprintf('%s DN: <b>%s</b> %s',_('Copy successful!'),htmlspecialchars($dn_dst),_('has been created.'));
|
||||
|
||||
$children = isset($snapshottree[$root_dn]) ? $snapshottree[$root_dn] : null;
|
||||
if (is_array($children) && count($children) > 0) {
|
||||
foreach($children as $child_dn) {
|
||||
$child_rdn = get_rdn($child_dn);
|
||||
$new_dest_dn = sprintf('%s,%s',$child_rdn,$dn_dst);
|
||||
$copy_result = r_copy_dn($ldapserver_src,$ldapserver_dst,$snapshottree,$child_dn,$new_dest_dn);
|
||||
$copy_message[] = array_shift($copy_result);
|
||||
}
|
||||
}
|
||||
|
||||
return $copy_message;
|
||||
}
|
||||
|
||||
function copy_dn($ldapserver_src,$ldapserver_dst,$dn_src,$dn_dst) {
|
||||
if (DEBUG_ENABLED)
|
||||
debug_log('Entered with (%s,%s,%s,%s)',17,__FILE__,__LINE__,__METHOD__,
|
||||
$ldapserver_src->server_id,$ldapserver_dst->server_id,$dn_src,$dn_dst);
|
||||
|
||||
$new_entry = $ldapserver_src->getDNAttrs($dn_src);
|
||||
|
||||
# modify the prefix-value (ie "bob" in cn=bob) to match the destination DN's value.
|
||||
$rdn_attr = substr($dn_dst,0,strpos($dn_dst,'='));
|
||||
$rdn_value = get_rdn($dn_dst);
|
||||
$rdn_value = substr($rdn_value,strpos($rdn_value,'=') + 1);
|
||||
$new_entry[$rdn_attr] = $rdn_value;
|
||||
|
||||
# don't need a dn attribute in the new entry
|
||||
unset($new_entry['dn']);
|
||||
|
||||
# Check the user-defined custom call back first
|
||||
if (run_hook('pre_entry_create',
|
||||
array ('server_id'=>$ldapserver_dst->server_id,'dn'=>$dn_dst,'attrs'=>$new_entry))) {
|
||||
|
||||
$add_result = $ldapserver_dst->add($dn_dst,$new_entry);
|
||||
if (! $add_result) {
|
||||
echo '</small><br /><br />';
|
||||
pla_error(_('Failed to copy DN: ').$dn_dst,$ldapserver_dst->error(),$ldapserver_dst->errno());
|
||||
} else {
|
||||
run_hook('post_entry_create',
|
||||
array('server_id'=>$ldapserver_dst->server_id,'dn'=>$dn_dst,'attrs'=>$new_entry));
|
||||
}
|
||||
|
||||
return $add_result;
|
||||
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param object $ldapserver
|
||||
* @param dn $dn
|
||||
* @param array $tree
|
||||
* @param string $filter
|
||||
*/
|
||||
function build_tree($ldapserver,$dn,$buildtree) {
|
||||
if (DEBUG_ENABLED)
|
||||
debug_log('Entered with (%s,%s,%s)',1,__FILE__,__LINE__,__METHOD__,
|
||||
$ldapserver->server_id,$dn,$buildtree);
|
||||
|
||||
# we search all children, not only the visible children in the tree
|
||||
$children = $ldapserver->getContainerContents($dn,0);
|
||||
|
||||
if (is_array($children) && count($children) > 0) {
|
||||
$buildtree[$dn] = $children;
|
||||
foreach ($children as $child_dn)
|
||||
$buildtree = build_tree($ldapserver,$child_dn,$buildtree);
|
||||
}
|
||||
|
||||
if (DEBUG_ENABLED)
|
||||
debug_log('Returning (%s)',1,__FILE__,__LINE__,__METHOD__,$buildtree);
|
||||
|
||||
return $buildtree;
|
||||
}
|
||||
?>
|
105
htdocs/copy_form.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/copy_form.php,v 1.30 2007/12/15 07:50:30 wurley Exp $
|
||||
|
||||
/**
|
||||
* Copies a given object to create a new one.
|
||||
*
|
||||
* Variables that come in via GET variables
|
||||
* - dn (rawurlencoded)
|
||||
*
|
||||
* @package phpLDAPadmin
|
||||
*/
|
||||
/**
|
||||
*/
|
||||
|
||||
require './common.php';
|
||||
|
||||
if ($ldapserver->isReadOnly())
|
||||
pla_error(_('You cannot perform updates while server is in read-only mode'));
|
||||
|
||||
$entry['dn'] = get_request('dn','GET');
|
||||
$entry['rdn'] = get_rdn($entry['dn']);
|
||||
|
||||
# We search all children, not only the visible children in the tree
|
||||
$entry['children'] = $ldapserver->getContainerContents($entry['dn']);
|
||||
|
||||
# Draw some javaScrpt to enable/disable the filter field if this may be a recursive copy
|
||||
if (is_array($entry['children']) && count($entry['children']) > 0) { ?>
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
function toggle_disable_filter_field(recursive_checkbox)
|
||||
{
|
||||
if (recursive_checkbox.checked) {
|
||||
recursive_checkbox.form.remove.disabled = false;
|
||||
recursive_checkbox.form.filter.disabled = false;
|
||||
} else {
|
||||
recursive_checkbox.form.remove.disabled = true;
|
||||
recursive_checkbox.form.remove.checked = false;
|
||||
recursive_checkbox.form.filter.disabled = true;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php }
|
||||
|
||||
printf('<h3 class="title">%s %s</h3>',_('Copy'),htmlspecialchars($entry['rdn']));
|
||||
printf('<h3 class="subtitle">%s: <b>%s</b> %s: <b>%s</b></h3>',_('Server'),$ldapserver->name,
|
||||
_('Distinguished Name'),htmlspecialchars($entry['dn']));
|
||||
echo "\n";
|
||||
|
||||
echo '<center>';
|
||||
printf('%s <b>%s</b> %s:<br /><br />',_('Copy'),htmlspecialchars($entry['rdn']),_('to a new object'));
|
||||
|
||||
echo '<form action="cmd.php" method="post" name="copy_form">';
|
||||
echo '<input type="hidden" name="cmd" value="copy" />';
|
||||
printf('<input type="hidden" name="old_dn" value="%s" />',htmlspecialchars($entry['dn']));
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
|
||||
echo "\n";
|
||||
|
||||
echo '<table style="border-spacing: 10px">';
|
||||
echo "\n";
|
||||
|
||||
echo '<tr>';
|
||||
printf('<td><acronym title="%s">%s</acronym>:</td>',
|
||||
_('The full DN of the new entry to be created when copying the source entry'),_('Destination DN'));
|
||||
printf('<td><input type="text" name="new_dn" size="45" value="%s" />',htmlspecialchars($entry['dn']));
|
||||
draw_chooser_link('copy_form.new_dn','true',htmlspecialchars($entry['rdn']));
|
||||
echo '</td></tr>';
|
||||
echo "\n";
|
||||
|
||||
printf('<tr><td>%s</td><td>%s</td></tr>',_('Destination Server'),server_select_list($ldapserver->server_id,true,'dest_server_id'));
|
||||
echo "\n";
|
||||
|
||||
if (is_array($entry['children']) && count($entry['children']) > 0) {
|
||||
echo '<tr>';
|
||||
printf('<td><label for="recursive">%s</label>:</td>',_('Recursive copy'));
|
||||
echo '<td><input type="checkbox" id="recursive" name="recursive" onClick="toggle_disable_filter_field(this)" />';
|
||||
printf('<small>(%s)</small></td>',_('Recursively copy all children of this object as well.'));
|
||||
echo '</tr>'."\n";
|
||||
|
||||
echo '<tr>';
|
||||
printf('<td><acronym title="%s">%s</acronym>:</td>',_('When performing a recursive copy, only copy those entries which match this filter'),_('Filter'));
|
||||
echo '<td><input type="text" name="filter" value="(objectClass=*)" size="45" disabled />';
|
||||
echo '</tr>'."\n";
|
||||
|
||||
echo '<tr>';
|
||||
printf('<td>%s</td>',_('Delete after copy (move):'));
|
||||
echo '<td><input type="checkbox" name="remove" value="yes" disabled />';
|
||||
printf('<small>(%s)</small)</td>',_('Make sure your filter (above) will select all child records.'));
|
||||
echo '</tr>';
|
||||
|
||||
} else {
|
||||
printf('<tr><td>%s</td><td><input type="checkbox" name="remove" value="yes"/></td></tr>',_('Delete after copy (move):'));
|
||||
}
|
||||
echo "\n";
|
||||
|
||||
printf('<tr><td colspan="2" align="right"><input type="submit" value="%s" /></td></tr>',_('Copy '));
|
||||
echo "\n";
|
||||
echo '</table></form>';
|
||||
echo "\n";
|
||||
|
||||
if ($_SESSION['plaConfig']->GetValue('appearance','show_hints'))
|
||||
printf('<small><img src="images/light.png" alt="Light" /><span class="hint">%s</span></small>',_('Hint: Copying between different servers only works if there are no schema violations'));
|
||||
|
||||
echo '</center>';
|
||||
?>
|
134
htdocs/create.php
Normal file
@@ -0,0 +1,134 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/create.php,v 1.48 2007/12/15 07:50:30 wurley Exp $
|
||||
|
||||
/**
|
||||
* Creates a new object.
|
||||
*
|
||||
* Variables that come in as POST vars:
|
||||
* - new_dn
|
||||
* - required_attrs (an array with indices being the attributes,
|
||||
* and the values being their respective values)
|
||||
* - object_classes (rawurlencoded, and serialized array of objectClasses)
|
||||
*
|
||||
* @package phpLDAPadmin
|
||||
*/
|
||||
/**
|
||||
* @todo: posixgroup with empty memberlist generates an error.
|
||||
*/
|
||||
|
||||
require './common.php';
|
||||
|
||||
if ($ldapserver->isReadOnly())
|
||||
pla_error(_('You cannot perform updates while server is in read-only mode'), null, -1, true);
|
||||
|
||||
if (! $_SESSION['plaConfig']->isCommandAvailable('entry_create'))
|
||||
pla_error(sprintf('%s%s %s',_('This operation is not permitted by the configuration'),_(':'),_('create entry')));
|
||||
|
||||
$rdn_attr = isset($_POST['rdn_attribute']) ? $_POST['rdn_attribute'] : null;
|
||||
|
||||
$entryfactoryclass = $_SESSION['plaConfig']->GetValue('appearance','entry_factory');
|
||||
eval('$entry_factory = new '.$entryfactoryclass.'();');
|
||||
$entry = $entry_factory->newCreatingEntry('');
|
||||
|
||||
eval('$reader = new '.$_SESSION['plaConfig']->GetValue('appearance', 'entry_reader').'($ldapserver);');
|
||||
$entry->accept($reader);
|
||||
|
||||
$container = $entry->getContainer();
|
||||
|
||||
if (!$container || !$ldapserver->dnExists($container))
|
||||
pla_error(sprintf(_('The container you specified (%s) does not exist. Please try again.'),htmlspecialchars($container)),null,-1,true);
|
||||
|
||||
$tree = get_cached_item($ldapserver->server_id,'tree');
|
||||
if ($tree) {
|
||||
$container_entry = $tree->getEntry($container);
|
||||
if (!$container_entry)
|
||||
$tree->addEntry($container);
|
||||
|
||||
$container_entry = $tree->getEntry($container);
|
||||
if ($container_entry->isLeaf())
|
||||
pla_error(sprintf(_('The container (%s) is a leaf.'), htmlspecialchars($container)), null, -1, true);
|
||||
}
|
||||
|
||||
$entry->setRdnAttributeName($rdn_attr);
|
||||
if (!$entry->getRdnAttribute())
|
||||
pla_error(sprintf(_('The Rdn attribute (%s) does not exist.'), htmlspecialchars($rdn_attr)), null, -1, true);
|
||||
|
||||
$new_dn = $entry->getDn();
|
||||
if (! $new_dn)
|
||||
pla_error(_('You left the RDN field blank.'));
|
||||
|
||||
$redirect = isset($_POST['redirect']) ? $_POST['redirect'] : false;
|
||||
|
||||
$new_entry = array();
|
||||
$attrs = $entry->getAttributes();
|
||||
foreach ($attrs as $attr) {
|
||||
$vals = $attr->getValues();
|
||||
$new_vals = array();
|
||||
foreach ($vals as $val) {
|
||||
if (strlen($val) > 0)
|
||||
$new_vals[] = $val;
|
||||
}
|
||||
|
||||
if ($attr->isRequired() && !$new_vals)
|
||||
pla_error(sprintf(_('You left the value blank for required attribute (%s).'), htmlspecialchars($attr->getName())));
|
||||
|
||||
if ($new_vals)
|
||||
$new_entry[$attr->getName()] = $new_vals;
|
||||
}
|
||||
|
||||
if (! in_array('top', $new_entry['objectClass']))
|
||||
$new_entry['objectClass'][] = 'top';
|
||||
|
||||
foreach ($new_entry as $attr => $vals) {
|
||||
# Check to see if this is a unique Attribute
|
||||
if ($badattr = $ldapserver->checkUniqueAttr($new_dn,$attr,$vals)) {
|
||||
$search_href = sprintf('?cmd=search&search=true&form=advanced&server_id=%s&filter=%s=%s', $ldapserver->server_id,$attr,$badattr);
|
||||
pla_error(sprintf(_('Your attempt to add <b>%s</b> (<i>%s</i>) to <br><b>%s</b><br> is NOT allowed. That attribute/value belongs to another entry.<p>You might like to <a href=\'%s\'>search</a> for that entry.'),$attr,$badattr,$new_dn,$search_href));
|
||||
}
|
||||
}
|
||||
|
||||
# Check the user-defined custom call back first
|
||||
if (run_hook('pre_entry_create',array('server_id'=>$ldapserver->server_id,'dn'=>$new_dn,'attrs'=>$new_entry)))
|
||||
$add_result = $ldapserver->add($new_dn,$new_entry);
|
||||
|
||||
if ($add_result) {
|
||||
run_hook('post_entry_create',array('server_id'=>$ldapserver->server_id,'dn'=>$new_dn,'attrs'=>$new_entry));
|
||||
|
||||
$action_number = $_SESSION['plaConfig']->GetValue('appearance', 'action_after_creation');
|
||||
|
||||
$container = get_container($new_dn,false);
|
||||
//$container_container = get_container($container);
|
||||
|
||||
if ($redirect) {
|
||||
$redirect_url = $redirect;
|
||||
} else if ($action_number == 2) {
|
||||
$redirect_url = sprintf('cmd.php?cmd=template_engine&server_id=%s&container=%s', $ldapserver->server_id, rawurlencode($container));
|
||||
} else {
|
||||
$redirect_url = sprintf('cmd.php?cmd=template_engine&server_id=%s&dn=%s', $ldapserver->server_id, rawurlencode($new_dn));
|
||||
}
|
||||
|
||||
if ($action_number == 1 || $action_number == 2)
|
||||
printf('<meta http-equiv="refresh" content="0; url=%s" />',$redirect_url);
|
||||
|
||||
if ($action_number == 1 || $action_number == 2) {
|
||||
$create_message = sprintf('%s DN%s <b>%s</b> %s',_('Creation successful!'),_(':'),htmlspecialchars($new_dn),_('has been created.'));
|
||||
|
||||
system_message(array(
|
||||
'title'=>_('Create Entry'),
|
||||
'body'=>$create_message,
|
||||
'type'=>'info'),
|
||||
$redirect_url);
|
||||
} else {
|
||||
printf('<h3 class="title">%s</h3>',_('Entry created'));
|
||||
echo '<br />';
|
||||
echo '<center>';
|
||||
printf('<a href="cmd.php?cmd=template_engine&server_id=%s&dn=%s">%s</a>.',$ldapserver->server_id,rawurlencode($new_dn),_('Display the new created entry'));
|
||||
echo '<br />';
|
||||
printf('<a href="cmd.php?cmd=template_engine&server_id=%s&container=%s">%s</a>.',$ldapserver->server_id,rawurlencode($container),_('Create another entry'));
|
||||
echo '</center>';
|
||||
}
|
||||
|
||||
} else {
|
||||
pla_error(_('Could not add the object to the LDAP server.'),$ldapserver->error(),$ldapserver->errno());
|
||||
}
|
||||
?>
|
1046
htdocs/css/style.css
Normal file
52
htdocs/delete.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/delete.php,v 1.27 2007/12/15 07:50:30 wurley Exp $
|
||||
|
||||
/**
|
||||
* Deletes a DN and presents a "job's done" message.
|
||||
*
|
||||
* Variables that come in as POST vars:
|
||||
* - dn (rawurlencoded)
|
||||
*
|
||||
* @package phpLDAPadmin
|
||||
*/
|
||||
/**
|
||||
*/
|
||||
|
||||
require './common.php';
|
||||
|
||||
if ($ldapserver->isReadOnly())
|
||||
pla_error(_('You cannot perform updates while server is in read-only mode'));
|
||||
|
||||
if (! $_SESSION['plaConfig']->isCommandAvailable('entry_delete', 'simple_delete'))
|
||||
pla_error(sprintf('%s%s %s',_('This operation is not permitted by the configuration'),_(':'),_('delete entry')));
|
||||
|
||||
$entry['dn'] = get_request('dn');
|
||||
|
||||
if (! $entry['dn'])
|
||||
pla_error(_('You must specify a DN'));
|
||||
|
||||
if (! $ldapserver->dnExists($entry['dn']))
|
||||
pla_error(sprintf(_('No such entry: %s'),'<b>'.pretty_print_dn($entry['dn']).'</b>'));
|
||||
|
||||
# Check the user-defined custom callback first.
|
||||
if (run_hook('pre_entry_delete',array('server_id'=>$ldapserver->server_id,'dn'=>$entry['dn'])))
|
||||
$result = $ldapserver->delete($entry['dn']);
|
||||
else
|
||||
pla_error(sprintf(_('Could not delete the entry: %s'),'<b>'.pretty_print_dn($entry['dn']).'</b>'));
|
||||
|
||||
if ($result) {
|
||||
# Custom callback
|
||||
run_hook('post_entry_delete',
|
||||
array('server_id'=>$ldapserver->server_id,'dn'=>$entry['dn']));
|
||||
|
||||
system_message(array(
|
||||
'title'=>_('Delete DN'),
|
||||
'body'=>_('Successfully deleted DN ').sprintf('<b>%s</b>',$entry['dn']),
|
||||
'type'=>'info'),
|
||||
'index.php');
|
||||
|
||||
} else {
|
||||
pla_error(sprintf(_('Could not delete the entry: %s'),'<b>'.pretty_print_dn($entry['dn']).'</b>'),
|
||||
$ldapserver->error(),$ldapserver->errno());
|
||||
}
|
||||
?>
|
52
htdocs/delete_attr.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/delete_attr.php,v 1.16 2007/12/15 07:50:30 wurley Exp $
|
||||
|
||||
/**
|
||||
* Deletes an attribute from an entry with NO confirmation.
|
||||
*
|
||||
* On success, redirect to template_engine.php
|
||||
* On failure, echo an error.
|
||||
*
|
||||
* @package phpLDAPadmin
|
||||
*/
|
||||
/**
|
||||
*/
|
||||
|
||||
require './common.php';
|
||||
|
||||
if ($ldapserver->isReadOnly())
|
||||
pla_error(_('You cannot perform updates while server is in read-only mode'));
|
||||
|
||||
if (! $_SESSION['plaConfig']->isCommandAvailable('attribute_delete'))
|
||||
pla_error(sprintf('%s%s %s',_('This operation is not permitted by the configuration'),_(':'),_('delete attribute')));
|
||||
|
||||
$entry['dn']['string'] = get_request('dn');
|
||||
$entry['dn']['encode'] = rawurlencode($entry['dn']['string']);
|
||||
$entry['attr'] = get_request('attr');
|
||||
|
||||
if (! $entry['dn']['string'])
|
||||
pla_error(_('No DN specified'));
|
||||
|
||||
if (! $entry['attr'])
|
||||
pla_error(_('No attribute name specified.'));
|
||||
|
||||
if ($ldapserver->isAttrReadOnly($entry['attr']))
|
||||
pla_error(sprintf(_('The attribute "%s" is flagged as read-only in the phpLDAPadmin configuration.'),htmlspecialchars($entry['attr'])));
|
||||
|
||||
$update_array = array();
|
||||
$update_array[$entry['attr']] = array();
|
||||
|
||||
$result = $ldapserver->modify($entry['dn']['string'],$update_array);
|
||||
if ($result) {
|
||||
$redirect_url = sprintf('cmd.php?cmd=template_engine&server_id=%s&dn=%s',$ldapserver->server_id,$entry['dn']['encode']);
|
||||
|
||||
foreach ($update_array as $attr => $junk)
|
||||
$redirect_url .= "&modified_attrs[]=$attr";
|
||||
|
||||
header("Location: $redirect_url");
|
||||
die();
|
||||
|
||||
} else {
|
||||
pla_error(_('Could not perform ldap_modify operation.'),$ldapserver->error(),$ldapserver->errno());
|
||||
}
|
||||
?>
|
138
htdocs/delete_form.php
Normal file
@@ -0,0 +1,138 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/delete_form.php,v 1.26 2007/12/15 07:50:30 wurley Exp $
|
||||
|
||||
/**
|
||||
* delete_form.php
|
||||
* Displays a last chance confirmation form to delete a dn.
|
||||
*
|
||||
* Variables that come in as GET vars:
|
||||
* - dn (rawurlencoded)
|
||||
*
|
||||
* @package phpLDAPadmin
|
||||
*/
|
||||
/**
|
||||
*/
|
||||
|
||||
require './common.php';
|
||||
|
||||
if ($ldapserver->isReadOnly())
|
||||
pla_error(_('You cannot perform updates while server is in read-only mode'));
|
||||
|
||||
$entry['dn']['string'] = get_request('dn','GET');
|
||||
$entry['dn']['html'] = htmlspecialchars($entry['dn']['string']);
|
||||
|
||||
# We search all children, not only the visible children in the tree
|
||||
$entry['children'] = $ldapserver->getContainerContents($entry['dn']['string'],0,'(objectClass=*)',LDAP_DEREF_NEVER);
|
||||
|
||||
printf('<h3 class="title">'._('Delete %s').'</h3>',htmlspecialchars(get_rdn($entry['dn']['string'])));
|
||||
printf('<h3 class="subtitle">%s: <b>%s</b> %s: <b>%s</b></h3>',
|
||||
_('Server'),$ldapserver->name,_('Distinguished Name'),$entry['dn']['html']);
|
||||
echo "\n";
|
||||
|
||||
echo '<center>';
|
||||
|
||||
if (count($entry['children'])) {
|
||||
printf('<b>%s</b><br /><br />',_('Permanently delete all children also?'));
|
||||
|
||||
# Get the total number of child objects (whole sub-tree)
|
||||
$search['entries'] = $ldapserver->search(null,dn_escape($entry['dn']['string']),'objectClass=*',array('dn'));
|
||||
$search['count'] = count($search['entries']);
|
||||
$search['href'] = htmlspecialchars(sprintf('cmd.php?cmd=search&search=true&;server_id=%s&filter=%s&base_dn=%s&form=advanced&scope=sub',
|
||||
$ldapserver->server_id,rawurlencode('objectClass=*'),rawurlencode($entry['dn']['string'])));
|
||||
|
||||
echo '<table class="delete" border=0>';
|
||||
echo '<tr>';
|
||||
echo '<td colspan=2>';
|
||||
printf(_('This entry is the root of a sub-tree containing %s entries.'),$search['count']);
|
||||
printf(' <small>(<a href="%s">%s</a>)</small>',
|
||||
$search['href'],_('view entries'));
|
||||
echo '</td></tr>';
|
||||
|
||||
echo '<tr><td colspan=2> </td></tr>';
|
||||
|
||||
printf('<tr><td colspan=2>%s</td></tr>',
|
||||
sprintf(_('phpLDAPadmin can recursively delete this entry and all %s of its children. See below for a list of all the entries that this action will delete. Do you want to do this?'),$search['count']-1));
|
||||
|
||||
echo '<tr><td colspan=2> </td></tr>';
|
||||
|
||||
printf('<tr><td colspan=2><small>%s</small></td></tr>',
|
||||
_('Note: this is potentially very dangerous and you do this at your own risk. This operation cannot be undone. Take into consideration aliases, referrals, and other things that may cause problems.'));
|
||||
echo "\n";
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td width=50%><center>';
|
||||
echo '<form action="cmd.php" method="post">';
|
||||
echo '<input type="hidden" name="cmd" value="rdelete" />';
|
||||
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($entry['dn']['string']));
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
|
||||
printf('<input type="submit" class="scary" value="%s" />',sprintf(_('Delete all %s objects'),$search['count']));
|
||||
echo '</form>';
|
||||
echo '</center></td>';
|
||||
|
||||
echo '<td width=50%><center>';
|
||||
echo '<form action="cmd.php" method="get">';
|
||||
echo '<input type="hidden" name="cmd" value="template_engine" />';
|
||||
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($entry['dn']['string']));
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
|
||||
printf('<input type="submit" name="submit" value="%s" class="cancel" />',_('Cancel'));
|
||||
echo '</form>';
|
||||
echo '</center></td>';
|
||||
echo '</tr>';
|
||||
echo "\n";
|
||||
|
||||
echo '</table>';
|
||||
echo "\n";
|
||||
|
||||
echo '<br /><br />';
|
||||
echo _('List of entries to be deleted:');
|
||||
echo '<br />';
|
||||
|
||||
printf('<select size="%s" multiple disabled style="background:white; color:black;width:500px" >',min(10,$search['count']));
|
||||
$i = 0;
|
||||
foreach ($search['entries'] as $dn => $junk) {
|
||||
$i++;
|
||||
printf('<option>%s. %s</option>',$i,htmlspecialchars(dn_unescape($dn)));
|
||||
}
|
||||
echo '</select>';
|
||||
echo "\n";
|
||||
|
||||
} else {
|
||||
echo '<table class="delete" border=0>';
|
||||
|
||||
printf('<tr><td colspan=4>%s</td></tr>',_('Are you sure you want to permanently delete this object?'));
|
||||
echo '<tr><td colspan=4> </td></tr>';
|
||||
|
||||
printf('<tr><td width=10%%>%s:</td><td colspan=3 width=75%%><b>%s</b></td></tr>',_('Server'),htmlspecialchars($ldapserver->name));
|
||||
printf('<tr><td width=10%%><acronym title="%s">%s</acronym></td><td colspan=3 width=75%%><b>%s</b></td></tr>',
|
||||
_('Distinguished Name'),_('DN'),$entry['dn']['string']);
|
||||
echo '<tr><td colspan=4> </td></tr>';
|
||||
echo "\n";
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td colspan=2 width=50%><center>';
|
||||
echo '<form action="cmd.php" method="post">';
|
||||
echo '<input type="hidden" name="cmd" value="delete" />';
|
||||
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($entry['dn']['string']));
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
|
||||
printf('<input type="submit" name="submit" value="%s" class="scary" />',_('Delete'));
|
||||
echo '</form>';
|
||||
|
||||
echo '</center></td>';
|
||||
echo '<td colspan=2 width=50%><center>';
|
||||
|
||||
echo '<form action="cmd.php" method="get">';
|
||||
echo '<input type="hidden" name="cmd" value="template_engine" />';
|
||||
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($entry['dn']['string']));
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
|
||||
printf('<input type="submit" name="submit" value="%s" class="cancel" />',_('Cancel'));
|
||||
echo '</form>';
|
||||
|
||||
echo '</center></td>';
|
||||
echo '</tr>';
|
||||
echo '</table>';
|
||||
echo "\n";
|
||||
}
|
||||
|
||||
echo '</center>';
|
||||
echo '<br />';
|
||||
?>
|
40
htdocs/download_binary_attr.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/download_binary_attr.php,v 1.15 2007/12/15 07:50:30 wurley Exp $
|
||||
|
||||
/**
|
||||
* @package phpLDAPadmin
|
||||
* Variables that come in via common.php
|
||||
* - server_id
|
||||
*/
|
||||
/**
|
||||
*/
|
||||
|
||||
require './common.php';
|
||||
|
||||
if ($ldapserver->isReadOnly())
|
||||
pla_error(_('You cannot perform updates while server is in read-only mode'));
|
||||
if (! $ldapserver->haveAuthInfo())
|
||||
pla_error(_('Not enough information to login to server. Please check your configuration.'));
|
||||
|
||||
$dn = rawurldecode($_GET['dn']);
|
||||
$attr = $_GET['attr'];
|
||||
|
||||
# if there are multiple values in this attribute, which one do you want to see?
|
||||
$value_num = isset($_GET['value_num']) ? $_GET['value_num'] : null;
|
||||
|
||||
if (! $ldapserver->dnExists($dn))
|
||||
pla_error(sprintf(_('No such entry: %s'),pretty_print_dn($dn)));
|
||||
|
||||
$search = $ldapserver->search(null,$dn,'(objectClass=*)',array($attr),'base',false,$_SESSION['plaConfig']->GetValue('deref','view'));
|
||||
|
||||
# Dump the binary data to the browser
|
||||
if (ob_get_level()) ob_end_clean();
|
||||
header('Content-type: octet-stream');
|
||||
header("Content-disposition: attachment; filename=$attr");
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
if ($value_num && is_array($search[$attr][$dn]))
|
||||
echo $search[$dn][$attr][$value_num];
|
||||
else
|
||||
echo $search[$dn][$attr];
|
||||
?>
|
41
htdocs/draw_tree_node.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/draw_tree_node.php,v 1.2.2.1 2007/12/21 12:11:55 wurley Exp $
|
||||
|
||||
/**
|
||||
* @package phpLDAPadmin
|
||||
*/
|
||||
|
||||
$entry['dn'] = get_request('dn','REQUEST');
|
||||
$entry['server_id'] = get_request('server_id','REQUEST');
|
||||
$entry['code'] = get_request('code','REQUEST');
|
||||
$entry['action'] = get_request('action','REQUEST');
|
||||
|
||||
$tree = Tree::getInstance($entry['server_id']);
|
||||
if (! $tree)
|
||||
die();
|
||||
|
||||
$dnentry = $tree->getEntry($entry['dn']);
|
||||
if (! $dnentry) {
|
||||
$tree->addEntry($entry['dn']);
|
||||
$dnentry = $this->getEntry($entry['dn']);
|
||||
}
|
||||
|
||||
if (! $dnentry)
|
||||
die();
|
||||
|
||||
if ($entry['action'] == 0) {
|
||||
$dnentry->close();
|
||||
|
||||
} elseif ($entry['action'] == 2) {
|
||||
$dnentry->open();
|
||||
|
||||
} else {
|
||||
$dnentry->open();
|
||||
if ($entry['dn']) {
|
||||
echo $tree->draw_children($dnentry,$entry['code']);
|
||||
} else {
|
||||
$tree->draw(true);
|
||||
}
|
||||
}
|
||||
die();
|
||||
?>
|
124
htdocs/entry_chooser.php
Normal file
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/entry_chooser.php,v 1.31 2007/12/15 07:50:30 wurley Exp $
|
||||
|
||||
/**
|
||||
* Display a selection (popup window) to pick a DN.
|
||||
*
|
||||
* @package phpLDAPadmin
|
||||
*/
|
||||
|
||||
include './common.php';
|
||||
include HTDOCDIR.'header.php';
|
||||
|
||||
$entry['container'] = get_request('container','GET');
|
||||
$entry['element'] = get_request('form_element','GET');
|
||||
$entry['rdn'] = get_request('rdn','GET');
|
||||
|
||||
echo '<body>';
|
||||
echo '<div class="entry_chooser">';
|
||||
printf('<h3>%s</h3>',_('Entry Chooser'));
|
||||
?>
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
function returnDN(dn) {
|
||||
opener.document.<?php echo $entry['element']; ?>.value = dn;
|
||||
close();
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
echo '<table class="entry_chooser" border=0>';
|
||||
if ($entry['container']) {
|
||||
printf('<tr><td class="head" colspan=3>%s:</td><td class="value">%s</td></tr>',_('Server'),htmlspecialchars($ldapserver->name));
|
||||
printf('<tr><td class="head" colspan=3>%s:</td><td class="value">%s</td></tr>',_('Looking in'),htmlspecialchars($entry['container']));
|
||||
echo '<tr><td class="spacer" colspan=4> </td></tr>';
|
||||
}
|
||||
|
||||
/* Has the use already begun to descend into a specific server tree? */
|
||||
if (isset($ldapserver) && ! is_null($entry['container'])) {
|
||||
|
||||
if (! $ldapserver->haveAuthInfo())
|
||||
pla_error(_('Not enough information to login to server. Please check your configuration.'));
|
||||
|
||||
$entry['children'] = $ldapserver->getContainerContents($entry['container'],0,'(objectClass=*)',$_SESSION['plaConfig']->GetValue('deref','tree'));
|
||||
sort($entry['children']);
|
||||
|
||||
foreach ($ldapserver->getBaseDN() as $base_dn) {
|
||||
if (DEBUG_ENABLED)
|
||||
debug_log('entry_chooser.php: Comparing BaseDN [%s] with container [%s]',64,$base_dn,$entry['container']);
|
||||
|
||||
if (! pla_compare_dns($entry['container'],$base_dn)) {
|
||||
$parent_container = false;
|
||||
$href['up'] = htmlspecialchars(sprintf('entry_chooser.php?form_element=%s&rdn=%s',$entry['element'],$entry['rdn']));
|
||||
break;
|
||||
|
||||
} else {
|
||||
$parent_container = get_container($entry['container']);
|
||||
$href['up'] = htmlspecialchars(sprintf('entry_chooser.php?form_element=%s&rdn=%s&server_id=%s&container=%s',
|
||||
$entry['element'],$entry['rdn'],$ldapserver->server_id,rawurlencode($parent_container)));
|
||||
}
|
||||
}
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td class="spacer"> </td>';
|
||||
printf('<td class="icon"><a href="%s"><img src="images/up.png" alt="Up" /></a></td>',$href['up']);
|
||||
printf('<td class="value" colspan=2><a href="%s">%s</a></td>',$href['up'],_('Back Up...'));
|
||||
echo '</tr>';
|
||||
|
||||
if (! count($entry['children']))
|
||||
printf('<td class="spacer" colspan=2> </td><td class="body" colspan=2">(%s)</td>',_('no entries'));
|
||||
|
||||
else
|
||||
foreach ($entry['children'] as $dn) {
|
||||
$href['return'] = sprintf("javascript:returnDN('%s%s')",($entry['rdn'] ? sprintf('%s,',$entry['rdn']) : ''),rawurlencode($dn));
|
||||
$href['expand'] = htmlspecialchars(sprintf('entry_chooser.php?server_id=%s&form_element=%s&rdn=%s&container=%s',
|
||||
$ldapserver->server_id,$entry['element'],$entry['rdn'],rawurlencode($dn)));
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td class="spacer"> </td>';
|
||||
printf('<td class="icon"><a href="%s"><img src="images/plus.png" alt="Plus" /></a></td>',$href['expand']);
|
||||
|
||||
printf('<td colspan=2 class="body"><a href="%s">%s</a></td>',$href['return'],htmlspecialchars($dn));
|
||||
echo '</tr>';
|
||||
echo "\n\n";
|
||||
}
|
||||
|
||||
/* draw the root of the selection tree (ie, list all the servers) */
|
||||
} else {
|
||||
foreach ($_SESSION['plaConfig']->ldapservers->GetServerList() as $id) {
|
||||
|
||||
$ldapserver = $_SESSION['plaConfig']->ldapservers->Instance($id);
|
||||
|
||||
if ($ldapserver->isVisible()) {
|
||||
|
||||
if (! $ldapserver->haveAuthInfo())
|
||||
continue;
|
||||
|
||||
else {
|
||||
printf('<tr><td class="head" colspan=3>%s:</td><td class="value">%s</td></tr>',_('Server'),htmlspecialchars($ldapserver->name));
|
||||
foreach ($ldapserver->getBaseDN() as $dn) {
|
||||
if (! $dn) {
|
||||
printf('<tr><td class="spacer"> </td><td class="body" colspan=3>(%s)</td></tr>',_('Could not determine base DN'));
|
||||
|
||||
} else {
|
||||
$href['return'] = sprintf("javascript:returnDN('%s%s')",($entry['rdn'] ? sprintf('%s,',$entry['rdn']) : ''),rawurlencode($dn));
|
||||
$href['expand'] = htmlspecialchars(sprintf('entry_chooser.php?server_id=%s&form_element=%s&rdn=%s&container=%s',
|
||||
$ldapserver->server_id,$entry['element'],$entry['rdn'],rawurlencode($dn)));
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td class="spacer"> </td>';
|
||||
printf('<td colspan=2 class="icon"><a href="%s"><img src="images/plus.png" alt="Plus" /></a></td>',$href['expand']);
|
||||
printf('<td colspan=2 class="body"><a href="%s">%s</a></td>',$href['return'],htmlspecialchars($dn));
|
||||
}
|
||||
}
|
||||
|
||||
echo '<tr><td class="spacer" colspan=4> </td></tr>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo '</table>';
|
||||
echo '</div>';
|
||||
echo '</body></html>';
|
||||
?>
|
26
htdocs/expand.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/expand.php,v 1.26 2007/12/15 07:50:30 wurley Exp $
|
||||
|
||||
/**
|
||||
* This script alters the session variable 'tree', expanding it
|
||||
* at the dn specified in the query string.
|
||||
*
|
||||
* Note: this script is equal and opposite to collapse.php
|
||||
* @package phpLDAPadmin
|
||||
* @see collapse.php
|
||||
*/
|
||||
/**
|
||||
*/
|
||||
|
||||
require './common.php';
|
||||
|
||||
$dn = get_request('dn','GET',true);
|
||||
$tree = get_cached_item($ldapserver->server_id,'tree');
|
||||
$entry = $tree->getEntry($dn);
|
||||
$entry->open();
|
||||
set_cached_item($ldapserver->server_id,'tree','null',$tree);
|
||||
|
||||
header(sprintf('Location:index.php?server_id=%s&junk=%s#%s%s',
|
||||
$ldapserver->server_id,random_junk(),htmlid($ldapserver->server_id,$dn),pla_session_param()));
|
||||
die();
|
||||
?>
|
113
htdocs/export.php
Executable file
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/export.php,v 1.18 2007/12/15 07:50:30 wurley Exp $
|
||||
|
||||
/**
|
||||
* @package phpLDAPadmin
|
||||
*/
|
||||
/**
|
||||
*/
|
||||
|
||||
require './common.php';
|
||||
|
||||
# Fix a bug with IE:
|
||||
ini_set('session.cache_limiter','');
|
||||
|
||||
require LIBDIR.'export_functions.php';
|
||||
|
||||
if (! $_SESSION['plaConfig']->isCommandAvailable('export'))
|
||||
pla_error(sprintf('%s%s %s',_('This operation is not permitted by the configuration'),_(':'),_('export')));
|
||||
|
||||
$entry['base_dn'] = get_request('dn');
|
||||
$entry['format'] = get_request('format','POST',false,'unix');
|
||||
$entry['scope'] = get_request('scope','POST',false,'base');
|
||||
$entry['filter'] = get_request('filter','POST',false,'objectclass=*');
|
||||
$entry['attr'] = get_request('attributes');
|
||||
$entry['sys_attr'] = get_request('sys_attr');
|
||||
$entry['file'] = get_request('save_as_file') ? true : false;
|
||||
$entry['exporter_id'] = get_request('exporter_id');
|
||||
|
||||
if ($entry['filter']) {
|
||||
$entry['filter'] = preg_replace('/\s+/','',$entry['filter']);
|
||||
$attributes = split(',',preg_replace('/\s+/','',$entry['attr']));
|
||||
|
||||
} else {
|
||||
$attributes = array();
|
||||
}
|
||||
|
||||
# Add system attributes if needed
|
||||
if ($entry['sys_attr']) {
|
||||
array_push($attributes,'*');
|
||||
array_push($attributes,'+');
|
||||
}
|
||||
|
||||
(! is_null($entry['exporter_id'])) or pla_error(_('You must choose an export format.'));
|
||||
isset($exporters[$entry['exporter_id']]) or pla_error(_('Invalid export format'));
|
||||
|
||||
# Initialisation of other variables
|
||||
$friendly_rdn = get_rdn($entry['base_dn'],1);
|
||||
$extension = $exporters[$entry['exporter_id']]['extension'];
|
||||
|
||||
# default case not really needed
|
||||
switch ($entry['format']) {
|
||||
case 'win':
|
||||
$br = "\r\n";
|
||||
break;
|
||||
case 'mac':
|
||||
$br = "\r";
|
||||
break;
|
||||
case 'unix':
|
||||
default:
|
||||
$br = "\n";
|
||||
}
|
||||
|
||||
# get the decoree,ie the source
|
||||
$plaLdapExporter = new PlaLdapExporter($ldapserver->server_id,$entry['filter'],$entry['base_dn'],$entry['scope'],$attributes);
|
||||
|
||||
# the decorator do it that way for the moment
|
||||
$exporter = null;
|
||||
|
||||
switch ($entry['exporter_id']) {
|
||||
case 0:
|
||||
$exporter = new PlaLdifExporter($plaLdapExporter);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
$exporter = new PlaDsmlExporter($plaLdapExporter);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
$exporter = new PlaVcardExporter($plaLdapExporter);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
$exporter = new PlaCSVExporter($plaLdapExporter);
|
||||
break;
|
||||
|
||||
default:
|
||||
# truly speaking,this default case will never be reached. See check at the bottom.
|
||||
pla_error(_('No available exporter found.'));
|
||||
}
|
||||
|
||||
# set the CLRN
|
||||
$exporter->setOutputFormat($br);
|
||||
|
||||
if (isset($_REQUEST['compress']) && $_REQUEST['compress'] = 'on')
|
||||
$exporter->compress(true);
|
||||
|
||||
# prevent script from bailing early for long search
|
||||
@set_time_limit(0);
|
||||
|
||||
# send the header
|
||||
if ($entry['file']) {
|
||||
if (ob_get_level()) ob_end_clean();
|
||||
header('Content-type: application/download');
|
||||
header(sprintf('Content-Disposition: filename="%s.%s"',$friendly_rdn,$exporters[$entry['exporter_id']]['extension'].($exporter->isCompressed()?'.gz':'')));
|
||||
$exporter->export();
|
||||
die();
|
||||
|
||||
} else {
|
||||
print '<span style="font-size: 14px; font-family: courier;"><pre>';
|
||||
$exporter->export();
|
||||
print '</pre></span>';
|
||||
}
|
||||
?>
|
161
htdocs/export_form.php
Executable file
@@ -0,0 +1,161 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/export_form.php,v 1.26 2007/12/15 07:50:30 wurley Exp $
|
||||
|
||||
/**
|
||||
* export_form.php
|
||||
* Html form to choose an export format(ldif,...)
|
||||
* @package phpLDAPadmin
|
||||
*/
|
||||
/**
|
||||
*/
|
||||
|
||||
require './common.php';
|
||||
|
||||
require LIBDIR.'export_functions.php';
|
||||
|
||||
$entry['format'] = get_request('format','GET',false,get_line_end_format());
|
||||
$entry['scope'] = get_request('scope','GET',false,'base');
|
||||
$entry['id'] = get_request('exporter_id','GET',false,0);
|
||||
$entry['dn'] = get_request('dn','GET');
|
||||
$entry['filter'] = get_request('filter','GET',false,'(objectClass=*)');
|
||||
$entry['attr'] = get_request('attributes','GET',false,'*');
|
||||
$entry['sys_attr'] = get_request('sys_attr','GET') ? true: false;
|
||||
|
||||
$available_formats = array (
|
||||
'unix' => 'UNIX (Linux, BSD)',
|
||||
'mac' => 'Macintosh',
|
||||
'win' => 'Windows'
|
||||
);
|
||||
|
||||
$available_scopes = array (
|
||||
'base' => _('Base (base dn only)'),
|
||||
'one' => _('One (one level beneath base)'),
|
||||
'sub' => _('Sub (entire subtree)')
|
||||
);
|
||||
|
||||
printf('<h3 class="title">%s</h3>',_('Export'));
|
||||
echo '<br />';
|
||||
echo '<center>';
|
||||
echo '<form name="export_form" action="cmd.php" method="post">';
|
||||
echo '<input type="hidden" name="cmd" value="export" />';
|
||||
echo '<table class="export">';
|
||||
echo '<tr>';
|
||||
echo '<td>';
|
||||
|
||||
echo '<fieldset>';
|
||||
printf('<legend>%s</legend>',_('Export'));
|
||||
|
||||
echo '<table>';
|
||||
printf('<tr><td>%s</td><td>%s</td></tr>',_('Server'),server_select_list($ldapserver->server_id));
|
||||
|
||||
echo '<tr>';
|
||||
printf('<td style="white-space:nowrap">%s</td>',_('Base DN'));
|
||||
printf('<td><span style="white-space: nowrap;"><input type="text" name="dn" id="dn" style="width:230px" value="%s" /> ',htmlspecialchars($entry['dn']));
|
||||
draw_chooser_link('export_form.dn');
|
||||
echo '</span></td>';
|
||||
echo '</tr>';
|
||||
|
||||
echo '<tr>';
|
||||
printf('<td><span style="white-space: nowrap">%s</span></td>',_('Search Scope'));
|
||||
|
||||
echo '<td>';
|
||||
|
||||
foreach ($available_scopes as $id => $desc)
|
||||
printf('<input type="radio" name="scope" value="%s" id="%s"%s /><label for="%s">%s</label><br />',
|
||||
htmlspecialchars($id),htmlspecialchars($id),($id == $entry['scope']) ? 'checked="true"' : '',
|
||||
htmlspecialchars($id),htmlspecialchars($desc));
|
||||
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
|
||||
printf('<tr><td>%s</td><td><input type="text" name="filter" style="width:300px" value="%s" /></td></tr>',
|
||||
_('Search Filter'),htmlspecialchars($entry['filter']));
|
||||
|
||||
printf('<tr><td>%s</td><td><input type="text" name="attributes" style="width:300px" value="%s" /></td></tr>',
|
||||
_('Show Attributtes'),htmlspecialchars($entry['attr']));
|
||||
|
||||
printf('<tr><td> </td><td><input type="checkbox" name="sys_attr" id="sys_attr" %s/> <label for="sys_attr">%s</label></td></tr>',
|
||||
$entry['sys_attr'] ? 'checked="true" ' : '',_('Include system attributes'));
|
||||
|
||||
printf('<tr><td> </td><td><input type="checkbox" id="save_as_file" name="save_as_file" onclick="toggle_disable_field_saveas(this)" /> <label for="save_as_file">%s</label></td></tr>',
|
||||
_('Save as file'));
|
||||
|
||||
printf('<tr><td> </td><td><input type="checkbox" id="compress" name="compress" disabled /> <label for="compress">%s</label></td></tr>',
|
||||
_('Compress'));
|
||||
|
||||
echo '</table>';
|
||||
echo '</fieldset>';
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
echo '<tr>';
|
||||
echo '<td>';
|
||||
|
||||
echo '<table style="width: 100%">';
|
||||
echo '<tr><td style="width: 50%">';
|
||||
echo '<fieldset style="height: 100px">';
|
||||
|
||||
printf('<legend>%s</legend>',_('Export format'));
|
||||
|
||||
foreach ($exporters as $index => $exporter) {
|
||||
printf('<input type="radio" name="exporter_id" id="exporter_id_%s" value="%s"%s />',
|
||||
htmlspecialchars($index),htmlspecialchars($index),($index==$entry['id']) ? ' checked="true"' : '');
|
||||
printf('<label for="%s">%s</label><br />',
|
||||
htmlspecialchars($index),htmlspecialchars($exporter['desc']));
|
||||
}
|
||||
|
||||
echo '</fieldset>';
|
||||
echo '</td>';
|
||||
echo '<td style="width: 50%">';
|
||||
echo '<fieldset style="height: 100px">';
|
||||
|
||||
printf('<legend>%s</legend>',_('Line ends'));
|
||||
foreach ($available_formats as $id => $desc)
|
||||
printf('<input type="radio" name="format" value="%s" id="%s"%s /><label for="%s">%s</label><br />',
|
||||
htmlspecialchars($id),htmlspecialchars($id),($entry['format']==$id) ? ' checked="true"' : '',
|
||||
htmlspecialchars($id),htmlspecialchars($desc));
|
||||
|
||||
echo '</fieldset>';
|
||||
echo '</td></tr>';
|
||||
echo '</table>';
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td colspan="2">';
|
||||
printf('<center><input type="submit" name="target" value="%s" /></center>',
|
||||
htmlspecialchars(_('Proceed >>')));
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
echo '</table>';
|
||||
|
||||
echo '</form>';
|
||||
echo '</center>';
|
||||
|
||||
/**
|
||||
* Helper functoin for fetching the line end format.
|
||||
* @return String 'win', 'unix', or 'mac' based on the user's browser..
|
||||
*/
|
||||
function get_line_end_format() {
|
||||
if (is_browser_os_windows())
|
||||
return 'win';
|
||||
elseif (is_browser_os_unix())
|
||||
return 'unix';
|
||||
elseif (is_browser_os_mac())
|
||||
return 'mac';
|
||||
else
|
||||
return 'unix';
|
||||
}
|
||||
|
||||
?>
|
||||
<script type="text/javascript" language="javascript">
|
||||
<!--
|
||||
function toggle_disable_field_saveas(id) {
|
||||
if (id.checked) {
|
||||
id.form.compress.disabled = false;
|
||||
} else {
|
||||
id.form.compress.disabled = true;
|
||||
id.form.compress.checked = false;
|
||||
}
|
||||
}
|
||||
-->
|
||||
</script>
|
69
htdocs/header.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/header.php,v 1.27 2007/12/15 07:50:30 wurley Exp $
|
||||
|
||||
/**
|
||||
* @package phpLDAPadmin
|
||||
*/
|
||||
|
||||
require_once LIBDIR.'./common.php';
|
||||
|
||||
/* We want to get $language into scope in case we were included
|
||||
from within a function */
|
||||
$language = isset($_SESSION['plaConfig']) ? $language = $_SESSION['plaConfig']->GetValue('appearance','language') : 'auto';
|
||||
|
||||
# text/xml won't work with MSIE, but is very useful for debugging xhtml code.
|
||||
# header('Content-type: text/xml; charset="UTF-8"');
|
||||
@header('Content-type: text/html; charset="UTF-8"');
|
||||
|
||||
# XML version and encoding for well-behaved browsers
|
||||
echo '<?xml version="1.0" encoding="utf-8"?>'."\n";
|
||||
|
||||
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"'."\n";
|
||||
echo '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n";
|
||||
|
||||
printf('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="%s" lang="%s" dir="ltr">',$language,$language);
|
||||
echo "\n\n";
|
||||
|
||||
echo '<head>';
|
||||
|
||||
if (isset($_SESSION['plaConfig']) && $pagetitle = $_SESSION['plaConfig']->GetValue('appearance','page_title'))
|
||||
printf('<title>phpLDAPadmin - %s</title>',$pagetitle);
|
||||
else
|
||||
echo '<title>phpLDAPadmin</title>';
|
||||
|
||||
if (isset($_SESSION['plaConfig']))
|
||||
$css = $_SESSION['plaConfig']->GetValue('appearance','stylesheet');
|
||||
else
|
||||
$css = 'style.css';
|
||||
printf('<link type="text/css" rel="stylesheet" href="%s%s" media="screen" />','../htdocs/'.CSSDIR,$css);
|
||||
|
||||
if (isset($server_id)) {
|
||||
$custom_file = get_custom_file($server_id,'style.css','../htdocs/'.CSSDIR);
|
||||
|
||||
if (strcmp($custom_file,'style.css') != 0)
|
||||
printf('<link type="text/css" rel="stylesheet" href="%s" media="screen" />',$custom_file);
|
||||
}
|
||||
|
||||
printf('<script type="text/javascript" src="%sentry_chooser.js"></script>','../htdocs/'.JSDIR);
|
||||
printf('<script type="text/javascript" src="%sie_png_work_around.js"></script>','../htdocs/'.JSDIR);
|
||||
printf('<script type="text/javascript" src="%sgeneric_utils.js"></script>','../htdocs/'.JSDIR);
|
||||
printf('<script type="text/javascript" src="%sto_ascii.js"></script>','../htdocs/'.JSDIR);
|
||||
printf('<script type="text/javascript" src="%smodify_member.js"></script>','../htdocs/'.JSDIR);
|
||||
printf('<link type="text/css" rel="stylesheet" media="all" href="%s/jscalendar/calendar-blue.css" title="blue" />','../htdocs/'.JSDIR);
|
||||
|
||||
echo "\n<!--\n";
|
||||
printf('<script type="text/javascript" src="%sjscalendar/calendar.js"></script>','../htdocs/'.JSDIR);
|
||||
printf('<script type="text/javascript" src="%sjscalendar/lang/calendar-en.js"></script>','../htdocs/'.JSDIR);
|
||||
printf('<script type="text/javascript" src="%sjscalendar/calendar-setup.js"></script>','../htdocs/'.JSDIR);
|
||||
printf('<script type="text/javascript" src="%sdate_selector.js"></script>','../htdocs/'.JSDIR);
|
||||
echo "\n-->\n";
|
||||
|
||||
printf('<link type="text/css" rel="stylesheet" href="%s/phplayersmenu/layerstreemenu.css"></link>','../htdocs/'.JSDIR);
|
||||
|
||||
if (isset($meta_refresh_variable))
|
||||
printf('<meta http-equiv="refresh" content="%s" />',$meta_refresh_variable);
|
||||
|
||||
echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
|
||||
echo '</head>';
|
||||
echo "\n\n";
|
||||
?>
|
BIN
htdocs/images/add.png
Normal file
After Width: | Height: | Size: 528 B |
BIN
htdocs/images/ajax-progress.gif
Normal file
After Width: | Height: | Size: 7.5 KiB |
BIN
htdocs/images/ajax-spinner.gif
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
htdocs/images/bug-big.png
Normal file
After Width: | Height: | Size: 928 B |
Before Width: | Height: | Size: 278 B After Width: | Height: | Size: 278 B |
BIN
htdocs/images/calendar.png
Normal file
After Width: | Height: | Size: 478 B |
BIN
htdocs/images/catalog.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
htdocs/images/children.png
Normal file
After Width: | Height: | Size: 342 B |
BIN
htdocs/images/compare.png
Normal file
After Width: | Height: | Size: 665 B |
BIN
htdocs/images/countries/af.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/al.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/am.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/an.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/ao.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/ar.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/at.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/au.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/aw.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/az.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/ba.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/bb.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/bd.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/be.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/bf.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/bg.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/bh.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/bi.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/bj.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/bm.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/bn.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/bo.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/br.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/bs.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/bt.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/bw.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/by.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/bz.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/ca.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/cf.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/cg.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/ch.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/images/countries/ci.png
Normal file
After Width: | Height: | Size: 1.0 KiB |