From ad0a07c531fadd1639c5298951cfaf5cfe0cb10e Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 7 Jun 2011 11:44:43 +1000 Subject: s3-talloc Change TALLOC_ZERO_P() to talloc_zero() Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc. --- source3/rpc_client/cli_netlogon.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source3/rpc_client/cli_netlogon.c') diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c index bd3232d2cde..b5193585586 100644 --- a/source3/rpc_client/cli_netlogon.c +++ b/source3/rpc_client/cli_netlogon.c @@ -177,7 +177,7 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli, ZERO_STRUCT(ret_creds); - logon = TALLOC_ZERO_P(mem_ctx, union netr_LogonLevel); + logon = talloc_zero(mem_ctx, union netr_LogonLevel); if (!logon) { return NT_STATUS_NO_MEMORY; } @@ -200,7 +200,7 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli, struct samr_Password lmpassword; struct samr_Password ntpassword; - password_info = TALLOC_ZERO_P(mem_ctx, struct netr_PasswordInfo); + password_info = talloc_zero(mem_ctx, struct netr_PasswordInfo); if (!password_info) { return NT_STATUS_NO_MEMORY; } @@ -240,7 +240,7 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli, ZERO_STRUCT(lm); ZERO_STRUCT(nt); - network_info = TALLOC_ZERO_P(mem_ctx, struct netr_NetworkInfo); + network_info = talloc_zero(mem_ctx, struct netr_NetworkInfo); if (!network_info) { return NT_STATUS_NO_MEMORY; } @@ -388,12 +388,12 @@ NTSTATUS rpccli_netlogon_sam_network_logon(struct rpc_pipe_client *cli, ZERO_STRUCT(lm); ZERO_STRUCT(nt); - logon = TALLOC_ZERO_P(mem_ctx, union netr_LogonLevel); + logon = talloc_zero(mem_ctx, union netr_LogonLevel); if (!logon) { return NT_STATUS_NO_MEMORY; } - network_info = TALLOC_ZERO_P(mem_ctx, struct netr_NetworkInfo); + network_info = talloc_zero(mem_ctx, struct netr_NetworkInfo); if (!network_info) { return NT_STATUS_NO_MEMORY; } @@ -505,12 +505,12 @@ NTSTATUS rpccli_netlogon_sam_network_logon_ex(struct rpc_pipe_client *cli, ZERO_STRUCT(lm); ZERO_STRUCT(nt); - logon = TALLOC_ZERO_P(mem_ctx, union netr_LogonLevel); + logon = talloc_zero(mem_ctx, union netr_LogonLevel); if (!logon) { return NT_STATUS_NO_MEMORY; } - network_info = TALLOC_ZERO_P(mem_ctx, struct netr_NetworkInfo); + network_info = talloc_zero(mem_ctx, struct netr_NetworkInfo); if (!network_info) { return NT_STATUS_NO_MEMORY; } -- cgit From 74eed8f3ed5c333728350df1d23a4318e9104909 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 9 Jun 2011 15:31:03 +1000 Subject: s3-param Remove special case for global_myname(), rename to lp_netbios_name() There is no reason this can't be a normal constant string in the loadparm system, now that we have lp_set_cmdline() to handle overrides correctly. Andrew Bartlett --- source3/rpc_client/cli_netlogon.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/rpc_client/cli_netlogon.c') diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c index b5193585586..3c685fd9a7f 100644 --- a/source3/rpc_client/cli_netlogon.c +++ b/source3/rpc_client/cli_netlogon.c @@ -185,7 +185,7 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli, if (workstation) { fstr_sprintf( clnt_name_slash, "\\\\%s", workstation ); } else { - fstr_sprintf( clnt_name_slash, "\\\\%s", global_myname() ); + fstr_sprintf( clnt_name_slash, "\\\\%s", lp_netbios_name() ); } /* Initialise input parameters */ @@ -279,7 +279,7 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli, status = dcerpc_netr_LogonSamLogon(b, mem_ctx, cli->srv_name_slash, - global_myname(), + lp_netbios_name(), &clnt_creds, &ret_creds, logon_type, @@ -441,7 +441,7 @@ NTSTATUS rpccli_netlogon_sam_network_logon(struct rpc_pipe_client *cli, status = dcerpc_netr_LogonSamLogon(b, mem_ctx, server_name_slash, - global_myname(), + lp_netbios_name(), &clnt_creds, &ret_creds, NetlogonNetworkInformation, @@ -556,7 +556,7 @@ NTSTATUS rpccli_netlogon_sam_network_logon_ex(struct rpc_pipe_client *cli, status = dcerpc_netr_LogonSamLogonEx(b, mem_ctx, server_name_slash, - global_myname(), + lp_netbios_name(), NetlogonNetworkInformation, logon, validation_level, @@ -608,7 +608,7 @@ NTSTATUS rpccli_netlogon_set_trust_password(struct rpc_pipe_client *cli, result = rpccli_netlogon_setup_creds(cli, cli->desthost, /* server name */ lp_workgroup(), /* domain */ - global_myname(), /* client name */ + lp_netbios_name(), /* client name */ account_name, /* machine account name */ orig_trust_passwd_hash, sec_channel_type, -- cgit