Make use of module_dirlen in full_fname().
authorWayne Davison <wayned@samba.org>
Fri, 30 Jun 2006 14:24:25 +0000 (14:24 +0000)
committerWayne Davison <wayned@samba.org>
Fri, 30 Jun 2006 14:24:25 +0000 (14:24 +0000)
util.c

diff --git a/util.c b/util.c
index 8dd1b1c..85b2227 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1021,7 +1021,7 @@ char *full_fname(const char *fn)
        if (*fn == '/')
                p1 = p2 = "";
        else {
-               p1 = curr_dir;
+               p1 = curr_dir + module_dirlen;
                for (p2 = p1; *p2 == '/'; p2++) {}
                if (*p2)
                        p2 = "/";
@@ -1030,13 +1030,6 @@ char *full_fname(const char *fn)
                m1 = " (in ";
                m2 = lp_name(module_id);
                m3 = ")";
-               if (p1 == curr_dir) {
-                       if (!lp_use_chroot(module_id)) {
-                               char *p = lp_path(module_id);
-                               if (*p != '/' || p[1])
-                                       p1 += strlen(p);
-                       }
-               }
        } else
                m1 = m2 = m3 = "";