X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fsystems%2Fclass_servNfs.inc;h=291a8570699aa8bee0e8a80f095e29d9ab0ecc7d;hb=afecd435ef601ea27a281cc6667f94d7273b40e2;hp=e89bab3ea9e939c26340ba83a4a0a27a576fb302;hpb=01708a472e32ce14edc296e7908740100a43d6d9;p=gosa.git diff --git a/plugins/admin/systems/class_servNfs.inc b/plugins/admin/systems/class_servNfs.inc index e89bab3ea..291a85706 100644 --- a/plugins/admin/systems/class_servNfs.inc +++ b/plugins/admin/systems/class_servNfs.inc @@ -32,7 +32,7 @@ class servnfs extends plugin { 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); } @@ -71,10 +71,11 @@ class servnfs extends plugin list($this->name, $this->description, $this->type, $this->charset, $this->path, $this->option, $this->volume)= split("\|",$entry."|"); $this->is_edit = true; - + }else{ $this->attributes[] = "name"; } + $this->create_mount_init = $mount; } @@ -181,7 +182,7 @@ class servnfs extends plugin // only 0-9a-z if(!$this->is_edit){ - if(preg_match("/[^a-z0-9\.\-_]/i",$this->name)){ + if(!preg_match("/^[a-z0-9\.\-_]+$/i",$this->name)){ $message[]=_("Please specify a valid name for your share."); } if(empty($this->name)){ @@ -189,11 +190,11 @@ class servnfs extends plugin } } - 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."); } @@ -201,7 +202,7 @@ class servnfs extends plugin $message[]=_("Path contains invalid characters."); } - if(preg_match("/\|/",$this->option)){ + if(preg_match("/[^a-z0-9._+ \|-]/i",$this->option)){ $message[]=_("Option contains invalid characters."); }