summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-05-17 16:25:26 +1000
committerStefan Metzmacher <metze@samba.org>2010-05-28 18:08:27 +0200
commit539ef13bfe950c7c512a4bdafd9a846c04ba5be4 (patch)
treea9f3f43930e4664dee57e8b5b4b5bfb88dd38893 /source3/lib/util.c
parent59422efca9734f7e4248f9c7df8b6b823f17999b (diff)
downloadsamba-539ef13bfe950c7c512a4bdafd9a846c04ba5be4.tar.gz
samba-539ef13bfe950c7c512a4bdafd9a846c04ba5be4.tar.bz2
samba-539ef13bfe950c7c512a4bdafd9a846c04ba5be4.zip
s3:lib split out global workgroup and netbios name functions.
Having these in their own file allows easier selective inclusion. Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c43
1 files changed, 1 insertions, 42 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 2339cfcc2a..88e4557d60 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -73,51 +73,11 @@ static enum remote_arch_types ra_type = RA_UNKNOWN;
Definitions for all names.
***********************************************************************/
-static char *smb_myname;
-static char *smb_myworkgroup;
static char *smb_scope;
static int smb_num_netbios_names;
static char **smb_my_netbios_names;
/***********************************************************************
- Allocate and set myname. Ensure upper case.
-***********************************************************************/
-
-bool set_global_myname(const char *myname)
-{
- SAFE_FREE(smb_myname);
- smb_myname = SMB_STRDUP(myname);
- if (!smb_myname)
- return False;
- strupper_m(smb_myname);
- return True;
-}
-
-const char *global_myname(void)
-{
- return smb_myname;
-}
-
-/***********************************************************************
- Allocate and set myworkgroup. Ensure upper case.
-***********************************************************************/
-
-bool set_global_myworkgroup(const char *myworkgroup)
-{
- SAFE_FREE(smb_myworkgroup);
- smb_myworkgroup = SMB_STRDUP(myworkgroup);
- if (!smb_myworkgroup)
- return False;
- strupper_m(smb_myworkgroup);
- return True;
-}
-
-const char *lp_workgroup(void)
-{
- return smb_myworkgroup;
-}
-
-/***********************************************************************
Allocate and set scope. Ensure upper case.
***********************************************************************/
@@ -184,8 +144,7 @@ static bool set_my_netbios_names(const char *name, int i)
void gfree_names(void)
{
- SAFE_FREE( smb_myname );
- SAFE_FREE( smb_myworkgroup );
+ gfree_netbios_names();
SAFE_FREE( smb_scope );
free_netbios_names_array();
free_local_machine_name();