diff options
author | Jeremy Allison <jra@samba.org> | 2002-11-12 23:20:50 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-11-12 23:20:50 +0000 |
commit | 2f194322d419350f35a48dff750066894d68eccf (patch) | |
tree | b0501eaf874ca8e740a51a8e0f29d261e32e0093 /source3/lib/util_sid.c | |
parent | f2b669b37fecda2687860eba4a15801dc89855dc (diff) | |
download | samba-2f194322d419350f35a48dff750066894d68eccf.tar.gz samba-2f194322d419350f35a48dff750066894d68eccf.tar.bz2 samba-2f194322d419350f35a48dff750066894d68eccf.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 f755711df8f74f9b8e8c1a2b0d07d02a931eeb89)
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; |