This file is indexed.

/usr/share/gosa/plugins/personal/connectivity/class_connectivity.inc is in gosa-plugin-connectivity 2.7.4+reloaded2-9ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
<?php
/*! \brief   connectivity plugin
  \author  Cajus Pollmeier <pollmeier@gonicus.de>
  \version 2.30
  \date    29.03.2005

  This class provides the functionality to read and write all attributes
  relevant for connectivity settings from/to the LDAP. It does syntax checking
  and displays the formulars required.
 */

class connectivity extends plugin
{
  /* Definitions */
  var $plHeadline= "Connectivity";
  var $plDescription= "Manage connectivity user settings";
  var $plIcon = "plugins/connectivity/images/plugin.png";

  /* attribute list for save action */
  var $attributes= array();
  var $objectclasses= array();

  var $ignore_account= TRUE;
  var $plugin= array();
  var $plugin_name= array();
  var $CopyPasteVars = array("plugin","plugin_name");

  var $multiple_support = TRUE;

  function connectivity (&$config, $dn= NULL,$parent =NULL)
  {
    /* Preseed permissions */
    $this->initTime = microtime(TRUE);
    $this->dn= $dn;
    $ui= get_userinfo();

    $this->config = $config;
  
    /* Load accounts */
    foreach ($config->data['TABS']['CONNECTIVITY'] as $plug){
      if (!class_available($plug['CLASS']) || !plugin_available($plug['CLASS'])) {
      	continue;
      }

      $name= $plug['CLASS'];
      $this->plugin_name[]= $name;
      $this->plugin[$name]= new $name($config, $dn,$parent);

      /* Acl base && category configuration, 
          these settings will be overloaded in main.inc, 
          if we are editing ourself */
      $this->plugin[$name]-> set_acl_category("users");
      $this->plugin[$name]-> set_acl_base($this->dn);
    }

    // Create statistic table entry
    stats::log('plugin', $class = get_class($this), $category = array($this->acl_category),  $action = 'open',
            $amount = 1, $duration = (microtime(TRUE) - $this->initTime));

  }

  function execute()
  {
	/* Call parent execute */
	plugin::execute();

    $display= "";

    /* Prepare templating */
    $smarty= get_smarty();

    /* Do we represent a valid account? */
    if ($this->parent === NULL){
      $enabled= true;
      foreach ($this->plugin_name as $name){
        if ($this->plugin[$name]->is_account){
          $enabled= true;
          break;
        }
      }
      if (!$enabled){
        $display= "<img alt=\"\" src=\"images/small-error.png\" align=\"middle\">&nbsp;<b>".
          msgPool::noValidExtension()."</b>";
        $display.= back_to_main();
        return ($display);
      }
    }

    if ($this->parent !== NULL){
      foreach ($this->plugin_name as $name){
        $this->plugin[$name]->parent= $this->parent;
      }
    }

    /* Execude  objects */
    $is_first= true;

    foreach ($this->plugin_name as $name){
      $this->plugin[$name]->read_only = &$this->read_only;
      if (!$is_first){
        $display.= '<hr>';
      } else {
        $is_first= false;
      }
      $display.= $this->plugin[$name]->execute();
    }

    /* Mark me as connectivity tab */
    $display.= "<input type='hidden' name='connectivityTab'>";
    return($display);
  }


  /* Save data to object */
  function save_object()
  {
    if (isset($_POST['connectivityTab'])){
      foreach ($this->plugin_name as $name){
        $this->plugin[$name]->save_object();
      }
    }
  }

  function check()
  {
    $message= plugin::check();

    foreach ($this->plugin_name as $name){
      if($this->plugin[$name]->is_account){
        $tmp= $this->plugin[$name]->check();
        $message= array_merge($message, $tmp);
      }
    }

    return ($message);
  }

  function set_acl_category($cat)
  {
    plugin::set_acl_category($cat);
    foreach ($this->plugin_name as $name){
      $this->plugin[$name]->set_acl_category( $cat);
    }
  }

