/*
* 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
*/
/*
*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <stdio.h>
#include <syslog.h>
#include <string.h>
#include <stdlib.h>
#include <nsswitch.h>
#include <netdb.h>
#include <errno.h>
#include <assert.h>
#include <rpcsvc/nfs_prot.h>
#include "automount.h"
/*
* Each name service is represented by a ns_info structure.
*/
struct ns_info {
};
};
void
{
}
}
static struct ns_info *
struct __nsw_lookup **curr_ns;
int curr_nserr;
{
/* __nsw_getconfig() is protected by a lock */
return (NULL);
}
}
/* first time */
else {
/* __NSW_ACTION is MT-Safe */
return (NULL);
}
return (nsp);
}
}
/*
* Note: if we get here then we've found
* an unsupported name service.
*/
}
return (NULL);
}
int
{
return (__NSW_SUCCESS);
}
if (ns_err == __NSW_SUCCESS)
return (__NSW_SUCCESS);
}
return (__NSW_UNAVAIL);
}
int
{
if (ns_err == __NSW_SUCCESS)
return (__NSW_SUCCESS);
}
return (__NSW_UNAVAIL);
}
int
{
stkptr);
if (ns_err == __NSW_SUCCESS)
return (__NSW_SUCCESS);
}
return (__NSW_UNAVAIL);
}
int
char *mapname;
int *error;
int *cache_time;
{
char *buffer, **p;
#ifdef lint
#endif
*error = 0;
if (trace > 1)
if (sethostent(1)) {
return (__NSW_UNAVAIL);
}
return (__NSW_UNAVAIL);
}
/*
* add canonical name
*/
goto done;
}
goto done; /* no aliases */
/*
* add alias only if different
* from canonical name
*/
goto done;
}
}
}
}
/*
* list of entries found
*/
*error = 0;
}
endhostent();
return (__NSW_SUCCESS);
}
/*
* enumerate all entries in the map in the various name services.
*/
int
char *mapname;
int *error;
int *cache_time;
{
int success = 0;
}
if (*error == 0) {
/*
* return success if listing was successful
* for at least one name service
*/
success++;
}
/*
* XXX force next name service
*/
if (ns_err != __NSW_UNAVAIL)
}
if (success) {
/*
* if succeeded at least once, return error=0
*/
*error = 0;
};
}