/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
* Copyright 2012 Milan Jurik. All rights reserved.
*/
#include <string.h>
#include <door.h>
#include "nscd_door.h"
#include "nscd_log.h"
#include <getxby_door.h>
#include <errno.h>
#include <fcntl.h>
static void
{
*doorfd);
if (*doorfd == -1) {
return;
}
/*
* we should close doorfd because we just opened it
*/
return;
}
}
/* general door call functions used by nscd */
static nss_status_t
{
void *dp;
} else {
(me, "output buffer not large enough "
" should be > %d but is %d\n",
}
ret = NSS_NSCD_PRIV;
}
}
return (ret);
}
{
void *dptr;
int ret;
/* allocate door buffer from the stack */
if (ret != NSS_SUCCESS) {
(me, "door call (%d) failed (status = %d, error = %s)\n",
}
return (ret);
}
{
void *uptr;
void *dptr;
void *datap;
int ret;
/* allocate door buffer from the stack */
if (ret != NSS_SUCCESS) {
(me, "door call (%d) failed (status = %d, error = %s)\n",
} else {
}
}
/* if new buffer allocated for this door call, free it */
return (ret);
}
{
void *uptr;
void *dptr;
void *datap;
/* allocate door buffer from the stack */
if (ret < 0) {
/*
* door call did not get through, return errno
* if requested
*/
}
(me, "door call (%d to %d) did not get through (%s)\n",
return (NSS_ERROR);
}
/*
* door call got through, check if operation failed.
* if so, return error info if requested
*/
if (ret != NSS_SUCCESS) {
}
(me, "door call (%d to %d) failed: p_status = %d, "
} else
/* if new buffer allocated for this door call, free it */
return (ret);
}
static void
{
int ret;
int doorfd;
int errnum;
if (NSCD_STATUS_IS_NOT_OK(phdr))
return;
if (ret < 0) {
(me, "door call (to fd %d) failed (%s)\n",
return;
}
(me, "no data\n");
}
}
{
void *uptr;
void *dptr;
void *datap;
/* allocate door buffer from the stack */
if (NSCD_STATUS_IS_NOT_OK(phdr_d)) {
(me, "door call (%d) failed (status = %d, error = %s)\n",
}
return (NSCD_GET_STATUS(phdr_d));
}