45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk * CDDL HEADER START
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk * The contents of this file are subject to the terms of the
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk * Common Development and Distribution License (the "License").
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk * You may not use this file except in compliance with the License.
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk * See the License for the specific language governing permissions
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk * and limitations under the License.
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk * When distributing Covered Code, include this CDDL HEADER in each
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk * If applicable, add the following below this CDDL HEADER, with the
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk * fields enclosed by brackets "[]" replaced with your own identifying
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk * information: Portions Copyright [yyyy] [name of copyright owner]
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk * CDDL HEADER END
909c1a3310e6a348a85950c7179fefda50d0e37dton * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk * Use is subject to license terms.
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk * From "tsol_gettpent.c 7.13 00/10/13 SMI; TSOL 2.x"
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk#pragma ident "%Z%%M% %I% %E% SMI"
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpkextern void _nss_XbyY_fgets(FILE *, nss_XbyY_args_t *); /* from lib.c */
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpkstatic int tsol_tp_stayopen; /* Unsynchronized, but it affects only */
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk /* efficiency, not correctness */
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpkstatic void
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk NSS_XbyY_INIT(&arg, &result, buf, sizeof (buf), str_to_tpstr);
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk#endif /* DEBUG */
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk NSS_XbyY_INIT(&arg, &result, buf, sizeof (buf), str_to_tpstr);
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk /* No key, no stayopen */
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk arg.status = nss_getent(&db_root, _nss_initf_tsol_tp, &context, &arg);
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk#endif /* DEBUG */
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk NSS_XbyY_INIT(&arg, &result, buf, sizeof (buf), str_to_tpstr);
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk * Loop until we find a non-blank, non-comment line, or
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk * until EOF. No need to log blank lines, comments.
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk * This is the callback routine for nss. It just wraps the tsol_sgettpent
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpkstr_to_tpstr(const char *instr, int lenstr, void *entp, char *buffer,
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk "str_to_tpstr:\nstr - %s\n\ttemplate - %s\n\tattrs - %s\n",
45916cd2fec6e79bca5dee0421bd39e3c2910d1ejpk#endif /* DEBUG */