summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1997-09-04 20:26:07 +0000
committerJeremy Allison <jra@samba.org>1997-09-04 20:26:07 +0000
commitf5302af621d91536a72b437ae2b80f9dedb46920 (patch)
tree7a72ab4e6d1a1cbff79ea9262b82b8e696203e6f /source3/lib/util.c
parent82290216ad827c9f8f74ffd3aa6a37dca28174e1 (diff)
downloadsamba-f5302af621d91536a72b437ae2b80f9dedb46920.tar.gz
samba-f5302af621d91536a72b437ae2b80f9dedb46920.tar.bz2
samba-f5302af621d91536a72b437ae2b80f9dedb46920.zip
Fixed up determination of client type for PROTOCOL_NT1. Uses client
capabilities bits in session_setup_and_X to decide. Made remote_arch an enum as well as a string, for easier use. Jeremy (jallison@whistle.com) (This used to be commit 99080705a2d0adcb25e1eecbe517a2fac2779baa)
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 3b4453dd5b..7f922def7e 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -68,6 +68,7 @@ BOOL case_mangle;
fstring remote_machine="";
fstring local_machine="";
fstring remote_arch="UNKNOWN";
+static enum remote_arch_types ra_type = RA_UNKNOWN;
fstring remote_proto="UNKNOWN";
pstring myhostname="";
pstring user_socket_options="";
@@ -3868,3 +3869,41 @@ BOOL is_myname(const char *s)
DEBUG(8, ("is_myname(\"%s\") returns %d\n", s, ret));
return(ret);
}
+
+/*******************************************************************
+set the horrid remote_arch string based on an enum.
+********************************************************************/
+void set_remote_arch(enum remote_arch_types type)
+{
+ ra_type = type;
+ switch( type )
+ {
+ case RA_WFWG:
+ strcpy(remote_arch, "WfWg");
+ return;
+ case RA_OS2:
+ strcpy(remote_arch, "OS2");
+ return;
+ case RA_WIN95:
+ strcpy(remote_arch, "Win95");
+ return;
+ case RA_WINNT:
+ strcpy(remote_arch, "WinNT");
+ return;
+ case RA_SAMBA:
+ strcpy(remote_arch,"Samba");
+ return;
+ default:
+ ra_type = RA_UNKNOWN;
+ strcpy(remote_arch, "UNKNOWN");
+ break;
+ }
+}
+
+/*******************************************************************
+ Get the remote_arch type.
+********************************************************************/
+enum remote_arch_types get_remote_arch()
+{
+ return ra_type;
+}