-
Notifications
You must be signed in to change notification settings - Fork 5
/
attributes.openbsd
55 lines (43 loc) · 1.59 KB
/
attributes.openbsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# /etc/rawhide.conf.d/attributes (OpenBSD)
# See rh(1) and rawhide.conf(5) for more information.
/*
This file defines aliases for the built-in symbols for OpenBSD file
flags, and the related constants and predicates. See <sys/stat.h>.
*/
// Aliases for the OpenBSD file flags built-ins
flag { attr }
flags { attr }
attrs { attr }
attribute { attr }
attributes { attr }
project { 0 }
generation { 0 }
// Flag constants from <sys/stat.h>
# Super-user and owner changeable flags
UF_SETTABLE { 0x0000ffff } # mask of owner changeable flags
UF_NODUMP { 0x00000001 } # do not dump file
UF_IMMUTABLE { 0x00000002 } # file may not be changed
UF_APPEND { 0x00000004 } # writes to file may only append
UF_OPAQUE { 0x00000008 } # directory is opaque wrt. union
# Super-user changeable flags
SF_SETTABLE { 0xffff0000 } # mask of superuser changeable flags
SF_ARCHIVED { 0x00010000 } # file is archived
SF_IMMUTABLE { 0x00020000 } # file may not be changed
SF_APPEND { 0x00040000 } # writes to file may only append
// Flag predicates (canonical, aliases)
arch { attr & SF_ARCHIVED }
archived { attr & SF_ARCHIVED }
nodump { attr & UF_NODUMP }
opaque { attr & UF_OPAQUE }
sappnd { attr & SF_APPEND }
sappend { attr & SF_APPEND }
schg { attr & UF_IMMUTABLE }
schange { attr & UF_IMMUTABLE }
simmutable { attr & UF_IMMUTABLE }
uappnd { attr & UF_APPEND }
uappend { attr & UF_APPEND }
uchg { attr & SF_IMMUTABLE }
uchange { attr & SF_IMMUTABLE }
uimmutable { attr & SF_IMMUTABLE }
append { uappend | sappend }
immutable { uimmutable | simmutable }