Code

Update sudo class
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 16 Sep 2008 12:50:08 +0000 (12:50 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 16 Sep 2008 12:50:08 +0000 (12:50 +0000)
-sudo::get_sudoers_ou uses get_ou now.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12479 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc

index 1f5f1413e8022fd45003023d97708766cd716ff3..c7fc62c294a2d23c29805f473270058b2f416e1f 100644 (file)
@@ -58,22 +58,11 @@ class sudo extends plugin
     /***
       GET sudo base
      ***/
-    $base ="";
+    $base = get_ou("sudoRDN");
     if(empty($base)){
-      /* Default is ou=sudoers,BASE */
-      $base = "ou=sudoers,".$config->current['BASE'];
-    }else{
-
-      /* Append base to given sudoers ou if missing */
-      if(!preg_match("/".normalizePreg($config->current['BASE'])."$/i",$base)){
-        if(!preg_match("/,$/",$base)){
-          $base = $base.",".$config->current['BASE'];
-        }else{
-          $base = $base.$config->current['BASE'];
-        }
-      }
+      $base = "ou=sudoers,";
     }
-    return($base);
+    return($base.$config->current['BASE']);
   }
 
   /*! \brief  Initializes this sudo class, with all required attributes.