if the export path is "/", it will be got rid of, will become "",
so can't be exported.

Signed-off-by: Aihua Zhang <[email protected]>
---
  src/Protocols/NFS/mnt_Mnt.c |    6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/Protocols/NFS/mnt_Mnt.c b/src/Protocols/NFS/mnt_Mnt.c
index 6a57cb2..e3471c6 100644
--- a/src/Protocols/NFS/mnt_Mnt.c
+++ b/src/Protocols/NFS/mnt_Mnt.c
@@ -88,8 +88,10 @@ int mnt_Mnt(nfs_arg_t *arg,

         /* If the path ends with a '/', get rid of it */
         /** @todo: should it be a while()?? */
-       if (arg->arg_mnt[strlen(arg->arg_mnt) - 1] == '/')
-               arg->arg_mnt[strlen(arg->arg_mnt) - 1] = '\0';
+       if (strlen(arg->arg_mnt) > 1) {
+               if (arg->arg_mnt[strlen(arg->arg_mnt) - 1] == '/')
+                       arg->arg_mnt[strlen(arg->arg_mnt) - 1] = '\0';
+       }

         /*  Find the export for the dirname (using as well Path or Tag) */
         if (arg->arg_mnt[0] == '/')
--
1.7.1


------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Nfs-ganesha-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel

Reply via email to