/*
* 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 (c) 1988-1997, by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <syslog.h>
#include <netconfig.h>
#include <netdir.h>
#include <tiuser.h>
#include <fcntl.h>
#include <string.h>
#include <locale.h>
extern int __rpc_negotiate_uid(int);
/*
* The highest level interface for server creation.
* Copied from svc_generic.c and cmd/keyserv/key_generic.c, but adapted
* to work only for TPI_CLTS semantics, and to be called only once
* from gssd.c. Returns 1 (interface created) on success and 0
* (no interfaces created) on failure.
*/
int
void (*dispatch) (); /* Dispatch function */
char *nettype; /* Networktype token */
char *servname; /* name of the service */
{
int num = 0;
void *net;
int fd;
gettext("svc_create: could not read netconfig database"));
return (0);
}
continue;
gettext("svc_create: %s: cannot open connection: %s"),
break;
}
/*
* Negotiate for returning the uid of the caller.
* This should be done before enabling the endpoint for
* service via t_bind() (called in svc_tli_create())
* so that requests to gssd contain the uid.
*/
if (__rpc_negotiate_uid(fd) != 0) {
gettext("Could not negotiate for"
" uid with loopback transport %s"),
break;
}
/* LINTED pointer alignment */
gettext("svc_create: t_alloc failed\n"));
break;
}
/* Copy the address */
} else {
gettext("svc_create: no well known "
"address for %s on %s\n"),
}
if (bind_addr)
gettext("svc_create: svc_tli_create failed\n"));
break;
} else {
== FALSE) {
gettext("svc_create: cannot"
" register %d vers %d on %s"),
break;
}
num = 1;
break;
}
}
return (num);
}