diff options
author | Jeremy Allison <jra@samba.org> | 2002-11-12 23:15:52 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-11-12 23:15:52 +0000 |
commit | 250c9801197ea1c949bd94c1c891f81ab118b130 (patch) | |
tree | 3a0ec79c71a010961d78726e223a70e1bc75c73f /source3/lib/util_sid.c | |
parent | 477025a6f628fd1a8d3bfacd30726e7a41819e50 (diff) | |
download | samba-250c9801197ea1c949bd94c1c891f81ab118b130.tar.gz samba-250c9801197ea1c949bd94c1c891f81ab118b130.tar.bz2 samba-250c9801197ea1c949bd94c1c891f81ab118b130.zip |
Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
(This used to be commit 82b8f749a36b42e22186297482aad2abb04fab8a)
Diffstat (limited to 'source3/lib/util_sid.c')
-rw-r--r-- | source3/lib/util_sid.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c index f0daf9787e..edd59ae109 100644 --- a/source3/lib/util_sid.c +++ b/source3/lib/util_sid.c @@ -24,9 +24,6 @@ #include "includes.h" -extern pstring global_myname; -extern fstring global_myworkgroup; - /* * Some useful sids */ @@ -178,7 +175,7 @@ NT_USER_TOKEN *get_system_token(void) /************************************************************************** Splits a name of format \DOMAIN\name or name into its two components. - Sets the DOMAIN name to global_myname if it has not been specified. + Sets the DOMAIN name to global_myname() if it has not been specified. ***************************************************************************/ void split_domain_name(const char *fullname, char *domain, char *name) @@ -202,7 +199,7 @@ void split_domain_name(const char *fullname, char *domain, char *name) fstrcpy(domain, full_name); fstrcpy(name, p+1); } else { - fstrcpy(domain, global_myname); + fstrcpy(domain, global_myname()); fstrcpy(name, full_name); } @@ -280,7 +277,8 @@ const char *sid_string_static(const DOM_SID *sid) BOOL string_to_sid(DOM_SID *sidout, const char *sidstr) { pstring tok; - char *p, *q; + char *q; + const char *p; /* BIG NOTE: this function only does SIDS where the identauth is not >= 2^32 */ uint32 ia; @@ -291,7 +289,7 @@ BOOL string_to_sid(DOM_SID *sidout, const char *sidstr) memset((char *)sidout, '\0', sizeof(DOM_SID)); - q = p = strdup(sidstr + 2); + p = q = strdup(sidstr + 2); if (p == NULL) { DEBUG(0, ("string_to_sid: out of memory!\n")); return False; |