From 09f5aa4269a6133e822ce4bbbde426ce5b37cd34 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 1 Mar 2005 21:26:01 +0000 Subject: 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) --- source3/smbd/service.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3') 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))); -- cgit