1 <?php
2 /*!
3 \brief sudoLdap plugin
4 \author Guido Serra <gserra@guidoserra.it>
5 \version 1.00
6 \date 22.03.2008
8 This class provides the functionality to read and write all attributes
9 relevant for sudo-ldap from/to the LDAP.
10 */
12 class sudoLdap extends plugin
13 {
14 /* Definitions */
15 var $plHeadline= "sudo-ldap";
16 var $plDescription= "This does something";
18 /* Plugin specific values */
20 var $attributes = array("sudoUser", "sudoHost", "sudoCommand", "sudoRunAs", "sudoOption");
21 var $objectclasses = array("sudoRole");
23 var $uid ="";
25 /* constructor, if 'dn' is set, the node loads the given
26 'dn' from LDAP */
27 function sudoLdap ($config, $dn= NULL, $parent= NULL)
28 {
29 /* Configuration is fine, allways */
30 $this->config= $config;
32 /* Load bases attributes */
33 plugin::plugin($config, $dn, $parent);
35 /* set user id */
36 if(isset($this->attrs['uid'])){
37 $this->uid = $this->attrs['uid'][0];
38 }
40 $ldap= $this->config->get_ldap_link();
42 }
45 /* execute generates the html output for this node */
46 function execute($isCopyPaste = false)
47 {
48 /* Call parent execute */
49 plugin::execute();
50 $display= "";
52 $display = "execute()";
54 return($display);
55 }
57 }
59 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
60 ?>