From 1f3c4ca0f07c371f2101c6a3dac729d3f890f952 Mon Sep 17 00:00:00 2001
From: Michael Hierweck <michael@hierweck.de>
Date: Thu, 28 Aug 2014 12:19:08 +0200
Subject: [PATCH] Generate /etc/sudoers.d/pacs instead of (whole) /etc/sudoers (configuration).

---
 hsarback/src/de/hsadmin/mods/pac/sudoers-pacs.vm          |    8 ++++++++
 /dev/null                                                 |   27 ---------------------------
 hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java |    2 +-
 3 files changed, 9 insertions(+), 28 deletions(-)

diff --git a/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java b/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java
index 4fb4e72..e809c1e 100644
--- a/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java
+++ b/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java
@@ -126,7 +126,7 @@
 	}
 
 	private Processor createSudouersProc(Hive hive) throws ProcessorException {
-		return new VelocityProcessor("/de/hsadmin/mods/pac/sudoers.vm", hive, "/etc/sudoers", true);
+		return new VelocityProcessor("/de/hsadmin/mods/pac/sudoers-pacs.vm", hive, "/etc/sudoers.d/pacs", true);
 	}
 
 	private Processor createProftpdConfProc(Hive hive) throws ProcessorException {
diff --git a/hsarback/src/de/hsadmin/mods/pac/sudoers-pacs.vm b/hsarback/src/de/hsadmin/mods/pac/sudoers-pacs.vm
new file mode 100644
index 0000000..a9b6a5d
--- /dev/null
+++ b/hsarback/src/de/hsadmin/mods/pac/sudoers-pacs.vm
@@ -0,0 +1,8 @@
+# 
+# This file is managed by HSAdmin.
+# Do not edit manually. Changes will be overwritten.
+#
+
+#foreach( $pac in ${hive.pacs} )
+${pac.name} ALL = (%${pac.name}) NOPASSWD: ALL
+#end
diff --git a/hsarback/src/de/hsadmin/mods/pac/sudoers.vm b/hsarback/src/de/hsadmin/mods/pac/sudoers.vm
deleted file mode 100644
index 6223029..0000000
--- a/hsarback/src/de/hsadmin/mods/pac/sudoers.vm
+++ /dev/null
@@ -1,27 +0,0 @@
-# 
-# This file is managed by HSAdmin.
-# Do not edit manually. Changes will be overwritten.
-#
-
-# Host alias specification
-
-# User alias specification
-
-# Cmnd alias specification
-
-# Override built in defaults
-
-Defaults ignore_dot             # "." bzw. "" im PATH ignorieren
-Defaults always_set_home        # HOME entsprechend des Zielusers aendern
-Defaults env_reset              # Environmentvariablen filtern
-Defaults listpw=all             # siehe sudoers(5)
-
-# User privilege specification
-root    ALL=(ALL) ALL
-%adm    ALL=NOPASSWD: ALL
-
-####################################################
-
-#foreach( $pac in ${hive.pacs} )
-${pac.name} ALL = (%${pac.name}) NOPASSWD: ALL
-#end

--
Gitblit v1.9.0-SNAPSHOT