From 97d96862ca84f599ee6fed0910389e07d46ee91d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 26 Feb 2002 05:45:33 +0000 Subject: This is a nasty hack to fix "xcopy /o" from win2000 on a Samba share The hack passes the true ntcreate desired_access down to open_file_shared1() from the ntcreatex function. This is used to determine if share modes should be used in denying this open. This hack will become unnecessary when we redo open.c to use the proper NTCreateX semantics rather than trying to jam the ntcreate semantics into openX semantics. (This used to be commit d09ae0c667a94fcf870c0fc7f97119266a650d45) --- source3/smbd/nttrans.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source3/smbd/nttrans.c') diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 694cfb92a3..501f0e9ab0 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -717,8 +717,11 @@ int reply_ntcreate_and_X(connection_struct *conn, * before issuing an oplock break request to * our client. JRA. */ - fsp = open_file_shared(conn,fname,&sbuf,smb_open_mode, - smb_ofun,unixmode, oplock_request,&rmode,&smb_action); + fsp = open_file_shared1(conn,fname,&sbuf, + desired_access, + smb_open_mode, + smb_ofun,unixmode, oplock_request, + &rmode,&smb_action); if (!fsp) { /* We cheat here. There are two cases we @@ -1213,7 +1216,8 @@ static int call_nt_transact_create(connection_struct *conn, * Ordinary file case. */ - fsp = open_file_shared(conn,fname,&sbuf,smb_open_mode,smb_ofun,unixmode, + fsp = open_file_shared1(conn,fname,&sbuf,desired_access, + smb_open_mode,smb_ofun,unixmode, oplock_request,&rmode,&smb_action); if (!fsp) { -- cgit