mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
Remove indentation around code wrapped by unneeded CAN_WRITE.
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
parent
0d88b37fc6
commit
a91aac4a5f
@ -705,6 +705,7 @@ int file_set_dosmode(connection_struct *conn, struct smb_filename *smb_fname,
|
|||||||
int ret = -1, lret = -1;
|
int ret = -1, lret = -1;
|
||||||
uint32_t old_mode;
|
uint32_t old_mode;
|
||||||
struct timespec new_create_timespec;
|
struct timespec new_create_timespec;
|
||||||
|
files_struct *fsp = NULL;
|
||||||
|
|
||||||
if (!CAN_WRITE(conn)) {
|
if (!CAN_WRITE(conn)) {
|
||||||
errno = EROFS;
|
errno = EROFS;
|
||||||
@ -855,14 +856,11 @@ int file_set_dosmode(connection_struct *conn, struct smb_filename *smb_fname,
|
|||||||
bits on a file. Just like file_ntimes below.
|
bits on a file. Just like file_ntimes below.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Check if we have write access. */
|
|
||||||
if (CAN_WRITE(conn)) {
|
|
||||||
/*
|
/*
|
||||||
* We need to open the file with write access whilst
|
* We need to open the file with write access whilst
|
||||||
* still in our current user context. This ensures we
|
* still in our current user context. This ensures we
|
||||||
* are not violating security in doing the fchmod.
|
* are not violating security in doing the fchmod.
|
||||||
*/
|
*/
|
||||||
files_struct *fsp;
|
|
||||||
if (!NT_STATUS_IS_OK(open_file_fchmod(conn, smb_fname,
|
if (!NT_STATUS_IS_OK(open_file_fchmod(conn, smb_fname,
|
||||||
&fsp)))
|
&fsp)))
|
||||||
return -1;
|
return -1;
|
||||||
@ -878,7 +876,6 @@ int file_set_dosmode(connection_struct *conn, struct smb_filename *smb_fname,
|
|||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
smb_fname->st.st_ex_mode = unixmode;
|
smb_fname->st.st_ex_mode = unixmode;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return( ret );
|
return( ret );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user