summaryrefslogtreecommitdiff
path: root/source4/torture/raw/setfileinfo.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-02-08 00:51:07 +0000
committerTim Potter <tpot@samba.org>2004-02-08 00:51:07 +0000
commit4639eb5a58f8c0906afdc8e8f8f67f82e9547f75 (patch)
tree2115d25166961cea7d49836d53a05e98c796ff8a /source4/torture/raw/setfileinfo.c
parentf0c9a54b30cfa627b4ddcbc24fe943b21472df34 (diff)
downloadsamba-4639eb5a58f8c0906afdc8e8f8f67f82e9547f75.tar.gz
samba-4639eb5a58f8c0906afdc8e8f8f67f82e9547f75.tar.bz2
samba-4639eb5a58f8c0906afdc8e8f8f67f82e9547f75.zip
Convert libcli routines to use cli_tree instead of cli_state. Port
smbtorture to use the new interface. Part 2 will be to eliminate cli_state from smbtorture as this is now the only place where it is used. (This used to be commit db1cc96af62ea42837d60592877fc3f93cef143b)
Diffstat (limited to 'source4/torture/raw/setfileinfo.c')
-rw-r--r--source4/torture/raw/setfileinfo.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/source4/torture/raw/setfileinfo.c b/source4/torture/raw/setfileinfo.c
index 9da75596c5..f82a63180a 100644
--- a/source4/torture/raw/setfileinfo.c
+++ b/source4/torture/raw/setfileinfo.c
@@ -55,22 +55,22 @@ BOOL torture_raw_sfileinfo(int dummy)
mem_ctx = talloc_init("torture_sfileinfo");
- cli_deltree(cli, BASEDIR);
- cli_mkdir(cli, BASEDIR);
+ cli_deltree(cli->tree, BASEDIR);
+ cli_mkdir(cli->tree, BASEDIR);
#define RECREATE_FILE(fname) do { \
- if (fnum != -1) cli_close(cli, fnum); \
+ if (fnum != -1) cli_close(cli->tree, fnum); \
fnum = create_complex_file(cli, mem_ctx, fname); \
if (fnum == -1) { \
printf("(%d) ERROR: open of %s failed (%s)\n", \
- __LINE__, fname, cli_errstr(cli)); \
+ __LINE__, fname, cli_errstr(cli->tree)); \
ret = False; \
goto done; \
}} while (0)
#define RECREATE_BOTH do { \
RECREATE_FILE(path_fname); \
- cli_close(cli, fnum); \
+ cli_close(cli->tree, fnum); \
RECREATE_FILE(fnum_fname); \
} while (0)
@@ -408,8 +408,8 @@ BOOL torture_raw_sfileinfo(int dummy)
CHECK_VALUE(MODE_INFORMATION, mode_information, mode, 0);
#if 1
printf("finally the rename_information level\n");
- cli_close(cli, create_complex_file(cli, mem_ctx, fnum_fname_new));
- cli_close(cli, create_complex_file(cli, mem_ctx, path_fname_new));
+ cli_close(cli->tree, create_complex_file(cli, mem_ctx, fnum_fname_new));
+ cli_close(cli->tree, create_complex_file(cli, mem_ctx, path_fname_new));
sfinfo.rename_information.in.overwrite = 0;
sfinfo.rename_information.in.root_fid = 0;
@@ -444,7 +444,7 @@ BOOL torture_raw_sfileinfo(int dummy)
printf("Trying rename with dest file open and delete_on_close\n");
CHECK_CALL_FNUM(RENAME_INFORMATION, NT_STATUS_ACCESS_DENIED);
- cli_close(cli, fnum2);
+ cli_close(cli->tree, fnum2);
CHECK_CALL_FNUM(RENAME_INFORMATION, NT_STATUS_OK);
CHECK_STR(NAME_INFO, name_info, fname.s, fnum_fname);
@@ -459,7 +459,7 @@ BOOL torture_raw_sfileinfo(int dummy)
sfinfo.rename_information.in.overwrite = 0;
CHECK_CALL_FNUM(RENAME_INFORMATION, NT_STATUS_OK);
CHECK_STR(NAME_INFO, name_info, fname.s, fnum_fname_new);
- cli_close(cli, fnum2);
+ cli_close(cli->tree, fnum2);
sfinfo.rename_information.in.new_name = fnum_fname+strlen(BASEDIR)+1;
sfinfo.rename_information.in.overwrite = 0;
@@ -499,12 +499,12 @@ BOOL torture_raw_sfileinfo(int dummy)
done:
smb_raw_exit(cli->session);
- cli_close(cli, fnum);
- if (!cli_unlink(cli, fnum_fname)) {
- printf("Failed to delete %s - %s\n", fnum_fname, cli_errstr(cli));
+ cli_close(cli->tree, fnum);
+ if (!cli_unlink(cli->tree, fnum_fname)) {
+ printf("Failed to delete %s - %s\n", fnum_fname, cli_errstr(cli->tree));
}
- if (!cli_unlink(cli, path_fname)) {
- printf("Failed to delete %s - %s\n", path_fname, cli_errstr(cli));
+ if (!cli_unlink(cli->tree, path_fname)) {
+ printf("Failed to delete %s - %s\n", path_fname, cli_errstr(cli->tree));
}
torture_close_connection(cli);
@@ -532,7 +532,7 @@ BOOL torture_raw_sfileinfo_bug(int dummy)
mem_ctx = talloc_init("torture_sfileinfo");
fnum = create_complex_file(cli, mem_ctx, fname);
- cli_close(cli, fnum);
+ cli_close(cli->tree, fnum);
sfinfo.generic.level = RAW_SFILEINFO_STANDARD;
sfinfo.generic.file.fname = fname;