summaryrefslogtreecommitdiffstats
path: root/usr.sbin/extattrctl/extattrctl.8
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2000-04-20 20:32:43 +0000
committerrwatson <rwatson@FreeBSD.org>2000-04-20 20:32:43 +0000
commit51d4afa1a6e67d4db34a9651496b097ff3e99402 (patch)
treecdadd3f09d40d74bab11a3374d5322b869a5377c /usr.sbin/extattrctl/extattrctl.8
parentbcd52d23a79386fd25fe196d96f8606bcf3c7063 (diff)
downloadFreeBSD-src-51d4afa1a6e67d4db34a9651496b097ff3e99402.zip
FreeBSD-src-51d4afa1a6e67d4db34a9651496b097ff3e99402.tar.gz
o Update extattrctl.8 to reflect new initattr -p, -r, and -w options.
o Update extattrctl.c to default new attributes to readable and writable only by the kernel and root user. Previously the default was to allow the file owner to directory view and manipulate the attributes, which is probably an inappropriate default.
Diffstat (limited to 'usr.sbin/extattrctl/extattrctl.8')
-rw-r--r--usr.sbin/extattrctl/extattrctl.841
1 files changed, 39 insertions, 2 deletions
diff --git a/usr.sbin/extattrctl/extattrctl.8 b/usr.sbin/extattrctl/extattrctl.8
index 71ef783..c71d938 100644
--- a/usr.sbin/extattrctl/extattrctl.8
+++ b/usr.sbin/extattrctl/extattrctl.8
@@ -71,12 +71,47 @@ option must have been enabled.
Stop extended attribute support on the file system named using
.Ar path .
Extended attribute support must previously have been started.
-.It Cm initattr Ar attrsize Ar attrfile
+.It Xo
+.Cm initattr
+.Op Fl p Ar path
+.Op Fl r Op Ar kroa
+.Op Fl w Op Ar kroa
+.Ar attrsize attrfile
+.Xc
Create and initialize a file to use as an attribute backing file.
You must specify a maximum per-inode size for the attribute in bytes in
.Ar attrsize ,
as well as the file where the attribute will be stored, using
.Ar attrfile .
+.Pp
+The
+.Fl p Ar path
+argument may be used to preallocate space for all attributes rather than
+relying on sparse files to conserve space.
+This has the advantage of guaranteeing that space will be available
+for attributes when they are written, preventing low disk space conditions
+from denying attribute service.
+.Pp
+The
+.Fl r
+and
+.Fl w
+options can be used to set the read and write permissions on the named
+attribute, respectively.
+There are four levels possible for both read and write:
+.Dq k
+limits reading or writing to the kernel,
+.Dq r
+limits activities to root,
+.Dq o
+limits activities to root and the owner of the file having the attribute
+read or written, and
+.Dq q
+allows any user to perform the attribute operation.
+The default is to limit activities to the root user, or
+.Dq r
+.
+.Pp
This file should not exist before running
.Cm initattr.
.It Cm enable Ar path Ar attrname Ar attrfile
@@ -108,7 +143,9 @@ Start extended attributes on the root file system.
.Dl extattrctl initattr 17 /.attribute/md5
.Pp
Create an attribute backing file in /.attribute/md5, and set the maximum
-size of each attribute to 17 bytes.
+size of each attribute to 17 bytes. Sparse files are used for storing the
+attributes, and the default permissions limiting access to the root user
+are implied.
.Pp
.Dl extattrctl enable / md5 /.attribute/md5
.Pp
OpenPOWER on IntegriCloud