The Samba-Bugzilla – Attachment 5343 Details for
Bug 7126
[SMBD] With access denied error smbd return wrong NT_STATUS_OBJECT_PATH_INVALID error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am format patch for 3.3.11.
0001-Fix-bug-7126-SMBD-With-access-denied-error-smbd-retu.patch (text/plain), 2.09 KB, created by
Jeremy Allison
on 2010-02-12 18:54:40 UTC
(
hide
)
Description:
git-am format patch for 3.3.11.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2010-02-12 18:54:40 UTC
Size:
2.09 KB
patch
obsolete
>From 65abba000c2bc3699f2eae9c72af40d1f975f268 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Fri, 12 Feb 2010 16:53:13 -0800 >Subject: [PATCH] Fix bug #7126 - [SMBD] With access denied error smbd return wrong NT_STATUS_OBJECT_PATH_INVALID error > >As tridge's comment says, we should be ignoring ACCESS_DENIED >on the share path in a TconX call, instead allowing the mount >and having individual SMB calls fail (as Windows does). The >original code erroneously caught SMB_VFS_STAT != 0 and errored >out on that. > >Jeremy. >--- > source/smbd/service.c | 25 +++++++++++++++---------- > 1 files changed, 15 insertions(+), 10 deletions(-) > >diff --git a/source/smbd/service.c b/source/smbd/service.c >index 7ba1043..52fa54e 100644 >--- a/source/smbd/service.c >+++ b/source/smbd/service.c >@@ -1083,20 +1083,25 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, > 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 ((ret = SMB_VFS_STAT(conn, conn->connectpath, &st)) != 0 || >- !S_ISDIR(st.st_mode)) { >- if (ret == 0 && !S_ISDIR(st.st_mode)) { >+ if (SMB_VFS_STAT(conn, conn->connectpath, &st) == 0) { >+ if (!S_ISDIR(st.st_mode)) { > DEBUG(0,("'%s' is not a directory, when connecting to " > "[%s]\n", conn->connectpath, > lp_servicename(snum))); >- } 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; >+ } >+ } 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, >+ strerror(errno) )); >+ *pstatus = NT_STATUS_BAD_NETWORK_NAME; >+ goto err_root_exit; > } >- *pstatus = NT_STATUS_BAD_NETWORK_NAME; >- goto err_root_exit; > } > > string_set(&conn->origpath,conn->connectpath); >-- >1.6.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 7126
:
5323
|
5339
|
5340
|
5341
|
5342
|
5343