DEBUG(4,(" session request ok\n"));
- if (!cli_negprot(c)) {
- DEBUG(0,("protocol negotiation failed\n"));
+ status = cli_negprot(c);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("protocol negotiation failed: %s\n",
+ nt_errstr(status)));
cli_shutdown(c);
return NULL;
}
DEBUG(4,(" session setup ok\n"));
- if (!cli_send_tconX(c, share, "?????",
- password, strlen(password)+1)) {
- DEBUG(0,("tree connect failed: %s\n", cli_errstr(c)));
+ status = cli_tcon_andx(c, share, "?????", password,
+ strlen(password)+1);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0,("tree connect failed: %s\n", nt_errstr(status)));
cli_shutdown(c);
return NULL;
}
static void testpair(struct cli_state *cli, const char *mask, const char *file)
{
- int fnum;
+ uint16_t fnum;
fstring res1;
char *res2;
static int count;
fstrcpy(res1, "---");
- fnum = cli_open(cli, file, O_CREAT|O_TRUNC|O_RDWR, 0);
- if (fnum == -1) {
+ if (!NT_STATUS_IS_OK(cli_open(cli, file, O_CREAT|O_TRUNC|O_RDWR, 0, &fnum))) {
DEBUG(0,("Can't create %s\n", file));
return;
}
if (die_on_error) exit(1);
}
- cli_unlink(cli, file);
+ cli_unlink(cli, file, aSYSTEM | aHIDDEN);
if (count % 100 == 0) DEBUG(0,("%d\n", count));
SAFE_FREE(long_name);
cli_mkdir(cli, "\\masktest");
- cli_unlink(cli, "\\masktest\\*");
+ cli_unlink(cli, "\\masktest\\*", aSYSTEM | aHIDDEN);
if (argc >= 2) {
while (argc >= 2) {