index 784bf569b1a3e577952cc025581abfa8e71c1338..fbda973248ad639c51ae553444f6d94f1c2d8876 100644 (file)
{
plugin::plugin ($config, $dn);
- $this->types = array("NFS"=>"NFS","samba"=>"samba","netatalk"=>"netatalk","NCP"=>"NCP");
+ $this->types = array("CIFS" => "CIFS", "NFS"=>"NFS","samba"=>"samba","netatalk"=>"netatalk","NCP"=>"NCP");
if($dn){
$this->host = substr($dn, 3, strpos($dn, ',')-3);
}
if($entry){
list($this->name, $this->description, $this->type, $this->charset,
- $this->path, $this->option, $this->volume)= split("\|",$entry);
+ $this->path, $this->option, $this->volume)= split("\|",$entry."|");
$this->is_edit = true;
-
+
}else{
$this->attributes[] = "name";
}
+
$this->create_mount_init = $mount;
}
// only 0-9a-z
if(!$this->is_edit){
- if(preg_match("/[^a-z0-9\.\-_]/i",$this->name)){
- $message[]=_("Please specify a valid name for your setup.");
+ if(!preg_match("/^[a-z0-9\.\-_]+$/i",$this->name)){
+ $message[]=_("Please specify a valid name for your share.");
}
if(empty($this->name)){
- $message[]=_("Please specify a name for your setup.");
+ $message[]=_("Please specify a name for your share.");
}
}
- if(preg_match("/\|/",$this->description)){
+ if(preg_match("/[^a-z0-9._+ \|-]+/i",$this->description)){
$message[]=_("Description contains invalid characters.");
}
- if(preg_match("/\|/",$this->volume)){
+ if(preg_match("/[^a-z0-9._+ |-]/i",$this->volume)){
$message[]=_("Volume contains invalid characters.");
}
$message[]=_("Path contains invalid characters.");
}
- if(preg_match("/\|/",$this->option)){
+ if(preg_match("/[^a-z0-9._+ \|-]/i",$this->option)){
$message[]=_("Option contains invalid characters.");
}
return $this->create_mount;
}
+ /* Return plugin informations for acl handling */
+ function plInfo()
+ {
+ return (array(
+ "plShortName" => _("NFS"),
+ "plDescription" => _("NFS service"),
+ "plSelfModify" => FALSE,
+ "plDepends" => array(),
+ "plPriority" => 0,
+ "plSection" => array("administration"),
+ "plCategory" => array("server"),
+
+ "plProvidedAcls"=> array(
+ "description" => _("Description"),
+ "type" => _("Type"),
+ "charset" => _("Charset"),
+ "path" => _("Path"),
+ "option" => _("Option"),
+ "volume" => _("Volume"))
+ ));
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: