From d73f8e58affd842cb11b1bba6cca0128182bfc96 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Mon, 23 Nov 1998 22:45:36 +0000 Subject: cvs being STUPID (This used to be commit 22802195ed544b6042d791b34e704d608bbdfd84) --- source3/groupdb/aliasfile.c | 51 +++------------------------------------------ 1 file changed, 3 insertions(+), 48 deletions(-) (limited to 'source3/groupdb/aliasfile.c') diff --git a/source3/groupdb/aliasfile.c b/source3/groupdb/aliasfile.c index 01166bcc1f..e73ff39e74 100644 --- a/source3/groupdb/aliasfile.c +++ b/source3/groupdb/aliasfile.c @@ -19,7 +19,7 @@ #include "includes.h" -#ifdef USE_SMBPASS_DB +#ifdef USE_SMBGROUP_DB static int al_file_lock_depth = 0; extern int DEBUGLEVEL; @@ -65,51 +65,6 @@ static BOOL setalsfilepwpos(void *vp, SMB_BIG_UINT tok) return setfilepwpos(vp, tok); } -static BOOL make_alias_line(char *p, int max_len, - LOCAL_GRP *als, - LOCAL_GRP_MEMBER **mem, int *num_mem) -{ - int i; - int len; - len = slprintf(p, max_len-1, "%s:%s:%d:", als->name, als->comment, als->rid); - - if (len == -1) - { - DEBUG(0,("make_alias_line: cannot create entry\n")); - return False; - } - - p += len; - max_len -= len; - - if (mem == NULL || num_mem == NULL) - { - return True; - } - - for (i = 0; i < (*num_mem); i++) - { - len = strlen((*mem)[i].name); - p = safe_strcpy(p, (*mem)[i].name, max_len); - - if (p == NULL) - { - DEBUG(0, ("make_alias_line: out of space for aliases!\n")); - return False; - } - - max_len -= len; - - if (i != (*num_mem)-1) - { - *p = ','; - p++; - max_len--; - } - } - - return True; -} /************************************************************************* Routine to return the next entry in the smbdomainalias list. @@ -136,11 +91,11 @@ static char *get_alias_members(char *p, int *num_mem, LOCAL_GRP_MEMBER **members { /* sid entered directly */ string_to_sid(&sid, name); - found = lookup_name(&sid, name, &type) == 0x0; + found = lookup_sid(&sid, name, &type) == 0x0; } else { - found = lookup_sid(name, &sid, &type) == 0x0; + found = lookup_name(name, &sid, &type) == 0x0; } if (!found) -- cgit