From 942bfcd744262c7675accc2ffb5a042e832466f8 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Thu, 12 Oct 2006 13:35:07 +0000 Subject: [PATCH] Document S_IRWXU and permission bits for group/other. PR: docs/57153 MFC after: 3 days --- lib/libc/sys/stat.2 | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/libc/sys/stat.2 b/lib/libc/sys/stat.2 index f81462f0b24..6ecf370d6e4 100644 --- a/lib/libc/sys/stat.2 +++ b/lib/libc/sys/stat.2 @@ -32,7 +32,7 @@ .\" @(#)stat.2 8.4 (Berkeley) 5/1/95 .\" $FreeBSD$ .\" -.Dd November 15, 2004 +.Dd October 12, 2006 .Dt STAT 2 .Os .Sh NAME @@ -195,7 +195,7 @@ The status information word .Fa st_mode has the following bits: .Bd -literal -#define S_IFMT 0170000 /* type of file */ +#define S_IFMT 0170000 /* type of file mask */ #define S_IFIFO 0010000 /* named pipe (fifo) */ #define S_IFCHR 0020000 /* character special */ #define S_IFDIR 0040000 /* directory */ @@ -207,9 +207,18 @@ has the following bits: #define S_ISUID 0004000 /* set user id on execution */ #define S_ISGID 0002000 /* set group id on execution */ #define S_ISVTX 0001000 /* save swapped text even after use */ +#define S_IRWXU 0000700 /* RWX mask for owner */ #define S_IRUSR 0000400 /* read permission, owner */ #define S_IWUSR 0000200 /* write permission, owner */ #define S_IXUSR 0000100 /* execute/search permission, owner */ +#define S_IRWXG 0000070 /* RWX mask for group */ +#define S_IRGRP 0000040 /* read permission, group */ +#define S_IWGRP 0000020 /* write permission, group */ +#define S_IXGRP 0000010 /* execute/search permission, group */ +#define S_IRWXO 0000007 /* RWX mask for other */ +#define S_IROTH 0000004 /* read permission, other */ +#define S_IWOTH 0000002 /* write permission, other */ +#define S_IXOTH 0000001 /* execute/search permission, other */ .Ed .Pp For a list of access modes, see