diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libc/string/strmode.3 | 45 |
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 ) |
| 54 | into a symbolic string which is stored in the location referenced by | 54 | into a symbolic string which is stored in the location referenced by |
| 55 | .Fa bp . | 55 | .Fa bp . |
| 56 | This stored string is eleven characters in length plus a trailing | 56 | This stored string is eleven characters in length plus a trailing null byte. |
| 57 | .Dv NUL . | ||
| 58 | .Pp | 57 | .Pp |
| 59 | The first character is the inode type, and will be one of the following: | 58 | The 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 | |||
| 83 | characters each. | 82 | characters each. |
| 84 | The first three characters are the permissions for the owner of the | 83 | The first three characters are the permissions for the owner of the |
| 85 | file, the second three for the group the file belongs to, and the | 84 | file, the second three for the group the file belongs to, and the |
| 86 | third for the ``other'', or default, set of users. | 85 | third for the |
| 86 | .Dq other , | ||
| 87 | or default, set of users. | ||
| 87 | .Pp | 88 | .Pp |
| 88 | Permission checking is done as specifically as possible. | 89 | Permission checking is done as specifically as possible. |
| 89 | If read permission is denied to the owner of a file in the first set | 90 | If read permission is denied to the owner of a file in the first set |
| 90 | of permissions, the owner of the file will not be able to read the file. | 91 | of permissions, the owner of the file will not be able to read the file. |
| 91 | This is true even if the owner is in the file's group and the group | 92 | This is true even if the owner is in the file's group and the group |
| 92 | permissions allow reading or the ``other'' permissions allow reading. | 93 | permissions allow reading or the |
| 94 | .Dq other | ||
| 95 | permissions allow reading. | ||
| 93 | .Pp | 96 | .Pp |
| 94 | If the first character of the three character set is an ``r'', the file is | 97 | If the first character of the three character set is an |
| 95 | readable for that set of users; if a dash ``\-'', it is not readable. | 98 | .Sq r , |
| 99 | the file is readable for that set of users; if a dash | ||
| 100 | .Pq Ql - , | ||
| 101 | it is not readable. | ||
| 96 | .Pp | 102 | .Pp |
| 97 | If the second character of the three character set is a ``w'', the file is | 103 | If the second character of the three character set is a |
| 98 | writable for that set of users; if a dash ``\-'', it is not writable. | 104 | .Sq w , |
| 105 | the file is writable for that set of users; if a dash | ||
| 106 | .Pq Ql - , | ||
| 107 | it is not writable. | ||
| 99 | .Pp | 108 | .Pp |
| 100 | The third character is the first of the following characters that apply: | 109 | The 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 |
| 103 | If the character is part of the owner permissions and the file is not | 112 | If the character is part of the owner permissions and the file is not |
| 104 | executable or the directory is not searchable by the owner, and the | 113 | executable or the directory is not searchable by the owner, and the |
| 105 | set-user-id bit is set. | 114 | set-user-ID bit is set. |
| 106 | .It S | 115 | .It S |
| 107 | If the character is part of the group permissions and the file is not | 116 | If the character is part of the group permissions and the file is not |
| 108 | executable or the directory is not searchable by the group, and the | 117 | executable or the directory is not searchable by the group, and the |
| 109 | set-group-id bit is set. | 118 | set-group-ID bit is set. |
| 110 | .It T | 119 | .It T |
| 111 | If the character is part of the other permissions and the file is not | 120 | If the character is part of the other permissions and the file is not |
| 112 | executable or the directory is not searchable by others, and the ``sticky'' | 121 | executable or the directory is not searchable by others, and the |
| 122 | .Dq sticky | ||
| 113 | .Pq Dv S_ISVTX | 123 | .Pq Dv S_ISVTX |
| 114 | bit is set. | 124 | bit is set. |
| 115 | .It s | 125 | .It s |
| 116 | If the character is part of the owner permissions and the file is | 126 | If the character is part of the owner permissions and the file is |
| 117 | executable or the directory searchable by the owner, and the set-user-id | 127 | executable or the directory searchable by the owner, and the set-user-ID |
| 118 | bit is set. | 128 | bit is set. |
| 119 | .It s | 129 | .It s |
| 120 | If the character is part of the group permissions and the file is | 130 | If the character is part of the group permissions and the file is |
| 121 | executable or the directory searchable by the group, and the set-group-id | 131 | executable or the directory searchable by the group, and the set-group-ID |
| 122 | bit is set. | 132 | bit is set. |
| 123 | .It t | 133 | .It t |
| 124 | If the character is part of the other permissions and the file is | 134 | If the character is part of the other permissions and the file is |
| 125 | executable or the directory searchable by others, and the ``sticky'' | 135 | executable or the directory searchable by others, and the |
| 136 | .Dq sticky | ||
| 126 | .Pq Dv S_ISVTX | 137 | .Pq Dv S_ISVTX |
| 127 | bit is set. | 138 | bit is set. |
| 128 | .It x | 139 | .It x |
| @@ -131,7 +142,9 @@ The file is executable or the directory is searchable. | |||
| 131 | None of the above apply. | 142 | None of the above apply. |
| 132 | .El | 143 | .El |
| 133 | .Pp | 144 | .Pp |
| 134 | The last character is a plus sign ``+'' if there are any alternate | 145 | The last character is a plus sign |
| 146 | .Pq Ql + | ||
| 147 | if there are any alternate | ||
| 135 | or additional access control methods associated with the inode, otherwise | 148 | or additional access control methods associated with the inode, otherwise |
| 136 | it will be a space. | 149 | it will be a space. |
| 137 | .Sh RETURN VALUES | 150 | .Sh RETURN VALUES |
