The Samba-Bugzilla – Attachment 1468 Details for
Bug 3129
Poor error message on bad directory permissions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch with better message.
look (text/plain), 1.72 KB, created by
Jeremy Allison
on 2005-10-03 11:11:21 UTC
(
hide
)
Description:
Proposed patch with better message.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2005-10-03 11:11:21 UTC
Size:
1.72 KB
patch
obsolete
>Index: smbd/service.c >=================================================================== >--- smbd/service.c (revision 10687) >+++ smbd/service.c (working copy) >@@ -272,6 +272,7 @@ > SMB_STRUCT_STAT st; > fstring user; > fstring dev; >+ int ret; > > *user = 0; > fstrcpy(dev, pdev); >@@ -554,7 +555,6 @@ > /* Preexecs are done here as they might make the dir we are to ChDir to below */ > /* execute any "root preexec = " line */ > if (*lp_rootpreexec(snum)) { >- int ret; > pstring cmd; > pstrcpy(cmd,lp_rootpreexec(snum)); > standard_sub_conn(conn,cmd,sizeof(cmd)); >@@ -584,7 +584,6 @@ > /* Preexecs are done here as they might make the dir we are to ChDir to below */ > /* execute any "preexec = " line */ > if (*lp_preexec(snum)) { >- int ret; > pstring cmd; > pstrcpy(cmd,lp_preexec(snum)); > standard_sub_conn(conn,cmd,sizeof(cmd)); >@@ -629,8 +628,13 @@ > 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, conn->connectpath, &st) != 0 || !S_ISDIR(st.st_mode)) { >- DEBUG(0,("'%s' does not exist or is not a directory, when connecting to [%s]\n", conn->connectpath, lp_servicename(snum))); >+ 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, 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) )); >+ } > change_to_root_user(); > /* Call VFS disconnect hook */ > SMB_VFS_DISCONNECT(conn);
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 3129
: 1468