KCC: docstring for kcc.graph.InternalEdge
[Samba.git] / source3 / torture / test_buffersize.c
blob217b1486efa5e65f3d670385017d0da0afe6cea3
1 /*
2 Unix SMB/CIFS implementation.
3 Test buffer sizes in cli_qpathinfo
4 Copyright (C) Volker Lendecke 2012
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #include "includes.h"
21 #include "torture/proto.h"
22 #include "libsmb/libsmb.h"
23 #include "libcli/security/dom_sid.h"
24 #include "libcli/security/secdesc.h"
25 #include "libcli/security/security.h"
26 #include "trans2.h"
27 #include "source3/libsmb/clirap.h"
29 bool run_qpathinfo_bufsize(int dummy)
31 struct cli_state *cli = NULL;
32 bool ret = false;
33 int i;
35 printf("Starting qpathinfo_bufsize\n");
37 if (!torture_open_connection(&cli, 0)) {
38 printf("torture_open_connection failed\n");
39 goto fail;
42 for (i=0; i<500; i++) {
43 uint8_t *rdata;
44 uint32_t num_rdata;
45 cli_qpathinfo(cli, cli, "\\", SMB_FILE_ALL_INFORMATION,
46 0, i, &rdata, &num_rdata);
49 ret = true;
50 fail:
51 if (cli != NULL) {
52 torture_close_connection(cli);
54 return ret;