nfs_acl_srv.c revision 6764e83b0a0199b8aa37e222a7c92e92c1d44f90
/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <sys/pathname.h>
#include <sys/sysmacros.h>
#include <nfs/nfs_clnt.h>
/*
* These are the interface routines for the server side of the
* NFS ACL server. See the NFS ACL protocol specification
* for a description of this interface.
*/
/* ARGSUSED */
void
{
int error;
return;
}
/*
* If the underlying file system doesn't support
* aclent_t type acls, fabricate an acl. This is
* required in order to to support existing clients
* that require the call to VOP_GETSECATTR to
* succeed while making the assumption that all
* file systems support aclent_t type acls. This
* causes problems for servers exporting ZFS file
* systems because ZFS supports ace_t type acls,
* and fails (with ENOSYS) when asked for aclent_t
* type acls.
*
* Note: if the fs_fab_acl() fails, we have other problems.
* This error should be returned to the caller.
*/
}
if (error) {
return;
}
/* check for overflowed values */
if (!error) {
}
if (error) {
}
}
return;
}
}
}
}
}
}
void *
{
}
void
{
}
}
}
}
/* ARGSUSED */
void
{
int error;
return;
}
return;
}
if (error) {
return;
}
/* check for overflowed values */
if (!error) {
}
if (error) {
return;
}
}
void *
{
}
/* ARGSUSED */
void
{
int error;
return;
}
/* check for overflowed values */
if (!error) {
}
if (error) {
return;
}
}
void *
{
}
/* ARGSUSED */
void
{
int error;
int checkwriteperm;
return;
}
/*
* If the file system is exported read only, it is not appropriate
* to check write permissions for regular files and directories.
* Special files are interpreted by the client, so the underlying
* permissions are sent back to the client for interpretation.
*/
checkwriteperm = 0;
else
checkwriteperm = 1;
/*
* We need the mode so that we can correctly determine access
* permissions relative to a mandatory lock file. Access to
* mandatory lock files is denied on the server, so it might
* as well be reflected to the server during the open.
*/
if (error) {
return;
}
}
if (!error)
}
if (checkwriteperm &&
}
if (checkwriteperm &&
if (!error)
}
}
/* check for overflowed values */
if (!error) {
}
if (error) {
return;
}
}
void *
{
}
/* ARGSUSED */
void
{
int error;
int flags;
return;
}
else {
return;
}
}
}
}
if (!error) {
if (!error) {
if (!error)
}
}
if (error) {
return;
}
}
void *
{
}
/* ARGSUSED */
void
{
int error;
goto out;
}
#ifdef DEBUG
if (rfs3_do_post_op_attr) {
} else
#else
#endif
/*
* If the underlying file system doesn't support
* aclent_t type acls, fabricate an acl. This is
* required in order to to support existing clients
* that require the call to VOP_GETSECATTR to
* succeed while making the assumption that all
* file systems support aclent_t type acls. This
* causes problems for servers exporting ZFS file
* systems because ZFS supports ace_t type acls,
* and fails (with ENOSYS) when asked for aclent_t
* type acls.
*
* Note: if the fs_fab_acl() fails, we have other problems.
* This error should be returned to the caller.
*/
}
if (error)
goto out;
#ifdef DEBUG
if (rfs3_do_post_op_attr) {
} else
#else
#endif
}
}
}
}
return;
out:
} else
out1:
}
void *
{
}
void
{
}
}
}
}
/* ARGSUSED */
void
{
int error;
goto out1;
}
#ifdef DEBUG
if (rfs3_do_post_op_attr) {
} else
#else
#endif
goto out1;
}
#ifdef DEBUG
if (rfs3_do_post_op_attr) {
} else
#else
#endif
if (error)
goto out;
return;
out:
} else
out1:
}
}
void *
{
}
/* ARGSUSED */
void
{
int error;
int flags;
return;
}
else {
return;
}
}
}
}
if (!error) {
if (!error) {
}
}
if (error) {
return;
}
}
void *
{
}