summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-10-19 22:42:28 +0200
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-19 15:54:23 -0500
commit23f6c371c992de211e10b7ae9cd46de3ec672143 (patch)
treefbfac2def7c998e89c37a791da5cad3432c4d344 /source3
parent13bf4c4bb7a0c2fa1495bacdc81c91ee70588ce6 (diff)
downloadsamba-23f6c371c992de211e10b7ae9cd46de3ec672143.tar.gz
samba-23f6c371c992de211e10b7ae9cd46de3ec672143.tar.bz2
samba-23f6c371c992de211e10b7ae9cd46de3ec672143.zip
Streamline logic, reducing the amount of indentation.
Michael (This used to be commit aae3d04e30a0e6f21f661da3dc6a2835d31ce964)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index 27bc807367..55c30c5315 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -2033,22 +2033,21 @@ WERROR _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC
}
nt_status = open_file_stat(conn, NULL, filename, &st, &fsp);
- if ( !NT_STATUS_IS_OK(nt_status)) {
- /* Perhaps it is a directory */
- if (NT_STATUS_EQUAL(nt_status, NT_STATUS_FILE_IS_A_DIRECTORY))
- nt_status = open_directory(conn, NULL, filename, &st,
- READ_CONTROL_ACCESS,
- FILE_SHARE_READ|FILE_SHARE_WRITE,
- FILE_OPEN,
- 0,
- FILE_ATTRIBUTE_DIRECTORY,
- NULL, &fsp);
-
- if (!NT_STATUS_IS_OK(nt_status)) {
- DEBUG(3,("_srv_net_file_query_secdesc: Unable to open file %s\n", filename));
- r_u->status = ntstatus_to_werror(nt_status);
- goto error_exit;
- }
+ /* Perhaps it is a directory */
+ if (NT_STATUS_EQUAL(nt_status, NT_STATUS_FILE_IS_A_DIRECTORY)) {
+ nt_status = open_directory(conn, NULL, filename, &st,
+ READ_CONTROL_ACCESS,
+ FILE_SHARE_READ|FILE_SHARE_WRITE,
+ FILE_OPEN,
+ 0,
+ FILE_ATTRIBUTE_DIRECTORY,
+ NULL, &fsp);
+ }
+
+ if (!NT_STATUS_IS_OK(nt_status)) {
+ DEBUG(3,("_srv_net_file_query_secdesc: Unable to open file %s\n", filename));
+ r_u->status = ntstatus_to_werror(nt_status);
+ goto error_exit;
}
sd_size = SMB_VFS_GET_NT_ACL(fsp, fsp->fsp_name, (OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION), &psd);