mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s3:libsmb: add 'cli_state_client_guid'
This can be used by tests to use the same client guid for multiple connections. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
parent
89c6d67124
commit
44b3fa6ff8
@ -131,6 +131,8 @@ NTSTATUS cli_init_creds(struct cli_state *cli, const char *username, const char
|
||||
Set the signing state (used from the command line).
|
||||
****************************************************************************/
|
||||
|
||||
struct GUID cli_state_client_guid;
|
||||
|
||||
struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx,
|
||||
int fd,
|
||||
const char *remote_name,
|
||||
@ -144,7 +146,13 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx,
|
||||
bool use_level_II_oplocks = false;
|
||||
uint32_t smb1_capabilities = 0;
|
||||
uint32_t smb2_capabilities = 0;
|
||||
struct GUID client_guid = GUID_random();
|
||||
struct GUID client_guid;
|
||||
|
||||
if (!GUID_all_zero(&cli_state_client_guid)) {
|
||||
client_guid = cli_state_client_guid;
|
||||
} else {
|
||||
client_guid = GUID_random();
|
||||
}
|
||||
|
||||
/* Check the effective uid - make sure we are not setuid */
|
||||
if (is_setuid_root()) {
|
||||
|
@ -165,6 +165,7 @@ NTSTATUS cli_set_domain(struct cli_state *cli, const char *domain);
|
||||
NTSTATUS cli_set_username(struct cli_state *cli, const char *username);
|
||||
NTSTATUS cli_set_password(struct cli_state *cli, const char *password);
|
||||
NTSTATUS cli_init_creds(struct cli_state *cli, const char *username, const char *domain, const char *password);
|
||||
extern struct GUID cli_state_client_guid;
|
||||
struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx,
|
||||
int fd,
|
||||
const char *remote_name,
|
||||
|
Loading…
Reference in New Issue
Block a user