The Samba-Bugzilla – Attachment 5323 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]
Fix for wrong NT_STATUS_OBJECT_PATH_INVALID error
local_eacces_patch.diff (text/x-patch), 1.66 KB, created by
giusdbg
on 2010-02-10 17:12:51 UTC
(
hide
)
Description:
Fix for wrong NT_STATUS_OBJECT_PATH_INVALID error
Filename:
MIME Type:
Creator:
giusdbg
Created:
2010-02-10 17:12:51 UTC
Size:
1.66 KB
patch
obsolete
>--- samba-3.4.5_orig/source3/smbd/service.c 2010-01-18 12:38:09.000000000 +0100 >+++ samba-3.4.5/source3/smbd/service.c 2010-02-10 23:25:11.000000000 +0100 >@@ -996,20 +996,30 @@ > 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)) { >- DEBUG(0,("'%s' is not a directory, when connecting to " >- "[%s]\n", conn->connectpath, >+ if ((ret = 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; >+ *pstatus = NT_STATUS_OBJECT_PATH_INVALID; >+ goto err_root_exit; >+ } >+ } 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_ACCESS_DENIED; >+ switch (errno) { >+ case ENOENT: { >+ *pstatus = NT_STATUS_OBJECT_PATH_INVALID; >+ break; } >+ case EACCES: { >+ *pstatus = NT_STATUS_ACCESS_DENIED; >+ break; } >+ } >+ goto err_root_exit; > } > > string_set(&conn->origpath,conn->connectpath);
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