diff options
author | Steve Dickson <steved@redhat.com> | 2009-12-01 07:16:13 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2010-01-13 15:39:14 -0500 |
commit | 3b777b084a438f55482c8bf7508903ff4c30e1db (patch) | |
tree | 579f61ea0d057e7f4a579d5d34b3168d6fb80659 /support | |
parent | 7f39d93b2cac65467999375e4a09bc5debb730e6 (diff) | |
download | nfs-utils-3b777b084a438f55482c8bf7508903ff4c30e1db.tar.gz nfs-utils-3b777b084a438f55482c8bf7508903ff4c30e1db.tar.xz nfs-utils-3b777b084a438f55482c8bf7508903ff4c30e1db.zip |
exports: NFSv4 pseudoroot support routines
Create v4root exports for each directory that is a parent of an explicit
export. Give each the minimal security required to traverse to any of
its children.
Signed-off-by: Steve Dickson <steved@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'support')
-rw-r--r-- | support/include/exportfs.h | 2 | ||||
-rw-r--r-- | support/include/v4root.h | 15 | ||||
-rw-r--r-- | support/nfs/exports.c | 2 |
3 files changed, 18 insertions, 1 deletions
diff --git a/support/include/exportfs.h b/support/include/exportfs.h index ce7eac0..470b2ec 100644 --- a/support/include/exportfs.h +++ b/support/include/exportfs.h @@ -99,6 +99,8 @@ int xtab_mount_write(void); int xtab_export_write(void); void xtab_append(nfs_export *); +int secinfo_addflavor(struct flav_info *, struct exportent *); + int rmtab_read(void); struct nfskey * key_lookup(char *hname); diff --git a/support/include/v4root.h b/support/include/v4root.h new file mode 100644 index 0000000..706c15c --- /dev/null +++ b/support/include/v4root.h @@ -0,0 +1,15 @@ +/* + * Copyright (C) 2009 Red Hat <nfs@redhat.com> + * support/include/v4root.h + * + * Support routines for dynamic pseudo roots. + * + */ + +#ifndef V4ROOT_H +#define V4ROOT_H + +extern int v4root_needed; +extern void v4root_set(void); + +#endif /* V4ROOT_H */ diff --git a/support/nfs/exports.c b/support/nfs/exports.c index ef31a85..50e83a8 100644 --- a/support/nfs/exports.c +++ b/support/nfs/exports.c @@ -385,7 +385,7 @@ static int valid_uuid(char *uuid) * do nothing if it's already there. Returns the index of flavor * in the resulting array in any case. */ -static int secinfo_addflavor(struct flav_info *flav, struct exportent *ep) +int secinfo_addflavor(struct flav_info *flav, struct exportent *ep) { struct sec_entry *p; |