summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraaron <>2000-02-29 03:45:12 +0000
committeraaron <>2000-02-29 03:45:12 +0000
commit6be216a1a89a8132724fa9e7369d5a2382b63459 (patch)
tree37f2df36ad54880e88e88ad65a8adb5a799e055c
parentb9c98bfda9ab7985dee6f0fbf6ce586a76ff8e01 (diff)
downloadopenbsd-6be216a1a89a8132724fa9e7369d5a2382b63459.tar.gz
openbsd-6be216a1a89a8132724fa9e7369d5a2382b63459.tar.bz2
openbsd-6be216a1a89a8132724fa9e7369d5a2382b63459.zip
Use Dq/Sq and friends.
-rw-r--r--src/lib/libc/string/strmode.345
1 files changed, 29 insertions, 16 deletions
diff --git a/src/lib/libc/string/strmode.3 b/src/lib/libc/string/strmode.3
index 3db953704d..3703a7adaf 100644
--- a/src/lib/libc/string/strmode.3
+++ b/src/lib/libc/string/strmode.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: strmode.3,v 1.6 1998/06/15 17:55:13 mickey Exp $ 1.\" $OpenBSD: strmode.3,v 1.7 2000/02/29 03:45:12 aaron Exp $
2.\" 2.\"
3.\" Copyright (c) 1990, 1991, 1993 3.\" Copyright (c) 1990, 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
@@ -53,8 +53,7 @@ converts a file
53.Xr stat 2 ) 53.Xr stat 2 )
54into a symbolic string which is stored in the location referenced by 54into a symbolic string which is stored in the location referenced by
55.Fa bp . 55.Fa bp .
56This stored string is eleven characters in length plus a trailing 56This stored string is eleven characters in length plus a trailing null byte.
57.Dv NUL .
58.Pp 57.Pp
59The first character is the inode type, and will be one of the following: 58The first character is the inode type, and will be one of the following:
60.Pp 59.Pp
@@ -83,46 +82,58 @@ The next nine characters encode three sets of permissions, in three
83characters each. 82characters each.
84The first three characters are the permissions for the owner of the 83The first three characters are the permissions for the owner of the
85file, the second three for the group the file belongs to, and the 84file, the second three for the group the file belongs to, and the
86third for the ``other'', or default, set of users. 85third for the
86.Dq other ,
87or default, set of users.
87.Pp 88.Pp
88Permission checking is done as specifically as possible. 89Permission checking is done as specifically as possible.
89If read permission is denied to the owner of a file in the first set 90If read permission is denied to the owner of a file in the first set
90of permissions, the owner of the file will not be able to read the file. 91of permissions, the owner of the file will not be able to read the file.
91This is true even if the owner is in the file's group and the group 92This is true even if the owner is in the file's group and the group
92permissions allow reading or the ``other'' permissions allow reading. 93permissions allow reading or the
94.Dq other
95permissions allow reading.
93.Pp 96.Pp
94If the first character of the three character set is an ``r'', the file is 97If the first character of the three character set is an
95readable for that set of users; if a dash ``\-'', it is not readable. 98.Sq r ,
99the file is readable for that set of users; if a dash
100.Pq Ql - ,
101it is not readable.
96.Pp 102.Pp
97If the second character of the three character set is a ``w'', the file is 103If the second character of the three character set is a
98writable for that set of users; if a dash ``\-'', it is not writable. 104.Sq w ,
105the file is writable for that set of users; if a dash
106.Pq Ql - ,
107it is not writable.
99.Pp 108.Pp
100The third character is the first of the following characters that apply: 109The third character is the first of the following characters that apply:
101.Bl -tag -width xxxx 110.Bl -tag -width xxxx
102.It S 111.It S
103If the character is part of the owner permissions and the file is not 112If the character is part of the owner permissions and the file is not
104executable or the directory is not searchable by the owner, and the 113executable or the directory is not searchable by the owner, and the
105set-user-id bit is set. 114set-user-ID bit is set.
106.It S 115.It S
107If the character is part of the group permissions and the file is not 116If the character is part of the group permissions and the file is not
108executable or the directory is not searchable by the group, and the 117executable or the directory is not searchable by the group, and the
109set-group-id bit is set. 118set-group-ID bit is set.
110.It T 119.It T
111If the character is part of the other permissions and the file is not 120If the character is part of the other permissions and the file is not
112executable or the directory is not searchable by others, and the ``sticky'' 121executable or the directory is not searchable by others, and the
122.Dq sticky
113.Pq Dv S_ISVTX 123.Pq Dv S_ISVTX
114bit is set. 124bit is set.
115.It s 125.It s
116If the character is part of the owner permissions and the file is 126If the character is part of the owner permissions and the file is
117executable or the directory searchable by the owner, and the set-user-id 127executable or the directory searchable by the owner, and the set-user-ID
118bit is set. 128bit is set.
119.It s 129.It s
120If the character is part of the group permissions and the file is 130If the character is part of the group permissions and the file is
121executable or the directory searchable by the group, and the set-group-id 131executable or the directory searchable by the group, and the set-group-ID
122bit is set. 132bit is set.
123.It t 133.It t
124If the character is part of the other permissions and the file is 134If the character is part of the other permissions and the file is
125executable or the directory searchable by others, and the ``sticky'' 135executable or the directory searchable by others, and the
136.Dq sticky
126.Pq Dv S_ISVTX 137.Pq Dv S_ISVTX
127bit is set. 138bit is set.
128.It x 139.It x
@@ -131,7 +142,9 @@ The file is executable or the directory is searchable.
131None of the above apply. 142None of the above apply.
132.El 143.El
133.Pp 144.Pp
134The last character is a plus sign ``+'' if there are any alternate 145The last character is a plus sign
146.Pq Ql +
147if there are any alternate
135or additional access control methods associated with the inode, otherwise 148or additional access control methods associated with the inode, otherwise
136it will be a space. 149it will be a space.
137.Sh RETURN VALUES 150.Sh RETURN VALUES