summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1604bae)
raw | patch | inline | side by side (parent: 1604bae)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 4 Apr 2007 06:21:28 +0000 (06:21 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 4 Apr 2007 06:21:28 +0000 (06:21 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5962 594d385d-05f5-0310-b6e9-bd551577e9d8
contrib/gosa.conf | patch | blob | history | |
html/setup.php | patch | blob | history | |
include/class_ldap.inc | patch | blob | history | |
plugins/personal/mail/class_mailAccount.inc | patch | blob | history |
diff --git a/contrib/gosa.conf b/contrib/gosa.conf
index 296794d674b28069bfa7ea3e3b657c3d03e84018..e543c72ea64d3a392b05983f3b58601f59f37427 100644 (file)
--- a/contrib/gosa.conf
+++ b/contrib/gosa.conf
-<?xml version="1.0"?>
+{literal}<?xml version="1.0"?>{/literal}
<conf>
<menu>
<section name="My account">
<main default="{$cv.location}"
- {if $cv.pwd_rules.pwminlen_active}
+{if $cv.pwd_rules.pwminlen_active}
pwminlen="{$cv.pwd_rules.pwminlen}"
- {/if}
- {if $cv.pwd_rules.pwdiffer_active}
+{/if}
+{if $cv.pwd_rules.pwdiffer_active}
pwdiffer="{$cv.pwd_rules.pwdiffer}"
- {/if}
- {if $cv.pwd_rules.externalpwdhook_active}
+{/if}
+{if $cv.pwd_rules.externalpwdhook_active}
pwdiffer="{$cv.pwd_rules.externalpwdhook}"
- {/if}
-
- {if $cv.errorlvl}
+{/if}
+{if $cv.errorlvl}
displayerrors="true"
- {else}
+{else}
displayerrors="false"
- {/if}
-
- {if $cv.enable_schema_check}
+{/if}
+{if $cv.enable_schema_check}
schema_check="true"
- {else}
+{else}
schema_check="false"
- {/if}
-
- lang="{$cv.lang}"
- theme="{$cv.theme}"
-
+{/if}
+{if $cv.optional.enableCopyPaste}
+ enableCopyPaste="true"
+{else}
enableCopyPaste="false"
- ppd_path="/var/spool/ppd/"
- kde_applications_menu=""
- compile="/var/spool/gosa"
- debuglevel="0"
+{/if}
+{if $cv.optional.forceglobals}
+ forceglobals="true"
+{else}
+ forceglobals="false"
+{/if}
+{if $cv.optional.forcessl}
+ forcessl="true"
+{else}
forcessl="false"
+{/if}
+{if $cv.optional.warnssl}
+ warnssl="true"
+{else}
warnssl="false"
- iconsize="48x48"
- forceglobals="false"
- smbhash='SMBHASH'
- session_lifetime="7200"
- max_ldap_query_time="5.0"
-
+{/if}
+{if $cv.optional.ppd_path_active}
+ ppd_path="{$cv.optional.ppd_path}"
+{/if}
+{if $cv.optional.kde_applications_menu_active}
+ kde_applications_menu="{$cv.optional.kde_applications_menu}"
+{/if}
+{if $cv.optional.max_ldap_query_time_active}
+ max_ldap_query_time="{$cv.optional.max_ldap_query_time}"
+{/if}
+ lang="{$cv.lang}"
+ theme="{$cv.theme}"
+ session_lifetime="{$cv.optional.session_lifetime}"
+ compile="{$cv.optional.compile}"
+ debuglevel="{$cv.optional.debuglevel}"
+ smbhash='{$cv.optional.smbhash}'
>
<location name="{$cv.location}"
groups="{$cv.groupou}"
gidbase="{$cv.uidbase}"
uidbase="{$cv.uidbase}"
- {if $cv.generic_settings.wws_ou_active}
+{if $cv.generic_settings.wws_ou_active}
winstations="{$cv.generic_settings.wws_ou}"
- {/if}
- {if $cv.generic_settings.idgen_active}
+{/if}
+{if $cv.generic_settings.idgen_active}
idgen="{$cv.generic_settings.idgen}"
- {/if}
- {if $cv.strict}
+{/if}
+{if $cv.strict}
strict="yes"
- {else}
+{else}
strict="no"
- {/if}
- {if $cv.generic_settings.minid_active}
+{/if}
+{if $cv.generic_settings.minid_active}
minid="{$cv.generic_settings.minid}"
- {/if}
- {if $cv.mail != "disabled"}
+{/if}
+{if $cv.mail != "disabled"}
mailMethod="{$cv.mail}"
- {if $cv.cyrusunixstyle}
+{if $cv.cyrusunixstyle}
cyrusunixstyle="true"
- {else}
+{else}
cyrusunixstyle="false"
- {/if}
- {if $cv.mail_settings.vacationdir_active}
- {$cv.mail_settings.vacationdir}
- {/if}
- {/if}
- {if $cv.tls}
+{/if}
+{if $cv.mail_settings.vacationdir_active}
+ vacationdir="{$cv.mail_settings.vacationdir}"
+{/if}
+{/if}
+{if $cv.tls}
tls="true"
- {/if}
- {if $cv.governmentmode}
+{/if}
+{if $cv.governmentmode}
governmentmode="true"
- {/if}
- {if $cv.sambaidmapping}
+{/if}
+{if $cv.sambaidmapping}
sambaidmapping="true"
- {/if}
- {if $cv.account_expiration}
+{/if}
+{if $cv.account_expiration}
account_expiration="true"
- {/if}
- {if $cv.samba_settings.samba_sid_active}
+{/if}
+{if $cv.samba_settings.samba_sid_active}
SID="{$cv.samba_settings.samba_sid}"
- {/if}
- {if $cv.samba_settings.samba_rid_active}
+{/if}
+{if $cv.samba_settings.samba_rid_active}
RIDBASE="{$cv.samba_settings.samba_rid_active}"
- {/if}
- {if $cv.generic_settings.snapshot_active}
+{/if}
+{if $cv.generic_settings.snapshot_active}
enable_snapshot="true"
- {if $cv.generic_settings.snapshot_base != ""}
+{if $cv.generic_settings.snapshot_base != ""}
snapshot_base="{$cv.generic_settings.snapshot_base}"
- {/if}
- {if $cv.generic_settings.snapshot_user != ""}
+{/if}
+{if $cv.generic_settings.snapshot_user != ""}
snapshot_user="{$cv.generic_settings.snapshot_user}"
- {/if}
- {if $cv.generic_settings.snapshot_password != ""}
+{/if}
+{if $cv.generic_settings.snapshot_password != ""}
snapshot_password="{$cv.generic_settings.snapshot_password}"
- {/if}
- {if $cv.generic_settings.snapshot_server != ""}
+{/if}
+{if $cv.generic_settings.snapshot_server != ""}
snapshot_server="{$cv.generic_settings.snapshot_server}"
- {/if}
- {/if}
- sambaversion="SAMBAVERSION"
+{/if}
+{/if}
+{if $cv.samba_version != 0}
+ sambaversion="{$cv.samba_version}"
+{/if}
config="ou=gosa,ou=configs,ou=systems,{$cv.base}">
<referral url="{$cv.connection}/{$cv.base}"
diff --git a/html/setup.php b/html/setup.php
index dc02aad3d231852c85340cb030b6fb9fd1e56b77..8d2ef2e957e9ed840be4a982a8384867b01c011d 100644 (file)
--- a/html/setup.php
+++ b/html/setup.php
require_once("../setup/class_setupStep4.inc");
require_once("../setup/class_setupStep5.inc");
require_once("../setup/class_setupStep6.inc");
+require_once("../setup/class_setupStep6a.inc");
require_once("../setup/class_setupStep7.inc");
require_once("../setup/class_setupStep8.inc");
diff --git a/include/class_ldap.inc b/include/class_ldap.inc
index b3ae4983b38e7ac0bfd609cd4e391325114fc3b2..fafa96c9765c561a0869b822dcf482b61050ac70 100644 (file)
--- a/include/class_ldap.inc
+++ b/include/class_ldap.inc
<?php
/*****************************************************************************
newldap.inc - version 1.0
- Copyright (C) 2003 Alejandro Escanero Blanco <aescanero@chaosdimension.org>
+ Copyright (C) 2003 Alejandro Escanero Blanco <aescanerochaosdimension.org>
Copyright (C) 2004-2006 Cajus Pollmeier <pollmeier@gonicus.de>
Based in code of ldap.inc of
{
$this->hascon=false;
$this->reconnect=false;
- if ($this->cid= @ldap_connect($this->hostname)) {
- @ldap_set_option($this->cid, LDAP_OPT_PROTOCOL_VERSION, 3);
+ if ($this->cid= ldap_connect($this->hostname)) {
+ ldap_set_option($this->cid, LDAP_OPT_PROTOCOL_VERSION, 3);
if (function_exists("ldap_set_rebind_proc") && $this->follow_referral) {
- @ldap_set_option($this->cid, LDAP_OPT_REFERRALS, 1);
- @ldap_set_rebind_proc($this->cid, array(&$this, "rebind"));
+ ldap_set_option($this->cid, LDAP_OPT_REFERRALS, 1);
+ ldap_set_rebind_proc($this->cid, array(&$this, "rebind"));
}
if (function_exists("ldap_start_tls") && $this->tls){
- @ldap_start_tls($this->cid);
+ ldap_start_tls($this->cid);
}
$this->error = "No Error";
- if ($bid = @ldap_bind($this->cid, $this->fix($this->binddn), $this->bindpw)) {
+ if ($bid = ldap_bind($this->cid, $this->fix($this->binddn), $this->bindpw)) {
$this->error = "Success";
$this->hascon=true;
} else {
function rebind($ldap, $referral)
{
$credentials= $this->get_credentials($referral);
- if (@ldap_bind($ldap, $this->fix($credentials['ADMIN']), $credentials['PASSWORD'])) {
+ if (ldap_bind($ldap, $this->fix($credentials['ADMIN']), $credentials['PASSWORD'])) {
$this->error = "Success";
$this->hascon=true;
$this->reconnect= true;
function reconnect()
{
if ($this->reconnect){
- @ldap_unbind($this->cid);
+ ldap_unbind($this->cid);
$this->cid = NULL;
}
}
function unbind()
{
- @ldap_unbind($this->cid);
+ ldap_unbind($this->cid);
$this->cid = NULL;
}
function disconnect()
{
if($this->hascon){
- @ldap_close($this->cid);
+ ldap_close($this->cid);
$this->hascon=false;
}
}
$start = microtime();
$this->clearResult();
- $this->sr = @ldap_search($this->cid, $this->fix($this->basedn), $filter, $attrs);
- $this->error = @ldap_error($this->cid);
+ $this->sr = ldap_search($this->cid, $this->fix($this->basedn), $filter, $attrs);
+ $this->error = ldap_error($this->cid);
$this->resetResult();
$this->hasres=true;
$start = microtime();
- $this->sr = @ldap_list($this->cid, $this->fix($basedn), $filter,$attrs);
- $this->error = @ldap_error($this->cid);
+ $this->sr = ldap_list($this->cid, $this->fix($basedn), $filter,$attrs);
+ $this->error = ldap_error($this->cid);
$this->resetResult();
$this->hasres=true;
if ($this->reconnect) $this->connect();
$this->clearResult();
$filter = "(objectclass=*)";
- $this->sr = @ldap_read($this->cid, $this->fix($dn), $filter,$attrs);
- $this->error = @ldap_error($this->cid);
+ $this->sr = ldap_read($this->cid, $this->fix($dn), $filter,$attrs);
+ $this->error = ldap_error($this->cid);
$this->resetResult();
$this->hasres=true;
return($this->sr);
{
/* Ignore zero settings */
if ($size == 0){
- @ldap_set_option($this->cid, LDAP_OPT_SIZELIMIT, 10000000);
+ ldap_set_option($this->cid, LDAP_OPT_SIZELIMIT, 10000000);
}
if($this->hascon){
- @ldap_set_option($this->cid, LDAP_OPT_SIZELIMIT, $size);
+ ldap_set_option($this->cid, LDAP_OPT_SIZELIMIT, $size);
} else {
$this->error = "Could not connect to LDAP server";
}
if ($this->start == 0)
{
$this->start = 1;
- $this->re= @ldap_first_entry($this->cid, $this->sr);
+ $this->re= ldap_first_entry($this->cid, $this->sr);
} else {
- $this->re= @ldap_next_entry($this->cid, $this->re);
+ $this->re= ldap_next_entry($this->cid, $this->re);
}
if ($this->re)
{
- $att= @ldap_get_attributes($this->cid, $this->re);
- $att['dn']= trim($this->convert(@ldap_get_dn($this->cid, $this->re)));
+ $att= ldap_get_attributes($this->cid, $this->re);
+ $att['dn']= trim($this->convert(ldap_get_dn($this->cid, $this->re)));
}
- $this->error = @ldap_error($this->cid);
+ $this->error = ldap_error($this->cid);
if (!isset($att)){
$att= array();
}
{
if($this->hasres){
$this->hasres = false;
- @ldap_free_result($this->sr);
+ ldap_free_result($this->sr);
}
}
}
else
{
- $rv = @ldap_get_dn($this->cid, $this->re);
+ $rv = ldap_get_dn($this->cid, $this->re);
- $this->error = @ldap_error($this->cid);
+ $this->error = ldap_error($this->cid);
return(trim($this->convert($rv)));
}
}else{
{
if($this->hascon){
if($this->hasres){
- $rv = @ldap_count_entries($this->cid, $this->sr);
- $this->error = @ldap_error($this->cid);
+ $rv = ldap_count_entries($this->cid, $this->sr);
+ $this->error = ldap_error($this->cid);
return($rv);
}else{
$this->error = "Perform a Fetch with no Search";
if ($dn == "")
$dn = $this->basedn;
- $r = @ldap_mod_del($this->cid, $this->fix($dn), $attrs);
- $this->error = @ldap_error($this->cid);
+ $r = ldap_mod_del($this->cid, $this->fix($dn), $attrs);
+ $this->error = ldap_error($this->cid);
return($r);
}else{
$this->error = "Could not connect to LDAP server";
if ($dn == "")
$dn = $this->basedn;
- $r = @ldap_mod_replace($this->cid, $this->fix($dn), $attrs);
- $this->error = @ldap_error($this->cid);
+ $r = ldap_mod_replace($this->cid, $this->fix($dn), $attrs);
+ $this->error = ldap_error($this->cid);
return($r);
}else{
$this->error = "Could not connect to LDAP server";
{
if($this->hascon){
if ($this->reconnect) $this->connect();
- $r = @ldap_delete($this->cid, $this->fix($deletedn));
- $this->error = @ldap_error($this->cid);
+ $r = ldap_delete($this->cid, $this->fix($deletedn));
+ $this->error = ldap_error($this->cid);
return($r ? $r : 0);
}else{
$this->error = "Could not connect to LDAP server";
}
/* Finally Delete own Node */
- $r = @ldap_delete($this->cid, $this->fix($deletedn));
- $this->error = @ldap_error($this->cid);
+ $r = ldap_delete($this->cid, $this->fix($deletedn));
+ $this->error = ldap_error($this->cid);
return($r ? $r : 0);
}else{
$this->error = "Could not connect to LDAP server";
error_reporting(E_ALL);
if($is_first){
- echo "<h2>".sprintf(_("Creating copy of %s"),"<i>".@LDAP::fix($sourcedn)."</i>")."</h2>";
+ echo "<h2>".sprintf(_("Creating copy of %s"),"<i>".LDAP::fix($sourcedn)."</i>")."</h2>";
}else{
if(preg_match("/^ou=/",$sourcedn)){
- echo "<h3>"._("Processing")." <i>".@LDAP::fix($destinationdn)."</i></h3>";
+ echo "<h3>"._("Processing")." <i>".LDAP::fix($destinationdn)."</i></h3>";
}else{
$tmp = split(",",$sourcedn);
echo " <b>"._("Object").":</b> ";
- $deststr = @LDAP::fix($destinationdn);
+ $deststr = LDAP::fix($destinationdn);
if(strlen($deststr) > 96){
$deststr = substr($deststr,0,96)."...";
}
if(in_array($key ,array("FAItemplateFile","FAIscript", "gotoLogonScript", "gosaApplicationIcon","gotoMimeIcon"))){
$sr= ldap_read($this->cid, $this->fix($sourcedn), "$key=*", array($key));
$ei= ldap_first_entry($this->cid, $sr);
- if ($tmp= @ldap_get_values_len($this->cid, $ei,$key)){
+ if ($tmp= ldap_get_values_len($this->cid, $ei,$key)){
$attr[$key] = $tmp;
}
}
}
if($this->hascon){
if ($this->reconnect) $this->connect();
- $r = @ldap_modify($this->cid, $this->fix($this->basedn), $attrs);
- $this->error = @ldap_error($this->cid);
+ $r = ldap_modify($this->cid, $this->fix($this->basedn), $attrs);
+ $this->error = ldap_error($this->cid);
return($r ? $r : 0);
}else{
$this->error = "Could not connect to LDAP server";
{
if($this->hascon){
if ($this->reconnect) $this->connect();
- $r = @ldap_add($this->cid, $this->fix($this->basedn), $attrs);
- $this->error = @ldap_error($this->cid);
+ $r = ldap_add($this->cid, $this->fix($this->basedn), $attrs);
+ $this->error = ldap_error($this->cid);
return($r ? $r : 0);
}else{
$this->error = "Could not connect to LDAP server";
{
$data= "";
if ($this->reconnect) $this->connect();
- $sr= @ldap_read($this->cid, $this->fix($dn), "objectClass=*", array("$name"));
+ $sr= ldap_read($this->cid, $this->fix($dn), "objectClass=*", array("$name"));
/* fill data from LDAP */
if ($sr) {
- $ei= @ldap_first_entry($this->cid, $sr);
+ $ei= ldap_first_entry($this->cid, $sr);
if ($ei) {
- if ($info= @ldap_get_values_len($this->cid, $ei, "$name")){
+ if ($info= ldap_get_values_len($this->cid, $ei, "$name")){
$data= $info[0];
}
function get_additional_error()
{
$error= "";
- @ldap_get_option ($this->cid, LDAP_OPT_ERROR_STRING, $error);
+ ldap_get_option ($this->cid, LDAP_OPT_ERROR_STRING, $error);
return ($error);
}
}
/* Searching Ldap Tree */
- $sr= @ldap_read($this->cid, $this->fix($dn), $filter, $name);
+ $sr= ldap_read($this->cid, $this->fix($dn), $filter, $name);
/* Get the first entry */
- $entry= @ldap_first_entry($this->cid, $sr);
+ $entry= ldap_first_entry($this->cid, $sr);
/* Get all attributes related to that Objekt */
$atts = array();
/* Reset index */
$i = 1 ;
$identifier = array();
- $attribute= @ldap_first_attribute($this->cid,$entry,$identifier);
+ $attribute= ldap_first_attribute($this->cid,$entry,$identifier);
while ($attribute) {
$i++;
$atts[$i]['name'] = $attribute;
- $atts[$i]['value'] = @ldap_get_values_len($this->cid, $entry, "$attribute");
+ $atts[$i]['value'] = ldap_get_values_len($this->cid, $entry, "$attribute");
/* Next one */
- $attribute= @ldap_next_attribute($this->cid,$entry,$identifier);
+ $attribute= ldap_next_attribute($this->cid,$entry,$identifier);
}
foreach($atts as $at)
for ($i= 0; $i<$at['value']['count']; $i++){
/* Check if we must encode the data */
- if(!preg_match('/^[a-z0-9+@#.=, \/ -]+$/i', $at['value'][$i])) {
+ if(!preg_match('/^[a-z0-9+#.=, \/ -]+$/i', $at['value'][$i])) {
$ret .= $at['name'].":: ".base64_encode($at['value'][$i])."\n";
} else {
$ret .= $at['name'].": ".$at['value'][$i]."\n";
function dn_exists($dn)
{
- return @ldap_list($this->cid, $this->fix($dn), "(objectClass=*)", array("objectClass"));
+ return ldap_list($this->cid, $this->fix($dn), "(objectClass=*)", array("objectClass"));
}
$objectclasses = array();
# Get base to look for schema
- $sr = @ldap_read ($this->cid, NULL, "objectClass=*", array("subschemaSubentry"));
- $attr = @ldap_get_entries($this->cid,$sr);
+ $sr = ldap_read ($this->cid, NULL, "objectClass=*", array("subschemaSubentry"));
+ $attr = ldap_get_entries($this->cid,$sr);
if (!isset($attr[0]['subschemasubentry'][0])){
return array();
}
}
}
- /* added by Guido Serra aka Zeph <zeph@purotesto.it> */
+ /* added by Guido Serra aka Zeph <zephpurotesto.it> */
function getCn($dn){
$simple= split(",", $dn);
$r= ldap_bind ($ds, $admin, $password);
/* Get base to look for naming contexts */
- $sr = @ldap_read ($ds, "", "objectClass=*", array("namingContexts"));
- $attr= @ldap_get_entries($ds,$sr);
+ $sr = ldap_read ($ds, "", "objectClass=*", array("namingContexts"));
+ $attr= ldap_get_entries($ds,$sr);
return ($attr[0]['namingcontexts']);
}
diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc
index 289e15420bcdd9ea9ac6e891866f64aacbe80cce..e6c11cf383e6b9c6eac360fa4d5c73fb7481dfaa 100644 (file)
@DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__,$this->attributes, "Save");
$ldap->cd($this->dn);
$this->cleanup();
+
+ print_a($this->attrs);
+ exit();
+
$ldap->modify ($this->attrs);
show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/mail account with dn '%s' failed."),$this->dn));