The Samba-Bugzilla – Attachment 5339 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]
patch for master.
look (text/plain), 1.63 KB, created by
Jeremy Allison
on 2010-02-12 16:50:03 UTC
(
hide
)
Description:
patch for master.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2010-02-12 16:50:03 UTC
Size:
1.63 KB
patch
obsolete
>diff --git a/source3/smbd/service.c b/source3/smbd/service.c >index d8ba4fe..976b2de 100644 >--- a/source3/smbd/service.c >+++ b/source3/smbd/service.c >@@ -1019,19 +1019,27 @@ 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 ((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))); >+ if ((ret = SMB_VFS_STAT(conn, smb_fname_cpath)) == 0) { >+ if (!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. Use NT_STATUS_BAD_NETWORK_NAME unless >+ * we got access denied. */ >+ DEBUG(0, ("stat on directory '%s' failed when " >+ "connecting to [%s] Error was %s\n", >+ conn->connectpath, lp_servicename(snum), >+ strerror(errno))); >+ >+ if (errno == EACCES) { >+ *pstatus = NT_STATUS_ACCESS_DENIED; > } 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; > } >- *pstatus = NT_STATUS_BAD_NETWORK_NAME; > goto err_root_exit; > } >
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