summaryrefslogtreecommitdiff
path: root/source3/smbd/change_trust_pw.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-11-12 23:20:50 +0000
committerJeremy Allison <jra@samba.org>2002-11-12 23:20:50 +0000
commit2f194322d419350f35a48dff750066894d68eccf (patch)
treeb0501eaf874ca8e740a51a8e0f29d261e32e0093 /source3/smbd/change_trust_pw.c
parentf2b669b37fecda2687860eba4a15801dc89855dc (diff)
downloadsamba-2f194322d419350f35a48dff750066894d68eccf.tar.gz
samba-2f194322d419350f35a48dff750066894d68eccf.tar.bz2
samba-2f194322d419350f35a48dff750066894d68eccf.zip
Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy. (This used to be commit f755711df8f74f9b8e8c1a2b0d07d02a931eeb89)
Diffstat (limited to 'source3/smbd/change_trust_pw.c')
-rw-r--r--source3/smbd/change_trust_pw.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source3/smbd/change_trust_pw.c b/source3/smbd/change_trust_pw.c
index 7cb9084072..e4a7fbae6b 100644
--- a/source3/smbd/change_trust_pw.c
+++ b/source3/smbd/change_trust_pw.c
@@ -24,13 +24,11 @@
#include "includes.h"
-extern pstring global_myname;
-
/*********************************************************
Change the domain password on the PDC.
**********************************************************/
-static NTSTATUS modify_trust_password( char *domain, char *remote_machine,
+static NTSTATUS modify_trust_password( const char *domain, const char *remote_machine,
unsigned char orig_trust_passwd_hash[16])
{
struct cli_state *cli;
@@ -46,7 +44,7 @@ static NTSTATUS modify_trust_password( char *domain, char *remote_machine,
return NT_STATUS_UNSUCCESSFUL;
}
- if (!NT_STATUS_IS_OK(cli_full_connection(&cli, global_myname, remote_machine,
+ if (!NT_STATUS_IS_OK(cli_full_connection(&cli, global_myname(), remote_machine,
NULL, 0,
"IPC$", "IPC",
"", "",
@@ -82,7 +80,7 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(cli)));
Change the trust account password for a domain.
************************************************************************/
-NTSTATUS change_trust_account_password( char *domain, char *remote_machine_list)
+NTSTATUS change_trust_account_password( const char *domain, const char *remote_machine_list)
{
fstring remote_machine;
unsigned char old_trust_passwd_hash[16];
@@ -117,7 +115,7 @@ account password for domain %s.\n", domain));
* address used as a string.
*/
- if(!lookup_dc_name(global_myname, domain, &pdc_ip, dc_name))
+ if(!lookup_dc_name(global_myname(), domain, &pdc_ip, dc_name))
continue;
if(NT_STATUS_IS_OK(res = modify_trust_password( domain, dc_name,
old_trust_passwd_hash)))