1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

There's no point in passing down a 0

(This used to be commit 525a6887af)
This commit is contained in:
Volker Lendecke 2007-12-05 15:34:07 +01:00
parent 195d6be38d
commit b2ca9253e9
2 changed files with 27 additions and 19 deletions

View File

@ -423,7 +423,6 @@ void reply_ntcreate_and_X(connection_struct *conn, struct smb_request *req)
SMB_BIG_UINT allocation_size;
/* Breakout the oplock request bits so we can set the
reply bits separately. */
int oplock_request = 0;
uint32 fattr=0;
SMB_OFF_T file_len = 0;
SMB_STRUCT_STAT sbuf;
@ -501,7 +500,7 @@ void reply_ntcreate_and_X(connection_struct *conn, struct smb_request *req)
status = create_file(conn, req, root_dir_fid, fname, flags,
access_mask, file_attributes, share_access,
create_disposition, create_options,
oplock_request, allocation_size, NULL, NULL,
allocation_size, NULL, NULL,
&fsp, &info, &oplock_granted, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
@ -812,7 +811,6 @@ static void call_nt_transact_create(connection_struct *conn,
char *params = *ppparams;
char *data = *ppdata;
/* Breakout the oplock request bits so we can set the reply bits separately. */
int oplock_request = 0;
uint32 fattr=0;
SMB_OFF_T file_len = 0;
SMB_STRUCT_STAT sbuf;
@ -946,7 +944,7 @@ static void call_nt_transact_create(connection_struct *conn,
status = create_file(conn, req, root_dir_fid, fname, flags,
access_mask, file_attributes, share_access,
create_disposition, create_options,
oplock_request, allocation_size, sd, ea_list,
allocation_size, sd, ea_list,
&fsp, &info, &oplock_granted, &sbuf);
if(!NT_STATUS_IS_OK(status)) {

View File

@ -2454,7 +2454,6 @@ NTSTATUS create_file(connection_struct *conn,
uint32_t share_access,
uint32_t create_disposition,
uint32_t create_options,
int oplock_request,
SMB_BIG_UINT allocation_size,
struct security_descriptor *sd,
struct ea_list *ea_list,
@ -2470,6 +2469,7 @@ NTSTATUS create_file(connection_struct *conn,
int info = FILE_WAS_OPENED;
files_struct *fsp = NULL;
uint8_t oplock_granted = NO_OPLOCK_RETURN;
int oplock_request;
NTSTATUS status;
DEBUG(10,("create_file: flags = 0x%x, access_mask = 0x%x "
@ -2619,18 +2619,22 @@ NTSTATUS create_file(connection_struct *conn,
? BATCH_OPLOCK : 0;
}
status = resolve_dfspath(
talloc_tos(), conn, req->flags2 & FLAGS2_DFS_PATHNAMES,
fname, &fname);
if (req == NULL) {
oplock_request |= INTERNAL_OPEN_ONLY;
}
if (!NT_STATUS_IS_OK(status)) {
/*
* For PATH_NOT_COVERED we had
* reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
* ERRSRV, ERRbadpath);
* Need to fix in callers
*/
goto fail;
if ((req != NULL) && (req->flags2 & FLAGS2_DFS_PATHNAMES)) {
status = resolve_dfspath(talloc_tos(), conn, true, fname, &fname);
if (!NT_STATUS_IS_OK(status)) {
/*
* For PATH_NOT_COVERED we had
* reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
* ERRSRV, ERRbadpath);
* Need to fix in callers
*/
goto fail;
}
}
/*
@ -2852,9 +2856,15 @@ NTSTATUS create_file(connection_struct *conn,
info, (int)oplock_granted));
*result = fsp;
*pinfo = info;
*poplock_granted = oplock_granted;
*psbuf = sbuf;
if (pinfo != NULL) {
*pinfo = info;
}
if (poplock_granted != NULL) {
*poplock_granted = oplock_granted;
}
if (psbuf != NULL) {
*psbuf = sbuf;
}
TALLOC_FREE(frame);
return NT_STATUS_OK;