source: trunk/server/source3/lib/util_names.c

Last change on this file was 745, checked in by Silvan Scherrer, 13 years ago

Samba Server: updated trunk to 3.6.0

File size: 2.4 KB
Line 
1/*
2 Unix SMB/CIFS implementation.
3 Samba utility functions
4 Copyright (C) Andrew Tridgell 1992-1998
5 Copyright (C) Jeremy Allison 2001-2007
6 Copyright (C) Simo Sorce 2001
7 Copyright (C) Jim McDonough <[email protected]> 2003
8 Copyright (C) James Peach 2006
9 Copyright (C) Andrew Bartlett 2010
10
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 3 of the License, or
14 (at your option) any later version.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program. If not, see <http://www.gnu.org/licenses/>.
23*/
24
25#include "includes.h"
26
27static char *smb_myname;
28static char *smb_myworkgroup;
29
30/***********************************************************************
31 Allocate and set myname. Ensure upper case.
32***********************************************************************/
33
34bool set_global_myname(const char *myname)
35{
36 SAFE_FREE(smb_myname);
37 smb_myname = SMB_STRDUP(myname);
38 if (!smb_myname)