diff options
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/util_sid.c | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/source4/lib/util_sid.c b/source4/lib/util_sid.c index 6f63e25c5d..5ce72a6f51 100644 --- a/source4/lib/util_sid.c +++ b/source4/lib/util_sid.c @@ -143,76 +143,6 @@ void generate_wellknown_sids(void) initialised = True; } -/************************************************************************** - Splits a name of format \DOMAIN\name or name into its two components. - Sets the DOMAIN name to lp_netbios_name() if it has not been specified. -***************************************************************************/ - -void split_domain_name(const char *fullname, char *domain, char *name) -{ - pstring full_name; - const char *sep; - char *p; - - sep = lp_winbind_separator(); - - *domain = *name = '\0'; - - if (fullname[0] == sep[0] || fullname[0] == '\\') - fullname++; - - pstrcpy(full_name, fullname); - p = strchr_m(full_name+1, '\\'); - if (!p) p = strchr_m(full_name+1, sep[0]); - - if (p != NULL) { - *p = 0; - fstrcpy(domain, full_name); - fstrcpy(name, p+1); - } else { - fstrcpy(domain, lp_netbios_name()); - fstrcpy(name, full_name); - } - - DEBUG(10,("split_domain_name:name '%s' split into domain :'%s' and user :'%s'\n", - fullname, domain, name)); -} - -/***************************************************************** - Convert a SID to an ascii string. -*****************************************************************/ - -char *sid_to_string(fstring sidstr_out, const struct dom_sid *sid) -{ - char *tmp_string; - TALLOC_CTX *mem_ctx; - if (!(mem_ctx = talloc_init("sid_to_string temp context"))) { - return NULL; - } - - tmp_string = dom_sid_string(mem_ctx, sid); - if (!tmp_string) - return NULL; - - fstrcpy(sidstr_out, tmp_string); - return sidstr_out; -} - -/***************************************************************** - Removes the last rid from the end of a sid -*****************************************************************/ - -BOOL sid_split_rid(struct dom_sid *sid, uint32 *rid) -{ - if (sid->num_auths > 0) { - sid->num_auths--; - if (rid) - *rid = sid->sub_auths[sid->num_auths]; - return True; - } - return False; -} - /***************************************************************** Return the last rid from the end of a sid *****************************************************************/ |