summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/nfs/rnode4.h
diff options
context:
space:
mode:
authorth199096 <none@none>2007-10-22 15:49:36 -0700
committerth199096 <none@none>2007-10-22 15:49:36 -0700
commitb9238976491622ad75a67ab0c12edf99e36212b9 (patch)
tree9b05921ffcef7973ffdbbb12b4e5b867fdaf70c1 /usr/src/uts/common/nfs/rnode4.h
parent90c85bf889e3af34323084f00e344a82f120b409 (diff)
downloadillumos-gate-b9238976491622ad75a67ab0c12edf99e36212b9.tar.gz
PSARC 2007/416 NFSv4 Mirror-mounts
PSARC 2007/563 Add _AT_TRIGGER to fstatat(2) 5035401 allow clients to cross server filesystem boundaries if the fs is visible 6613892 nftw(3C) has potential security issues
Diffstat (limited to 'usr/src/uts/common/nfs/rnode4.h')
-rw-r--r--usr/src/uts/common/nfs/rnode4.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/usr/src/uts/common/nfs/rnode4.h b/usr/src/uts/common/nfs/rnode4.h
index d65e1011c0..a07c2b5be0 100644
--- a/usr/src/uts/common/nfs/rnode4.h
+++ b/usr/src/uts/common/nfs/rnode4.h
@@ -2,9 +2,8 @@
* 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.
+ * 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
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -42,6 +41,11 @@ extern "C" {
#include <sys/thread.h>
#include <sys/sysmacros.h> /* for offsetof */
+typedef enum nfs4_stub_type {
+ NFS4_STUB_NONE,
+ NFS4_STUB_MIRRORMOUNT
+} nfs4_stub_type_t;
+
typedef enum nfs4_access_type {
NFS4_ACCESS_UNKNOWN,
NFS4_ACCESS_ALLOWED,
@@ -319,7 +323,9 @@ typedef struct rnode4 {
fattr4_fsid r_srv_fsid; /* fsid of srv fs containing object */
/* when rnode created; compare with */
/* sv_fsid (servinfo4_t) to see why */
- /* R4SRVSTUB was set */
+ /* stub type was set */
+ nfs4_stub_type_t r_stub_type;
+ /* e.g. mirror-mount */
} rnode4_t;
#define r_vnode r_svnode.sv_r_vnode
@@ -343,7 +349,6 @@ typedef struct rnode4 {
#define R4RECOVERR 0x2000 /* couldn't recover */
#define R4RECEXPFH 0x4000 /* recovering expired filehandle */
#define R4RECOVERRP 0x8000 /* R4RECOVERR pending, but not set (yet) */
-#define R4SRVSTUB 0x10000 /* server stub / fs mntpnt */
#define R4ISXATTR 0x20000 /* rnode is a named attribute */
#define R4DELMAPLIST 0x40000 /* delmap callers tracked for as callback */
#define R4PGFLUSH 0x80000 /* page flush thread active */
@@ -354,6 +359,9 @@ typedef struct rnode4 {
#define RTOV4(rp) ((rp)->r_vnode)
#define VTOR4(vp) ((rnode4_t *)((vp)->v_data))
+#define RP_ISSTUB(rp) (((rp)->r_stub_type != NFS4_STUB_NONE))
+#define RP_ISSTUB_MIRRORMOUNT(rp) ((rp)->r_stub_type == NFS4_STUB_MIRRORMOUNT)
+
/*
* Open file instances.
*/
@@ -474,6 +482,9 @@ extern void rddir4_cache_destroy(rnode4_t *);
extern rddir4_cache *rddir4_cache_lookup(rnode4_t *, offset_t, int);
extern void rddir4_cache_rele(rnode4_t *, rddir4_cache *);
+extern void r4_stub_mirrormount(rnode4_t *);
+extern void r4_stub_none(rnode4_t *);
+
#ifdef DEBUG
extern char *rddir4_cache_buf_alloc(size_t, int);
extern void rddir4_cache_buf_free(void *, size_t);