The Samba-Bugzilla – Attachment 1910 Details for
Bug 3790
smbd ignores initial file size on TRANS2OPEN call
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Potential fix for the above problem
fix.diff (text/plain), 1.28 KB, created by
Marcel Müller
on 2006-05-19 10:49:39 UTC
(
hide
)
Description:
Potential fix for the above problem
Filename:
MIME Type:
Creator:
Marcel Müller
Created:
2006-05-19 10:49:39 UTC
Size:
1.28 KB
patch
obsolete
>Index: smbd/trans2.c >=================================================================== >--- smbd/trans2.c (revision 15718) >+++ smbd/trans2.c (working copy) >@@ -860,7 +860,26 @@ > return(ERROR_DOS(ERRDOS,ERRnoaccess)); > } > >- if (total_data && smb_action == FILE_WAS_CREATED) { >+ /* allocate space for the file if a size hint is supplied */ >+ if (smb_action != FILE_WAS_OPENED && open_size && (open_size > size)) /* in case of create or overwrite only */ >+ { >+ fsp->initial_allocation_size = smb_roundup(fsp->conn, open_size); >+ size = open_size; /* Adjust size here to return the right size in the reply. At least Windows does it that way. */ >+ >+ if (fsp->is_directory) { >+ close_file(fsp,False); >+ END_PROFILE(SMBntcreateX); >+ /* Can't set allocation size on a directory. */ >+ return ERROR_NT(NT_STATUS_ACCESS_DENIED); >+ } >+ if (vfs_allocate_file_space(fsp, fsp->initial_allocation_size) == -1) { >+ close_file(fsp,False); >+ return ERROR_NT(NT_STATUS_DISK_FULL); >+ } >+ } else >+ fsp->initial_allocation_size = smb_roundup(fsp->conn, (SMB_BIG_UINT)size); >+ >+ if (total_data && smb_action != FILE_WAS_OPENED) { /* in case of create or overwrite only */ > status = set_ea(conn, fsp, fname, ea_list); > talloc_destroy(ctx); > if (!NT_STATUS_IS_OK(status)) {
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 3790
:
1910
|
1911
|
1912