Projects
Kolab:Winterfell
kolab-webadmin
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 5
View file
kolab-webadmin.spec
Changed
@@ -35,7 +35,7 @@ Name: kolab-webadmin Version: 3.2.11 -Release: 0.20160505.git%{?dist} +Release: 0.20160506.git%{?dist} Summary: Kolab Groupware Server Web Administration Interface License: AGPLv3+ Group: Productivity/Office/Organizers
View file
debian.changelog
Changed
@@ -1,4 +1,4 @@ -kolab-webadmin (3.2.11~dev20160505-0~kolab1) unstable; urgency=low +kolab-webadmin (3.2.11~dev20160506-0~kolab1) unstable; urgency=low * New upstream release 3.2.7
View file
kolab-webadmin-3.2.11.tar.gz/bin/purge-deleted-domains
Changed
@@ -34,6 +34,7 @@ $username = $CONF->get('ldap', 'bind_dn'); $password = $CONF->get('ldap', 'bind_pw'); $domain = $CONF->get('kolab', 'primary_domain'); +$dry_run = in_array('--dry-run', $argv); // see https://cgit.kolab.org/webadmin/tree/lib/kolab_api_controller.php#n292 session_start(); @@ -49,7 +50,7 @@ // delete domains foreach ($domains as $dn => $domain) { - delete_domain($dn, $domain); + delete_domain($dn, $domain, $dry_run); } @@ -81,7 +82,7 @@ return $result['list']; } -function delete_domain($domain_dn, $domain) +function delete_domain($domain_dn, $domain, $dry_run = false) { global $LDAP, $CONF; @@ -106,27 +107,33 @@ $inetdomainbasedn = "dc=" . implode(',dc=', explode('.', $domain_name)); } - // only deletes associateddomain=domain.tld,cn=kolab,cn=config - if (!$LDAP->delete_entry($domain_dn)) { - echo "Error: Failed to delete $domain_dn.\n"; - return; - } - $entries = array(); $entries[] = $inetdomainbasedn; - $cn = str_replace('.', '_', $domain_name); + $cn = str_replace('.', '_', $domain_name); if ($LDAP->get_entry_attribute("cn={$cn},cn=ldbm database,cn=plugins,cn=config", 'nsuniqueid')) { $entries[] = "cn={$cn},cn=ldbm database,cn=plugins,cn=config"; } - $cn = str_replace(array(',', '='), array('\2C', '\3D'), $inetdomainbasedn); + $cn = str_replace(array(',', '='), array('\2C', '\3D'), $inetdomainbasedn); if ($LDAP->get_entry_attribute("cn={$cn},cn=mapping tree,cn=config", 'nsuniqueid')) { $entries[] = "cn={$cn},cn=mapping tree,cn=config"; } + if ($dry_run) { + echo "Deleting $domain_dn\n"; + } + // only deletes associateddomain=domain.tld,cn=kolab,cn=config + else if (!$LDAP->delete_entry($domain_dn)) { + echo "Error: Failed to delete $domain_dn.\n"; + return; + } + foreach ($entries as $dn) { - if (!$LDAP->delete_entry_recursive($dn)) { + if ($dry_run) { + echo "Deleting $dn\n"; + } + else if (!$LDAP->delete_entry_recursive($dn)) { echo "Error: Failed to delete $dn.\n"; return; }
View file
kolab-webadmin.dsc
Changed
@@ -2,7 +2,7 @@ Source: kolab-webadmin Binary: kolab-webadmin Architecture: all -Version: 3.2.11~dev20160505-0~kolab1 +Version: 3.2.11~dev20160506-0~kolab1 Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Uploaders: Paul Klos <kolab@klos2day.nl> Homepage: http://www.kolab.org/
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.