  function set_acl_base($base)
  {
    plugin::set_acl_base($base);
    foreach ($this->plugin_name as $name){
      $this->plugin[$name]->set_acl_base( $base);
    }
  }

  /* Save to LDAP */
  function save()
  {
    // Append parent to sub-plugins.
    if ($this->parent !== NULL){
      foreach ($this->plugin_name as $name){
        $this->plugin[$name]->parent= $this->parent;
      }
    }

    /* Save objects */
    foreach ($this->plugin_name as $name){
      $this->plugin[$name]->dn= $this->dn;
      
      if ($this->plugin[$name]->is_account){
        $this->plugin[$name]->save();
      } else {
        $this->plugin[$name]->remove_from_parent();
      }
    }
  }

  function remove_from_parent()
  {
    // Append parent to sub-plugins.
    if ($this->parent !== NULL){
      foreach ($this->plugin_name as $name){
        $this->plugin[$name]->parent= $this->parent;
      }
    }

    /* Remove objects */
    foreach ($this->plugin_name as $name){
      $this->plugin[$name]->dn= $this->dn;
      $this->plugin[$name]->remove_from_parent();
    }
  }

  function adapt_from_template($dn, $skip= array())
  {
    /* Adapt objects */
    foreach ($this->plugin_name as $name){
      $this->plugin[$name]->dn= $this->dn;
      $this->plugin[$name]->adapt_from_template($dn, $skip);
    }
  }

  /* Prepare the connectivity obj 
   */
  function PrepareForCopyPaste($obj)
  { 
    $tmp = $this->plugin;
    plugin::PrepareForCopyPaste($obj);
    $this->plugin = $tmp;
    foreach( $this->plugin as $key => $plug){
      $this->plugin[$key]->PrepareForCopyPaste($obj);
    }
  }


  function enable_multiple_support()
  {
    plugin::enable_multiple_support();
    
    foreach($this->plugin_name as $key => $name){
      if($this->plugin[$name]->multiple_support){
        $this->plugin[$name]->enable_multiple_support();  
      }else{
        unset($this->plugin_name[$key]);
        unset($this->plugin[$name]);
      }
    }
  }
  
  
  function multiple_execute()
  {
    return($this->execute());
  }
  
  /* Save data to object */
  function multiple_save_object()
  {
    if (isset($_POST['connectivityTab'])){
      foreach ($this->plugin_name as $name){
        $this->plugin[$name]->multiple_save_object();
      }
    }
  }

  function multiple_check()
  {
    $message = plugin::multiple_check();
    foreach ($this->plugin_name as $name){
      $message = array_merge($message,$this->plugin[$name]->multiple_check());
    }
    return($message);
  }

  function get_multi_init_values()
  {
    $ret = array();
    foreach($this->plugin as $name => $plugin){
      $ret = array_merge($ret,$plugin->get_multi_init_values());
    }
    return($ret);
  }

  function init_multiple_support($attrs,$attr)
  {
    foreach($this->plugin as $name => $plugin){
      $this->plugin[$name]->init_multiple_support($attrs,$attr);
    }
  }

  function get_multi_edit_values()
  {
    $ret['plugin'] = &$this->plugin;
    return($ret);
  }

  function set_multi_edit_values($values)
  {
    foreach($values['plugin'] as $name => $plugin){
      $this->plugin[$name]->set_multi_edit_values($plugin->get_multi_edit_values());
    }
  }


  /* Return plugin informations for acl handling */
  static function plInfo()
  {
    return (array(
          "plShortName"     => _("Connectivity"),
          "plDepends"       => array("user"),
          "plPriority"      => 20,                                 // Position in tabs
          "plSection"     => array("personal" => _("My account")),
          "plCategory"    => array("users"),
          "plOptions"       => array(),

          "plDescription"       => _("Connectivity add-on"),
          "plSelfModify"        => TRUE,

          "plProvidedAcls"  => array()
          ));
  }


}

// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>