Skip to content

Commit

Permalink
Merge branch '1.0.10-fixes'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mortier Benoit committed Apr 6, 2016
2 parents 48333c0 + 5cb73bc commit b3a0de1
Showing 43 changed files with 3,900 additions and 3,860 deletions.
28 changes: 28 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
FusionDirectory changelog
=========================

* FusionDirectory 1.0.11

|Fix] FusionDirectory plugins - Bugs #4391: Choices order seems random in shell
|Fix] Bugs #4621: Use of mcrypt should be removed
|Fix] FusionDirectory plugins - Bugs #4630: DNS adding reverse zone issue (tested on FD 1.0.10) in class B and class A
|Fix] FusionDirectory plugins - Bugs #4631: DNS menu is not displayed without systems plugin
|Fix] FusionDirectory plugins - Bugs #4632: Webservice needs a better method for modification
|Fix] Bugs #4633: change requirement to php 5.4 for centos
|Fix] Bugs #4634: DNS PTR migration does not work
|Fix] FusionDirectory plugins - Bugs #4635: [DNS] Reverse zone association breaks when there are several A record for the same domain.
|Fix] FusionDirectory plugins - Bugs #4636: [SYSTEMS] When add Windows Workstation (winStation) and enable DHCP it will not be enabled when edit again
|Fix] FusionDirectory plugins - Bugs #4637: DNS tab won’t work on winstations
|Fix] Bugs #4638: UI issue, entry disappear in 'Base' dropdown
|Fix] Bugs #4639: depending on FD language setting, the calendar doesn't show up on icon click
|Fix] Bugs #4640: strange error when following org's link from user "references" tab
|Fix] Bugs #4652: The weird _copy fallback should be removed
|Fix] Bugs #4653: Having a wrong default location should trigger a fatal error
|Fix] FusionDirectory plugins - Bugs #4654: DHCP seems to use inexistant method getCn
|Fix] Bugs #4655: The edit anyway button does not work in my account menu
|Fix] FusionDirectory plugins - Bugs #4658: csv import with empty field
|Fix] Bugs #4659: when creating a user via template or csv import, mandatory , alreay defined fields have to be re-inputed even if already defined
|Fix] Bugs #4667: Samba munged dial fields are always asked when using a template
|Fix] Bugs #4673: ImageAttribute are broken
|Fix] FusionDirectory plugins - Bugs #4675: csv import, add an option for not importing anything in case of error
|Fix] FusionDirectory plugins - Bugs #4676: Edit IDs problems related to our selenium test
|Fix] FusionDirectory plugins - Wishlist #4657: community organization membership type
|Fix] FusionDirectory plugins - Wishlist #4660: csv import lacks an option or help on what to do with the first line

* FusionDirectory 1.0.10

