ucred.c revision d0fa49b78d1f40d84ec76c363cdc38cf128511dd
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include "lint.h"
#define _STRUCTURED_PROC 1
#include "priv_private.h"
#include <errno.h>
#include <priv.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <ucred.h>
#include <limits.h>
#include <fcntl.h>
#include <door.h>
#include <alloca.h>
#include <sys/sysmacros.h>
ucred_t *
_ucred_alloc(void)
{
ucred_t *r;
if (r != NULL)
return (r);
}
void
{
}
ucred_t *
{
uc = _ucred_alloc();
return (NULL);
ucred_free(uc);
return (NULL);
}
return (uc);
}
{
/* LINTED: alignment */
return ((uid_t)-1);
}
}
{
/* LINTED: alignment */
return ((uid_t)-1);
}
}
{
/* LINTED: alignment */
return ((uid_t)-1);
}
}
{
/* LINTED: alignment */
return ((gid_t)-1);
}
}
{
/* LINTED: alignment */
return ((gid_t)-1);
}
}
{
/* LINTED: alignment */
return ((gid_t)-1);
}
}
int
{
/* LINTED: alignment */
return (-1);
}
if (cr->pr_ngroups > 0)
else
return (cr->pr_ngroups);
}
const priv_set_t *
{
/* LINTED: alignment */
priv_data_t *d;
return (NULL);
}
LOADPRIVDATA(d);
return ((const priv_set_t *)
}
{
}
{
}
{
return (-1);
}
}
{
/* LINTED: alignment */
return (NULL);
}
return (slabel);
}
/*
* For now, assume single bit flags.
*/
{
/* LINTED: alignment */
char *x, *end;
return ((uint_t)-1);
}
while (x < end) {
/* LINTED: alignment */
switch (pi->priv_info_type) {
case PRIV_INFO_FLAGS:
/* LINTED: alignment */
pii = (priv_info_uint_t *)x;
}
/* Forward progress */
break;
x += pi->priv_info_size;
}
return ((uint_t)-1);
}
{
/* LINTED: alignment */
return (AU_NOAUDITID);
}
{
/* LINTED: alignment */
return ((au_asid_t)-1);
}
const au_tid64_addr_t *
{
/* LINTED: alignment */
return (NULL);
}
}
const au_mask_t *
{
/* LINTED: alignment */
return (NULL);
}
}
ucred_size(void)
{
priv_data_t *d;
LOADPRIVDATA(d);
return (d->pd_ucredsize);
}