From: psc Date: Fri, 2 Oct 2009 08:39:06 +0000 (+0000) Subject: Check volume for possibly hidden share names, instead X-Git-Url: https://git.tokkee.org/?p=gosa.git;a=commitdiff_plain;h=b1d0ad6b8608db2f0f07692e0dbfc1c3f32b00ce Check volume for possibly hidden share names, instead of the name. (Trac: #1960) git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@14461 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/trunk/gosa-plugins/goto/admin/systems/services/nfs/class_servNfs.inc b/trunk/gosa-plugins/goto/admin/systems/services/nfs/class_servNfs.inc index 119ce0795..aee4d9662 100644 --- a/trunk/gosa-plugins/goto/admin/systems/services/nfs/class_servNfs.inc +++ b/trunk/gosa-plugins/goto/admin/systems/services/nfs/class_servNfs.inc @@ -183,6 +183,10 @@ class servnfs extends plugin if (!preg_match('/^[a-z0-9-]+:[0-9]+$/', $this->path)){ $message[]= _("'Path / Volume' must be of format 'server:port'!"); } + } elseif ($this->type == "CIFS" || $this->type == "samba") { + if (!preg_match("/^[^\$]+[\$]*$/", $this->path)) { + $message[] = _("'$' is only allowed at the end of the share name for hidden shares"); + } } else { if (!tests::is_path($this->path)){ $message[]= _("'Path / Volume' must contain at least one '/' and no special characters!"); @@ -201,11 +205,6 @@ class servnfs extends plugin if(!preg_match("/^[a-z0-9\._äüö\$]*$/ui",$this->name)){ $message[]= msgPool::invalid(_("Name"),$this->name,"/[a-z0-9\._äüö]\$/ui"); } - else { - if (!preg_match("/^[^\$]+[\$]*$/", $this->name)) { - $message[] = _("Hidden shares must have the '$' at the end of the name!"); - } - } } if(!empty($this->description) && preg_match("/^[^a-z0-9\._äüö\+ -]*$/ui",$this->description)){