gssd_handle.c revision ebd1706e95186ddae1d4c0d63c47544cf33832ee
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Copyright (c) 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
* All Rights Reserved
*
* Portions of this source code were derived from Berkeley
* 4.3 BSD under license from the Regents of the University of
* California.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/* from kerbd_handle.c 1.3 92/01/29 SMI */
/*
* gssd_handle.c, Interface to gssd
*
*/
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <netconfig.h>
#include "gssd.h"
#ifdef DEBUG
#else
#endif /* DEBUG */
/*
* Keep the handle cached. This call may be made quite often.
*/
CLIENT *
{
void *localhandle;
struct utsname u;
static char *hostname;
if (clnt)
return (clnt);
if (!(localhandle = setnetconfig()))
return (NULL);
if (first_time == TRUE) {
if (uname(&u) == -1)
first_time = FALSE;
}
if (clnt) {
dprt("got COTS_ORD\n");
break;
}
} else {
}
}
}
/* Now, try the connection-oriented loopback transport */
#ifdef DEBUG
if (clnt) {
dprt("got COTS\n");
}
#endif /* DEBUG */
}
/*
* This bit of code uses an as yet unimplemented argument to
* clnt_control(). CLSET_SVC_PRIV specifies that the underlying
* loopback transport should be checked to ensure it is
* connected to a process running as root. If so, the clnt_control()
* call returns TRUE. If not, it returns FALSE.
*/
#ifdef CLSET_SVC_PRIV
return (NULL);
{
#endif
return (NULL);
return (NULL);
}
return (clnt);
}