Fix bug #7669.
[metze/samba/wip.git] / source3 / libsmb / cliquota.c
index 1462aa7a6ab5ec3b3b9ffee14984b64504904c1d..2af5b22da5695c1e46f6bacba3aa5c473cce9256 100644 (file)
@@ -117,7 +117,9 @@ static bool parse_user_quota_record(const char *rdata, unsigned int rdata_count,
        }
 #endif /* LARGE_SMB_OFF_T */
 
-       sid_parse(rdata+40,sid_len,&qt.sid);
+       if (!sid_parse(rdata+40,sid_len,&qt.sid)) {
+               return false;
+       }
 
        qt.qtype = SMB_USER_QUOTA_TYPE;
 
@@ -150,7 +152,7 @@ bool cli_get_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUC
        SIVAL(params, 8,0x00000000);
        SIVAL(params,12,0x00000024);
 
-       sid_len = ndr_size_dom_sid(&pqt->sid, 0);
+       sid_len = ndr_size_dom_sid(&pqt->sid, NULL, 0);
        data_len = sid_len+8;
        SIVAL(data, 0, 0x00000000);
        SIVAL(data, 4, sid_len);
@@ -213,7 +215,7 @@ bool cli_set_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUC
 
        SSVAL(params,0,quota_fnum);
 
-       sid_len = ndr_size_dom_sid(&pqt->sid, 0);
+       sid_len = ndr_size_dom_sid(&pqt->sid, NULL, 0);
        SIVAL(data,0,0);
        SIVAL(data,4,sid_len);
        SBIG_UINT(data, 8,(uint64_t)0);