summaryrefslogtreecommitdiff
path: root/source3/smbd/open.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-10-22 16:55:03 +0000
committerJeremy Allison <jra@samba.org>1998-10-22 16:55:03 +0000
commit1ee499385c1ea0b4add82d3d4513ea997d048af1 (patch)
treef97f96fc88c6e00ee318cb48339a7ed9cd178937 /source3/smbd/open.c
parent2356f467d129305246b4ba08e61a854f832a76ca (diff)
downloadsamba-1ee499385c1ea0b4add82d3d4513ea997d048af1.tar.gz
samba-1ee499385c1ea0b4add82d3d4513ea997d048af1.tar.bz2
samba-1ee499385c1ea0b4add82d3d4513ea997d048af1.zip
libsmb/smbdes.c: #ifdef'ed out code prior to removal.
rpc_client/cli_pipe.c: Inlined code removed from smbdes.c rpc_server/srv_samr.c: Fixed unused variable warning. rpc_server/srv_util.c: Inlined code removed from smbdes.c Luke - the above changes are the first part of the changes you and I discussed as being neccessary at the CIFS conference. *PLEASE REVIEW THESE CHANGES* - make sure I haven't broken any of the authenticated DCE/RPC code. smbd/nttrans.c: Fixed to allow NT5.0beta2 to use Samba shares with NT SMB support. smbd/open.c: Fixed mkdir when called from nttrans calls. smbd/server.c: Set correct size for strcpy of global_myworkgroup. Jeremy. (This used to be commit d891421d16ff80998dee429227bd391455f9d1a1)
Diffstat (limited to 'source3/smbd/open.c')
-rw-r--r--source3/smbd/open.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 311c494a97..a6e2953263 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -696,6 +696,7 @@ static int check_share_mode( share_mode_entry *share, int deny_mode,
/****************************************************************************
open a file with a share mode
****************************************************************************/
+
void open_file_shared(files_struct *fsp,connection_struct *conn,char *fname,int share_mode,int ofun,
mode_t mode,int oplock_request, int *Access,int *action)
{
@@ -714,6 +715,9 @@ void open_file_shared(files_struct *fsp,connection_struct *conn,char *fname,int
fsp->open = False;
fsp->fd_ptr = 0;
+ DEBUG(10,("open_file_shared: fname = %s, share_mode = %x, ofun = %x, mode = %o, oplock request = %d\n",
+ fname, share_mode, ofun, mode, oplock_request ));
+
/* this is for OS/2 EAs - try and say we don't support them */
if (strstr(fname,".+,;=[]."))
{
@@ -725,11 +729,14 @@ void open_file_shared(files_struct *fsp,connection_struct *conn,char *fname,int
unix_ERR_code = ERROR_EAS_NOT_SUPPORTED;
#endif /* OS2_WPS_FIX */
+ DEBUG(5,("open_file_shared: OS/2 EA's are not supported.\n"));
return;
}
if ((ofun & 0x3) == 0 && file_existed)
{
+ DEBUG(5,("open_file_shared: create new requested for file %s and file already exists.\n",
+ fname ));
errno = EEXIST;
return;
}
@@ -770,6 +777,8 @@ void open_file_shared(files_struct *fsp,connection_struct *conn,char *fname,int
{
if (!fcbopen)
{
+ DEBUG(5,("open_file_shared: read/write access requested for file %s on read only %s\n",
+ fname, !CAN_WRITE(conn) ? "share" : "file" ));
errno = EACCES;
return;
}
@@ -978,7 +987,7 @@ int open_directory(files_struct *fsp,connection_struct *conn,
* Create the directory.
*/
- if(dos_mkdir(fname, unixmode) < 0) {
+ if(dos_mkdir(fname, unix_mode(conn,aDIR)) < 0) {
DEBUG(0,("open_directory: unable to create %s. Error was %s\n",
fname, strerror(errno) ));
return -1;