/*
- * $Id: ofork.c,v 1.29 2009-11-06 03:51:54 didg Exp $
+ * $Id: ofork.c,v 1.30.2.1 2010-01-02 10:22:32 franklahm Exp $
*
* Copyright (c) 1996 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
int ret;
path->st_errno = 0;
path->st_valid = 1;
- if ((ret = stat(path->u_name, &path->st)) < 0)
+ if ((ret = lstat(path->u_name, &path->st)) < 0)
path->st_errno = errno;
return ret;
}
stat(".") works even if "." is deleted thus
we have to stat ../name because we want to know if it's there
*/
-int of_statdir (const struct vol *vol, struct path *path)
+int of_statdir (struct vol *vol, struct path *path)
{
static char pathname[ MAXPATHLEN + 1] = "../";
int ret;
/* FIXME, what about: we don't have r-x perm anymore ? */
strlcpy(pathname +3, path->d_dir->d_u_name, sizeof (pathname) -3);
- if (!(ret = stat(pathname, &path->st)))
+ if (!(ret = lstat(pathname, &path->st)))
return 0;
path->st_errno = errno;
if (movecwd(vol, curdir->d_parent))
return -1;
path->st_errno = 0;
- if ((ret = stat(path->d_dir->d_u_name, &path->st)) < 0)
+ if ((ret = lstat(path->d_dir->d_u_name, &path->st)) < 0)
path->st_errno = errno;
}
return ret;