smbd/winbindd: Do an early check if ctdbd is functional
[Samba.git] / source3 / torture / test_buffersize.c
blob6e86374212517eacc1d6e860afdf46d155c6f7a3
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 NTSTATUS status, status2;
33 bool ret = false;
34 int i;
36 printf("Starting qpathinfo_bufsize\n");
38 if (!torture_open_connection(&cli, 0)) {
39 printf("torture_open_connection failed\n");
40 goto fail;
43 for (i=0; i<500; i++) {
44 uint8_t *rdata;
45 uint32_t num_rdata;
46 cli_qpathinfo(cli, cli, "\\", SMB_FILE_ALL_INFORMATION,
47 0, i, &rdata, &num_rdata);
50 ret = true;
51 fail:
52 if (cli != NULL) {
53 torture_close_connection(cli);
55 return ret;