/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "files_common.h"
#include <string.h>
#include <libtsnet.h>
/*
* files/tsol_getrhent.c --
* "files" backend for nsswitch "tnrhdb" database
*/
static int
{
char prev;
int ipv6;
prev = '\0';
ipv6 = 1;
else
ipv6 = 0;
/*
* compare addr in
*
* 192.168.120.6:public
* fec0\:\:a00\:20ff\:fea0\:21f7:cipso
*
* ':' is the seperator.
*/
break;
keyp++;
linep++;
}
return (1);
return (0);
}
static void
int i, j;
for (i = 0, j = 0; in[i] != '\0'; i++) {
if (in[i] == ':') {
out[j++] = '\\';
} else
}
out[j] = '\0';
}
static nss_status_t
{
return (NSS_NOTFOUND);
/* IPV6 */
return (NSS_NOTFOUND);
/* save the key in original format */
/* Replace the key with escaped format */
} else {
/* IPV4 */
return (NSS_NOTFOUND);
}
/* restore argp->key.hostaddr.addr */
if (addr)
return (rc);
}
};
/* LINTED E_FUNC_ARG_UNUSED */
/* LINTED E_FUNC_ARG_UNUSED */
const char *dummy3)
{
return (_nss_files_constr(tsol_rh_ops,
}