/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <synch.h>
#include <lber.h>
#include <ldap.h>
#include "fedfs_impl.h"
#include <syslog.h>
/*
* Return the number of fsn UUIDs provided in 'locations'.
* The caller should free this allocated memory with free_fsns().
*
* Return values: the number of FSNs in the array (may be zero),
* or -1 in the case of communications errors.
*/
int
{
char *a;
int n;
#ifdef DEBUG
int i;
#endif
char **entries;
/* Sanity */
return (-1);
/*
* Connect and bind to the directory anonymously
*/
#ifdef DEBUG
perror("list_fsns");
#endif
return (-1);
}
attribs[0] = "fedfsFsnUuid";
n = 0;
/*
* Perform search for a select set of attributes from above
*/
#ifdef DEBUG
"Warning: Unable to search the directory\n");
#endif
return (-1);
}
/*
* For each entry collect attributes and values
*/
e = ldap_next_entry(ld, e)) {
/* Walk FSL attributes */
#ifdef DEBUG
#endif
break;
#ifdef DEBUG
#endif
if ((strcasecmp("fedfsFsnUuid", a) == 0)) {
#ifdef DEBUG
#endif
continue;
entries[n] =
n++;
sizeof (char *) * (n + 1));
}
ldap_memfree(a);
}
}
(void) ldap_msgfree(result);
(void) ldap_unbind(ld);
#ifdef DEBUG
for (i = 0; i < n; i++) {
entries[i]);
}
#endif
return (n);
}
/*
* Free memory allocated by nsdb_lookup().
*/
void
{
int i;
return;
for (i = 0; i < n; i++)
}