From 90177708aaf5bf17d689979701b5f0156b8a2fa4 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 29 Apr 1998 22:27:26 +0000 Subject: Makefile: Added files to smbpasswd.c. loadparm.c: Patch from tim@quiknet.com for static string problems. server.c: Setup global_myname. smbpass.c: Fix up locking. Add machine_password_delete() call. smbpasswd.c: Added provisional code to add to a domain. lib/rpc/client/cli_login.c: Fixed incorrect cred_hash3 call when setting machine password. lib/rpc/server/srv_netlog.c: Fixed incorrect cred_hash3 call when setting machine password. Jeremy. (This used to be commit 6a7164233e3bf9d6bb57c44a53204068e454ae5c) --- source3/smbd/server.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'source3/smbd') diff --git a/source3/smbd/server.c b/source3/smbd/server.c index ac18bb4038..83293a5787 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -26,6 +26,7 @@ pstring servicesf = CONFIGFILE; extern pstring debugf; extern pstring sesssetup_user; extern fstring global_myworkgroup; +extern pstring global_myname; char *InBuffer = NULL; char *OutBuffer = NULL; @@ -4942,6 +4943,21 @@ static void init_structs(void ) int i; get_myname(myhostname,NULL); + /* + * Set the machine NETBIOS name if not already + * set from the config file. + */ + + if (!*global_myname) + { + char *p; + fstrcpy( global_myname, myhostname ); + p = strchr( global_myname, '.' ); + if (p) + *p = 0; + } + strupper( global_myname ); + for (i=0;i