[debian-edu-commits] debian-edu/pkg-team/ 02/02: debian/patches: Add 1002_fix-netgroup-remove-from-hosts.patch. Correctly remove systems from NIS netgroup via NIS netgroup tab of system objects. (Closes: #802559).

Mike Gabriel sunweaver at debian.org
Wed Oct 21 04:21:37 UTC 2015


This is an automated email from the git hooks/post-receive script.

sunweaver pushed a commit to branch master
in repository gosa-plugin-netgroups.

commit c620405e11a135ac9172f695a0caa080f681a585
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Wed Oct 21 06:18:55 2015 +0200

    debian/patches: Add 1002_fix-netgroup-remove-from-hosts.patch. Correctly remove systems from NIS netgroup via NIS netgroup tab of system objects. (Closes: #802559).
---
 .../1002_fix-netgroup-remove-from-hosts.patch      | 26 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 27 insertions(+)

diff --git a/debian/patches/1002_fix-netgroup-remove-from-hosts.patch b/debian/patches/1002_fix-netgroup-remove-from-hosts.patch
new file mode 100644
index 0000000..fdc7cf4
--- /dev/null
+++ b/debian/patches/1002_fix-netgroup-remove-from-hosts.patch
@@ -0,0 +1,26 @@
+Description: Correctly remove systems from NIS netgroups via the NIS netgroup tab of system objects
+Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+
+--- a/admin/systems/netgroups/class_netgroupSystem.inc
++++ b/admin/systems/netgroups/class_netgroupSystem.inc
+@@ -313,7 +313,19 @@
+ 		}
+ 		foreach($to_del as $dn){
+ 			$ng = new netgroup($this->config, $dn);
+-			$ng->removeTriple($this->cn);
++			$host= $this->cn;
++			if(strpos($host, ".") === FALSE){
++				$domain = $this->getDNSZoneForHost($host);
++				if(!$domain){
++					msg_dialog::display(_("Failed to remove triple"), sprintf(_("Unable to detect FQDN for host '%s'!"), $host), WARNING_DIALOG);
++					continue;
++				}
++			}else{
++				$domain = preg_replace("/^[^\.]*+\./", "", $host);
++				$host = preg_replace("/\..*/", "", $host);
++			}
++
++			$ng->removeTriple($host.".".$domain);
+ 			$ng->save();
+ 		}
+ 	}
diff --git a/debian/patches/series b/debian/patches/series
index 1d693e7..29f7661 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 1001_fix-renaming-hosts.patch
+1002_fix-netgroup-remove-from-hosts.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/gosa-plugin-netgroups.git



More information about the debian-edu-commits mailing list