summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-04-29 22:27:26 +0000
committerJeremy Allison <jra@samba.org>1998-04-29 22:27:26 +0000
commit90177708aaf5bf17d689979701b5f0156b8a2fa4 (patch)
treedcca0199c3d534976a204b8cd936109fbe5e69d8 /source3/smbd
parente305c2c9e2e657974d34d1d58a8f9372921fdae2 (diff)
downloadsamba-90177708aaf5bf17d689979701b5f0156b8a2fa4.tar.gz
samba-90177708aaf5bf17d689979701b5f0156b8a2fa4.tar.bz2
samba-90177708aaf5bf17d689979701b5f0156b8a2fa4.zip
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)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/server.c16
1 files changed, 16 insertions, 0 deletions
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<MAX_CONNECTIONS;i++)
{
Connections[i].open = False;