s3:torture: avoid unused cli_set_username()
authorStefan Metzmacher <metze@samba.org>
Fri, 26 Sep 2014 01:13:28 +0000 (03:13 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 17 Oct 2014 10:57:07 +0000 (12:57 +0200)
Change-Id: Ia774b256093aff5f2b3338e7827e2d798fb06a96
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/torture/torture.c

index deb0e60a2f5b520754b787dd26e8ce715c5e4318..2cd63e113c8e5a5556a6dbca5d2f1014a1443f75 100644 (file)
@@ -411,12 +411,10 @@ bool torture_init_connection(struct cli_state **pcli)
 bool torture_cli_session_setup2(struct cli_state *cli, uint16 *new_vuid)
 {
        uint16_t old_vuid = cli_state_get_uid(cli);
-       fstring old_user_name;
        size_t passlen = strlen(password);
        NTSTATUS status;
        bool ret;
 
-       fstrcpy(old_user_name, cli->user_name);
        cli_state_set_uid(cli, 0);
        ret = NT_STATUS_IS_OK(cli_session_setup(cli, username,
                                                password, passlen,
@@ -424,10 +422,6 @@ bool torture_cli_session_setup2(struct cli_state *cli, uint16 *new_vuid)
                                                workgroup));
        *new_vuid = cli_state_get_uid(cli);
        cli_state_set_uid(cli, old_vuid);
-       status = cli_set_username(cli, old_user_name);
-       if (!NT_STATUS_IS_OK(status)) {
-               return false;
-       }
        return ret;
 }