/*
* 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
*/
/*
*/
/*
* libidmap API custom functions for NFSv4
*
* These should probably be merged back into the common functions, but
* we need to get NFSv4 behavior correct for release with minimum risk
* to other components.
*/
#include "idmap_impl.h"
#include "idmap_cache.h"
#include "sidutil.h"
/*
* Get uid given SID.
*/
{
int direction;
return (IDMAP_ERR_NOMAPPING);
if (flag & IDMAP_REQ_FLG_USE_CACHE) {
if (rc == IDMAP_SUCCESS)
return (rc);
if (rc != IDMAP_ERR_NOMAPPING)
return (rc);
}
}
return (rc);
}
/*
* Get gid given SID.
*/
{
int is_user = 0;
int direction;
return (IDMAP_ERR_NOMAPPING);
if (flag & IDMAP_REQ_FLG_USE_CACHE) {
if (rc == IDMAP_SUCCESS)
return (rc);
if (rc != IDMAP_ERR_NOMAPPING)
return (rc);
}
}
return (rc);
}
/*
* Get winname given pid
*/
static idmap_retcode
{
int direction;
if (flag & IDMAP_REQ_FLG_USE_CACHE) {
if (is_user)
else
if (rc == IDMAP_SUCCESS)
goto out;
if (rc != IDMAP_ERR_NOMAPPING)
goto err;
}
/* Get mapping */
/* Return on error */
if (rc != IDMAP_SUCCESS)
goto err;
/*
* The given PID may have been mapped to a SID with no
* proper name@domain name. In those cases, we use the SID.
*/
goto err;
}
}
if (flag & IDMAP_REQ_FLG_USE_CACHE) {
if (is_user)
else
}
out:
} else {
goto err;
}
}
rc = IDMAP_SUCCESS;
err:
return (rc);
}
/*
* Get winname given uid
*/
{
}
/*
* Get winname given gid
*/
{
}