overwrite... in cli_state_update_after_sesssetup
authorStefan Metzmacher <metze@samba.org>
Mon, 8 May 2017 13:27:21 +0000 (15:27 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 18 Feb 2019 11:47:34 +0000 (12:47 +0100)
source3/libsmb/cliconnect.c

index fcc8e0b67b8a0475ed51b43657e14e42cb543e51..04d689cd9cb473150b8284873eb079934a615e5e 100644 (file)
@@ -386,21 +386,21 @@ static NTSTATUS cli_state_update_after_sesssetup(struct cli_state *cli,
 {
 #define _VALID_STR(p) ((p) != NULL && (p)[0] != '\0')
 
-       if (!_VALID_STR(cli->server_os) && _VALID_STR(native_os)) {
+       if (_VALID_STR(native_os)) {
                cli->server_os = talloc_strdup(cli, native_os);
                if (cli->server_os == NULL) {
                        return NT_STATUS_NO_MEMORY;
                }
        }
 
-       if (!_VALID_STR(cli->server_type) && _VALID_STR(native_lm)) {
+       if (_VALID_STR(native_lm)) {
                cli->server_type = talloc_strdup(cli, native_lm);
                if (cli->server_type == NULL) {
                        return NT_STATUS_NO_MEMORY;
                }
        }
 
-       if (!_VALID_STR(cli->server_domain) && _VALID_STR(primary_domain)) {
+       if (_VALID_STR(primary_domain)) {
                cli->server_domain = talloc_strdup(cli, primary_domain);
                if (cli->server_domain == NULL) {
                        return NT_STATUS_NO_MEMORY;