summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-03-01 21:26:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:55:50 -0500
commit09f5aa4269a6133e822ce4bbbde426ce5b37cd34 (patch)
treec06a0deb1645ba60217812ab429a44c5d60c02de /source3
parent5ba59da467eef5cbc6506d45b0a6abb1777f2346 (diff)
downloadsamba-09f5aa4269a6133e822ce4bbbde426ce5b37cd34.tar.gz
samba-09f5aa4269a6133e822ce4bbbde426ce5b37cd34.tar.bz2
samba-09f5aa4269a6133e822ce4bbbde426ce5b37cd34.zip
r5607: Fix for bug #2399 - ensure we use SMB_VFS_STAT instead of stat
when checking for existance of a pathname. Jeremy. (This used to be commit 08aac40e3ac0911673ea7e6ef35ba7fe9822d2fd)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/service.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index f199fe3ade..bc74a28faf 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -278,6 +278,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser,
*user = 0;
fstrcpy(dev, pdev);
+ ZERO_STRUCT(st);
if (NT_STATUS_IS_ERR(*status = share_sanity_checks(snum, dev))) {
return NULL;
@@ -622,7 +623,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser,
}
#else
/* the alternative is just to check the directory exists */
- if (stat(conn->connectpath, &st) != 0 || !S_ISDIR(st.st_mode)) {
+ if (SMB_VFS_STAT(conn, conn->connectpath, &st) != 0 || !S_ISDIR(st.st_mode)) {
DEBUG(0,("'%s' does not exist or is not a directory, when connecting to [%s]\n", conn->connectpath, lp_servicename(SNUM(conn))));
change_to_root_user();
yield_connection(conn, lp_servicename(SNUM(conn)));