[pve-devel] r5561 - in pve-access-control/trunk/PVE: . API2

svn-commits at proxmox.com svn-commits at proxmox.com
Fri Feb 18 06:37:28 CET 2011


Author: dietmar
Date: 2011-02-18 06:37:27 +0100 (Fri, 18 Feb 2011)
New Revision: 5561

Modified:
   pve-access-control/trunk/PVE/API2/Domains.pm
   pve-access-control/trunk/PVE/AccessControl.pm
Log:
list 'pam' and 'pve' domains


Modified: pve-access-control/trunk/PVE/API2/Domains.pm
===================================================================
--- pve-access-control/trunk/PVE/API2/Domains.pm	2011-02-18 05:26:22 UTC (rev 5560)
+++ pve-access-control/trunk/PVE/API2/Domains.pm	2011-02-18 05:37:27 UTC (rev 5561)
@@ -109,6 +109,9 @@
 		die "domain '$domid' already exists\n" 
 		    if $cfg->{$domid};
 
+		die "unable to use reserved name '$domid'\n"
+		    if ($domid eq 'pam' || $domid eq 'pve');
+
 		$cfg->{$domid} = {
 		    type => $param->{type},
 		    server1 => $param->{server1},
@@ -174,6 +177,9 @@
 		my $domid = $param->{domid};
 		delete $param->{domid};
 
+		die "unable to modify bultin domain '$domid'\n"
+		    if ($domid eq 'pam' || $domid eq 'pve');
+
 		die "domain '$domid' does not exist\n" 
 		    if !$cfg->{$domid};
 

Modified: pve-access-control/trunk/PVE/AccessControl.pm
===================================================================
--- pve-access-control/trunk/PVE/AccessControl.pm	2011-02-18 05:26:22 UTC (rev 5560)
+++ pve-access-control/trunk/PVE/AccessControl.pm	2011-02-18 05:37:27 UTC (rev 5561)
@@ -901,6 +901,18 @@
 	}
     }
 
+    # add default domains
+
+    $cfg->{pve} = {
+	type => 'builtin',
+	comment => "Proxmox VE authentication server", 
+    };
+
+    $cfg->{pam} = {
+	type => 'builtin',
+	comment => "Linux PAM standard authentication", 
+    };
+	
     return $cfg;
 }
 




More information about the pve-devel mailing list