]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/catsearch.c
previous commit 'lchdir: use chdir + getcwd' was only testing for symlink outside...
[netatalk.git] / etc / afpd / catsearch.c
index 662a876613a87db5419c50473e082fb1123040de..a1e96dfc50ab74649f67c09569f6ea8c99818e37 100644 (file)
@@ -49,6 +49,8 @@
 #ifdef CNID_DB
 #include <atalk/cnid.h>
 #endif /* CNID_DB */
+#include <atalk/util.h>
+
 #include "desktop.h"
 #include "directory.h"
 #include "file.h"
@@ -497,7 +499,7 @@ static int catsearch(struct vol *vol, struct dir *dir,
        int result = AFP_OK;
        int ccr;
     struct path path;
-       char *vpath = vol->v_realpath;
+       char *vpath = vol->v_path;
        char *rrbuf = rbuf;
     time_t start_time;
     int num_rounds = NUM_ROUNDS;
@@ -540,8 +542,7 @@ static int catsearch(struct vol *vol, struct dir *dir,
        while ((cidx = reducestack()) != -1) {
                cached = 1;
 
-               /* XXX use lchdir */
-               error = chdir(dstack[cidx].path);
+               error = lchdir(dstack[cidx].path);
 
                if (!error && dirpos == NULL) {
                        dirpos = opendir(".");