From f791b443a5652a55861b62841266e316e95742ae Mon Sep 17 00:00:00 2001 From: Uri Simchoni Date: Tue, 26 Apr 2016 13:04:28 +0300 Subject: [PATCH] style fixes --- source3/smbd/smb2_setinfo.c | 9 +++------ source3/smbd/trans2.c | 19 ++++++++++--------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/source3/smbd/smb2_setinfo.c b/source3/smbd/smb2_setinfo.c index fcb98de..b5a6de1 100644 --- a/source3/smbd/smb2_setinfo.c +++ b/source3/smbd/smb2_setinfo.c @@ -532,14 +532,11 @@ static struct tevent_req *smbd_smb2_setinfo_send(TALLOC_CTX *mem_ctx, case 0x02:/* SMB2_SETINFO_FS */ { - uint16_t file_info_level; - char *data; - size_t data_size; + uint16_t file_info_level = in_file_info_class + 1000; + char *data = NULL; + size_t data_size = in_input_buffer.length; size_t ret_size = 0; - file_info_level = in_file_info_class + 1000; - data = NULL; - data_size = in_input_buffer.length; if (data_size > 0) { data = (char *)SMB_MALLOC_ARRAY(char, data_size); if (tevent_req_nomem(data, req)) { diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index fb268ce..064ea88 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -4006,22 +4006,22 @@ static NTSTATUS smb_set_fsquota(connection_struct *conn, /* access check */ if ((get_current_uid(conn) != 0) || !CAN_WRITE(conn)) { - DEBUG(0,("set_user_quota: access_denied service [%s] user [%s]\n", - lp_servicename(talloc_tos(), SNUM(conn)), - conn->session_info->unix_info->unix_name)); + DEBUG(3, ("set_fsquota: access_denied service [%s] user [%s]\n", + lp_servicename(talloc_tos(), SNUM(conn)), + conn->session_info->unix_info->unix_name)); return NT_STATUS_ACCESS_DENIED; } - /* note: normally there're 48 bytes, - * but we didn't use the last 6 bytes for now - * --metze - */ if (!check_fsp_ntquota_handle(conn, req, fsp)) { - DEBUG(3,("TRANSACT_GET_USER_QUOTA: no valid QUOTA HANDLE\n")); + DEBUG(1, ("set_fsquota: no valid QUOTA HANDLE\n")); return NT_STATUS_INVALID_HANDLE; } + /* note: normally there're 48 bytes, + * but we didn't use the last 6 bytes for now + * --metze + */ if (total_data < 42) { DEBUG(0,("set_fsquota: requires total_data(%u) >= 42 bytes!\n", (unsigned int)total_data)); @@ -4043,7 +4043,8 @@ static NTSTATUS smb_set_fsquota(connection_struct *conn, /* now set the quotas */ if (vfs_set_ntquota(fsp, SMB_USER_FS_QUOTA_TYPE, NULL, "as)!=0) { - DEBUG(0,("vfs_set_ntquota() failed for service [%s]\n",lp_servicename(talloc_tos(), SNUM(conn)))); + DEBUG(1, ("vfs_set_ntquota() failed for service [%s]\n", + lp_servicename(talloc_tos(), SNUM(conn)))); status = map_nt_error_from_unix(errno); } else { status = NT_STATUS_OK; -- 2.5.5