diff --git a/INSTALL b/INSTALL index 4a3e2ce..cec0dba 100644 --- a/INSTALL +++ b/INSTALL @@ -14,8 +14,24 @@ in the "doc" directory. 3. Copy 'config.php.example' to 'config.php' and edit to taste. 4. Then, point your browser to the phpldapadmin directory. -* For help +* For additional help See the files in the "doc" directory. Join our mailing list: https://lists.sourceforge.net/lists/listinfo/phpldapadmin-devel + +* Platform specific notes + + * OpenBSD with chroot'ed Apache: + + For jpeg photos to work properly, you must do this: + # mkdir /var/www/tmp, and then + # chown root:daemon /var/www/tmp + # chmod 1755 /var/www/tmp + Where tmp is the $jpeg_temp_dir configured in config.php + + * Windows + + For jpeg photos to work properly, be sure to change $jpeg_temp_dir + from "/tmp" to "c:\\temp" or similar. + diff --git a/VERSION b/VERSION index 965065d..a602fc9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.3 +0.9.4 diff --git a/add_attr.php b/add_attr.php new file mode 100644 index 0000000..798f0f6 --- /dev/null +++ b/add_attr.php @@ -0,0 +1,135 @@ +createSambaPasswords( $val ); + $val = $mkntPassword->valueOf($attr); +} + +$ds = pla_ldap_connect( $server_id ) or pla_error( $lang['could_not_connect'] ); +$new_entry = array( $attr => $val ); +$result = @ldap_mod_add( $ds, $dn, $new_entry ); + +if( $result ) + header( "Location: edit.php?server_id=$server_id&dn=$encoded_dn&modified_attrs[]=$encoded_attr" ); +else + pla_error( $lang['failed_to_add_attr'], ldap_error( $ds ) , ldap_errno( $ds ) ); + +// check if we need to append the ;binary option to the name +// of some binary attribute + +function is_binary_option_required( $server_id, $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" + ); + + // quick check by attr name (short circuits the schema check if possible) + //foreach( $binary_attributes_with_options as $oid => $name ) + //if( 0 == strcasecmp( $attr, $name ) ) + //return true; + + $schema_attr = get_schema_attribute( $server_id, $attr ); + if( ! $schema_attr ) + return false; + + $syntax = $schema_attr->getSyntaxOID(); + if( isset( $binary_attributes_with_options[ $syntax ] ) ) + return true; + + return false; +} + +?> diff --git a/add_attr_form.php b/add_attr_form.php new file mode 100644 index 0000000..d361669 --- /dev/null +++ b/add_attr_form.php @@ -0,0 +1,171 @@ + + +
+ + +