[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Fri Feb 12 19:19:08 MST 2010
The branch, master has been updated
via 1f89ffd... Revert "Fix bug #7126 - [SMBD] With access denied error smbd return wrong NT_STATUS_OBJECT_PATH_INVALID error"
from 2fdd8b1... Fix bug #7126 - [SMBD] With access denied error smbd return wrong NT_STATUS_OBJECT_PATH_INVALID error
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 1f89ffd0357bd226fc599f527b0570b3eba9f2b9
Author: Jeremy Allison <jra at samba.org>
Date: Fri Feb 12 18:17:32 2010 -0800
Revert "Fix bug #7126 - [SMBD] With access denied error smbd return wrong NT_STATUS_OBJECT_PATH_INVALID error"
This reverts commit 2fdd8b10c6abadd27c579e772c0482214d2363a5.
This fix is incorrect. The original code works as desired,
I made a mistake here.
Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/service.c | 25 +++++++++----------------
1 files changed, 9 insertions(+), 16 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index 6e57e1f..d8ba4fe 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -1019,27 +1019,20 @@ connection_struct *make_connection_snum(struct smbd_server_connection *sconn,
check during individual operations. To match this behaviour
I have disabled this chdir check (tridge) */
/* the alternative is just to check the directory exists */
- if (SMB_VFS_STAT(conn, smb_fname_cpath) == 0) {
- if (!S_ISDIR(smb_fname_cpath->st.st_ex_mode)) {
+ if ((ret = SMB_VFS_STAT(conn, smb_fname_cpath)) != 0 ||
+ !S_ISDIR(smb_fname_cpath->st.st_ex_mode)) {
+ if (ret == 0 && !S_ISDIR(smb_fname_cpath->st.st_ex_mode)) {
DEBUG(0,("'%s' is not a directory, when connecting to "
"[%s]\n", conn->connectpath,
lp_servicename(snum)));
- *pstatus = NT_STATUS_BAD_NETWORK_NAME;
- goto err_root_exit;
- }
- } else {
- /* Stat failed. Bail on any error except permission denied. */
- if (errno != EACCES) {
- DEBUG(0,("Connecting to share [%s], path '%s' "
- "gives error %s\n",
- lp_servicename(snum),
- conn->connectpath,
+ } else {
+ DEBUG(0,("'%s' does not exist or permission denied "
+ "when connecting to [%s] Error was %s\n",
+ conn->connectpath, lp_servicename(snum),
strerror(errno) ));
- *pstatus = NT_STATUS_BAD_NETWORK_NAME;
- goto err_root_exit;
}
- /* As Windows does, on permsission denied we continue.
- * Pathname calls fail, not TconX calls. */
+ *pstatus = NT_STATUS_BAD_NETWORK_NAME;
+ goto err_root_exit;
}
string_set(&conn->origpath,conn->connectpath);
--
Samba Shared Repository
More information about the samba-cvs
mailing list