The Samba-Bugzilla – Attachment 4547 Details for
Bug 6616
[SMBD] Problem with share link to directory (with bad account access), and obscure error message
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for fix lost access denied
local_eacces_patch.diff (text/plain), 1.78 KB, created by
giusdbg
on 2009-08-12 07:46:07 UTC
(
hide
)
Description:
Patch for fix lost access denied
Filename:
MIME Type:
Creator:
giusdbg
Created:
2009-08-12 07:46:07 UTC
Size:
1.78 KB
patch
obsolete
>diff -aur source_orig/smbd/service.c source/smbd/service.c >--- source_orig/smbd/service.c 2009-07-28 10:30:39.000000000 +0200 >+++ source/smbd/service.c 2009-08-11 23:37:03.000000000 +0200 >@@ -1064,20 +1064,33 @@ > 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, >+ >+ /* Check the directory exists is possible only if stat function >+ return success */ >+ 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 6616
: 4547