[Feature] Bugs #1217: DNS service must be redone
22 changes: 21 additions & 1 deletion contrib/bin/fusiondirectory-setup
Original file line number Diff line number Diff line change
@@ -732,7 +732,7 @@ sub get_ldap_connexion {
# read ldap's server's info from /etc/fusiondirectory/fusiondirectory.conf
if (-e $fd_config) {
my $twig = XML::Twig->new(); # create the twig
$twig->parsefile($fd_config); # build it
$twig->safe_parsefile($fd_config) or die("There is an error in $fd_config XML code: ".(split /\n/, $@)[1]."\n");
my @locs = $twig->root->first_child('main')->children('location');
my %locations = ();
foreach my $loc (@locs) {
@@ -1363,7 +1363,27 @@ sub migrate_dns {
$result->code && die "Migration of DNS zone subentry failed, LDAP error: ".$result->error."\n";
}

# Fix reverse zone PTR records DNs
$mesg = $ldap->search(
base => $zoneDn,
filter => "(&(objectClass=dNSZone)(!(relativeDomainName=@))(|(zoneName=*.arpa)(zoneName=*.arpa.)))"
);
$mesg->code && die $mesg->error;

@entries = $mesg->entries;

foreach my $entry (@entries) {
$entry->dn() =~ m/^([^,]+),relativeDomainName=[^,]+,$zoneDn$/ or next;
$result = $ldap->moddn (
$entry->dn(),
newrdn => $1,
deleteoldrdn => '1',
newsuperior => 'zoneName='.$entry->get_value('zoneName').','.$zoneDn
);
$result->code && die "Migration of DNS reverse zone subentry ".$entry->dn()." failed, LDAP error: ".$result->error."\n";
}

# Add DNS tab on server
$mesg = $ldap->search(
base => $systemdn,
scope => 'base',
26 changes: 26 additions & 0 deletions contrib/docs/UPGRADE
Original file line number Diff line number Diff line change
@@ -1265,6 +1265,32 @@ If they are old objectClasses it will warn you and you will have to remove it by

!! Please read it carefully before applying !!

Migrate FusionDirectory from 1.0.10 to 1.0.11
=============================================

Ubuntu 12.0.4 TLS users
=======================

Since 1.0.9.2 FusionDirectory need the php-cas library for CAS server support. This library can normally found in universe in the Ubuntu repositories

In case you did not find it, grab the deb from here and install it

http://packages.ubuntu.com/trusty/all/php-cas/download

and select your preferred mirror

Upgrade FusionDirectory first
=============================

Upgrade FusionDirectory core package before other ones to avoid dependencies errors:

apt-get install fusiondirectory

Upgrade FusionDirectory schema package too.

apt-get install fusiondirectory-schema


---
* Further information

6 changes: 5 additions & 1 deletion html/include/datepicker.js
Original file line number Diff line number Diff line change
@@ -256,8 +256,12 @@ DatePicker.prototype = {

/* arguments */
this._relative= h_p["relative"];
if (h_p["language"])
if (h_p["language"]) {
this._language = h_p["language"];
if (this._language_close.get(this._language) == undefined) {
this._language = 'en';
}
}
this._zindex = ( h_p["zindex"] ) ? parseInt(Number(h_p["zindex"])) : 999;
if (!Object.isUndefined(h_p["keepFieldEmpty"]))
this._keepFieldEmpty = h_p["keepFieldEmpty"];
34 changes: 17 additions & 17 deletions include/class_config.inc
Original file line number Diff line number Diff line change
@@ -293,11 +293,12 @@ class config {
session::global_set('HTTP_FDKEY_CACHE', $cache);
} catch (Exception $e) {
$msg = sprintf(
_('It seems you are trying to decode something which is not encoded : %s<br/>\n'.
_('It seems you are trying to decode something which is not encoded : %s<br/>'."\n".
'Please check you are not using a fusiondirectory.secrets file while your passwords are not encrypted.'),
$e->getMessage()
);
msg_dialog::display(_("Configuration error"), $msg, FATAL_ERROR_DIALOG);
msg_dialog::display(_('Configuration error'), $msg, FATAL_ERROR_DIALOG);
exit;
}
}
return $cache[$creds];
@@ -368,6 +369,10 @@ class config {
*/
function set_current($name)
{
if (!isset($this->data['LOCATIONS'][$name])) {
msg_dialog::display(_('Error'), sprintf(_('Location "%s" could not be found in the configuration file'), $name), FATAL_ERROR_DIALOG);
exit;
}
$this->current = $this->data['LOCATIONS'][$name];

if (isset($this->current['INITIAL_BASE'])) {
@@ -608,13 +613,10 @@ class config {
}
}


/*!
* \brief Store the departments from ldap in $this->departments
*
* \param string $ignore_dn dn of the department
*/
function get_departments($ignore_dn = "")
function get_departments()
{
/* Initialize result hash */
$result = array();
@@ -629,14 +631,14 @@ class config {
$types = departmentManagement::getDepartmentTypes();

/* Create a list of attributes to fetch */
$filter = "";
$ldap_values = array("objectClass", "description");
$filter = '';
$ldap_values = array('objectClass', 'description');
foreach ($types as $type) {
$i = objects::infos($type);
$filter .= $i['filter'];
$ldap_values[] = $i['mainAttr']; // Specific key for departement objectTypes
}
$filter = "(|".$filter.")";
$filter = '(|'.$filter.')';

/* Get list of department objects */
$ldap = $this->get_ldap_link();
@@ -660,17 +662,15 @@ class config {

$dn = $ldap->getDN();
$data = objects::infos($oc);
$this->department_info[$dn] = array("img" => $data['icon'],
"description" => isset($attrs['description'][0])?$attrs['description'][0]:"",
"name" => $attrs[$data['mainAttr']][0]);

if ($dn == $ignore_dn) {
continue;
}
$c_dn = convert_department_dn($dn)." (".$data['mainAttr'].")";
$this->department_info[$dn] = array(
'img' => $data['icon'],
'description' => (isset($attrs['description'][0]) ? $attrs['description'][0] : ''),
'name' => $attrs[$data['mainAttr']][0]
);

/* Only assign non-root departments */
if ($dn != $result['/']) {
$c_dn = convert_department_dn($dn).' ('.$data['mainAttr'].')';
$result[$c_dn] = $dn;
}
}
23 changes: 0 additions & 23 deletions include/class_ldap.inc
Original file line number Diff line number Diff line change
@@ -594,29 +594,6 @@ class LDAP
}
}

/*!
* \brief Rename the dn
*
* \param string $attrs
*
* \param string $dn The DN
*/
function rename($attrs, $dn = "")
{
if ($this->hascon) {
if ($this->reconnect) $this->connect();
if ($dn == "")
$dn = $this->basedn;

$r = @ldap_mod_replace($this->cid, LDAP::fix($dn), $attrs);
$this->error = @ldap_error($this->cid);
return $r;
} else {
$this->error = "Could not connect to LDAP server";
return "";
}
}

/*!
* \brief Remove directory
*
2 changes: 2 additions & 0 deletions include/class_management.inc
Original file line number Diff line number Diff line change
@@ -145,6 +145,7 @@ class management
*/
function execute()
{
global $config;
// Ensure that html posts and gets are kept even if we see a 'Entry islocked' dialog.
$vars = array('/^act$/','/^listing/','/^PID$/','/^FILTER_PID$/');
session::set('LOCK_VARS_TO_USE', $vars);
@@ -167,6 +168,7 @@ class management

// Pre-render list to init things if a dn is gonna be opened on first load
if (isset($_REQUEST['dn'])) {
$this->headpage->setBase($config->current['BASE']);
$this->headpage->filter->setCurrentScope('sub');
$this->renderList();
}
Loading

0 comments on commit b3a0de1

Please sign in to comment.