mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
s3: smbd: SMB1 UNIX extensions - only allow size change on regular file.
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
parent
4b25299c0d
commit
d8567d46bd
@ -8301,14 +8301,16 @@ static NTSTATUS smb_set_file_unix_basic(connection_struct *conn,
|
||||
|
||||
/* Deal with any size changes. */
|
||||
|
||||
status = smb_set_file_size(conn, req,
|
||||
fsp,
|
||||
smb_fname,
|
||||
&sbuf,
|
||||
size,
|
||||
false);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
return status;
|
||||
if (S_ISREG(sbuf.st_ex_mode)) {
|
||||
status = smb_set_file_size(conn, req,
|
||||
fsp,
|
||||
smb_fname,
|
||||
&sbuf,
|
||||
size,
|
||||
false);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
/* Deal with any time changes. */
|
||||
|
Loading…
Reference in New Issue
Block a user