diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-08-16 17:14:16 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:38:39 -0500 |
commit | b29915d6113264bdce243005d29a1af9a8b69bde (patch) | |
tree | 4eabcbaac1b16408df187f84a05da81a879dc803 /source3/torture | |
parent | 0be131725ff90e48d4f9696b80b35b740575fb2c (diff) | |
download | samba-b29915d6113264bdce243005d29a1af9a8b69bde.tar.gz samba-b29915d6113264bdce243005d29a1af9a8b69bde.tar.bz2 samba-b29915d6113264bdce243005d29a1af9a8b69bde.zip |
r17571: Change the return code of cli_session_setup from BOOL to NTSTATUS
Volker
(This used to be commit 94817a8ef53589011bc4ead4e17807a101acf5c9)
Diffstat (limited to 'source3/torture')
-rw-r--r-- | source3/torture/locktest.c | 10 | ||||
-rw-r--r-- | source3/torture/masktest.c | 8 | ||||
-rw-r--r-- | source3/torture/torture.c | 29 |
3 files changed, 26 insertions, 21 deletions
diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c index 3559a55a46..c3200ca038 100644 --- a/source3/torture/locktest.c +++ b/source3/torture/locktest.c @@ -220,10 +220,12 @@ static struct cli_state *connect_one(char *share, int snum) fstrcpy(username[1], username[0]); } - if (!cli_session_setup(c, username[snum], - password[snum], strlen(password[snum]), - password[snum], strlen(password[snum]), - lp_workgroup())) { + if (!NT_STATUS_IS_OK(cli_session_setup(c, username[snum], + password[snum], + strlen(password[snum]), + password[snum], + strlen(password[snum]), + lp_workgroup()))) { DEBUG(0,("session setup failed: %s\n", cli_errstr(c))); return NULL; } diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c index 44d26cdc5a..2ce59c86e6 100644 --- a/source3/torture/masktest.c +++ b/source3/torture/masktest.c @@ -216,10 +216,10 @@ struct cli_state *connect_one(char *share) } } - if (!cli_session_setup(c, username, - password, strlen(password), - password, strlen(password), - lp_workgroup())) { + if (!NT_STATUS_IS_OK(cli_session_setup(c, username, + password, strlen(password), + password, strlen(password), + lp_workgroup()))) { DEBUG(0,("session setup failed: %s\n", cli_errstr(c))); return NULL; } diff --git a/source3/torture/torture.c b/source3/torture/torture.c index 5876707d62..f951b44494 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -284,7 +284,10 @@ BOOL torture_cli_session_setup2(struct cli_state *cli, uint16 *new_vuid) fstrcpy(old_user_name, cli->user_name); cli->vuid = 0; - ret = cli_session_setup(cli, username, password, passlen, password, passlen, workgroup); + ret = NT_STATUS_IS_OK(cli_session_setup(cli, username, + password, passlen, + password, passlen, + workgroup)); *new_vuid = cli->vuid; cli->vuid = old_vuid; fstrcpy(cli->user_name, old_user_name); @@ -4682,8 +4685,8 @@ static BOOL run_error_map_extract(int dummy) { return False; } - if (!cli_session_setup(c_nt, "", "", 0, "", 0, - workgroup)) { + if (!NT_STATUS_IS_OK(cli_session_setup(c_nt, "", "", 0, "", 0, + workgroup))) { printf("%s rejected the NT-error initial session setup (%s)\n",host, cli_errstr(c_nt)); return False; } @@ -4703,8 +4706,8 @@ static BOOL run_error_map_extract(int dummy) { return False; } - if (!cli_session_setup(c_dos, "", "", 0, "", 0, - workgroup)) { + if (!NT_STATUS_IS_OK(cli_session_setup(c_dos, "", "", 0, "", 0, + workgroup))) { printf("%s rejected the DOS-error initial session setup (%s)\n",host, cli_errstr(c_dos)); return False; } @@ -4712,10 +4715,10 @@ static BOOL run_error_map_extract(int dummy) { for (error=(0xc0000000 | 0x1); error < (0xc0000000| 0xFFF); error++) { fstr_sprintf(user, "%X", error); - if (cli_session_setup(c_nt, user, - password, strlen(password), - password, strlen(password), - workgroup)) { + if (NT_STATUS_IS_OK(cli_session_setup(c_nt, user, + password, strlen(password), + password, strlen(password), + workgroup))) { printf("/** Session setup succeeded. This shouldn't happen...*/\n"); } @@ -4730,10 +4733,10 @@ static BOOL run_error_map_extract(int dummy) { nt_status = NT_STATUS(0xc0000000); } - if (cli_session_setup(c_dos, user, - password, strlen(password), - password, strlen(password), - workgroup)) { + if (NT_STATUS_IS_OK(cli_session_setup(c_dos, user, + password, strlen(password), + password, strlen(password), + workgroup))) { printf("/** Session setup succeeded. This shouldn't happen...*/\n"); } flgs2 = SVAL(c_dos->inbuf,smb_flg2), errnum; |