home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: Tape Archive
(archive/tar).
You can browse this item here: aceslsts.tar
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Tape Archive (archive/tar)
| magic
| Supported |
100%
| file
| tar archive
| default
| |
99%
| file
| tar archive (V7), file access-lists/, mode 755 , uid 243 , gid 12 , size 0 , seconds 4402110407
| default
| |
98%
| file
| data
| default
| |
100%
| lsar
| Tar
| default
| |
100%
| gt2
| TAR Archiv gefunden (Auflistung ist deaktiviert)
| default
| |
100%
| disktype
| Pre-POSIX tar archive
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 61 63 63 65 73 73 2d 6c | 69 73 74 73 2f 00 00 00 |access-l|ists/...|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 20 20 37 | 35 35 20 00 20 20 20 32 |.... 7|55 . 2|
|00000070| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00000080| 20 20 20 20 20 20 30 20 | 20 34 34 30 32 31 31 30 | 0 | 4402110|
|00000090| 34 30 37 20 20 20 36 34 | 30 31 00 20 00 00 00 00 |407 64|01. ....|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 61 63 63 65 73 73 2d 6c | 69 73 74 73 2f 4d 61 6b |access-l|ists/Mak|
|00000210| 65 66 69 6c 65 00 00 00 | 00 00 00 00 00 00 00 00 |efile...|........|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00000270| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00000280| 20 20 20 31 30 34 36 20 | 20 34 34 30 32 31 31 30 | 1046 | 4402110|
|00000290| 33 35 32 20 20 31 30 31 | 32 36 00 20 00 00 00 00 |352 101|26. ....|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 43 46 4c 41 47 53 20 3d | 20 2d 4f 0a 41 4c 4c 20 |CFLAGS =| -O.ALL |
|00000410| 3d 20 65 64 61 63 6c 20 | 6c 73 61 63 6c 20 63 68 |= edacl |lsacl ch|
|00000420| 61 63 6c 20 63 70 61 63 | 6c 0a 42 49 4e 44 49 52 |acl cpac|l.BINDIR|
|00000430| 20 3d 20 2f 75 73 72 2f | 6c 6f 63 61 6c 0a 0a 23 | = /usr/|local..#|
|00000440| 20 2e 6c 20 28 6d 61 6e | 20 70 61 67 65 29 20 66 | .l (man| page) f|
|00000450| 69 6c 65 73 20 63 6f 6e | 66 75 73 65 20 6d 61 6b |iles con|fuse mak|
|00000460| 65 2c 20 77 68 69 63 68 | 20 74 68 69 6e 6b 73 20 |e, which| thinks |
|00000470| 74 68 65 79 20 61 72 65 | 20 6c 65 78 20 70 72 6f |they are| lex pro|
|00000480| 67 72 61 6d 73 0a 2e 53 | 55 46 46 49 58 45 53 20 |grams..S|UFFIXES |
|00000490| 3a 0a 2e 53 55 46 46 49 | 58 45 53 20 3a 20 2e 6f |:..SUFFI|XES : .o|
|000004a0| 75 74 20 2e 6f 20 2e 63 | 20 2e 65 20 2e 72 20 2e |ut .o .c| .e .r .|
|000004b0| 66 20 2e 79 20 2e 73 20 | 2e 70 0a 0a 61 6c 6c 20 |f .y .s |.p..all |
|000004c0| 3a 20 24 7b 41 4c 4c 7d | 0a 0a 65 64 61 63 6c 20 |: ${ALL}|..edacl |
|000004d0| 3a 0a 09 63 70 20 65 64 | 61 63 6c 2e 73 68 20 65 |:..cp ed|acl.sh e|
|000004e0| 64 61 63 6c 0a 0a 6c 73 | 61 63 6c 20 3a 20 6c 73 |dacl..ls|acl : ls|
|000004f0| 61 63 6c 2e 6f 0a 09 63 | 63 20 6c 73 61 63 6c 2e |acl.o..c|c lsacl.|
|00000500| 6f 20 2d 6f 20 6c 73 61 | 63 6c 0a 0a 63 68 61 63 |o -o lsa|cl..chac|
|00000510| 6c 20 3a 20 63 68 61 63 | 6c 2e 6f 0a 09 63 63 20 |l : chac|l.o..cc |
|00000520| 63 68 61 63 6c 2e 6f 20 | 2d 6f 20 63 68 61 63 6c |chacl.o |-o chacl|
|00000530| 0a 0a 63 70 61 63 6c 20 | 3a 20 63 70 61 63 6c 2e |..cpacl |: cpacl.|
|00000540| 6f 0a 09 63 63 20 63 70 | 61 63 6c 2e 6f 20 2d 6f |o..cc cp|acl.o -o|
|00000550| 20 63 70 61 63 6c 0a 0a | 63 6c 65 61 6e 20 3a 0a | cpacl..|clean :.|
|00000560| 09 72 6d 20 2d 66 20 2a | 2e 6f 20 63 6f 72 65 20 |.rm -f *|.o core |
|00000570| 61 2e 6f 75 74 20 24 7b | 41 4c 4c 7d 0a 0a 6d 61 |a.out ${|ALL}..ma|
|00000580| 6e 20 3a 0a 09 63 70 20 | 63 68 61 63 6c 2e 6c 20 |n :..cp |chacl.l |
|00000590| 63 70 61 63 6c 2e 6c 20 | 65 64 61 63 6c 2e 6c 20 |cpacl.l |edacl.l |
|000005a0| 6c 73 61 63 6c 2e 6c 20 | 2f 75 73 72 2f 6d 61 6e |lsacl.l |/usr/man|
|000005b0| 2f 6d 61 6e 6c 0a 09 63 | 70 20 67 65 74 61 63 6c |/manl..c|p getacl|
|000005c0| 2e 32 20 73 65 74 61 63 | 6c 2e 32 20 2f 75 73 72 |.2 setac|l.2 /usr|
|000005d0| 2f 6d 61 6e 2f 6d 61 6e | 32 0a 0a 69 6e 73 74 61 |/man/man|2..insta|
|000005e0| 6c 6c 20 3a 20 24 7b 41 | 4c 4c 7d 0a 09 66 6f 72 |ll : ${A|LL}..for|
|000005f0| 20 69 20 69 6e 20 24 7b | 41 4c 4c 7d 20 3b 20 64 | i in ${|ALL} ; d|
|00000600| 6f 20 69 6e 73 74 61 6c | 6c 20 2d 6d 20 37 35 35 |o instal|l -m 755|
|00000610| 20 24 24 69 20 24 7b 42 | 49 4e 44 49 52 7d 20 3b | $$i ${B|INDIR} ;|
|00000620| 20 64 6f 6e 65 0a 00 00 | 00 00 00 00 00 00 00 00 | done...|........|
|00000630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000670| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000680| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000690| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000700| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000720| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000800| 61 63 63 65 73 73 2d 6c | 69 73 74 73 2f 52 45 41 |access-l|ists/REA|
|00000810| 44 4d 45 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |DME.....|........|
|00000820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000860| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00000870| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00000880| 20 20 20 32 34 30 33 20 | 20 34 34 30 32 31 31 30 | 2403 | 4402110|
|00000890| 33 35 33 20 20 20 37 33 | 34 35 00 20 00 00 00 00 |353 73|45. ....|
|000008a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000900| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a00| 54 68 69 73 20 73 68 6f | 75 6c 64 20 65 78 70 6c |This sho|uld expl|
|00000a10| 61 69 6e 20 68 6f 77 20 | 74 6f 20 69 6e 73 74 61 |ain how |to insta|
|00000a20| 6c 6c 20 74 68 65 20 6d | 6f 64 73 20 66 6f 72 20 |ll the m|ods for |
|00000a30| 61 63 63 65 73 73 20 63 | 6f 6e 74 72 6f 6c 20 6c |access c|ontrol l|
|00000a40| 69 73 74 73 2e 0a 49 20 | 61 6d 20 77 72 69 74 69 |ists..I |am writi|
|00000a50| 6e 67 20 74 68 69 73 20 | 61 66 74 65 72 20 74 68 |ng this |after th|
|00000a60| 65 20 66 61 63 74 2c 20 | 74 68 6f 75 67 68 2c 20 |e fact, |though, |
|00000a70| 73 6f 20 69 66 20 49 20 | 68 61 76 65 20 66 6f 72 |so if I |have for|
|00000a80| 67 6f 74 74 65 6e 20 61 | 6e 79 74 68 69 6e 67 2c |gotten a|nything,|
|00000a90| 0a 6c 65 74 20 6d 65 20 | 6b 6e 6f 77 2e 0a 0a 30 |.let me |know...0|
|00000aa0| 29 20 61 66 74 65 72 20 | 75 6e 70 61 63 6b 69 6e |) after |unpackin|
|00000ab0| 67 2c 20 79 6f 75 20 73 | 68 6f 75 6c 64 20 68 61 |g, you s|hould ha|
|00000ac0| 76 65 20 74 68 65 20 66 | 69 6c 65 73 0a 0a 09 52 |ve the f|iles...R|
|00000ad0| 45 41 44 4d 45 09 09 52 | 45 41 44 4d 45 2e 6b 65 |EADME..R|EADME.ke|
|00000ae0| 72 6e 65 6c 0a 09 68 2e | 70 61 74 09 09 73 79 73 |rnel..h.|pat..sys|
|00000af0| 2e 70 61 74 0a 09 61 63 | 6c 2e 68 09 09 61 63 6c |.pat..ac|l.h..acl|
|00000b00| 2e 63 0a 09 67 65 74 61 | 63 6c 2e 32 09 73 65 74 |.c..geta|cl.2.set|
|00000b10| 61 63 6c 2e 32 0a 09 6c | 6f 67 69 6e 2e 70 61 74 |acl.2..l|ogin.pat|
|00000b20| 0a 0a 09 4d 61 6b 65 66 | 69 6c 65 09 6a 6a 67 2e |...Makef|ile.jjg.|
|00000b30| 68 0a 09 63 68 61 63 6c | 2e 63 09 09 63 68 61 63 |h..chacl|.c..chac|
|00000b40| 6c 2e 6c 0a 09 63 70 61 | 63 6c 2e 63 09 09 63 70 |l.l..cpa|cl.c..cp|
|00000b50| 61 63 6c 2e 6c 0a 09 65 | 64 61 63 6c 2e 73 68 09 |acl.l..e|dacl.sh.|
|00000b60| 65 64 61 63 6c 2e 6c 0a | 09 6c 73 61 63 6c 2e 63 |edacl.l.|.lsacl.c|
|00000b70| 09 09 6c 73 61 63 6c 2e | 6c 0a 0a 31 29 20 68 2e |..lsacl.|l..1) h.|
|00000b80| 70 61 74 20 61 6e 64 20 | 73 79 73 2e 70 61 74 20 |pat and |sys.pat |
|00000b90| 61 72 65 20 70 61 74 63 | 68 65 73 20 74 6f 20 66 |are patc|hes to f|
|00000ba0| 69 6c 65 73 20 69 6e 20 | 74 68 65 20 2f 73 79 73 |iles in |the /sys|
|00000bb0| 2f 68 20 61 6e 64 20 2f | 73 79 73 2f 73 79 73 0a |/h and /|sys/sys.|
|00000bc0| 20 20 20 64 69 72 65 63 | 74 6f 72 69 65 73 2e 20 | direc|tories. |
|00000bd0| 20 69 66 20 79 6f 75 20 | 68 61 76 65 20 74 68 65 | if you |have the|
|00000be0| 20 70 61 74 63 68 20 70 | 72 6f 67 72 61 6d 2c 20 | patch p|rogram, |
|00000bf0| 74 68 65 6e 0a 0a 09 28 | 20 63 64 20 2f 73 79 73 |then...(| cd /sys|
|00000c00| 2f 68 20 3b 20 70 61 74 | 63 68 20 29 20 3c 20 68 |/h ; pat|ch ) < h|
|00000c10| 2e 70 61 74 0a 09 28 20 | 63 64 20 2f 73 79 73 2f |.pat..( |cd /sys/|
|00000c20| 73 79 73 20 3b 20 70 61 | 74 63 68 20 29 20 3c 20 |sys ; pa|tch ) < |
|00000c30| 73 79 73 2e 70 61 74 0a | 0a 20 20 20 6f 74 68 65 |sys.pat.|. othe|
|00000c40| 72 77 69 73 65 20 79 6f | 75 20 77 69 6c 6c 20 68 |rwise yo|u will h|
|00000c50| 61 76 65 20 74 6f 20 61 | 70 70 6c 79 20 74 68 65 |ave to a|pply the|
|00000c60| 20 70 61 74 63 68 65 73 | 20 74 6f 20 74 68 65 20 | patches| to the |
|00000c70| 66 69 6c 65 73 20 62 79 | 20 68 61 6e 64 2e 0a 0a |files by| hand...|
|00000c80| 32 29 20 69 6e 73 74 61 | 6c 6c 20 74 68 65 20 66 |2) insta|ll the f|
|00000c90| 69 6c 65 73 20 61 63 6c | 2e 68 20 61 6e 64 20 61 |iles acl|.h and a|
|00000ca0| 63 6c 2e 63 20 69 6e 20 | 2f 73 79 73 2f 68 20 61 |cl.c in |/sys/h a|
|00000cb0| 6e 64 20 2f 73 79 73 2f | 73 79 73 20 2c 20 72 65 |nd /sys/|sys , re|
|00000cc0| 73 70 65 63 74 69 76 65 | 6c 79 2e 0a 0a 33 29 20 |spective|ly...3) |
|00000cd0| 6d 61 6b 65 20 61 6e 64 | 20 69 6e 73 74 61 6c 6c |make and| install|
|00000ce0| 20 74 68 65 20 6e 65 77 | 20 6b 65 72 6e 65 6c 2e | the new| kernel.|
|00000cf0| 20 20 62 72 69 65 66 20 | 69 6e 73 74 72 75 63 74 | brief |instruct|
|00000d00| 69 6f 6e 73 20 61 72 65 | 20 69 6e 20 52 45 41 44 |ions are| in READ|
|00000d10| 4d 45 2e 6b 65 72 6e 65 | 6c 20 2e 0a 0a 34 29 20 |ME.kerne|l ...4) |
|00000d20| 65 64 69 74 20 74 68 65 | 20 4d 61 6b 65 66 69 6c |edit the| Makefil|
|00000d30| 65 20 61 6e 64 20 63 68 | 61 6e 67 65 20 42 49 4e |e and ch|ange BIN|
|00000d40| 44 49 52 20 74 6f 20 77 | 68 61 74 65 76 65 72 2e |DIR to w|hatever.|
|00000d50| 20 20 74 68 65 6e 20 22 | 6d 61 6b 65 20 69 6e 73 | then "|make ins|
|00000d60| 74 61 6c 6c 22 0a 20 20 | 20 74 6f 20 67 65 74 20 |tall". | to get |
|00000d70| 74 68 65 20 70 72 6f 67 | 72 61 6d 73 20 63 68 61 |the prog|rams cha|
|00000d80| 63 6c 20 63 70 61 63 6c | 20 65 64 61 63 6c 20 6c |cl cpacl| edacl l|
|00000d90| 73 61 63 6c 20 2e 0a 0a | 35 29 20 6c 6f 67 69 6e |sacl ...|5) login|
|00000da0| 2e 70 61 74 20 69 73 20 | 61 20 70 61 74 63 68 20 |.pat is |a patch |
|00000db0| 74 6f 20 2f 75 73 72 2f | 73 72 63 2f 62 69 6e 2f |to /usr/|src/bin/|
|00000dc0| 6c 6f 67 69 6e 2e 63 20 | 2c 20 74 6f 20 6d 61 6b |login.c |, to mak|
|00000dd0| 65 20 6c 6f 67 69 6e 20 | 63 6c 65 61 72 0a 20 20 |e login |clear. |
|00000de0| 20 74 68 65 20 61 63 6c | 20 6f 6e 20 74 68 65 20 | the acl| on the |
|00000df0| 75 73 65 72 27 73 20 74 | 65 72 6d 69 6e 61 6c 2e |user's t|erminal.|
|00000e00| 20 20 70 61 74 63 68 2c | 20 6d 61 6b 65 2c 20 61 | patch,| make, a|
|00000e10| 6e 64 20 69 6e 73 74 61 | 6c 6c 20 6c 6f 67 69 6e |nd insta|ll login|
|00000e20| 20 2e 0a 0a 36 29 20 69 | 6e 73 74 61 6c 6c 20 74 | ...6) i|nstall t|
|00000e30| 68 65 20 6d 61 6e 20 70 | 61 67 65 73 3b 20 20 22 |he man p|ages; "|
|00000e40| 6d 61 6b 65 20 6d 61 6e | 22 20 77 69 6c 6c 20 64 |make man|" will d|
|00000e50| 6f 20 69 74 2e 0a 0a 37 | 29 20 72 65 62 6f 6f 74 |o it...7|) reboot|
|00000e60| 2e 0a 0a 38 29 20 72 65 | 61 64 20 74 68 65 20 6d |...8) re|ad the m|
|00000e70| 61 6e 20 70 61 67 65 73 | 20 66 6f 72 20 74 68 65 |an pages| for the|
|00000e80| 20 70 72 6f 67 72 61 6d | 73 2c 20 61 6e 64 20 74 | program|s, and t|
|00000e90| 72 79 20 74 68 65 6d 20 | 6f 75 74 2e 0a 0a 39 29 |ry them |out...9)|
|00000ea0| 20 70 6c 65 61 73 65 20 | 73 65 6e 64 20 63 6f 6d | please |send com|
|00000eb0| 6d 65 6e 74 73 2c 20 66 | 69 78 65 73 2c 20 69 6d |ments, f|ixes, im|
|00000ec0| 70 72 6f 76 65 6d 65 6e | 74 73 2c 20 61 6e 64 20 |provemen|ts, and |
|00000ed0| 28 6d 69 6c 64 29 20 66 | 6c 61 6d 65 73 20 62 61 |(mild) f|lames ba|
|00000ee0| 63 6b 0a 20 20 20 74 6f | 20 6d 65 20 2d 20 6c 69 |ck. to| me - li|
|00000ef0| 6e 75 73 21 73 65 63 75 | 72 69 74 79 21 6a 6a 67 |nus!secu|rity!jjg|
|00000f00| 20 2e 0a 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00000f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001000| 61 63 63 65 73 73 2d 6c | 69 73 74 73 2f 52 45 41 |access-l|ists/REA|
|00001010| 44 4d 45 2e 6b 65 72 6e | 65 6c 00 00 00 00 00 00 |DME.kern|el......|
|00001020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001060| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00001070| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00001080| 20 20 20 32 35 37 35 20 | 20 34 34 30 32 31 31 30 | 2575 | 4402110|
|00001090| 33 35 35 20 20 31 30 36 | 34 30 00 20 00 00 00 00 |355 106|40. ....|
|000010a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001200| 54 68 69 73 20 69 73 20 | 61 20 62 72 69 65 66 20 |This is |a brief |
|00001210| 73 65 74 20 6f 66 20 69 | 6e 73 74 72 75 63 74 69 |set of i|nstructi|
|00001220| 6f 6e 73 20 66 6f 72 20 | 69 6e 73 74 61 6c 6c 69 |ons for |installi|
|00001230| 6e 67 20 74 68 65 20 73 | 79 73 74 65 6d 20 63 61 |ng the s|ystem ca|
|00001240| 6c 6c 73 20 67 65 74 61 | 63 6c 28 29 0a 61 6e 64 |lls geta|cl().and|
|00001250| 20 73 65 74 61 63 6c 28 | 29 2e 20 20 49 74 20 69 | setacl(|). It i|
|00001260| 73 20 69 6e 74 65 6e 64 | 65 64 20 66 6f 72 20 70 |s intend|ed for p|
|00001270| 65 6f 70 6c 65 20 6c 69 | 6b 65 20 6d 65 2c 20 77 |eople li|ke me, w|
|00001280| 68 6f 20 68 61 76 65 20 | 6e 65 76 65 72 20 68 61 |ho have |never ha|
|00001290| 63 6b 65 64 20 74 68 65 | 0a 6b 65 72 6e 65 6c 20 |cked the|.kernel |
|000012a0| 6d 75 63 68 20 62 65 66 | 6f 72 65 2e 20 0a 0a 31 |much bef|ore. ..1|
|000012b0| 29 20 61 64 64 20 74 68 | 65 20 72 6f 75 74 69 6e |) add th|e routin|
|000012c0| 65 73 20 22 67 65 74 61 | 63 6c 22 20 61 6e 64 20 |es "geta|cl" and |
|000012d0| 22 73 65 74 61 63 6c 22 | 20 74 6f 20 74 68 65 20 |"setacl"| to the |
|000012e0| 73 74 61 6e 64 61 72 64 | 20 6c 69 62 72 61 72 79 |standard| library|
|000012f0| 2e 0a 20 20 20 66 6f 72 | 20 74 68 65 20 56 41 58 |.. for| the VAX|
|00001300| 2c 20 74 68 69 73 20 72 | 65 71 75 69 72 65 73 20 |, this r|equires |
|00001310| 74 68 61 74 20 79 6f 75 | 3a 0a 0a 09 61 29 20 63 |that you|:...a) c|
|00001320| 72 65 61 74 65 20 74 68 | 65 20 66 69 6c 65 73 20 |reate th|e files |
|00001330| 67 65 74 61 63 6c 2e 63 | 20 61 6e 64 20 73 65 74 |getacl.c| and set|
|00001340| 61 63 6c 2e 63 20 69 6e | 0a 09 20 20 20 2f 75 73 |acl.c in|.. /us|
|00001350| 72 2f 73 72 63 2f 6c 69 | 62 2f 6c 69 62 63 2f 76 |r/src/li|b/libc/v|
|00001360| 61 78 2f 73 79 73 20 2e | 20 20 63 6f 70 79 20 6f |ax/sys .| copy o|
|00001370| 6e 65 20 6f 66 20 74 68 | 65 20 65 78 69 73 74 69 |ne of th|e existi|
|00001380| 6e 67 0a 09 20 20 20 66 | 69 6c 65 73 20 74 68 65 |ng.. f|iles the|
|00001390| 72 65 20 28 6c 69 6b 65 | 20 72 65 61 64 2e 63 29 |re (like| read.c)|
|000013a0| 20 74 6f 20 67 65 74 20 | 74 68 65 20 66 6f 72 6d | to get |the form|
|000013b0| 61 74 2e 0a 0a 09 62 29 | 20 75 70 64 61 74 65 20 |at....b)| update |
|000013c0| 74 68 65 20 4d 61 6b 65 | 66 69 6c 65 20 69 6e 20 |the Make|file in |
|000013d0| 74 68 61 74 20 64 69 72 | 65 63 74 6f 72 79 2e 20 |that dir|ectory. |
|000013e0| 20 61 64 64 20 22 67 65 | 74 61 63 6c 2e 6f 22 0a | add "ge|tacl.o".|
|000013f0| 09 20 20 20 61 6e 64 20 | 22 73 65 74 61 63 6c 2e |. and |"setacl.|
|00001400| 6f 22 20 74 6f 20 74 68 | 65 20 64 65 66 69 6e 69 |o" to th|e defini|
|00001410| 74 69 6f 6e 20 6f 66 20 | 74 68 65 20 4f 42 4a 53 |tion of |the OBJS|
|00001420| 20 76 61 72 69 61 62 6c | 65 2e 0a 0a 09 63 29 20 | variabl|e....c) |
|00001430| 61 64 64 20 74 68 65 20 | 74 77 6f 20 6c 69 6e 65 |add the |two line|
|00001440| 73 0a 09 09 0a 09 09 23 | 64 65 66 69 6e 65 20 53 |s......#|define S|
|00001450| 59 53 5f 67 65 74 61 63 | 6c 09 31 35 31 0a 09 09 |YS_getac|l.151...|
|00001460| 23 64 65 66 69 6e 65 20 | 53 59 53 5f 73 65 74 61 |#define |SYS_seta|
|00001470| 63 6c 09 31 35 32 0a 0a | 09 20 20 20 74 6f 20 74 |cl.152..|. to t|
|00001480| 68 65 20 65 6e 64 20 6f | 66 20 74 68 65 20 66 69 |he end o|f the fi|
|00001490| 6c 65 20 2f 75 73 72 2f | 69 6e 63 6c 75 64 65 2f |le /usr/|include/|
|000014a0| 73 79 73 63 61 6c 6c 2e | 68 20 2e 20 20 63 68 61 |syscall.|h . cha|
|000014b0| 6e 67 65 20 22 31 35 31 | 22 0a 09 20 20 20 61 6e |nge "151|".. an|
|000014c0| 64 20 22 31 35 32 22 20 | 74 6f 20 77 68 61 74 65 |d "152" |to whate|
|000014d0| 76 65 72 20 61 72 65 20 | 74 68 65 20 6e 65 78 74 |ver are |the next|
|000014e0| 20 74 77 6f 20 6e 75 6d | 62 65 72 73 2e 0a 0a 09 | two num|bers....|
|000014f0| 64 29 20 63 64 20 74 6f | 20 2f 75 73 72 2f 73 72 |d) cd to| /usr/sr|
|00001500| 63 2f 6c 69 62 2f 6c 69 | 62 63 20 2c 20 61 6e 64 |c/lib/li|bc , and|
|00001510| 20 22 6d 61 6b 65 22 20 | 2e 20 20 74 68 65 6e 20 | "make" |. then |
|00001520| 22 6d 61 6b 65 20 69 6e | 73 74 61 6c 6c 22 2e 0a |"make in|stall"..|
|00001530| 0a 32 29 20 61 64 64 20 | 74 68 65 20 6e 61 6d 65 |.2) add |the name|
|00001540| 73 20 6f 66 20 74 68 65 | 20 6e 65 77 20 73 79 73 |s of the| new sys|
|00001550| 74 65 6d 20 63 61 6c 6c | 73 20 28 20 22 67 65 74 |tem call|s ( "get|
|00001560| 61 63 6c 22 20 61 6e 64 | 20 22 73 65 74 61 63 6c |acl" and| "setacl|
|00001570| 22 20 29 20 74 6f 0a 20 | 20 20 74 68 65 20 65 6e |" ) to. | the en|
|00001580| 64 20 6f 66 20 74 68 65 | 20 61 72 72 61 79 20 73 |d of the| array s|
|00001590| 79 73 63 61 6c 6c 6e 61 | 6d 65 73 20 69 6e 20 2f |yscallna|mes in /|
|000015a0| 73 79 73 2f 73 79 73 2f | 73 79 73 63 61 6c 6c 73 |sys/sys/|syscalls|
|000015b0| 2e 63 20 2e 0a 0a 33 29 | 20 69 6e 20 2f 73 79 73 |.c ...3)| in /sys|
|000015c0| 2f 73 79 73 2f 69 6e 69 | 74 5f 73 79 73 65 6e 74 |/sys/ini|t_sysent|
|000015d0| 2e 63 20 2c 20 64 65 63 | 6c 61 72 65 20 67 65 74 |.c , dec|lare get|
|000015e0| 61 63 6c 28 29 20 61 6e | 64 20 73 65 74 61 63 6c |acl() an|d setacl|
|000015f0| 28 29 20 61 73 20 69 6e | 74 20 66 75 6e 63 74 69 |() as in|t functi|
|00001600| 6f 6e 73 2c 0a 20 20 20 | 61 6e 64 20 61 64 64 20 |ons,. |and add |
|00001610| 74 68 65 20 74 77 6f 20 | 6c 69 6e 65 73 20 0a 20 |the two |lines . |
|00001620| 20 20 0a 09 33 2c 20 67 | 65 74 61 63 6c 2c 09 2f | ..3, g|etacl,./|
|00001630| 2a 20 31 35 31 20 3d 20 | 67 65 74 61 63 6c 20 2a |* 151 = |getacl *|
|00001640| 2f 0a 09 33 2c 20 73 65 | 74 61 63 6c 2c 09 2f 2a |/..3, se|tacl,./*|
|00001650| 20 31 35 32 20 3d 20 73 | 65 74 61 63 6c 20 2a 2f | 152 = s|etacl */|
|00001660| 0a 0a 20 20 20 74 6f 20 | 74 68 65 20 65 6e 64 20 |.. to |the end |
|00001670| 6f 66 20 74 68 65 20 73 | 79 73 65 6e 74 20 61 72 |of the s|ysent ar|
|00001680| 72 61 79 20 64 65 63 6c | 61 72 61 74 69 6f 6e 2e |ray decl|aration.|
|00001690| 0a 0a 34 29 20 63 64 20 | 74 6f 20 2f 73 79 73 2f |..4) cd |to /sys/|
|000016a0| 63 6f 6e 66 20 2c 20 61 | 64 64 20 74 68 65 20 6f |conf , a|dd the o|
|000016b0| 6e 65 20 6c 69 6e 65 0a | 0a 09 73 79 73 2f 61 63 |ne line.|..sys/ac|
|000016c0| 6c 2e 63 09 73 74 61 6e | 64 61 72 64 0a 0a 20 20 |l.c.stan|dard.. |
|000016d0| 20 74 6f 20 74 68 65 20 | 66 69 6c 65 20 2f 73 79 | to the |file /sy|
|000016e0| 73 2f 63 6f 6e 66 2f 66 | 69 6c 65 73 20 2c 20 61 |s/conf/f|iles , a|
|000016f0| 6e 64 20 72 75 6e 20 22 | 2f 65 74 63 2f 63 6f 6e |nd run "|/etc/con|
|00001700| 66 69 67 20 4d 41 43 48 | 22 2c 0a 20 20 20 77 68 |fig MACH|",. wh|
|00001710| 65 72 65 20 4d 41 43 48 | 20 69 73 20 79 6f 75 72 |ere MACH| is your|
|00001720| 20 6d 61 63 68 69 6e 65 | 27 73 20 6e 61 6d 65 2e | machine|'s name.|
|00001730| 0a 0a 35 29 20 63 64 20 | 74 6f 20 2e 2e 2f 4d 41 |..5) cd |to ../MA|
|00001740| 43 48 20 61 6e 64 20 22 | 6d 61 6b 65 20 64 65 70 |CH and "|make dep|
|00001750| 65 6e 64 22 2c 20 61 6e | 64 20 22 6d 61 6b 65 22 |end", an|d "make"|
|00001760| 2e 0a 0a 36 29 20 69 6e | 73 74 61 6c 6c 20 76 6d |...6) in|stall vm|
|00001770| 75 6e 69 78 20 69 6e 20 | 2f 20 2e 0a 0a 00 00 00 |unix in |/ ......|
|00001780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001800| 61 63 63 65 73 73 2d 6c | 69 73 74 73 2f 54 4f 44 |access-l|ists/TOD|
|00001810| 4f 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |O.......|........|
|00001820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001860| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00001870| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00001880| 20 20 20 31 32 34 35 20 | 20 34 34 30 32 31 31 30 | 1245 | 4402110|
|00001890| 33 35 36 20 20 20 37 31 | 36 33 00 20 00 00 00 00 |356 71|63. ....|
|000018a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001900| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a00| 31 29 20 70 75 74 20 6c | 73 61 63 6c 28 31 29 20 |1) put l|sacl(1) |
|00001a10| 69 6e 74 6f 20 6c 73 28 | 31 29 20 2e 20 20 6c 73 |into ls(|1) . ls|
|00001a20| 20 6e 65 65 64 73 20 61 | 20 22 2d 41 22 20 6f 70 | needs a| "-A" op|
|00001a30| 74 69 6f 6e 20 3a 2d 29 | 0a 0a 32 29 20 6d 61 6b |tion :-)|..2) mak|
|00001a40| 65 20 63 70 28 31 29 20 | 63 6f 70 79 20 74 68 65 |e cp(1) |copy the|
|00001a50| 20 66 69 6c 65 27 73 20 | 61 63 6c 20 74 6f 20 74 | file's |acl to t|
|00001a60| 68 65 20 64 65 73 74 69 | 6e 61 74 69 6f 6e 20 66 |he desti|nation f|
|00001a70| 69 6c 65 2e 0a 0a 33 29 | 20 77 68 65 6e 20 65 78 |ile...3)| when ex|
|00001a80| 65 63 76 65 28 32 29 20 | 69 73 20 63 68 65 63 6b |ecve(2) |is check|
|00001a90| 69 6e 67 20 66 6f 72 20 | 61 6e 79 20 49 45 58 45 |ing for |any IEXE|
|00001aa0| 43 20 70 65 72 6d 69 73 | 73 69 6f 6e 0a 20 20 20 |C permis|sion. |
|00001ab0| 28 20 69 2e 65 2e 2c 20 | 22 28 69 70 2d 3e 69 5f |( i.e., |"(ip->i_|
|00001ac0| 6d 6f 64 65 20 26 20 28 | 49 45 58 45 43 7c 49 45 |mode & (|IEXEC|IE|
|00001ad0| 58 45 43 3e 3e 33 7c 49 | 45 58 45 43 3e 3e 36 29 |XEC>>3|I|EXEC>>6)|
|00001ae0| 20 3d 3d 20 30 29 22 20 | 29 2c 0a 20 20 20 63 68 | == 0)" |),. ch|
|00001af0| 65 63 6b 20 66 6f 72 20 | 61 6e 20 61 63 6c 20 65 |eck for |an acl e|
|00001b00| 6e 74 72 79 20 77 68 69 | 63 68 20 68 61 73 20 49 |ntry whi|ch has I|
|00001b10| 45 58 45 43 20 70 65 72 | 6d 69 73 73 69 6f 6e 2e |EXEC per|mission.|
|00001b20| 0a 0a 34 29 20 63 6f 6d | 65 20 75 70 20 77 69 74 |..4) com|e up wit|
|00001b30| 68 20 61 20 64 65 66 61 | 75 6c 74 20 61 63 6c 20 |h a defa|ult acl |
|00001b40| 77 68 65 6e 20 63 72 65 | 61 74 69 6e 67 20 66 69 |when cre|ating fi|
|00001b50| 6c 65 73 20 61 6e 64 20 | 64 69 72 65 63 74 6f 72 |les and |director|
|00001b60| 69 65 73 2e 0a 20 20 20 | 4d 75 6c 74 69 63 73 20 |ies.. |Multics |
|00001b70| 61 6c 6c 6f 77 73 20 64 | 65 66 61 75 6c 74 73 20 |allows d|efaults |
|00001b80| 61 74 20 74 68 65 20 75 | 73 65 72 2f 64 69 72 65 |at the u|ser/dire|
|00001b90| 63 74 6f 72 79 20 6c 65 | 76 65 6c 2e 20 20 61 20 |ctory le|vel. a |
|00001ba0| 63 6f 6d 70 72 6f 6d 69 | 73 65 0a 20 20 20 6d 69 |compromi|se. mi|
|00001bb0| 67 68 74 20 62 65 20 74 | 6f 20 61 6c 6c 6f 77 20 |ght be t|o allow |
|00001bc0| 61 20 64 65 66 61 75 6c | 74 20 61 74 20 74 68 65 |a defaul|t at the|
|00001bd0| 20 75 73 65 72 20 6c 65 | 76 65 6c 2c 20 61 6e 64 | user le|vel, and|
|00001be0| 20 73 74 6f 72 65 20 69 | 74 20 69 6e 20 74 68 65 | store i|t in the|
|00001bf0| 0a 20 20 20 75 20 61 72 | 65 61 2c 20 61 6c 61 20 |. u ar|ea, ala |
|00001c00| 75 6d 61 73 6b 28 32 29 | 2e 0a 0a 35 29 20 69 6e |umask(2)|...5) in|
|00001c10| 63 72 65 61 73 65 20 74 | 68 65 20 73 69 7a 65 20 |crease t|he size |
|00001c20| 6f 66 20 61 6e 20 61 63 | 6c 2e 20 20 74 68 69 73 |of an ac|l. this|
|00001c30| 20 72 65 71 75 69 72 65 | 73 20 70 75 74 74 69 6e | require|s puttin|
|00001c40| 67 20 74 68 65 20 61 63 | 6c 20 73 6f 6d 65 77 68 |g the ac|l somewh|
|00001c50| 65 72 65 0a 20 20 20 6f | 74 68 65 72 20 74 68 61 |ere. o|ther tha|
|00001c60| 6e 20 74 68 65 20 69 6e | 6f 64 65 2c 20 6f 72 20 |n the in|ode, or |
|00001c70| 69 6e 63 72 65 61 73 69 | 6e 67 20 74 68 65 20 73 |increasi|ng the s|
|00001c80| 69 7a 65 20 6f 66 20 74 | 68 65 20 69 6e 6f 64 65 |ize of t|he inode|
|00001c90| 20 62 65 79 6f 6e 64 20 | 31 32 38 20 62 79 74 65 | beyond |128 byte|
|00001ca0| 73 2e 0a 0a 0a 6c 6c 2e | 68 20 2e 20 20 63 68 61 |s....ll.|h . cha|
|00001cb0| 6e 67 65 20 22 31 35 31 | 22 0a 09 20 20 20 61 6e |nge "151|".. an|
|00001cc0| 64 20 22 31 35 32 22 20 | 74 6f 20 77 68 61 74 65 |d "152" |to whate|
|00001cd0| 76 65 72 20 61 72 65 20 | 74 68 65 20 6e 65 78 74 |ver are |the next|
|00001ce0| 20 74 77 6f 20 6e 75 6d | 62 65 72 73 2e 0a 0a 09 | two num|bers....|
|00001cf0| 64 29 20 63 64 20 74 6f | 20 2f 75 73 72 2f 73 72 |d) cd to| /usr/sr|
|00001d00| 63 2f 6c 69 62 2f 6c 69 | 62 63 20 2c 20 61 6e 64 |c/lib/li|bc , and|
|00001d10| 20 22 6d 61 6b 65 22 20 | 2e 20 20 74 68 65 6e 20 | "make" |. then |
|00001d20| 22 6d 61 6b 65 20 69 6e | 73 74 61 6c 6c 22 2e 0a |"make in|stall"..|
|00001d30| 0a 32 29 20 61 64 64 20 | 74 68 65 20 6e 61 6d 65 |.2) add |the name|
|00001d40| 73 20 6f 66 20 74 68 65 | 20 6e 65 77 20 73 79 73 |s of the| new sys|
|00001d50| 74 65 6d 20 63 61 6c 6c | 73 20 28 20 22 67 65 74 |tem call|s ( "get|
|00001d60| 61 63 6c 22 20 61 6e 64 | 20 22 73 65 74 61 63 6c |acl" and| "setacl|
|00001d70| 22 20 29 20 74 6f 0a 20 | 20 20 74 68 65 20 65 6e |" ) to. | the en|
|00001d80| 64 20 6f 66 20 74 68 65 | 20 61 72 72 61 79 20 73 |d of the| array s|
|00001d90| 79 73 63 61 6c 6c 6e 61 | 6d 65 73 20 69 6e 20 2f |yscallna|mes in /|
|00001da0| 73 79 73 2f 73 79 73 2f | 73 79 73 63 61 6c 6c 73 |sys/sys/|syscalls|
|00001db0| 2e 63 20 2e 0a 0a 33 29 | 20 69 6e 20 2f 73 79 73 |.c ...3)| in /sys|
|00001dc0| 2f 73 79 73 2f 69 6e 69 | 74 5f 73 79 73 65 6e 74 |/sys/ini|t_sysent|
|00001dd0| 2e 63 20 2c 20 64 65 63 | 6c 61 72 65 20 67 65 74 |.c , dec|lare get|
|00001de0| 61 63 6c 28 29 20 61 6e | 64 20 73 65 74 61 63 6c |acl() an|d setacl|
|00001df0| 28 29 20 61 73 20 69 6e | 74 20 66 75 6e 63 74 69 |() as in|t functi|
|00001e00| 61 63 63 65 73 73 2d 6c | 69 73 74 73 2f 61 63 6c |access-l|ists/acl|
|00001e10| 2e 63 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.c......|........|
|00001e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e60| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00001e70| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00001e80| 20 20 20 36 31 30 33 20 | 20 34 34 30 32 31 31 30 | 6103 | 4402110|
|00001e90| 33 36 31 20 20 20 37 33 | 37 30 00 20 00 00 00 00 |361 73|70. ....|
|00001ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002000| 23 69 6e 63 6c 75 64 65 | 20 22 2e 2e 2f 68 2f 70 |#include| "../h/p|
|00002010| 61 72 61 6d 2e 68 22 0a | 23 69 6e 63 6c 75 64 65 |aram.h".|#include|
|00002020| 20 22 2e 2e 2f 68 2f 73 | 79 73 74 6d 2e 68 22 0a | "../h/s|ystm.h".|
|00002030| 23 69 6e 63 6c 75 64 65 | 20 22 2e 2e 2f 68 2f 64 |#include| "../h/d|
|00002040| 69 72 2e 68 22 0a 23 69 | 6e 63 6c 75 64 65 20 22 |ir.h".#i|nclude "|
|00002050| 2e 2e 2f 68 2f 69 6e 6f | 64 65 2e 68 22 0a 23 69 |../h/ino|de.h".#i|
|00002060| 6e 63 6c 75 64 65 20 22 | 2e 2e 2f 68 2f 75 73 65 |nclude "|../h/use|
|00002070| 72 2e 68 22 0a 23 69 6e | 63 6c 75 64 65 20 22 2e |r.h".#in|clude ".|
|00002080| 2e 2f 68 2f 6e 61 6d 69 | 2e 68 22 0a 23 69 6e 63 |./h/nami|.h".#inc|
|00002090| 6c 75 64 65 20 22 2e 2e | 2f 68 2f 61 63 6c 2e 68 |lude "..|/h/acl.h|
|000020a0| 22 0a 0a 23 64 65 66 69 | 6e 65 20 46 4f 4c 4c 4f |"..#defi|ne FOLLO|
|000020b0| 57 5f 4c 49 4e 4b 20 31 | 0a 0a 2f 2a 0a 20 2a 20 |W_LINK 1|../*. * |
|000020c0| 70 61 63 6b 5f 61 63 6c | 65 28 29 20 63 6f 70 69 |pack_acl|e() copi|
|000020d0| 65 73 20 61 6e 20 61 63 | 6c 65 20 73 74 72 75 63 |es an ac|le struc|
|000020e0| 74 20 69 6e 74 6f 20 74 | 68 65 20 69 6e 6f 64 65 |t into t|he inode|
|000020f0| 2e 20 20 74 68 65 20 61 | 63 6c 65 20 69 73 20 70 |. the a|cle is p|
|00002100| 61 63 6b 65 64 0a 20 2a | 20 73 69 6e 63 65 20 74 |acked. *| since t|
|00002110| 68 65 20 69 6e 6f 64 65 | 20 69 73 20 72 61 74 68 |he inode| is rath|
|00002120| 65 72 20 73 68 6f 72 74 | 20 6f 66 20 73 70 61 63 |er short| of spac|
|00002130| 65 2e 0a 20 2a 2f 0a 70 | 61 63 6b 5f 61 63 6c 65 |e.. */.p|ack_acle|
|00002140| 28 20 69 70 2c 20 61 2c | 20 6e 20 29 0a 73 74 72 |( ip, a,| n ).str|
|00002150| 75 63 74 20 69 6e 6f 64 | 65 20 2a 69 70 3b 0a 73 |uct inod|e *ip;.s|
|00002160| 74 72 75 63 74 20 61 63 | 6c 65 20 61 3b 0a 69 6e |truct ac|le a;.in|
|00002170| 74 20 6e 3b 0a 7b 0a 09 | 2f 2a 20 63 6c 65 61 72 |t n;.{..|/* clear|
|00002180| 20 74 68 65 20 74 79 70 | 65 20 61 6e 64 20 6d 6f | the typ|e and mo|
|00002190| 64 65 20 66 69 65 6c 64 | 73 20 2a 2f 0a 09 69 70 |de field|s */..ip|
|000021a0| 2d 3e 69 5f 61 63 6c 65 | 5b 6e 2f 32 5d 20 26 3d |->i_acle|[n/2] &=|
|000021b0| 20 30 31 37 20 3c 3c 20 | 28 28 6e 25 32 29 20 3f | 017 << |((n%2) ?|
|000021c0| 20 34 20 3a 20 30 29 3b | 0a 0a 09 2f 2a 20 73 65 | 4 : 0);|.../* se|
|000021d0| 74 20 74 68 65 20 74 79 | 70 65 2c 20 6d 6f 64 65 |t the ty|pe, mode|
|000021e0| 2c 20 61 6e 64 20 69 64 | 20 66 69 65 6c 64 73 20 |, and id| fields |
|000021f0| 2a 2f 0a 09 69 70 2d 3e | 69 5f 61 63 6c 65 5b 6e |*/..ip->|i_acle[n|
|00002200| 2f 32 5d 20 7c 3d 20 28 | 20 61 2e 61 5f 74 79 70 |/2] |= (| a.a_typ|
|00002210| 65 20 21 3d 20 41 5f 47 | 52 4f 55 50 20 3f 20 41 |e != A_G|ROUP ? A|
|00002220| 5f 55 53 45 52 20 3a 20 | 41 5f 47 52 4f 55 50 20 |_USER : |A_GROUP |
|00002230| 29 20 3c 3c 0a 09 09 28 | 28 6e 25 32 29 20 3f 20 |) <<...(|(n%2) ? |
|00002240| 33 20 3a 20 37 29 3b 0a | 09 69 70 2d 3e 69 5f 61 |3 : 7);.|.ip->i_a|
|00002250| 63 6c 65 5b 6e 2f 32 5d | 20 7c 3d 20 28 20 61 2e |cle[n/2]| |= ( a.|
|00002260| 61 5f 6d 6f 64 65 20 26 | 20 30 37 20 29 20 3c 3c |a_mode &| 07 ) <<|
|00002270| 20 28 28 6e 25 32 29 20 | 3f 20 30 20 3a 20 34 29 | ((n%2) |? 0 : 4)|
|00002280| 3b 0a 09 69 70 2d 3e 69 | 5f 61 63 6c 69 64 5b 6e |;..ip->i|_aclid[n|
|00002290| 5d 20 3d 20 61 2e 61 5f | 69 64 3b 0a 7d 0a 0a 2f |] = a.a_|id;.}../|
|000022a0| 2a 0a 20 2a 20 6e 75 6c | 6c 5f 61 63 6c 65 28 29 |*. * nul|l_acle()|
|000022b0| 20 70 75 74 73 20 61 6e | 20 65 6e 64 2d 6f 66 2d | puts an| end-of-|
|000022c0| 61 63 6c 20 6d 61 72 6b | 65 72 20 69 6e 20 74 68 |acl mark|er in th|
|000022d0| 65 20 61 63 6c 20 61 74 | 20 65 6e 74 72 79 20 6e |e acl at| entry n|
|000022e0| 2e 0a 20 2a 20 74 68 65 | 20 65 6e 64 2d 6f 66 2d |.. * the| end-of-|
|000022f0| 61 63 6c 20 6d 61 72 6b | 65 72 20 6c 6f 6f 6b 73 |acl mark|er looks|
|00002300| 20 6c 69 6b 65 20 61 6e | 20 61 63 6c 20 65 6e 74 | like an| acl ent|
|00002310| 72 79 20 66 6f 72 20 72 | 6f 6f 74 0a 20 2a 20 28 |ry for r|oot. * (|
|00002320| 61 5f 74 79 70 65 20 3d | 3d 20 41 5f 55 53 45 52 |a_type =|= A_USER|
|00002330| 20 20 26 26 20 61 5f 69 | 64 20 3d 3d 20 30 29 2e | && a_i|d == 0).|
|00002340| 0a 20 2a 2f 0a 6e 75 6c | 6c 5f 61 63 6c 65 28 20 |. */.nul|l_acle( |
|00002350| 69 70 2c 20 6e 20 29 0a | 73 74 72 75 63 74 20 69 |ip, n ).|struct i|
|00002360| 6e 6f 64 65 20 2a 69 70 | 3b 0a 69 6e 74 20 6e 3b |node *ip|;.int n;|
|00002370| 0a 7b 0a 09 2f 2a 20 63 | 6c 65 61 72 20 74 68 65 |.{../* c|lear the|
|00002380| 20 74 79 70 65 20 61 6e | 64 20 6d 6f 64 65 20 66 | type an|d mode f|
|00002390| 69 65 6c 64 73 20 2a 2f | 0a 09 69 70 2d 3e 69 5f |ields */|..ip->i_|
|000023a0| 61 63 6c 65 5b 6e 2f 32 | 5d 20 26 3d 20 30 31 37 |acle[n/2|] &= 017|
|000023b0| 20 3c 3c 20 28 28 6e 25 | 32 29 20 3f 20 34 20 3a | << ((n%|2) ? 4 :|
|000023c0| 20 30 29 3b 0a 0a 09 2f | 2a 20 63 6c 65 61 72 20 | 0);.../|* clear |
|000023d0| 74 68 65 20 69 64 20 66 | 69 65 6c 64 20 2a 2f 0a |the id f|ield */.|
|000023e0| 09 69 70 2d 3e 69 5f 61 | 63 6c 69 64 5b 6e 5d 20 |.ip->i_a|clid[n] |
|000023f0| 3d 20 30 3b 0a 7d 0a 0a | 2f 2a 0a 20 2a 20 67 65 |= 0;.}..|/*. * ge|
|00002400| 74 61 63 6c 28 29 20 72 | 65 74 75 72 6e 73 20 74 |tacl() r|eturns t|
|00002410| 68 65 20 73 65 74 20 6f | 66 20 61 63 6c 20 65 6e |he set o|f acl en|
|00002420| 74 72 69 65 73 20 61 73 | 73 6f 63 69 61 74 65 64 |tries as|sociated|
|00002430| 20 77 69 74 68 20 74 68 | 65 20 66 69 6c 65 2e 0a | with th|e file..|
|00002440| 20 2a 20 74 68 65 20 75 | 73 65 72 20 6d 75 73 74 | * the u|ser must|
|00002450| 20 62 65 20 61 62 6c 65 | 20 74 6f 20 61 63 63 65 | be able| to acce|
|00002460| 73 73 20 74 68 65 20 66 | 69 6c 65 20 69 6e 20 6f |ss the f|ile in o|
|00002470| 72 64 65 72 20 74 6f 20 | 72 65 61 64 20 74 68 65 |rder to |read the|
|00002480| 20 61 63 6c 2e 0a 20 2a | 2f 0a 67 65 74 61 63 6c | acl.. *|/.getacl|
|00002490| 28 29 0a 7b 0a 09 73 74 | 72 75 63 74 20 69 6e 6f |().{..st|ruct ino|
|000024a0| 64 65 20 2a 69 70 3b 0a | 09 73 74 72 75 63 74 20 |de *ip;.|.struct |
|000024b0| 61 63 6c 65 20 6b 61 5b | 4d 41 58 41 43 4c 5d 3b |acle ka[|MAXACL];|
|000024c0| 0a 09 73 74 72 75 63 74 | 20 61 20 7b 0a 09 09 63 |..struct| a {...c|
|000024d0| 68 61 72 20 2a 66 6e 61 | 6d 65 3b 0a 09 09 69 6e |har *fna|me;...in|
|000024e0| 74 20 6e 5f 61 63 6c 65 | 3b 0a 09 09 73 74 72 75 |t n_acle|;...stru|
|000024f0| 63 74 20 61 63 6c 65 20 | 2a 61 63 6c 65 5f 70 3b |ct acle |*acle_p;|
|00002500| 0a 09 7d 20 2a 75 61 70 | 20 3d 20 28 73 74 72 75 |..} *uap| = (stru|
|00002510| 63 74 20 61 20 2a 29 20 | 75 2e 75 5f 61 70 3b 0a |ct a *) |u.u_ap;.|
|00002520| 09 69 6e 74 20 69 3b 0a | 0a 09 69 66 20 28 20 28 |.int i;.|..if ( (|
|00002530| 69 70 20 3d 20 6e 61 6d | 65 69 28 75 63 68 61 72 |ip = nam|ei(uchar|
|00002540| 2c 4c 4f 4f 4b 55 50 2c | 46 4f 4c 4c 4f 57 5f 4c |,LOOKUP,|FOLLOW_L|
|00002550| 49 4e 4b 29 29 20 21 3d | 20 4e 55 4c 4c 20 29 20 |INK)) !=| NULL ) |
|00002560| 7b 0a 09 09 2f 2a 20 75 | 6e 70 61 63 6b 20 74 68 |{.../* u|npack th|
|00002570| 65 20 61 63 6c 20 65 6e | 74 72 69 65 73 20 2a 2f |e acl en|tries */|
|00002580| 0a 09 09 66 6f 72 20 28 | 69 20 3d 20 30 3b 20 69 |...for (|i = 0; i|
|00002590| 20 3c 20 4d 41 58 41 43 | 4c 20 26 26 20 6f 6b 5f | < MAXAC|L && ok_|
|000025a0| 61 63 6c 65 28 69 70 2c | 69 29 3b 20 69 2b 2b 20 |acle(ip,|i); i++ |
|000025b0| 29 20 7b 0a 09 09 09 6b | 61 5b 69 5d 2e 61 5f 74 |) {....k|a[i].a_t|
|000025c0| 79 70 65 20 3d 20 61 63 | 6c 65 5f 74 79 70 65 28 |ype = ac|le_type(|
|000025d0| 20 69 70 2c 20 69 20 29 | 3b 0a 09 09 09 6b 61 5b | ip, i )|;....ka[|
|000025e0| 69 5d 2e 61 5f 6d 6f 64 | 65 20 3d 20 61 63 6c 65 |i].a_mod|e = acle|
|000025f0| 5f 6d 6f 64 65 28 20 69 | 70 2c 20 69 20 29 3b 0a |_mode( i|p, i );.|
|00002600| 09 09 09 6b 61 5b 69 5d | 2e 61 5f 69 64 20 3d 20 |...ka[i]|.a_id = |
|00002610| 61 63 6c 65 5f 69 64 28 | 20 69 70 2c 20 69 20 29 |acle_id(| ip, i )|
|00002620| 3b 0a 09 09 7d 0a 0a 09 | 09 2f 2a 20 67 65 74 61 |;...}...|./* geta|
|00002630| 63 6c 20 64 6f 65 73 6e | 27 74 20 6e 65 65 64 20 |cl doesn|'t need |
|00002640| 74 68 65 20 69 6e 6f 64 | 65 20 61 6e 79 20 6d 6f |the inod|e any mo|
|00002650| 72 65 2e 20 2a 2f 0a 09 | 09 69 70 75 74 28 20 69 |re. */..|.iput( i|
|00002660| 70 20 29 3b 0a 0a 09 09 | 69 66 20 28 20 75 61 70 |p );....|if ( uap|
|00002670| 2d 3e 6e 5f 61 63 6c 65 | 20 3c 20 69 20 29 20 7b |->n_acle| < i ) {|
|00002680| 0a 09 09 09 75 2e 75 5f | 65 72 72 6f 72 20 3d 20 |....u.u_|error = |
|00002690| 45 49 4e 56 41 4c 3b 0a | 09 09 7d 20 65 6c 73 65 |EINVAL;.|..} else|
|000026a0| 20 7b 0a 09 09 09 2f 2a | 0a 09 09 09 20 2a 20 63 | {..../*|.... * c|
|000026b0| 6f 70 79 20 74 68 65 20 | 61 63 6c 20 65 6e 74 72 |opy the |acl entr|
|000026c0| 69 65 73 20 74 6f 20 74 | 68 65 20 75 73 65 72 27 |ies to t|he user'|
|000026d0| 73 20 62 75 66 66 65 72 | 2c 0a 09 09 09 20 2a 20 |s buffer|,.... * |
|000026e0| 61 6e 64 20 72 65 74 75 | 72 6e 20 74 68 65 20 6e |and retu|rn the n|
|000026f0| 75 6d 62 65 72 20 6f 66 | 20 65 6e 74 72 69 65 73 |umber of| entries|
|00002700| 20 66 6f 75 6e 64 2e 0a | 09 09 09 20 2a 2f 0a 09 | found..|... */..|
|00002710| 09 09 75 2e 75 5f 65 72 | 72 6f 72 20 3d 20 63 6f |..u.u_er|ror = co|
|00002720| 70 79 6f 75 74 28 28 63 | 61 64 64 72 5f 74 29 20 |pyout((c|addr_t) |
|00002730| 6b 61 2c 20 28 63 61 64 | 64 72 5f 74 29 20 75 61 |ka, (cad|dr_t) ua|
|00002740| 70 2d 3e 61 63 6c 65 5f | 70 2c 0a 09 09 09 09 69 |p->acle_|p,.....i|
|00002750| 2a 73 69 7a 65 6f 66 28 | 73 74 72 75 63 74 20 61 |*sizeof(|struct a|
|00002760| 63 6c 65 29 29 3b 0a 09 | 09 09 69 66 20 28 20 75 |cle));..|..if ( u|
|00002770| 2e 75 5f 65 72 72 6f 72 | 20 3d 3d 20 30 20 29 20 |.u_error| == 0 ) |
|00002780| 75 2e 75 5f 72 2e 72 5f | 76 61 6c 31 20 3d 20 69 |u.u_r.r_|val1 = i|
|00002790| 3b 0a 09 09 7d 0a 09 7d | 0a 7d 0a 0a 2f 2a 0a 20 |;...}..}|.}../*. |
|000027a0| 2a 20 73 65 74 61 63 6c | 28 29 20 64 65 66 69 6e |* setacl|() defin|
|000027b0| 65 73 20 74 68 65 20 61 | 63 6c 20 66 6f 72 20 61 |es the a|cl for a|
|000027c0| 6e 20 69 6e 6f 64 65 2e | 20 20 74 6f 20 64 6f 20 |n inode.| to do |
|000027d0| 74 68 69 73 2c 20 74 68 | 65 20 75 73 65 72 20 6d |this, th|e user m|
|000027e0| 75 73 74 0a 20 2a 20 62 | 65 20 74 68 65 20 6f 77 |ust. * b|e the ow|
|000027f0| 6e 65 72 20 6f 66 20 74 | 68 65 20 69 6e 6f 64 65 |ner of t|he inode|
|00002800| 2c 20 6f 72 20 65 6c 73 | 65 20 6d 75 73 74 20 62 |, or els|e must b|
|00002810| 65 20 74 68 65 20 73 75 | 70 65 72 75 73 65 72 2e |e the su|peruser.|
|00002820| 0a 20 2a 0a 20 2a 20 62 | 75 67 73 3a 20 61 63 6c |. *. * b|ugs: acl|
|00002830| 20 65 6e 74 72 69 65 73 | 20 73 68 6f 75 6c 64 20 | entries| should |
|00002840| 62 65 20 73 6f 72 74 65 | 64 20 62 79 20 61 5f 74 |be sorte|d by a_t|
|00002850| 79 70 65 20 2c 20 73 6f | 20 74 68 61 74 20 61 63 |ype , so| that ac|
|00002860| 63 65 73 73 28 29 20 64 | 6f 65 73 0a 20 2a 20 6e |cess() d|oes. * n|
|00002870| 6f 74 20 68 61 76 65 20 | 74 6f 20 72 65 61 64 20 |ot have |to read |
|00002880| 74 68 65 20 65 6e 74 69 | 72 65 20 61 63 6c 20 74 |the enti|re acl t|
|00002890| 68 72 65 65 20 74 69 6d | 65 73 2e 20 20 73 69 6e |hree tim|es. sin|
|000028a0| 63 65 20 74 68 65 20 6e | 75 6d 62 65 72 20 6f 66 |ce the n|umber of|
|000028b0| 20 61 63 6c 0a 20 2a 20 | 65 6e 74 72 69 65 73 20 | acl. * |entries |
|000028c0| 69 73 20 73 6f 20 73 6d | 61 6c 6c 2c 20 74 68 6f |is so sm|all, tho|
|000028d0| 75 67 68 2c 20 74 68 69 | 73 20 77 6f 75 6c 64 20 |ugh, thi|s would |
|000028e0| 6d 61 6b 65 20 73 65 74 | 61 63 6c 28 29 20 6d 6f |make set|acl() mo|
|000028f0| 72 65 20 63 6f 6d 70 6c | 65 78 0a 20 2a 20 28 73 |re compl|ex. * (s|
|00002900| 6f 72 74 69 6e 67 20 74 | 68 65 20 65 6e 74 72 69 |orting t|he entri|
|00002910| 65 73 29 20 77 69 74 68 | 6f 75 74 20 72 65 61 6c |es) with|out real|
|00002920| 6c 79 20 62 75 79 69 6e | 67 20 74 68 61 74 20 6d |ly buyin|g that m|
|00002930| 75 63 68 2e 0a 20 2a 2f | 0a 73 65 74 61 63 6c 28 |uch.. */|.setacl(|
|00002940| 29 0a 7b 0a 09 73 74 72 | 75 63 74 20 69 6e 6f 64 |).{..str|uct inod|
|00002950| 65 20 2a 69 70 3b 0a 09 | 73 74 72 75 63 74 20 61 |e *ip;..|struct a|
|00002960| 63 6c 65 20 6b 61 5b 4d | 41 58 41 43 4c 5d 3b 0a |cle ka[M|AXACL];.|
|00002970| 09 69 6e 74 20 6b 6e 3b | 0a 09 73 74 72 75 63 74 |.int kn;|..struct|
|00002980| 20 61 20 7b 0a 09 09 63 | 68 61 72 20 2a 66 6e 61 | a {...c|har *fna|
|00002990| 6d 65 3b 0a 09 09 69 6e | 74 20 6e 5f 61 63 6c 65 |me;...in|t n_acle|
|000029a0| 3b 0a 09 09 73 74 72 75 | 63 74 20 61 63 6c 65 20 |;...stru|ct acle |
|000029b0| 2a 61 63 6c 65 5f 70 3b | 0a 09 7d 20 2a 75 61 70 |*acle_p;|..} *uap|
|000029c0| 20 3d 20 28 73 74 72 75 | 63 74 20 61 20 2a 29 20 | = (stru|ct a *) |
|000029d0| 75 2e 75 5f 61 70 3b 0a | 09 69 6e 74 20 69 3b 0a |u.u_ap;.|.int i;.|
|000029e0| 0a 09 2f 2a 0a 09 20 2a | 20 63 6f 70 79 20 74 68 |../*.. *| copy th|
|000029f0| 65 20 75 73 65 72 27 73 | 20 61 72 67 75 6d 65 6e |e user's| argumen|
|00002a00| 74 73 20 69 6e 74 6f 20 | 6b 65 72 6e 65 6c 20 73 |ts into |kernel s|
|00002a10| 70 61 63 65 3b 20 6b 6e | 20 77 69 6c 6c 20 63 6f |pace; kn| will co|
|00002a20| 6e 74 61 69 6e 0a 09 20 | 2a 20 74 68 65 20 6e 75 |ntain.. |* the nu|
|00002a30| 6d 62 65 72 20 6f 66 20 | 61 63 6c 20 65 6e 74 72 |mber of |acl entr|
|00002a40| 69 65 73 2c 20 61 6e 64 | 20 6b 61 20 77 69 6c 6c |ies, and| ka will|
|00002a50| 20 63 6f 6e 74 61 69 6e | 20 74 68 65 20 65 6e 74 | contain| the ent|
|00002a60| 72 69 65 73 2e 0a 09 20 | 2a 2f 0a 09 69 66 20 28 |ries... |*/..if (|
|00002a70| 20 28 6b 6e 20 3d 20 75 | 61 70 2d 3e 6e 5f 61 63 | (kn = u|ap->n_ac|
|00002a80| 6c 65 29 20 3e 20 4d 41 | 58 41 43 4c 20 29 20 7b |le) > MA|XACL ) {|
|00002a90| 0a 09 09 75 2e 75 5f 65 | 72 72 6f 72 20 3d 20 45 |...u.u_e|rror = E|
|00002aa0| 49 4e 56 41 4c 3b 0a 09 | 7d 20 65 6c 73 65 20 7b |INVAL;..|} else {|
|00002ab0| 0a 09 09 75 2e 75 5f 65 | 72 72 6f 72 20 3d 20 63 |...u.u_e|rror = c|
|00002ac0| 6f 70 79 69 6e 28 20 28 | 63 61 64 64 72 5f 74 29 |opyin( (|caddr_t)|
|00002ad0| 20 75 61 70 2d 3e 61 63 | 6c 65 5f 70 2c 20 28 63 | uap->ac|le_p, (c|
|00002ae0| 61 64 64 72 5f 74 29 20 | 6b 61 2c 0a 09 09 09 6b |addr_t) |ka,....k|
|00002af0| 6e 2a 73 69 7a 65 6f 66 | 28 73 74 72 75 63 74 20 |n*sizeof|(struct |
|00002b00| 61 63 6c 65 29 20 29 3b | 0a 09 09 69 66 20 28 20 |acle) );|...if ( |
|00002b10| 75 2e 75 5f 65 72 72 6f | 72 20 3d 3d 20 30 20 29 |u.u_erro|r == 0 )|
|00002b20| 20 7b 0a 09 09 09 69 66 | 20 28 20 28 69 70 20 3d | {....if| ( (ip =|
|00002b30| 20 6f 77 6e 65 72 28 46 | 4f 4c 4c 4f 57 5f 4c 49 | owner(F|OLLOW_LI|
|00002b40| 4e 4b 29 29 20 21 3d 20 | 4e 55 4c 4c 20 29 20 7b |NK)) != |NULL ) {|
|00002b50| 0a 09 09 09 09 66 6f 72 | 20 28 20 69 20 3d 20 30 |.....for| ( i = 0|
|00002b60| 3b 20 69 20 3c 20 6b 6e | 3b 20 69 2b 2b 20 29 20 |; i < kn|; i++ ) |
|00002b70| 7b 0a 09 09 09 09 09 70 | 61 63 6b 5f 61 63 6c 65 |{......p|ack_acle|
|00002b80| 28 20 69 70 2c 20 6b 61 | 5b 69 5d 2c 20 69 20 29 |( ip, ka|[i], i )|
|00002b90| 3b 0a 09 09 09 09 09 69 | 66 20 28 21 20 6f 6b 5f |;......i|f (! ok_|
|00002ba0| 61 63 6c 65 28 69 70 2c | 69 29 20 29 20 62 72 65 |acle(ip,|i) ) bre|
|00002bb0| 61 6b 3b 0a 09 09 09 09 | 7d 0a 0a 09 09 09 09 69 |ak;.....|}......i|
|00002bc0| 66 20 28 20 6b 6e 20 3c | 20 4d 41 58 41 43 4c 20 |f ( kn <| MAXACL |
|00002bd0| 29 20 6e 75 6c 6c 5f 61 | 63 6c 65 28 20 69 70 2c |) null_a|cle( ip,|
|00002be0| 20 6b 6e 20 29 3b 0a 0a | 09 09 09 09 2f 2a 20 75 | kn );..|..../* u|
|00002bf0| 70 64 61 74 65 20 63 74 | 69 6d 65 20 66 6f 72 20 |pdate ct|ime for |
|00002c00| 74 68 65 20 69 6e 6f 64 | 65 20 2a 2f 0a 09 09 09 |the inod|e */....|
|00002c10| 09 69 70 2d 3e 69 5f 66 | 6c 61 67 20 7c 3d 20 49 |.ip->i_f|lag |= I|
|00002c20| 43 48 47 3b 0a 09 09 09 | 09 69 70 75 74 28 20 69 |CHG;....|.iput( i|
|00002c30| 70 20 29 3b 0a 09 09 09 | 7d 0a 09 09 7d 0a 09 7d |p );....|}...}..}|
|00002c40| 0a 7d 0a 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.}......|........|
|00002c50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e00| 61 63 63 65 73 73 2d 6c | 69 73 74 73 2f 61 63 6c |access-l|ists/acl|
|00002e10| 2e 68 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.h......|........|
|00002e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e60| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00002e70| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00002e80| 20 20 20 31 31 36 35 20 | 20 34 34 30 32 31 31 30 | 1165 | 4402110|
|00002e90| 33 36 33 20 20 20 37 34 | 30 32 00 20 00 00 00 00 |363 74|02. ....|
|00002ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003000| 23 64 65 66 69 6e 65 20 | 41 5f 47 52 4f 55 50 09 |#define |A_GROUP.|
|00003010| 31 0a 23 64 65 66 69 6e | 65 20 41 5f 55 53 45 52 |1.#defin|e A_USER|
|00003020| 09 30 0a 0a 2f 2a 0a 20 | 2a 20 6d 61 63 72 6f 73 |.0../*. |* macros|
|00003030| 20 74 6f 20 64 69 73 61 | 73 73 65 6d 62 6c 65 20 | to disa|ssemble |
|00003040| 74 68 65 20 70 61 63 6b | 65 64 20 61 63 6c 20 69 |the pack|ed acl i|
|00003050| 6e 20 74 68 65 20 69 6e | 6f 64 65 0a 20 2a 2f 0a |n the in|ode. */.|
|00003060| 23 69 66 64 65 66 20 4b | 45 52 4e 45 4c 0a 23 64 |#ifdef K|ERNEL.#d|
|00003070| 65 66 69 6e 65 20 61 63 | 6c 65 5f 74 79 70 65 28 |efine ac|le_type(|
|00003080| 69 70 2c 6e 29 09 28 20 | 28 20 28 69 70 29 2d 3e |ip,n).( |( (ip)->|
|00003090| 69 5f 61 63 6c 65 5b 28 | 6e 29 2f 32 5d 20 3e 3e |i_acle[(|n)/2] >>|
|000030a0| 20 28 28 28 6e 29 25 32 | 29 20 3f 20 33 20 3a 20 | (((n)%2|) ? 3 : |
|000030b0| 37 29 20 29 20 26 20 30 | 31 20 29 0a 23 64 65 66 |7) ) & 0|1 ).#def|
|000030c0| 69 6e 65 20 61 63 6c 65 | 5f 69 64 28 69 70 2c 6e |ine acle|_id(ip,n|
|000030d0| 29 09 28 69 70 29 2d 3e | 69 5f 61 63 6c 69 64 5b |).(ip)->|i_aclid[|
|000030e0| 28 6e 29 5d 0a 23 64 65 | 66 69 6e 65 20 61 63 6c |(n)].#de|fine acl|
|000030f0| 65 5f 6d 6f 64 65 28 69 | 70 2c 6e 29 09 28 20 28 |e_mode(i|p,n).( (|
|00003100| 20 28 69 70 29 2d 3e 69 | 5f 61 63 6c 65 5b 28 6e | (ip)->i|_acle[(n|
|00003110| 29 2f 32 5d 20 3e 3e 20 | 28 28 28 6e 29 25 32 29 |)/2] >> |(((n)%2)|
|00003120| 20 3f 20 30 20 3a 20 34 | 29 20 29 20 26 20 30 37 | ? 0 : 4|) ) & 07|
|00003130| 20 29 0a 23 64 65 66 69 | 6e 65 20 6f 6b 5f 61 63 | ).#defi|ne ok_ac|
|00003140| 6c 65 28 69 70 2c 6e 29 | 09 28 20 28 20 61 63 6c |le(ip,n)|.( ( acl|
|00003150| 65 5f 74 79 70 65 28 28 | 69 70 29 2c 28 6e 29 29 |e_type((|ip),(n))|
|00003160| 20 21 3d 20 41 5f 55 53 | 45 52 20 29 20 7c 7c 20 | != A_US|ER ) || |
|00003170| 28 20 61 63 6c 65 5f 69 | 64 28 28 69 70 29 2c 28 |( acle_i|d((ip),(|
|00003180| 6e 29 29 20 21 3d 20 30 | 20 29 20 29 0a 23 65 6c |n)) != 0| ) ).#el|
|00003190| 73 65 0a 23 64 65 66 69 | 6e 65 20 6f 6b 5f 75 61 |se.#defi|ne ok_ua|
|000031a0| 63 6c 65 28 61 29 09 28 | 20 28 20 28 61 29 2e 61 |cle(a).(| ( (a).a|
|000031b0| 5f 74 79 70 65 20 21 3d | 20 41 5f 55 53 45 52 20 |_type !=| A_USER |
|000031c0| 29 20 7c 7c 20 28 20 28 | 61 29 2e 61 5f 69 64 20 |) || ( (|a).a_id |
|000031d0| 21 3d 20 30 20 29 20 29 | 0a 23 65 6e 64 69 66 0a |!= 0 ) )|.#endif.|
|000031e0| 0a 73 74 72 75 63 74 20 | 61 63 6c 65 20 7b 0a 09 |.struct |acle {..|
|000031f0| 63 68 61 72 20 61 5f 74 | 79 70 65 3b 09 2f 2a 20 |char a_t|ype;./* |
|00003200| 41 5f 47 52 4f 55 50 20 | 6f 72 20 41 5f 55 53 45 |A_GROUP |or A_USE|
|00003210| 52 20 2a 2f 0a 09 63 68 | 61 72 20 61 5f 6d 6f 64 |R */..ch|ar a_mod|
|00003220| 65 3b 09 2f 2a 20 30 20 | 28 6e 6f 20 70 65 72 6d |e;./* 0 |(no perm|
|00003230| 69 73 73 69 6f 6e 29 20 | 74 68 72 6f 75 67 68 20 |ission) |through |
|00003240| 37 20 28 72 77 78 29 20 | 2a 2f 0a 09 69 6e 74 20 |7 (rwx) |*/..int |
|00003250| 61 5f 69 64 3b 09 2f 2a | 20 67 69 64 20 6f 72 20 |a_id;./*| gid or |
|00003260| 75 69 64 2c 20 64 65 70 | 65 6e 64 69 6e 67 20 2a |uid, dep|ending *|
|00003270| 2f 0a 7d 3b 0a 32 29 20 | 3f 20 30 20 3a 20 34 29 |/.};.2) |? 0 : 4)|
|00003280| 3b 0a 09 69 70 2d 3e 69 | 5f 61 63 6c 69 64 5b 6e |;..ip->i|_aclid[n|
|00003290| 5d 20 3d 20 61 2e 61 5f | 69 64 3b 0a 7d 0a 0a 2f |] = a.a_|id;.}../|
|000032a0| 2a 0a 20 2a 20 6e 75 6c | 6c 5f 61 63 6c 65 28 29 |*. * nul|l_acle()|
|000032b0| 20 70 75 74 73 20 61 6e | 20 65 6e 64 2d 6f 66 2d | puts an| end-of-|
|000032c0| 61 63 6c 20 6d 61 72 6b | 65 72 20 69 6e 20 74 68 |acl mark|er in th|
|000032d0| 65 20 61 63 6c 20 61 74 | 20 65 6e 74 72 79 20 6e |e acl at| entry n|
|000032e0| 2e 0a 20 2a 20 74 68 65 | 20 65 6e 64 2d 6f 66 2d |.. * the| end-of-|
|000032f0| 61 63 6c 20 6d 61 72 6b | 65 72 20 6c 6f 6f 6b 73 |acl mark|er looks|
|00003300| 20 6c 69 6b 65 20 61 6e | 20 61 63 6c 20 65 6e 74 | like an| acl ent|
|00003310| 72 79 20 66 6f 72 20 72 | 6f 6f 74 0a 20 2a 20 28 |ry for r|oot. * (|
|00003320| 61 5f 74 79 70 65 20 3d | 3d 20 41 5f 55 53 45 52 |a_type =|= A_USER|
|00003330| 20 20 26 26 20 61 5f 69 | 64 20 3d 3d 20 30 29 2e | && a_i|d == 0).|
|00003340| 0a 20 2a 2f 0a 6e 75 6c | 6c 5f 61 63 6c 65 28 20 |. */.nul|l_acle( |
|00003350| 69 70 2c 20 6e 20 29 0a | 73 74 72 75 63 74 20 69 |ip, n ).|struct i|
|00003360| 6e 6f 64 65 20 2a 69 70 | 3b 0a 69 6e 74 20 6e 3b |node *ip|;.int n;|
|00003370| 0a 7b 0a 09 2f 2a 20 63 | 6c 65 61 72 20 74 68 65 |.{../* c|lear the|
|00003380| 20 74 79 70 65 20 61 6e | 64 20 6d 6f 64 65 20 66 | type an|d mode f|
|00003390| 69 65 6c 64 73 20 2a 2f | 0a 09 69 70 2d 3e 69 5f |ields */|..ip->i_|
|000033a0| 61 63 6c 65 5b 6e 2f 32 | 5d 20 26 3d 20 30 31 37 |acle[n/2|] &= 017|
|000033b0| 20 3c 3c 20 28 28 6e 25 | 32 29 20 3f 20 34 20 3a | << ((n%|2) ? 4 :|
|000033c0| 20 30 29 3b 0a 0a 09 2f | 2a 20 63 6c 65 61 72 20 | 0);.../|* clear |
|000033d0| 74 68 65 20 69 64 20 66 | 69 65 6c 64 20 2a 2f 0a |the id f|ield */.|
|000033e0| 09 69 70 2d 3e 69 5f 61 | 63 6c 69 64 5b 6e 5d 20 |.ip->i_a|clid[n] |
|000033f0| 3d 20 30 3b 0a 7d 0a 0a | 2f 2a 0a 20 2a 20 67 65 |= 0;.}..|/*. * ge|
|00003400| 61 63 63 65 73 73 2d 6c | 69 73 74 73 2f 63 68 61 |access-l|ists/cha|
|00003410| 63 6c 2e 63 00 00 00 00 | 00 00 00 00 00 00 00 00 |cl.c....|........|
|00003420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003460| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00003470| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00003480| 20 20 20 34 37 32 35 20 | 20 34 34 30 32 31 31 30 | 4725 | 4402110|
|00003490| 33 36 35 20 20 20 37 37 | 31 37 00 20 00 00 00 00 |365 77|17. ....|
|000034a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003500| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003600| 23 69 6e 63 6c 75 64 65 | 20 3c 73 74 64 69 6f 2e |#include| <stdio.|
|00003610| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 3c 73 79 73 |h>.#incl|ude <sys|
|00003620| 2f 70 61 72 61 6d 2e 68 | 3e 0a 23 69 6e 63 6c 75 |/param.h|>.#inclu|
|00003630| 64 65 20 3c 73 79 73 2f | 61 63 6c 2e 68 3e 0a 23 |de <sys/|acl.h>.#|
|00003640| 69 6e 63 6c 75 64 65 20 | 3c 67 72 70 2e 68 3e 0a |include |<grp.h>.|
|00003650| 23 69 6e 63 6c 75 64 65 | 20 3c 70 77 64 2e 68 3e |#include| <pwd.h>|
|00003660| 0a 23 69 6e 63 6c 75 64 | 65 20 22 6a 6a 67 2e 68 |.#includ|e "jjg.h|
|00003670| 22 0a 0a 23 64 65 66 69 | 6e 65 20 45 52 52 5f 46 |"..#defi|ne ERR_F|
|00003680| 41 54 41 4c 20 31 09 2f | 2a 20 66 6f 72 20 74 68 |ATAL 1./|* for th|
|00003690| 65 20 65 72 72 28 29 20 | 72 6f 75 74 69 6e 65 20 |e err() |routine |
|000036a0| 2a 2f 0a 23 64 65 66 69 | 6e 65 20 45 52 52 5f 4e |*/.#defi|ne ERR_N|
|000036b0| 4f 4e 46 41 54 41 4c 20 | 30 09 2f 2a 20 66 6f 72 |ONFATAL |0./* for|
|000036c0| 20 74 68 65 20 65 72 72 | 28 29 20 72 6f 75 74 69 | the err|() routi|
|000036d0| 6e 65 20 2a 2f 0a 0a 2f | 2a 0a 20 2a 20 63 61 6c |ne */../|*. * cal|
|000036e0| 6c 69 6e 67 20 73 65 71 | 75 65 6e 63 65 3a 20 63 |ling seq|uence: c|
|000036f0| 68 61 63 6c 20 5b 2d 75 | 20 5b 75 73 65 72 20 6d |hacl [-u| [user m|
|00003700| 6f 64 65 5d 5d 20 5b 2d | 67 20 5b 67 72 6f 75 70 |ode]] [-|g [group|
|00003710| 20 6d 6f 64 65 5d 5d 20 | 2d 66 20 5b 66 69 6c 65 | mode]] |-f [file|
|00003720| 5d 0a 20 2a 0a 20 2a 20 | 69 74 65 6d 73 20 65 6e |]. *. * |items en|
|00003730| 63 6c 6f 73 65 64 20 69 | 6e 20 62 72 61 63 6b 65 |closed i|n bracke|
|00003740| 74 73 20 6d 61 79 20 72 | 65 70 65 61 74 2e 0a 20 |ts may r|epeat.. |
|00003750| 2a 2f 0a 6d 61 69 6e 28 | 61 72 67 63 2c 20 61 72 |*/.main(|argc, ar|
|00003760| 67 76 2c 20 65 6e 76 69 | 72 6f 6e 29 0a 69 6e 74 |gv, envi|ron).int|
|00003770| 20 61 72 67 63 3b 0a 63 | 68 61 72 20 2a 61 72 67 | argc;.c|har *arg|
|00003780| 76 5b 5d 2c 20 2a 65 6e | 76 69 72 6f 6e 5b 5d 3b |v[], *en|viron[];|
|00003790| 0a 7b 0a 09 69 6e 74 20 | 69 2c 20 6a 2c 20 6e 61 |.{..int |i, j, na|
|000037a0| 3b 0a 09 73 74 72 75 63 | 74 20 61 63 6c 65 20 61 |;..struc|t acle a|
|000037b0| 63 6c 5b 4d 41 58 41 43 | 4c 5d 3b 0a 09 69 6e 74 |cl[MAXAC|L];..int|
|000037c0| 20 69 73 5f 75 5f 74 79 | 70 65 3b 0a 09 69 6e 74 | is_u_ty|pe;..int|
|000037d0| 20 66 69 6c 65 63 3b 0a | 09 69 6e 74 20 73 74 61 | filec;.|.int sta|
|000037e0| 74 75 73 3b 0a 0a 09 6e | 61 20 3d 20 30 3b 0a 0a |tus;...n|a = 0;..|
|000037f0| 09 66 6f 72 20 28 20 69 | 20 3d 20 31 3b 20 69 20 |.for ( i| = 1; i |
|00003800| 3c 20 61 72 67 63 3b 20 | 69 2b 2b 20 29 20 7b 0a |< argc; |i++ ) {.|
|00003810| 09 09 69 66 20 28 20 65 | 71 75 61 6c 28 61 72 67 |..if ( e|qual(arg|
|00003820| 76 5b 69 5d 2c 22 2d 75 | 22 29 20 7c 7c 20 65 71 |v[i],"-u|") || eq|
|00003830| 75 61 6c 28 61 72 67 76 | 5b 69 5d 2c 22 2d 67 22 |ual(argv|[i],"-g"|
|00003840| 29 20 29 20 7b 0a 09 09 | 09 69 73 5f 75 5f 74 79 |) ) {...|.is_u_ty|
|00003850| 70 65 20 3d 20 65 71 75 | 61 6c 28 20 61 72 67 76 |pe = equ|al( argv|
|00003860| 5b 69 5d 2c 20 22 2d 75 | 22 20 29 3b 0a 0a 09 09 |[i], "-u|" );....|
|00003870| 7d 20 65 6c 73 65 20 69 | 66 20 28 20 65 71 75 61 |} else i|f ( equa|
|00003880| 6c 28 61 72 67 76 5b 69 | 5d 2c 22 2d 66 22 29 20 |l(argv[i|],"-f") |
|00003890| 29 20 7b 0a 09 09 09 62 | 72 65 61 6b 3b 0a 0a 09 |) {....b|reak;...|
|000038a0| 09 7d 20 65 6c 73 65 20 | 69 66 20 28 20 2a 61 72 |.} else |if ( *ar|
|000038b0| 67 76 5b 69 5d 20 3d 3d | 20 27 2d 27 20 29 20 7b |gv[i] ==| '-' ) {|
|000038c0| 0a 09 09 09 65 72 72 28 | 20 45 52 52 5f 46 41 54 |....err(| ERR_FAT|
|000038d0| 41 4c 2c 20 22 75 6e 72 | 65 63 6f 67 6e 69 7a 65 |AL, "unr|ecognize|
|000038e0| 64 20 6f 70 74 69 6f 6e | 20 2d 20 25 73 22 2c 20 |d option| - %s", |
|000038f0| 61 72 67 76 5b 69 5d 20 | 29 3b 0a 0a 09 09 7d 20 |argv[i] |);....} |
|00003900| 65 6c 73 65 20 7b 0a 09 | 09 09 73 74 72 75 63 74 |else {..|..struct|
|00003910| 20 70 61 73 73 77 64 20 | 2a 75 70 3b 0a 09 09 09 | passwd |*up;....|
|00003920| 73 74 72 75 63 74 20 67 | 72 6f 75 70 20 2a 67 70 |struct g|roup *gp|
|00003930| 3b 0a 09 09 09 69 6e 74 | 20 76 61 6c 69 64 5f 6e |;....int| valid_n|
|00003940| 61 6d 65 3b 0a 0a 09 09 | 09 69 66 20 28 20 69 73 |ame;....|.if ( is|
|00003950| 5f 75 5f 74 79 70 65 20 | 29 20 7b 0a 09 09 09 09 |_u_type |) {.....|
|00003960| 75 70 20 3d 20 67 65 74 | 70 77 6e 61 6d 28 20 61 |up = get|pwnam( a|
|00003970| 72 67 76 5b 69 5d 20 29 | 3b 0a 09 09 09 09 76 61 |rgv[i] )|;.....va|
|00003980| 6c 69 64 5f 6e 61 6d 65 | 20 3d 20 75 70 20 21 3d |lid_name| = up !=|
|00003990| 20 4e 55 4c 4c 3b 0a 09 | 09 09 7d 20 65 6c 73 65 | NULL;..|..} else|
|000039a0| 20 7b 0a 09 09 09 09 67 | 70 20 3d 20 67 65 74 67 | {.....g|p = getg|
|000039b0| 72 6e 61 6d 28 20 61 72 | 67 76 5b 69 5d 20 29 3b |rnam( ar|gv[i] );|
|000039c0| 0a 09 09 09 09 76 61 6c | 69 64 5f 6e 61 6d 65 20 |.....val|id_name |
|000039d0| 3d 20 67 70 20 21 3d 20 | 4e 55 4c 4c 3b 0a 09 09 |= gp != |NULL;...|
|000039e0| 09 7d 0a 0a 09 09 09 69 | 66 20 28 20 76 61 6c 69 |.}.....i|f ( vali|
|000039f0| 64 5f 6e 61 6d 65 20 29 | 20 7b 0a 09 09 09 09 69 |d_name )| {.....i|
|00003a00| 2b 2b 3b 0a 0a 09 09 09 | 09 69 66 20 28 20 69 20 |++;.....|.if ( i |
|00003a10| 3c 20 61 72 67 63 20 29 | 20 7b 0a 09 09 09 09 09 |< argc )| {......|
|00003a20| 69 66 20 28 20 69 73 5f | 75 5f 74 79 70 65 20 26 |if ( is_|u_type &|
|00003a30| 26 20 75 70 2d 3e 70 77 | 5f 75 69 64 20 3d 3d 20 |& up->pw|_uid == |
|00003a40| 30 20 29 20 7b 0a 09 09 | 09 09 09 09 65 72 72 28 |0 ) {...|....err(|
|00003a50| 20 45 52 52 5f 4e 4f 4e | 46 41 54 41 4c 2c 20 22 | ERR_NON|FATAL, "|
|00003a60| 77 61 72 6e 69 6e 67 3a | 20 63 61 6e 6e 6f 74 20 |warning:| cannot |
|00003a70| 64 65 6e 79 20 61 63 63 | 65 73 73 20 74 6f 20 75 |deny acc|ess to u|
|00003a80| 73 65 72 20 25 73 22 2c | 20 22 72 6f 6f 74 22 20 |ser %s",| "root" |
|00003a90| 29 3b 0a 09 09 09 09 09 | 7d 20 65 6c 73 65 20 7b |);......|} else {|
|00003aa0| 0a 09 09 09 09 09 09 69 | 66 20 28 20 73 73 63 61 |.......i|f ( ssca|
|00003ab0| 6e 66 28 20 61 72 67 76 | 5b 69 5d 2c 20 22 25 64 |nf( argv|[i], "%d|
|00003ac0| 22 2c 20 26 61 63 6c 5b | 6e 61 5d 2e 61 5f 6d 6f |", &acl[|na].a_mo|
|00003ad0| 64 65 20 29 20 3d 3d 20 | 31 20 26 26 0a 09 09 09 |de ) == |1 &&....|
|00003ae0| 09 09 09 09 61 63 6c 5b | 6e 61 5d 2e 61 5f 6d 6f |....acl[|na].a_mo|
|00003af0| 64 65 20 3e 3d 20 30 20 | 26 26 20 61 63 6c 5b 6e |de >= 0 |&& acl[n|
|00003b00| 61 5d 2e 61 5f 6d 6f 64 | 65 20 3c 3d 20 37 20 29 |a].a_mod|e <= 7 )|
|00003b10| 20 7b 0a 09 09 09 09 09 | 09 09 69 66 20 28 20 6e | {......|..if ( n|
|00003b20| 61 20 3c 20 4d 41 58 41 | 43 4c 20 29 20 7b 0a 09 |a < MAXA|CL ) {..|
|00003b30| 09 09 09 09 09 09 09 61 | 63 6c 5b 6e 61 5d 2e 61 |.......a|cl[na].a|
|00003b40| 5f 74 79 70 65 20 3d 20 | 69 73 5f 75 5f 74 79 70 |_type = |is_u_typ|
|00003b50| 65 20 3f 20 41 5f 55 53 | 45 52 20 3a 20 41 5f 47 |e ? A_US|ER : A_G|
|00003b60| 52 4f 55 50 3b 0a 09 09 | 09 09 09 09 09 09 61 63 |ROUP;...|......ac|
|00003b70| 6c 5b 6e 61 5d 2e 61 5f | 69 64 20 3d 20 69 73 5f |l[na].a_|id = is_|
|00003b80| 75 5f 74 79 70 65 20 3f | 20 75 70 2d 3e 70 77 5f |u_type ?| up->pw_|
|00003b90| 75 69 64 20 3a 20 67 70 | 2d 3e 67 72 5f 67 69 64 |uid : gp|->gr_gid|
|00003ba0| 3b 0a 09 09 09 09 09 09 | 09 09 6e 61 2b 2b 3b 0a |;.......|..na++;.|
|00003bb0| 09 09 09 09 09 09 09 7d | 20 65 6c 73 65 20 7b 0a |.......}| else {.|
|00003bc0| 09 09 09 09 09 09 09 09 | 65 72 72 28 20 45 52 52 |........|err( ERR|
|00003bd0| 5f 4e 4f 4e 46 41 54 41 | 4c 2c 20 22 77 61 72 6e |_NONFATA|L, "warn|
|00003be0| 69 6e 67 3a 20 74 6f 6f | 20 6d 61 6e 79 20 61 63 |ing: too| many ac|
|00003bf0| 6c 20 65 6e 74 72 69 65 | 73 20 28 6d 75 73 74 20 |l entrie|s (must |
|00003c00| 62 65 20 6e 6f 20 6d 6f | 72 65 20 74 68 61 6e 20 |be no mo|re than |
|00003c10| 25 64 29 22 2c 20 4d 41 | 58 41 43 4c 20 29 3b 0a |%d)", MA|XACL );.|
|00003c20| 09 09 09 09 09 09 09 7d | 0a 0a 09 09 09 09 09 09 |.......}|........|
|00003c30| 7d 20 65 6c 73 65 20 7b | 0a 09 09 09 09 09 09 09 |} else {|........|
|00003c40| 65 72 72 28 20 45 52 52 | 5f 46 41 54 41 4c 2c 20 |err( ERR|_FATAL, |
|00003c50| 22 75 6e 72 65 63 6f 67 | 6e 69 7a 61 62 6c 65 20 |"unrecog|nizable |
|00003c60| 6d 6f 64 65 20 2d 20 25 | 64 20 28 6d 75 73 74 20 |mode - %|d (must |
|00003c70| 62 65 20 30 2d 37 29 22 | 2c 20 61 63 6c 5b 6e 61 |be 0-7)"|, acl[na|
|00003c80| 5d 2e 61 5f 6d 6f 64 65 | 20 29 3b 0a 09 09 09 09 |].a_mode| );.....|
|00003c90| 09 09 7d 0a 09 09 09 09 | 09 7d 0a 0a 09 09 09 09 |..}.....|.}......|
|00003ca0| 7d 20 65 6c 73 65 20 7b | 0a 09 09 09 09 09 65 72 |} else {|......er|
|00003cb0| 72 28 20 45 52 52 5f 46 | 41 54 41 4c 2c 20 22 65 |r( ERR_F|ATAL, "e|
|00003cc0| 78 70 65 63 74 65 64 20 | 6d 6f 64 65 20 61 66 74 |xpected |mode aft|
|00003cd0| 65 72 20 25 73 6e 61 6d | 65 22 2c 20 69 73 5f 75 |er %snam|e", is_u|
|00003ce0| 5f 74 79 70 65 20 3f 20 | 22 75 73 65 72 22 20 3a |_type ? |"user" :|
|00003cf0| 20 22 67 72 6f 75 70 22 | 20 29 3b 0a 09 09 09 09 | "group"| );.....|
|00003d00| 7d 0a 09 09 09 7d 20 65 | 6c 73 65 20 7b 0a 09 09 |}....} e|lse {...|
|00003d10| 09 09 65 72 72 28 20 45 | 52 52 5f 46 41 54 41 4c |..err( E|RR_FATAL|
|00003d20| 2c 20 69 73 5f 75 5f 74 | 79 70 65 20 3f 20 22 6e |, is_u_t|ype ? "n|
|00003d30| 6f 20 73 75 63 68 20 75 | 73 65 72 20 2d 20 25 73 |o such u|ser - %s|
|00003d40| 22 20 3a 20 22 6e 6f 20 | 73 75 63 68 20 67 72 6f |" : "no |such gro|
|00003d50| 75 70 20 2d 20 25 73 22 | 2c 20 61 72 67 76 5b 69 |up - %s"|, argv[i|
|00003d60| 5d 20 29 3b 0a 09 09 09 | 7d 0a 09 09 7d 0a 09 7d |] );....|}...}..}|
|00003d70| 0a 0a 2f 2a 09 0a 09 70 | 72 69 6e 74 66 28 20 22 |../*...p|rintf( "|
|00003d80| 6e 75 6d 62 65 72 20 6f | 66 20 61 63 6c 65 20 3d |number o|f acle =|
|00003d90| 20 25 64 5c 6e 22 2c 20 | 6e 61 20 29 3b 0a 09 70 | %d\n", |na );..p|
|00003da0| 72 69 6e 74 66 28 20 22 | 66 69 6c 65 20 6c 69 73 |rintf( "|file lis|
|00003db0| 74 20 62 65 67 69 6e 73 | 20 61 74 20 25 64 3b 20 |t begins| at %d; |
|00003dc0| 61 72 67 63 20 3d 20 25 | 64 5c 6e 22 2c 20 69 2b |argc = %|d\n", i+|
|00003dd0| 31 2c 20 61 72 67 63 20 | 29 3b 0a 0a 09 66 6f 72 |1, argc |);...for|
|00003de0| 20 28 20 69 20 3d 20 30 | 3b 20 69 20 3c 20 6e 61 | ( i = 0|; i < na|
|00003df0| 3b 20 69 2b 2b 20 29 20 | 7b 0a 09 09 70 72 69 6e |; i++ ) |{...prin|
|00003e00| 74 66 28 20 22 74 79 70 | 65 20 3d 20 25 73 20 69 |tf( "typ|e = %s i|
|00003e10| 64 20 3d 20 25 64 20 6d | 6f 64 65 20 3d 20 25 64 |d = %d m|ode = %d|
|00003e20| 5c 6e 22 2c 20 61 63 6c | 5b 69 5d 2e 61 5f 74 79 |\n", acl|[i].a_ty|
|00003e30| 70 65 20 3d 3d 20 41 5f | 47 52 4f 55 50 20 3f 20 |pe == A_|GROUP ? |
|00003e40| 22 2d 67 22 0a 09 09 09 | 3a 20 22 2d 75 22 2c 20 |"-g"....|: "-u", |
|00003e50| 61 63 6c 5b 69 5d 2e 61 | 5f 69 64 2c 20 61 63 6c |acl[i].a|_id, acl|
|00003e60| 5b 69 5d 2e 61 5f 6d 6f | 64 65 20 29 3b 0a 09 7d |[i].a_mo|de );..}|
|00003e70| 0a 2a 2f 0a 0a 09 73 74 | 61 74 75 73 20 3d 20 30 |.*/...st|atus = 0|
|00003e80| 3b 0a 09 66 6f 72 20 28 | 20 66 69 6c 65 63 20 3d |;..for (| filec =|
|00003e90| 20 69 2b 31 3b 20 66 69 | 6c 65 63 20 3c 20 61 72 | i+1; fi|lec < ar|
|00003ea0| 67 63 3b 20 66 69 6c 65 | 63 2b 2b 20 29 20 7b 0a |gc; file|c++ ) {.|
|00003eb0| 09 09 69 66 20 28 20 73 | 65 74 61 63 6c 28 20 61 |..if ( s|etacl( a|
|00003ec0| 72 67 76 5b 66 69 6c 65 | 63 5d 2c 20 6e 61 2c 20 |rgv[file|c], na, |
|00003ed0| 61 63 6c 20 29 20 21 3d | 20 30 20 29 20 7b 0a 09 |acl ) !=| 0 ) {..|
|00003ee0| 09 09 70 65 72 72 6f 72 | 28 20 61 72 67 76 5b 66 |..perror|( argv[f|
|00003ef0| 69 6c 65 63 5d 20 29 3b | 0a 09 09 09 73 74 61 74 |ilec] );|....stat|
|00003f00| 75 73 2b 2b 3b 0a 09 09 | 7d 0a 09 7d 0a 09 65 78 |us++;...|}..}..ex|
|00003f10| 69 74 28 20 73 74 61 74 | 75 73 20 29 3b 0a 7d 0a |it( stat|us );.}.|
|00003f20| 0a 65 72 72 28 20 6c 65 | 76 65 6c 2c 20 66 6d 74 |.err( le|vel, fmt|
|00003f30| 2c 20 61 72 67 20 29 0a | 69 6e 74 20 6c 65 76 65 |, arg ).|int leve|
|00003f40| 6c 3b 0a 63 68 61 72 20 | 2a 66 6d 74 2c 20 2a 61 |l;.char |*fmt, *a|
|00003f50| 72 67 3b 0a 7b 0a 09 63 | 68 61 72 20 62 75 66 5b |rg;.{..c|har buf[|
|00003f60| 32 34 30 5d 3b 0a 0a 09 | 73 70 72 69 6e 74 66 28 |240];...|sprintf(|
|00003f70| 20 62 75 66 2c 20 66 6d | 74 2c 20 61 72 67 20 29 | buf, fm|t, arg )|
|00003f80| 3b 0a 09 66 70 72 69 6e | 74 66 28 20 73 74 64 65 |;..fprin|tf( stde|
|00003f90| 72 72 2c 20 22 63 68 61 | 63 6c 3a 20 25 73 5c 6e |rr, "cha|cl: %s\n|
|00003fa0| 22 2c 20 62 75 66 20 29 | 3b 0a 0a 09 69 66 20 28 |", buf )|;...if (|
|00003fb0| 20 6c 65 76 65 6c 20 3d | 3d 20 45 52 52 5f 46 41 | level =|= ERR_FA|
|00003fc0| 54 41 4c 20 29 0a 09 09 | 65 78 69 74 28 20 31 20 |TAL )...|exit( 1 |
|00003fd0| 29 3b 0a 7d 0a 70 3b 0a | 09 69 6e 74 20 69 3b 0a |);.}.p;.|.int i;.|
|00003fe0| 0a 09 2f 2a 0a 09 20 2a | 20 63 6f 70 79 20 74 68 |../*.. *| copy th|
|00003ff0| 65 20 75 73 65 72 27 73 | 20 61 72 67 75 6d 65 6e |e user's| argumen|
|00004000| 61 63 63 65 73 73 2d 6c | 69 73 74 73 2f 63 68 61 |access-l|ists/cha|
|00004010| 63 6c 2e 6c 00 00 00 00 | 00 00 00 00 00 00 00 00 |cl.l....|........|
|00004020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004060| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00004070| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00004080| 20 20 20 37 35 32 31 20 | 20 34 34 30 32 31 31 30 | 7521 | 4402110|
|00004090| 33 36 37 20 20 20 37 37 | 32 37 00 20 00 00 00 00 |367 77|27. ....|
|000040a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004200| 27 27 27 20 24 48 65 61 | 64 65 72 3a 24 0a 27 27 |''' $Hea|der:$.''|
|00004210| 27 20 0a 27 27 27 20 24 | 4c 6f 67 3a 24 0a 2e 64 |' .''' $|Log:$..d|
|00004220| 65 20 53 68 0a 2e 62 72 | 0a 2e 6e 65 20 35 0a 2e |e Sh..br|..ne 5..|
|00004230| 50 50 0a 5c 66 42 5c 5c | 24 31 5c 66 52 0a 2e 50 |PP.\fB\\|$1\fR..P|
|00004240| 50 0a 2e 2e 0a 2e 64 65 | 20 53 70 0a 2e 69 66 20 |P.....de| Sp..if |
|00004250| 74 20 2e 73 70 20 2e 35 | 76 0a 2e 69 66 20 6e 20 |t .sp .5|v..if n |
|00004260| 2e 73 70 0a 2e 2e 0a 27 | 27 27 0a 27 27 27 20 20 |.sp....'|''.''' |
|00004270| 20 20 20 53 65 74 20 75 | 70 20 5c 2a 28 2d 2d 20 | Set u|p \*(-- |
|00004280| 74 6f 20 67 69 76 65 20 | 61 6e 20 75 6e 62 72 65 |to give |an unbre|
|00004290| 61 6b 61 62 6c 65 20 64 | 61 73 68 3b 0a 27 27 27 |akable d|ash;.'''|
|000042a0| 20 20 20 20 20 73 74 72 | 69 6e 67 20 54 72 20 68 | str|ing Tr h|
|000042b0| 6f 6c 64 73 20 75 73 65 | 72 20 64 65 66 69 6e 65 |olds use|r define|
|000042c0| 64 20 74 72 61 6e 73 6c | 61 74 69 6f 6e 20 73 74 |d transl|ation st|
|000042d0| 72 69 6e 67 2e 0a 27 27 | 27 20 20 20 20 20 42 65 |ring..''|' Be|
|000042e0| 6c 6c 20 53 79 73 74 65 | 6d 20 4c 6f 67 6f 20 69 |ll Syste|m Logo i|
|000042f0| 73 20 75 73 65 64 20 61 | 73 20 61 20 64 75 6d 6d |s used a|s a dumm|
|00004300| 79 20 63 68 61 72 61 63 | 74 65 72 2e 0a 27 27 27 |y charac|ter..'''|
|00004310| 0a 2e 69 65 20 6e 20 5c | 7b 5c 0a 2e 74 72 20 5c |..ie n \|{\..tr \|
|00004320| 28 62 73 2d 5c 2a 28 54 | 72 0a 2e 64 73 20 2d 2d |(bs-\*(T|r..ds --|
|00004330| 20 5c 28 62 73 2d 0a 2e | 69 66 20 28 5c 6e 28 2e | \(bs-..|if (\n(.|
|00004340| 48 3d 34 75 29 26 28 31 | 6d 3d 32 34 75 29 20 2e |H=4u)&(1|m=24u) .|
|00004350| 64 73 20 2d 2d 20 5c 28 | 62 73 5c 68 27 2d 31 32 |ds -- \(|bs\h'-12|
|00004360| 75 27 5c 28 62 73 5c 68 | 27 2d 31 32 75 27 2d 5c |u'\(bs\h|'-12u'-\|
|00004370| 22 20 64 69 61 62 6c 6f | 20 31 30 20 70 69 74 63 |" diablo| 10 pitc|
|00004380| 68 0a 2e 69 66 20 28 5c | 6e 28 2e 48 3d 34 75 29 |h..if (\|n(.H=4u)|
|00004390| 26 28 31 6d 3d 32 30 75 | 29 20 2e 64 73 20 2d 2d |&(1m=20u|) .ds --|
|000043a0| 20 5c 28 62 73 5c 68 27 | 2d 31 32 75 27 5c 28 62 | \(bs\h'|-12u'\(b|
|000043b0| 73 5c 68 27 2d 38 75 27 | 2d 5c 22 20 64 69 61 62 |s\h'-8u'|-\" diab|
|000043c0| 6c 6f 20 31 32 20 70 69 | 74 63 68 0a 2e 64 73 20 |lo 12 pi|tch..ds |
|000043d0| 4c 22 20 22 22 0a 2e 64 | 73 20 52 22 20 22 22 0a |L" ""..d|s R" "".|
|000043e0| 2e 64 73 20 4c 27 20 27 | 0a 2e 64 73 20 52 27 20 |.ds L' '|..ds R' |
|000043f0| 27 0a 27 62 72 5c 7d 0a | 2e 65 6c 5c 7b 5c 0a 2e |'.'br\}.|.el\{\..|
|00004400| 64 73 20 2d 2d 20 5c 28 | 65 6d 5c 7c 0a 2e 74 72 |ds -- \(|em\|..tr|
|00004410| 20 5c 2a 28 54 72 0a 2e | 64 73 20 4c 22 20 60 60 | \*(Tr..|ds L" ``|
|00004420| 0a 2e 64 73 20 52 22 20 | 27 27 0a 2e 64 73 20 4c |..ds R" |''..ds L|
|00004430| 27 20 60 0a 2e 64 73 20 | 52 27 20 27 0a 27 62 72 |' `..ds |R' '.'br|
|00004440| 5c 7d 0a 2e 54 48 20 63 | 68 61 63 6c 20 31 20 4c |\}..TH c|hacl 1 L|
|00004450| 4f 43 41 4c 0a 2e 53 48 | 20 4e 41 4d 45 0a 63 68 |OCAL..SH| NAME.ch|
|00004460| 61 63 6c 20 2d 20 63 68 | 61 6e 67 65 20 74 68 65 |acl - ch|ange the|
|00004470| 20 61 63 63 65 73 73 20 | 63 6f 6e 74 72 6f 6c 20 | access |control |
|00004480| 6c 69 73 74 20 66 6f 72 | 20 66 69 6c 65 73 0a 2e |list for| files..|
|00004490| 53 48 20 53 59 4e 4f 50 | 53 49 53 0a 2e 42 20 63 |SH SYNOP|SIS..B c|
|000044a0| 68 61 63 6c 0a 5b 2d 75 | 20 75 73 65 72 6e 61 6d |hacl.[-u| usernam|
|000044b0| 65 20 6d 6f 64 65 20 2e | 2e 2e 5d 20 5b 2d 67 20 |e mode .|..] [-g |
|000044c0| 67 72 6f 75 70 6e 61 6d | 65 20 6d 6f 64 65 20 2e |groupnam|e mode .|
|000044d0| 2e 2e 5d 20 2d 66 20 66 | 69 6c 65 20 2e 2e 2e 0a |..] -f f|ile ....|
|000044e0| 2e 53 48 20 44 45 53 43 | 52 49 50 54 49 4f 4e 0a |.SH DESC|RIPTION.|
|000044f0| 2e 49 20 63 68 61 63 6c | 0a 63 68 61 6e 67 65 73 |.I chacl|.changes|
|00004500| 20 74 68 65 20 61 63 63 | 65 73 73 20 63 6f 6e 74 | the acc|ess cont|
|00004510| 72 6f 6c 20 6c 69 73 74 | 73 20 66 6f 72 20 6f 6e |rol list|s for on|
|00004520| 65 20 6f 72 20 6d 6f 72 | 65 20 66 69 6c 65 73 2e |e or mor|e files.|
|00004530| 20 20 54 68 65 0a 61 63 | 63 65 73 73 20 63 6f 6e | The.ac|cess con|
|00004540| 74 72 6f 6c 20 6c 69 73 | 74 20 28 6f 72 20 61 63 |trol lis|t (or ac|
|00004550| 6c 29 20 61 6e 64 20 74 | 68 65 20 66 69 6c 65 27 |l) and t|he file'|
|00004560| 73 20 6f 77 6e 65 72 73 | 68 69 70 20 61 72 65 20 |s owners|hip are |
|00004570| 75 73 65 64 20 74 6f 20 | 64 65 74 65 72 6d 69 6e |used to |determin|
|00004580| 65 0a 77 68 69 63 68 20 | 75 73 65 72 73 20 63 61 |e.which |users ca|
|00004590| 6e 20 61 63 63 65 73 73 | 20 74 68 65 20 66 69 6c |n access| the fil|
|000045a0| 65 2e 0a 2e 50 50 0a 54 | 68 65 0a 2e 42 20 5c 2d |e...PP.T|he..B \-|
|000045b0| 75 0a 6f 70 74 69 6f 6e | 20 6d 61 72 6b 73 20 74 |u.option| marks t|
|000045c0| 68 65 20 62 65 67 69 6e | 6e 69 6e 67 20 6f 66 20 |he begin|ning of |
|000045d0| 61 20 6c 69 73 74 20 6f | 66 20 22 75 73 65 72 6e |a list o|f "usern|
|000045e0| 61 6d 65 20 6d 6f 64 65 | 22 20 70 61 69 72 73 2e |ame mode|" pairs.|
|000045f0| 0a 53 69 6d 69 6c 61 72 | 6c 79 2c 20 74 68 65 0a |.Similar|ly, the.|
|00004600| 2e 42 20 5c 2d 67 0a 6f | 70 74 69 6f 6e 20 6d 61 |.B \-g.o|ption ma|
|00004610| 72 6b 73 20 74 68 65 20 | 62 65 67 69 6e 6e 69 6e |rks the |beginnin|
|00004620| 67 20 6f 66 20 61 20 6c | 69 73 74 20 6f 66 20 22 |g of a l|ist of "|
|00004630| 67 72 6f 75 70 6e 61 6d | 65 20 6d 6f 64 65 22 20 |groupnam|e mode" |
|00004640| 70 61 69 72 73 2e 0a 41 | 20 22 6e 61 6d 65 20 6d |pairs..A| "name m|
|00004650| 6f 64 65 22 20 70 61 69 | 72 20 69 73 20 72 65 66 |ode" pai|r is ref|
|00004660| 65 72 72 65 64 20 74 6f | 20 61 73 20 61 6e 20 22 |erred to| as an "|
|00004670| 61 63 6c 20 65 6e 74 72 | 79 22 2e 0a 54 68 65 0a |acl entr|y"..The.|
|00004680| 2e 42 20 5c 2d 66 0a 6f | 70 74 69 6f 6e 20 73 65 |.B \-f.o|ption se|
|00004690| 70 61 72 61 74 65 73 20 | 74 68 65 20 61 63 6c 20 |parates |the acl |
|000046a0| 66 72 6f 6d 20 74 68 65 | 20 6c 69 73 74 20 6f 66 |from the| list of|
|000046b0| 20 66 69 6c 65 73 20 69 | 6e 76 6f 6c 76 65 64 2e | files i|nvolved.|
|000046c0| 0a 2e 50 50 0a 54 68 65 | 20 75 73 65 72 6e 61 6d |..PP.The| usernam|
|000046d0| 65 20 6f 72 20 67 72 6f | 75 70 6e 61 6d 65 20 69 |e or gro|upname i|
|000046e0| 73 20 68 75 6e 74 65 64 | 20 66 6f 72 20 69 6e 20 |s hunted| for in |
|000046f0| 74 68 65 20 66 69 72 73 | 74 20 66 69 65 6c 64 20 |the firs|t field |
|00004700| 6f 66 20 2f 65 74 63 2f | 70 61 73 73 77 64 0a 6f |of /etc/|passwd.o|
|00004710| 72 20 2f 65 74 63 2f 67 | 72 6f 75 70 20 2c 20 72 |r /etc/g|roup , r|
|00004720| 65 73 70 65 63 74 69 76 | 65 6c 79 2e 0a 54 68 65 |espectiv|ely..The|
|00004730| 20 6d 6f 64 65 20 69 73 | 20 61 20 73 69 6e 67 6c | mode is| a singl|
|00004740| 65 20 64 69 67 69 74 20 | 69 6e 20 74 68 65 20 72 |e digit |in the r|
|00004750| 61 6e 67 65 20 5b 30 2d | 37 5d 20 69 6e 64 69 63 |ange [0-|7] indic|
|00004760| 61 74 69 6e 67 20 72 65 | 61 64 2d 77 72 69 74 65 |ating re|ad-write|
|00004770| 2d 65 78 65 63 75 74 65 | 0a 70 65 72 6d 69 73 73 |-execute|.permiss|
|00004780| 69 6f 6e 20 61 6c 61 0a | 2e 49 52 20 63 68 6d 6f |ion ala.|.IR chmo|
|00004790| 64 20 2e 0a 2e 50 50 0a | 54 68 65 20 63 75 72 72 |d ...PP.|The curr|
|000047a0| 65 6e 74 20 69 6d 70 6c | 65 6d 65 6e 74 61 74 69 |ent impl|ementati|
|000047b0| 6f 6e 20 61 6c 6c 6f 77 | 73 20 75 70 20 74 6f 20 |on allow|s up to |
|000047c0| 38 20 61 63 6c 20 65 6e | 74 72 69 65 73 2e 20 20 |8 acl en|tries. |
|000047d0| 54 68 69 73 20 69 73 20 | 64 65 66 69 6e 65 64 0a |This is |defined.|
|000047e0| 62 79 20 74 68 65 20 63 | 6f 6e 73 74 61 6e 74 20 |by the c|onstant |
|000047f0| 4d 41 58 41 43 4c 20 69 | 6e 20 3c 73 79 73 2f 61 |MAXACL i|n <sys/a|
|00004800| 63 6c 2e 68 3e 2e 20 20 | 41 6e 20 65 6e 74 72 79 |cl.h>. |An entry|
|00004810| 20 63 61 6e 6e 6f 74 20 | 64 65 6e 79 20 61 63 63 | cannot |deny acc|
|00004820| 65 73 73 0a 74 6f 20 74 | 68 65 20 73 75 70 65 72 |ess.to t|he super|
|00004830| 75 73 65 72 2e 0a 53 65 | 74 74 69 6e 67 20 61 20 |user..Se|tting a |
|00004840| 66 69 6c 65 27 73 20 61 | 63 6c 20 72 65 6d 6f 76 |file's a|cl remov|
|00004850| 65 73 20 61 6e 79 20 65 | 78 69 73 74 69 6e 67 20 |es any e|xisting |
|00004860| 61 63 6c 20 65 6e 74 72 | 69 65 73 20 28 69 2e 65 |acl entr|ies (i.e|
|00004870| 2e 2c 20 63 61 6c 6c 73 | 20 74 6f 0a 2e 49 20 63 |., calls| to..I c|
|00004880| 68 61 63 6c 0a 64 6f 20 | 6e 6f 74 20 61 63 63 75 |hacl.do |not accu|
|00004890| 6d 75 6c 61 74 65 29 2e | 20 20 4f 6e 6c 79 20 74 |mulate).| Only t|
|000048a0| 68 65 20 6f 77 6e 65 72 | 20 6f 66 20 61 20 66 69 |he owner| of a fi|
|000048b0| 6c 65 20 28 6f 72 20 74 | 68 65 20 73 75 70 65 72 |le (or t|he super|
|000048c0| 75 73 65 72 29 20 63 61 | 6e 0a 63 68 61 6e 67 65 |user) ca|n.change|
|000048d0| 20 69 74 73 20 61 63 6c | 2e 0a 2e 50 50 0a 41 63 | its acl|...PP.Ac|
|000048e0| 63 65 73 73 20 64 65 63 | 69 73 69 6f 6e 73 20 61 |cess dec|isions a|
|000048f0| 72 65 20 6d 61 64 65 20 | 69 6e 20 74 68 65 20 66 |re made |in the f|
|00004900| 6f 6c 6c 6f 77 69 6e 67 | 20 77 61 79 2e 0a 2e 53 |ollowing| way...S|
|00004910| 70 0a 09 49 66 20 74 68 | 65 20 65 66 66 65 63 74 |p..If th|e effect|
|00004920| 69 76 65 20 75 73 65 72 | 69 64 20 28 65 75 69 64 |ive user|id (euid|
|00004930| 29 20 69 73 20 74 68 65 | 20 73 75 70 65 72 75 73 |) is the| superus|
|00004940| 65 72 2c 20 67 72 61 6e | 74 20 61 63 63 65 73 73 |er, gran|t access|
|00004950| 2e 0a 2e 53 70 0a 09 45 | 6c 73 65 20 69 66 20 74 |...Sp..E|lse if t|
|00004960| 68 65 20 65 75 69 64 20 | 69 73 20 74 68 65 20 66 |he euid |is the f|
|00004970| 69 6c 65 27 73 20 6f 77 | 6e 69 6e 67 20 75 69 64 |ile's ow|ning uid|
|00004980| 2c 20 63 68 65 63 6b 20 | 74 68 65 20 6f 77 6e 65 |, check |the owne|
|00004990| 72 20 70 65 72 6d 69 73 | 73 69 6f 6e 2e 0a 2e 53 |r permis|sion...S|
|000049a0| 70 0a 09 45 6c 73 65 20 | 69 66 20 74 68 65 20 65 |p..Else |if the e|
|000049b0| 75 69 64 20 6d 61 74 63 | 68 65 73 20 61 6e 20 61 |uid matc|hes an a|
|000049c0| 63 6c 20 65 6e 74 72 79 | 2c 0a 63 68 65 63 6b 20 |cl entry|,.check |
|000049d0| 74 68 65 20 65 6e 74 72 | 79 27 73 20 6d 6f 64 65 |the entr|y's mode|
|000049e0| 2e 0a 2e 53 70 0a 09 45 | 6c 73 65 20 69 66 20 74 |...Sp..E|lse if t|
|000049f0| 68 65 20 65 66 66 65 63 | 74 69 76 65 20 67 72 6f |he effec|tive gro|
|00004a00| 75 70 69 64 20 28 65 67 | 69 64 29 20 6d 61 74 63 |upid (eg|id) matc|
|00004a10| 68 65 73 20 61 6e 20 61 | 63 6c 20 65 6e 74 72 79 |hes an a|cl entry|
|00004a20| 2c 0a 63 68 65 63 6b 20 | 74 68 65 20 65 6e 74 72 |,.check |the entr|
|00004a30| 79 27 73 20 6d 6f 64 65 | 2e 0a 2e 53 70 0a 09 45 |y's mode|...Sp..E|
|00004a40| 6c 73 65 20 69 66 20 73 | 6f 6d 65 20 6d 65 6d 62 |lse if s|ome memb|
|00004a50| 65 72 20 6f 66 20 74 68 | 65 20 67 72 6f 75 70 20 |er of th|e group |
|00004a60| 6c 69 73 74 20 6d 61 74 | 63 68 65 73 20 61 6e 20 |list mat|ches an |
|00004a70| 61 63 6c 20 65 6e 74 72 | 79 2c 0a 63 68 65 63 6b |acl entr|y,.check|
|00004a80| 20 74 68 65 20 65 6e 74 | 72 79 27 73 20 6d 6f 64 | the ent|ry's mod|
|00004a90| 65 2e 0a 2e 53 70 0a 09 | 45 6c 73 65 20 69 66 20 |e...Sp..|Else if |
|00004aa0| 74 68 65 20 65 67 69 64 | 20 69 73 20 74 68 65 20 |the egid| is the |
|00004ab0| 66 69 6c 65 27 73 20 6f | 77 6e 69 6e 67 20 67 69 |file's o|wning gi|
|00004ac0| 64 2c 20 63 68 65 63 6b | 20 74 68 65 20 67 72 6f |d, check| the gro|
|00004ad0| 75 70 20 70 65 72 6d 69 | 73 73 69 6f 6e 2e 0a 2e |up permi|ssion...|
|00004ae0| 53 70 0a 09 45 6c 73 65 | 20 69 66 20 73 6f 6d 65 |Sp..Else| if some|
|00004af0| 20 6d 65 6d 62 65 72 20 | 6f 66 20 74 68 65 20 67 | member |of the g|
|00004b00| 72 6f 75 70 20 6c 69 73 | 74 20 6d 61 74 63 68 65 |roup lis|t matche|
|00004b10| 73 20 74 68 65 20 66 69 | 6c 65 27 73 20 6f 77 6e |s the fi|le's own|
|00004b20| 69 6e 67 20 67 69 64 2c | 0a 63 68 65 63 6b 20 74 |ing gid,|.check t|
|00004b30| 68 65 20 67 72 6f 75 70 | 20 70 65 72 6d 69 73 73 |he group| permiss|
|00004b40| 69 6f 6e 2e 0a 2e 53 70 | 0a 09 45 6c 73 65 20 63 |ion...Sp|..Else c|
|00004b50| 68 65 63 6b 20 74 68 65 | 20 6f 74 68 65 72 20 70 |heck the| other p|
|00004b60| 65 72 6d 69 73 73 69 6f | 6e 2e 0a 2e 50 50 0a 4f |ermissio|n...PP.O|
|00004b70| 72 64 65 72 20 77 69 74 | 68 69 6e 20 74 68 65 20 |rder wit|hin the |
|00004b80| 61 63 6c 20 69 73 20 69 | 6d 70 6f 72 74 61 6e 74 |acl is i|mportant|
|00004b90| 2e 20 20 57 68 65 6e 20 | 6d 61 74 63 68 69 6e 67 |. When |matching|
|00004ba0| 20 61 67 61 69 6e 73 74 | 20 74 68 65 20 61 63 6c | against| the acl|
|00004bb0| 2c 20 65 6e 74 72 69 65 | 73 0a 61 72 65 20 63 68 |, entrie|s.are ch|
|00004bc0| 65 63 6b 65 64 20 69 6e | 20 6f 72 64 65 72 2c 20 |ecked in| order, |
|00004bd0| 73 74 6f 70 70 69 6e 67 | 20 61 74 20 74 68 65 20 |stopping| at the |
|00004be0| 66 69 72 73 74 20 6d 61 | 74 63 68 2e 20 20 28 4d |first ma|tch. (M|
|00004bf0| 75 6c 74 69 70 6c 65 20 | 6d 61 74 63 68 65 73 20 |ultiple |matches |
|00004c00| 63 6f 75 6c 64 0a 6f 6e | 6c 79 20 6f 63 63 75 72 |could.on|ly occur|
|00004c10| 20 69 6e 20 67 72 6f 75 | 70 20 61 63 6c 20 65 6e | in grou|p acl en|
|00004c20| 74 72 69 65 73 2e 29 0a | 2e 53 48 20 45 58 41 4d |tries.).|.SH EXAM|
|00004c30| 50 4c 45 53 0a 09 63 68 | 61 63 6c 20 2d 75 20 6a |PLES..ch|acl -u j|
|00004c40| 6a 67 20 37 20 2d 67 20 | 64 37 35 20 30 20 2d 66 |jg 7 -g |d75 0 -f|
|00004c50| 20 67 6f 73 73 69 70 0a | 2e 53 70 0a 67 72 61 6e | gossip.|.Sp.gran|
|00004c60| 74 73 20 66 75 6c 6c 20 | 61 63 63 65 73 73 20 74 |ts full |access t|
|00004c70| 6f 20 74 68 65 20 66 69 | 6c 65 20 22 67 6f 73 73 |o the fi|le "goss|
|00004c80| 69 70 22 20 74 6f 20 74 | 68 65 20 75 73 65 72 20 |ip" to t|he user |
|00004c90| 22 6a 6a 67 22 2c 20 61 | 6e 64 20 64 65 6e 69 65 |"jjg", a|nd denie|
|00004ca0| 73 20 61 6c 6c 0a 61 63 | 63 65 73 73 20 74 6f 20 |s all.ac|cess to |
|00004cb0| 74 68 69 73 20 66 69 6c | 65 20 74 6f 20 74 68 65 |this fil|e to the|
|00004cc0| 20 67 72 6f 75 70 20 22 | 64 37 35 22 2e 0a 2e 53 | group "|d75"...S|
|00004cd0| 70 0a 09 63 68 61 63 6c | 20 2d 66 20 72 75 6d 6f |p..chacl| -f rumo|
|00004ce0| 72 73 0a 2e 53 70 0a 72 | 65 73 65 74 73 20 74 68 |rs..Sp.r|esets th|
|00004cf0| 65 20 61 63 6c 20 66 6f | 72 20 74 68 65 20 66 69 |e acl fo|r the fi|
|00004d00| 6c 65 20 22 72 75 6d 6f | 72 73 22 2e 0a 2e 53 70 |le "rumo|rs"...Sp|
|00004d10| 0a 09 63 68 61 63 6c 20 | 2d 75 20 6a 6a 67 20 36 |..chacl |-u jjg 6|
|00004d20| 20 75 75 63 70 20 34 20 | 2d 66 20 66 61 63 74 73 | uucp 4 |-f facts|
|00004d30| 0a 2e 53 70 0a 67 72 61 | 6e 74 73 20 72 65 61 64 |..Sp.gra|nts read|
|00004d40| 2d 77 72 69 74 65 20 61 | 63 63 65 73 73 20 74 6f |-write a|ccess to|
|00004d50| 20 74 68 65 20 75 73 65 | 72 20 22 6a 6a 67 22 20 | the use|r "jjg" |
|00004d60| 61 6e 64 20 72 65 61 64 | 20 61 63 63 65 73 73 20 |and read| access |
|00004d70| 74 6f 20 74 68 65 20 75 | 73 65 72 0a 22 75 75 63 |to the u|ser."uuc|
|00004d80| 70 22 20 66 6f 72 20 74 | 68 65 20 66 69 6c 65 20 |p" for t|he file |
|00004d90| 22 66 61 63 74 73 22 2e | 0a 2e 53 48 20 44 49 41 |"facts".|..SH DIA|
|00004da0| 47 4e 4f 53 54 49 43 53 | 0a 56 61 72 69 6f 75 73 |GNOSTICS|.Various|
|00004db0| 20 6d 65 73 73 61 67 65 | 73 20 69 6e 64 69 63 61 | message|s indica|
|00004dc0| 74 65 20 73 79 6e 74 61 | 63 74 69 63 20 65 72 72 |te synta|ctic err|
|00004dd0| 6f 72 73 20 69 6e 20 74 | 68 65 20 63 6f 6d 6d 61 |ors in t|he comma|
|00004de0| 6e 64 20 6c 69 6e 65 20 | 61 72 67 75 6d 65 6e 74 |nd line |argument|
|00004df0| 73 2e 0a 4d 69 6e 6f 72 | 20 65 72 72 6f 72 73 20 |s..Minor| errors |
|00004e00| 61 72 65 20 66 6c 61 67 | 67 65 64 20 77 69 74 68 |are flag|ged with|
|00004e10| 20 61 20 22 77 61 72 6e | 69 6e 67 3a 22 2c 20 61 | a "warn|ing:", a|
|00004e20| 6e 64 20 69 6e 64 69 63 | 61 74 65 20 74 68 61 74 |nd indic|ate that|
|00004e30| 0a 2e 49 20 63 68 61 63 | 6c 0a 63 61 72 72 69 65 |..I chac|l.carrie|
|00004e40| 64 20 6f 6e 20 61 6e 64 | 20 73 65 74 20 74 68 65 |d on and| set the|
|00004e50| 20 61 63 63 65 73 73 20 | 63 6f 6e 74 72 6f 6c 20 | access |control |
|00004e60| 6c 69 73 74 73 20 66 6f | 72 20 74 68 65 20 66 69 |lists fo|r the fi|
|00004e70| 6c 65 73 2e 0a 2e 50 50 | 0a 2e 49 20 63 68 61 63 |les...PP|..I chac|
|00004e80| 6c 0a 72 65 74 75 72 6e | 73 20 77 69 74 68 20 65 |l.return|s with e|
|00004e90| 78 69 74 20 73 74 61 74 | 75 73 20 30 20 69 66 20 |xit stat|us 0 if |
|00004ea0| 61 6c 6c 20 69 73 20 77 | 65 6c 6c 3b 20 20 77 69 |all is w|ell; wi|
|00004eb0| 74 68 20 65 78 69 74 20 | 73 74 61 74 75 73 20 31 |th exit |status 1|
|00004ec0| 20 69 66 20 74 68 65 72 | 65 0a 61 72 65 20 65 72 | if ther|e.are er|
|00004ed0| 72 6f 72 73 20 69 6e 20 | 74 68 65 20 63 6f 6d 6d |rors in |the comm|
|00004ee0| 61 6e 64 20 6c 69 6e 65 | 20 61 72 67 75 6d 65 6e |and line| argumen|
|00004ef0| 74 73 3b 20 20 6f 72 20 | 77 69 74 68 20 65 78 69 |ts; or |with exi|
|00004f00| 74 20 73 74 61 74 75 73 | 20 67 72 65 61 74 65 72 |t status| greater|
|00004f10| 0a 74 68 61 6e 20 30 20 | 69 66 20 74 68 65 20 61 |.than 0 |if the a|
|00004f20| 63 6c 73 20 66 6f 72 20 | 73 6f 6d 65 20 66 69 6c |cls for |some fil|
|00004f30| 65 73 20 63 6f 75 6c 64 | 20 6e 6f 74 20 62 65 20 |es could| not be |
|00004f40| 73 65 74 2e 0a 2e 53 48 | 20 53 45 45 20 41 4c 53 |set...SH| SEE ALS|
|00004f50| 4f 0a 63 70 61 63 6c 28 | 31 29 2c 0a 65 64 61 63 |O.cpacl(|1),.edac|
|00004f60| 6c 28 31 29 2c 0a 6c 73 | 61 63 6c 28 31 29 2c 0a |l(1),.ls|acl(1),.|
|00004f70| 67 65 74 61 63 6c 28 32 | 29 2c 0a 73 65 74 61 63 |getacl(2|),.setac|
|00004f80| 6c 28 32 29 0a 2e 53 48 | 20 43 41 56 45 41 54 0a |l(2)..SH| CAVEAT.|
|00004f90| 54 68 65 20 69 6d 70 6c | 65 6d 65 6e 74 61 74 69 |The impl|ementati|
|00004fa0| 6f 6e 20 6f 66 20 61 63 | 63 65 73 73 20 63 6f 6e |on of ac|cess con|
|00004fb0| 74 72 6f 6c 20 6c 69 73 | 74 73 20 69 73 20 61 6e |trol lis|ts is an|
|00004fc0| 20 65 78 70 65 72 69 6d | 65 6e 74 2e 20 20 54 68 | experim|ent. Th|
|00004fd0| 69 73 0a 69 6d 70 6c 65 | 6d 65 6e 74 61 74 69 6f |is.imple|mentatio|
|00004fe0| 6e 20 73 74 6f 72 65 73 | 20 74 68 65 20 61 63 63 |n stores| the acc|
|00004ff0| 65 73 73 20 63 6f 6e 74 | 72 6f 6c 20 6c 69 73 74 |ess cont|rol list|
|00005000| 20 69 6e 20 61 20 28 66 | 6f 72 6d 65 72 6c 79 29 | in a (f|ormerly)|
|00005010| 20 75 6e 75 73 65 64 20 | 66 69 65 6c 64 0a 69 6e | unused |field.in|
|00005020| 20 74 68 65 20 69 6e 6f | 64 65 2e 0a 54 68 65 72 | the ino|de..Ther|
|00005030| 65 20 69 73 20 6e 6f 20 | 67 75 61 72 61 6e 74 65 |e is no |guarante|
|00005040| 65 20 74 68 61 74 20 66 | 75 74 75 72 65 20 76 65 |e that f|uture ve|
|00005050| 72 73 69 6f 6e 73 20 6f | 66 20 55 6e 69 78 20 77 |rsions o|f Unix w|
|00005060| 69 6c 6c 20 6e 6f 74 20 | 75 73 65 20 74 68 69 73 |ill not |use this|
|00005070| 20 66 69 65 6c 64 0a 66 | 6f 72 20 73 6f 6d 65 74 | field.f|or somet|
|00005080| 68 69 6e 67 20 65 6c 73 | 65 2e 0a 2e 50 50 0a 54 |hing els|e...PP.T|
|00005090| 68 65 72 65 66 6f 72 65 | 2c 20 79 6f 75 20 73 68 |herefore|, you sh|
|000050a0| 6f 75 6c 64 20 6f 6e 6c | 79 20 75 73 65 20 61 63 |ould onl|y use ac|
|000050b0| 63 65 73 73 20 63 6f 6e | 74 72 6f 6c 20 6c 69 73 |cess con|trol lis|
|000050c0| 74 73 20 77 69 74 68 20 | 74 68 65 20 66 75 6c 6c |ts with |the full|
|000050d0| 0a 75 6e 64 65 72 73 74 | 61 6e 64 69 6e 67 20 74 |.underst|anding t|
|000050e0| 68 61 74 20 79 6f 75 20 | 61 72 65 20 70 61 72 74 |hat you |are part|
|000050f0| 69 63 69 70 61 74 69 6e | 67 20 69 6e 20 61 6e 20 |icipatin|g in an |
|00005100| 65 78 70 65 72 69 6d 65 | 6e 74 2e 0a 2e 53 48 20 |experime|nt...SH |
|00005110| 42 55 47 53 0a 41 6c 6c | 6f 77 69 6e 67 20 77 69 |BUGS.All|owing wi|
|00005120| 6c 64 63 61 72 64 73 20 | 69 6e 20 74 68 65 20 61 |ldcards |in the a|
|00005130| 63 6c 20 65 6e 74 72 79 | 27 73 20 6e 61 6d 65 20 |cl entry|'s name |
|00005140| 77 6f 75 6c 64 20 62 65 | 20 75 73 65 66 75 6c 2e |would be| useful.|
|00005150| 0a 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005200| 61 63 63 65 73 73 2d 6c | 69 73 74 73 2f 63 70 61 |access-l|ists/cpa|
|00005210| 63 6c 2e 63 00 00 00 00 | 00 00 00 00 00 00 00 00 |cl.c....|........|
|00005220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005260| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00005270| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00005280| 20 20 20 31 32 35 30 20 | 20 34 34 30 32 31 31 30 | 1250 | 4402110|
|00005290| 33 37 30 20 20 20 37 37 | 31 31 00 20 00 00 00 00 |370 77|11. ....|
|000052a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005400| 23 69 6e 63 6c 75 64 65 | 20 3c 73 74 64 69 6f 2e |#include| <stdio.|
|00005410| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 3c 73 79 73 |h>.#incl|ude <sys|
|00005420| 2f 70 61 72 61 6d 2e 68 | 3e 0a 23 69 6e 63 6c 75 |/param.h|>.#inclu|
|00005430| 64 65 20 3c 73 79 73 2f | 61 63 6c 2e 68 3e 0a 0a |de <sys/|acl.h>..|
|00005440| 2f 2a 0a 20 2a 20 63 70 | 61 63 6c 20 3a 20 63 6f |/*. * cp|acl : co|
|00005450| 70 79 20 74 68 65 20 61 | 63 63 65 73 73 20 63 6f |py the a|ccess co|
|00005460| 6e 74 72 6f 6c 20 6c 69 | 73 74 20 6f 66 20 6f 6e |ntrol li|st of on|
|00005470| 65 20 66 69 6c 65 20 74 | 6f 20 6f 74 68 65 72 20 |e file t|o other |
|00005480| 66 69 6c 65 73 2e 0a 20 | 2a 0a 20 2a 20 75 73 61 |files.. |*. * usa|
|00005490| 67 65 20 3a 20 63 70 61 | 63 6c 20 66 72 6f 6d 66 |ge : cpa|cl fromf|
|000054a0| 69 6c 65 20 74 6f 66 69 | 6c 65 20 5b 74 6f 66 69 |ile tofi|le [tofi|
|000054b0| 6c 65 20 2e 2e 2e 5d 0a | 20 2a 2f 0a 6d 61 69 6e |le ...].| */.main|
|000054c0| 28 61 72 67 63 2c 20 61 | 72 67 76 2c 20 65 6e 76 |(argc, a|rgv, env|
|000054d0| 69 72 6f 6e 29 0a 69 6e | 74 20 61 72 67 63 3b 0a |iron).in|t argc;.|
|000054e0| 63 68 61 72 20 2a 61 72 | 67 76 5b 5d 2c 20 2a 65 |char *ar|gv[], *e|
|000054f0| 6e 76 69 72 6f 6e 5b 5d | 3b 0a 7b 0a 09 69 6e 74 |nviron[]|;.{..int|
|00005500| 20 69 3b 0a 09 73 74 72 | 75 63 74 20 61 63 6c 65 | i;..str|uct acle|
|00005510| 20 61 63 6c 5b 4d 41 58 | 41 43 4c 5d 3b 0a 09 69 | acl[MAX|ACL];..i|
|00005520| 6e 74 20 73 74 61 74 75 | 73 3b 0a 09 69 6e 74 20 |nt statu|s;..int |
|00005530| 6e 61 3b 0a 0a 09 73 74 | 61 74 75 73 20 3d 20 30 |na;...st|atus = 0|
|00005540| 3b 0a 0a 09 69 66 20 28 | 20 61 72 67 63 20 3e 20 |;...if (| argc > |
|00005550| 31 20 29 20 7b 0a 09 09 | 69 66 20 28 20 28 6e 61 |1 ) {...|if ( (na|
|00005560| 20 3d 20 67 65 74 61 63 | 6c 28 61 72 67 76 5b 31 | = getac|l(argv[1|
|00005570| 5d 2c 4d 41 58 41 43 4c | 2c 61 63 6c 29 29 20 21 |],MAXACL|,acl)) !|
|00005580| 3d 20 2d 31 20 29 20 7b | 0a 09 09 09 66 6f 72 20 |= -1 ) {|....for |
|00005590| 28 20 69 20 3d 20 32 3b | 20 69 20 3c 20 61 72 67 |( i = 2;| i < arg|
|000055a0| 63 3b 20 69 2b 2b 20 29 | 20 7b 0a 09 09 09 09 69 |c; i++ )| {.....i|
|000055b0| 66 20 28 20 73 65 74 61 | 63 6c 28 20 61 72 67 76 |f ( seta|cl( argv|
|000055c0| 5b 69 5d 2c 20 6e 61 2c | 20 61 63 6c 20 29 20 21 |[i], na,| acl ) !|
|000055d0| 3d 20 30 20 29 20 7b 0a | 09 09 09 09 09 70 65 72 |= 0 ) {.|.....per|
|000055e0| 72 6f 72 28 20 61 72 67 | 76 5b 69 5d 20 29 3b 0a |ror( arg|v[i] );.|
|000055f0| 09 09 09 09 09 73 74 61 | 74 75 73 2b 2b 3b 0a 09 |.....sta|tus++;..|
|00005600| 09 09 09 7d 0a 09 09 09 | 7d 0a 09 09 7d 20 65 6c |...}....|}...} el|
|00005610| 73 65 20 7b 0a 09 09 09 | 70 65 72 72 6f 72 28 20 |se {....|perror( |
|00005620| 61 72 67 76 5b 31 5d 20 | 29 3b 0a 09 09 09 73 74 |argv[1] |);....st|
|00005630| 61 74 75 73 2b 2b 3b 0a | 09 09 7d 0a 09 7d 20 65 |atus++;.|..}..} e|
|00005640| 6c 73 65 20 7b 0a 09 09 | 66 70 72 69 6e 74 66 28 |lse {...|fprintf(|
|00005650| 20 73 74 64 65 72 72 2c | 20 22 63 70 61 63 6c 3a | stderr,| "cpacl:|
|00005660| 20 75 73 61 67 65 3a 20 | 63 70 61 63 6c 20 66 72 | usage: |cpacl fr|
|00005670| 6f 6d 66 69 6c 65 20 74 | 6f 66 69 6c 65 20 5b 74 |omfile t|ofile [t|
|00005680| 6f 66 69 6c 65 20 2e 2e | 2e 5d 5c 6e 22 20 29 3b |ofile ..|.]\n" );|
|00005690| 0a 09 7d 0a 0a 09 65 78 | 69 74 28 20 73 74 61 74 |..}...ex|it( stat|
|000056a0| 75 73 20 29 3b 0a 7d 0a | 20 75 73 65 72 6e 61 6d |us );.}.| usernam|
|000056b0| 65 20 6d 6f 64 65 20 2e | 2e 2e 5d 20 5b 2d 67 20 |e mode .|..] [-g |
|000056c0| 67 72 6f 75 70 6e 61 6d | 65 20 6d 6f 64 65 20 2e |groupnam|e mode .|
|000056d0| 2e 2e 5d 20 2d 66 20 66 | 69 6c 65 20 2e 2e 2e 0a |..] -f f|ile ....|
|000056e0| 2e 53 48 20 44 45 53 43 | 52 49 50 54 49 4f 4e 0a |.SH DESC|RIPTION.|
|000056f0| 2e 49 20 63 68 61 63 6c | 0a 63 68 61 6e 67 65 73 |.I chacl|.changes|
|00005700| 20 74 68 65 20 61 63 63 | 65 73 73 20 63 6f 6e 74 | the acc|ess cont|
|00005710| 72 6f 6c 20 6c 69 73 74 | 73 20 66 6f 72 20 6f 6e |rol list|s for on|
|00005720| 65 20 6f 72 20 6d 6f 72 | 65 20 66 69 6c 65 73 2e |e or mor|e files.|
|00005730| 20 20 54 68 65 0a 61 63 | 63 65 73 73 20 63 6f 6e | The.ac|cess con|
|00005740| 74 72 6f 6c 20 6c 69 73 | 74 20 28 6f 72 20 61 63 |trol lis|t (or ac|
|00005750| 6c 29 20 61 6e 64 20 74 | 68 65 20 66 69 6c 65 27 |l) and t|he file'|
|00005760| 73 20 6f 77 6e 65 72 73 | 68 69 70 20 61 72 65 20 |s owners|hip are |
|00005770| 75 73 65 64 20 74 6f 20 | 64 65 74 65 72 6d 69 6e |used to |determin|
|00005780| 65 0a 77 68 69 63 68 20 | 75 73 65 72 73 20 63 61 |e.which |users ca|
|00005790| 6e 20 61 63 63 65 73 73 | 20 74 68 65 20 66 69 6c |n access| the fil|
|000057a0| 65 2e 0a 2e 50 50 0a 54 | 68 65 0a 2e 42 20 5c 2d |e...PP.T|he..B \-|
|000057b0| 75 0a 6f 70 74 69 6f 6e | 20 6d 61 72 6b 73 20 74 |u.option| marks t|
|000057c0| 68 65 20 62 65 67 69 6e | 6e 69 6e 67 20 6f 66 20 |he begin|ning of |
|000057d0| 61 20 6c 69 73 74 20 6f | 66 20 22 75 73 65 72 6e |a list o|f "usern|
|000057e0| 61 6d 65 20 6d 6f 64 65 | 22 20 70 61 69 72 73 2e |ame mode|" pairs.|
|000057f0| 0a 53 69 6d 69 6c 61 72 | 6c 79 2c 20 74 68 65 0a |.Similar|ly, the.|
|00005800| 61 63 63 65 73 73 2d 6c | 69 73 74 73 2f 63 70 61 |access-l|ists/cpa|
|00005810| 63 6c 2e 6c 00 00 00 00 | 00 00 00 00 00 00 00 00 |cl.l....|........|
|00005820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005860| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00005870| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00005880| 20 20 20 33 34 31 37 20 | 20 34 34 30 32 31 31 30 | 3417 | 4402110|
|00005890| 33 37 31 20 20 20 37 37 | 33 32 00 20 00 00 00 00 |371 77|32. ....|
|000058a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005900| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a00| 27 27 27 20 24 48 65 61 | 64 65 72 3a 24 0a 27 27 |''' $Hea|der:$.''|
|00005a10| 27 20 0a 27 27 27 20 24 | 4c 6f 67 3a 24 0a 2e 64 |' .''' $|Log:$..d|
|00005a20| 65 20 53 68 0a 2e 62 72 | 0a 2e 6e 65 20 35 0a 2e |e Sh..br|..ne 5..|
|00005a30| 50 50 0a 5c 66 42 5c 5c | 24 31 5c 66 52 0a 2e 50 |PP.\fB\\|$1\fR..P|
|00005a40| 50 0a 2e 2e 0a 2e 64 65 | 20 53 70 0a 2e 69 66 20 |P.....de| Sp..if |
|00005a50| 74 20 2e 73 70 20 2e 35 | 76 0a 2e 69 66 20 6e 20 |t .sp .5|v..if n |
|00005a60| 2e 73 70 0a 2e 2e 0a 27 | 27 27 0a 27 27 27 20 20 |.sp....'|''.''' |
|00005a70| 20 20 20 53 65 74 20 75 | 70 20 5c 2a 28 2d 2d 20 | Set u|p \*(-- |
|00005a80| 74 6f 20 67 69 76 65 20 | 61 6e 20 75 6e 62 72 65 |to give |an unbre|
|00005a90| 61 6b 61 62 6c 65 20 64 | 61 73 68 3b 0a 27 27 27 |akable d|ash;.'''|
|00005aa0| 20 20 20 20 20 73 74 72 | 69 6e 67 20 54 72 20 68 | str|ing Tr h|
|00005ab0| 6f 6c 64 73 20 75 73 65 | 72 20 64 65 66 69 6e 65 |olds use|r define|
|00005ac0| 64 20 74 72 61 6e 73 6c | 61 74 69 6f 6e 20 73 74 |d transl|ation st|
|00005ad0| 72 69 6e 67 2e 0a 27 27 | 27 20 20 20 20 20 42 65 |ring..''|' Be|
|00005ae0| 6c 6c 20 53 79 73 74 65 | 6d 20 4c 6f 67 6f 20 69 |ll Syste|m Logo i|
|00005af0| 73 20 75 73 65 64 20 61 | 73 20 61 20 64 75 6d 6d |s used a|s a dumm|
|00005b00| 79 20 63 68 61 72 61 63 | 74 65 72 2e 0a 27 27 27 |y charac|ter..'''|
|00005b10| 0a 2e 69 65 20 6e 20 5c | 7b 5c 0a 2e 74 72 20 5c |..ie n \|{\..tr \|
|00005b20| 28 62 73 2d 5c 2a 28 54 | 72 0a 2e 64 73 20 2d 2d |(bs-\*(T|r..ds --|
|00005b30| 20 5c 28 62 73 2d 0a 2e | 69 66 20 28 5c 6e 28 2e | \(bs-..|if (\n(.|
|00005b40| 48 3d 34 75 29 26 28 31 | 6d 3d 32 34 75 29 20 2e |H=4u)&(1|m=24u) .|
|00005b50| 64 73 20 2d 2d 20 5c 28 | 62 73 5c 68 27 2d 31 32 |ds -- \(|bs\h'-12|
|00005b60| 75 27 5c 28 62 73 5c 68 | 27 2d 31 32 75 27 2d 5c |u'\(bs\h|'-12u'-\|
|00005b70| 22 20 64 69 61 62 6c 6f | 20 31 30 20 70 69 74 63 |" diablo| 10 pitc|
|00005b80| 68 0a 2e 69 66 20 28 5c | 6e 28 2e 48 3d 34 75 29 |h..if (\|n(.H=4u)|
|00005b90| 26 28 31 6d 3d 32 30 75 | 29 20 2e 64 73 20 2d 2d |&(1m=20u|) .ds --|
|00005ba0| 20 5c 28 62 73 5c 68 27 | 2d 31 32 75 27 5c 28 62 | \(bs\h'|-12u'\(b|
|00005bb0| 73 5c 68 27 2d 38 75 27 | 2d 5c 22 20 64 69 61 62 |s\h'-8u'|-\" diab|
|00005bc0| 6c 6f 20 31 32 20 70 69 | 74 63 68 0a 2e 64 73 20 |lo 12 pi|tch..ds |
|00005bd0| 4c 22 20 22 22 0a 2e 64 | 73 20 52 22 20 22 22 0a |L" ""..d|s R" "".|
|00005be0| 2e 64 73 20 4c 27 20 27 | 0a 2e 64 73 20 52 27 20 |.ds L' '|..ds R' |
|00005bf0| 27 0a 27 62 72 5c 7d 0a | 2e 65 6c 5c 7b 5c 0a 2e |'.'br\}.|.el\{\..|
|00005c00| 64 73 20 2d 2d 20 5c 28 | 65 6d 5c 7c 0a 2e 74 72 |ds -- \(|em\|..tr|
|00005c10| 20 5c 2a 28 54 72 0a 2e | 64 73 20 4c 22 20 60 60 | \*(Tr..|ds L" ``|
|00005c20| 0a 2e 64 73 20 52 22 20 | 27 27 0a 2e 64 73 20 4c |..ds R" |''..ds L|
|00005c30| 27 20 60 0a 2e 64 73 20 | 52 27 20 27 0a 27 62 72 |' `..ds |R' '.'br|
|00005c40| 5c 7d 0a 2e 54 48 20 43 | 50 41 43 4c 20 31 20 4c |\}..TH C|PACL 1 L|
|00005c50| 4f 43 41 4c 0a 2e 53 48 | 20 4e 41 4d 45 0a 63 70 |OCAL..SH| NAME.cp|
|00005c60| 61 63 6c 20 2d 20 63 6f | 70 79 20 74 68 65 20 61 |acl - co|py the a|
|00005c70| 63 63 65 73 73 20 63 6f | 6e 74 72 6f 6c 20 6c 69 |ccess co|ntrol li|
|00005c80| 73 74 20 6f 66 20 6f 6e | 65 20 66 69 6c 65 20 74 |st of on|e file t|
|00005c90| 6f 20 6f 74 68 65 72 20 | 66 69 6c 65 73 0a 2e 53 |o other |files..S|
|00005ca0| 48 20 53 59 4e 4f 50 53 | 49 53 0a 2e 42 20 63 70 |H SYNOPS|IS..B cp|
|00005cb0| 61 63 6c 0a 66 72 6f 6d | 66 69 6c 65 20 74 6f 66 |acl.from|file tof|
|00005cc0| 69 6c 65 20 5b 74 6f 66 | 69 6c 65 20 2e 2e 2e 5d |ile [tof|ile ...]|
|00005cd0| 0a 2e 53 48 20 44 45 53 | 43 52 49 50 54 49 4f 4e |..SH DES|CRIPTION|
|00005ce0| 0a 2e 49 20 63 70 61 63 | 6c 0a 63 6f 70 69 65 73 |..I cpac|l.copies|
|00005cf0| 20 74 68 65 20 61 63 63 | 65 73 73 20 63 6f 6e 74 | the acc|ess cont|
|00005d00| 72 6f 6c 20 6c 69 73 74 | 20 6f 66 20 61 20 66 69 |rol list| of a fi|
|00005d10| 6c 65 20 74 6f 20 74 68 | 65 20 61 63 63 65 73 73 |le to th|e access|
|00005d20| 20 63 6f 6e 74 72 6f 6c | 20 6c 69 73 74 73 20 6f | control| lists o|
|00005d30| 66 0a 6f 6e 65 20 6f 72 | 20 6d 6f 72 65 20 6f 74 |f.one or| more ot|
|00005d40| 68 65 72 20 66 69 6c 65 | 73 2e 20 20 54 68 65 20 |her file|s. The |
|00005d50| 61 63 63 65 73 73 20 63 | 6f 6e 74 72 6f 6c 20 6c |access c|ontrol l|
|00005d60| 69 73 74 0a 61 6e 64 20 | 74 68 65 20 66 69 6c 65 |ist.and |the file|
|00005d70| 27 73 20 6f 77 6e 65 72 | 73 68 69 70 20 61 72 65 |'s owner|ship are|
|00005d80| 20 75 73 65 64 20 74 6f | 20 64 65 74 65 72 6d 69 | used to| determi|
|00005d90| 6e 65 20 77 68 69 63 68 | 20 75 73 65 72 73 20 63 |ne which| users c|
|00005da0| 61 6e 20 61 63 63 65 73 | 73 0a 74 68 65 20 66 69 |an acces|s.the fi|
|00005db0| 6c 65 2e 0a 2e 50 50 0a | 2e 49 20 63 70 61 63 6c |le...PP.|.I cpacl|
|00005dc0| 0a 67 65 74 73 20 74 68 | 65 20 61 63 63 65 73 73 |.gets th|e access|
|00005dd0| 20 63 6f 6e 74 72 6f 6c | 20 6c 69 73 74 20 66 6f | control| list fo|
|00005de0| 72 20 66 72 6f 6d 66 69 | 6c 65 2c 20 61 6e 64 20 |r fromfi|le, and |
|00005df0| 63 6f 70 69 65 73 20 74 | 68 69 73 20 61 63 6c 20 |copies t|his acl |
|00005e00| 74 6f 20 74 68 65 20 61 | 63 6c 0a 66 6f 72 20 65 |to the a|cl.for e|
|00005e10| 61 63 68 20 74 6f 66 69 | 6c 65 2e 0a 2e 53 48 20 |ach tofi|le...SH |
|00005e20| 44 49 41 47 4e 4f 53 54 | 49 43 53 0a 2e 49 20 63 |DIAGNOST|ICS..I c|
|00005e30| 70 61 63 6c 0a 72 65 74 | 75 72 6e 73 20 77 69 74 |pacl.ret|urns wit|
|00005e40| 68 20 65 78 69 74 20 73 | 74 61 74 75 73 20 30 20 |h exit s|tatus 0 |
|00005e50| 69 66 20 61 6c 6c 20 69 | 73 20 77 65 6c 6c 3b 20 |if all i|s well; |
|00005e60| 20 77 69 74 68 20 65 78 | 69 74 20 73 74 61 74 75 | with ex|it statu|
|00005e70| 73 20 31 20 69 66 20 69 | 74 0a 63 6f 75 6c 64 20 |s 1 if i|t.could |
|00005e80| 6e 6f 74 20 67 65 74 20 | 74 68 65 20 61 63 63 65 |not get |the acce|
|00005e90| 73 73 20 63 6f 6e 74 72 | 6f 6c 20 6c 69 73 74 20 |ss contr|ol list |
|00005ea0| 66 6f 72 20 66 72 6f 6d | 66 69 6c 65 3b 20 6f 72 |for from|file; or|
|00005eb0| 20 77 69 74 68 20 65 78 | 69 74 20 73 74 61 74 75 | with ex|it statu|
|00005ec0| 73 0a 67 72 65 61 74 65 | 72 20 74 68 61 6e 20 30 |s.greate|r than 0|
|00005ed0| 20 69 66 20 74 68 65 20 | 61 63 63 65 73 73 20 63 | if the |access c|
|00005ee0| 6f 6e 74 72 6f 6c 20 6c | 69 73 74 73 20 66 6f 72 |ontrol l|ists for|
|00005ef0| 20 73 6f 6d 65 20 74 6f | 66 69 6c 65 73 20 63 6f | some to|files co|
|00005f00| 75 6c 64 20 6e 6f 74 0a | 62 65 20 73 65 74 2e 0a |uld not.|be set..|
|00005f10| 2e 53 48 20 53 45 45 20 | 41 4c 53 4f 0a 63 68 61 |.SH SEE |ALSO.cha|
|00005f20| 63 6c 28 31 29 2c 0a 65 | 64 61 63 6c 28 31 29 2c |cl(1),.e|dacl(1),|
|00005f30| 0a 6c 73 61 63 6c 28 31 | 29 2c 0a 67 65 74 61 63 |.lsacl(1|),.getac|
|00005f40| 6c 28 32 29 2c 0a 73 65 | 74 61 63 6c 28 32 29 0a |l(2),.se|tacl(2).|
|00005f50| 2e 53 48 20 43 41 56 45 | 41 54 0a 54 68 65 20 69 |.SH CAVE|AT.The i|
|00005f60| 6d 70 6c 65 6d 65 6e 74 | 61 74 69 6f 6e 20 6f 66 |mplement|ation of|
|00005f70| 20 61 63 63 65 73 73 20 | 63 6f 6e 74 72 6f 6c 20 | access |control |
|00005f80| 6c 69 73 74 73 20 69 73 | 20 61 6e 20 65 78 70 65 |lists is| an expe|
|00005f90| 72 69 6d 65 6e 74 2e 20 | 20 54 68 69 73 0a 69 6d |riment. | This.im|
|00005fa0| 70 6c 65 6d 65 6e 74 61 | 74 69 6f 6e 20 73 74 6f |plementa|tion sto|
|00005fb0| 72 65 73 20 74 68 65 20 | 61 63 63 65 73 73 20 63 |res the |access c|
|00005fc0| 6f 6e 74 72 6f 6c 20 6c | 69 73 74 20 69 6e 20 61 |ontrol l|ist in a|
|00005fd0| 20 28 66 6f 72 6d 65 72 | 6c 79 29 20 75 6e 75 73 | (former|ly) unus|
|00005fe0| 65 64 20 66 69 65 6c 64 | 0a 69 6e 20 74 68 65 20 |ed field|.in the |
|00005ff0| 69 6e 6f 64 65 2e 0a 54 | 68 65 72 65 20 69 73 20 |inode..T|here is |
|00006000| 6e 6f 20 67 75 61 72 61 | 6e 74 65 65 20 74 68 61 |no guara|ntee tha|
|00006010| 74 20 66 75 74 75 72 65 | 20 76 65 72 73 69 6f 6e |t future| version|
|00006020| 73 20 6f 66 20 55 6e 69 | 78 20 77 69 6c 6c 20 6e |s of Uni|x will n|
|00006030| 6f 74 20 75 73 65 20 74 | 68 69 73 20 66 69 65 6c |ot use t|his fiel|
|00006040| 64 0a 66 6f 72 20 73 6f | 6d 65 74 68 69 6e 67 20 |d.for so|mething |
|00006050| 65 6c 73 65 2e 0a 2e 50 | 50 0a 54 68 65 72 65 66 |else...P|P.Theref|
|00006060| 6f 72 65 2c 20 79 6f 75 | 20 73 68 6f 75 6c 64 20 |ore, you| should |
|00006070| 6f 6e 6c 79 20 75 73 65 | 20 61 63 63 65 73 73 20 |only use| access |
|00006080| 63 6f 6e 74 72 6f 6c 20 | 6c 69 73 74 73 20 77 69 |control |lists wi|
|00006090| 74 68 20 74 68 65 20 66 | 75 6c 6c 0a 75 6e 64 65 |th the f|ull.unde|
|000060a0| 72 73 74 61 6e 64 69 6e | 67 20 74 68 61 74 20 79 |rstandin|g that y|
|000060b0| 6f 75 20 61 72 65 20 70 | 61 72 74 69 63 69 70 61 |ou are p|articipa|
|000060c0| 74 69 6e 67 20 69 6e 20 | 61 6e 20 65 78 70 65 72 |ting in |an exper|
|000060d0| 69 6d 65 6e 74 2e 0a 2e | 53 48 20 42 55 47 53 0a |iment...|SH BUGS.|
|000060e0| 54 68 65 20 65 6e 74 69 | 72 65 20 6d 65 63 68 61 |The enti|re mecha|
|000060f0| 6e 69 73 6d 20 68 61 73 | 6e 27 74 20 62 65 65 6e |nism has|n't been|
|00006100| 20 66 75 6c 6c 79 20 74 | 65 73 74 65 64 2e 0a 27 | fully t|ested..'|
|00006110| 0a 2e 69 65 20 6e 20 5c | 7b 5c 0a 2e 74 72 20 5c |..ie n \|{\..tr \|
|00006120| 28 62 73 2d 5c 2a 28 54 | 72 0a 2e 64 73 20 2d 2d |(bs-\*(T|r..ds --|
|00006130| 20 5c 28 62 73 2d 0a 2e | 69 66 20 28 5c 6e 28 2e | \(bs-..|if (\n(.|
|00006140| 48 3d 34 75 29 26 28 31 | 6d 3d 32 34 75 29 20 2e |H=4u)&(1|m=24u) .|
|00006150| 64 73 20 2d 2d 20 5c 28 | 62 73 5c 68 27 2d 31 32 |ds -- \(|bs\h'-12|
|00006160| 75 27 5c 28 62 73 5c 68 | 27 2d 31 32 75 27 2d 5c |u'\(bs\h|'-12u'-\|
|00006170| 22 20 64 69 61 62 6c 6f | 20 31 30 20 70 69 74 63 |" diablo| 10 pitc|
|00006180| 68 0a 2e 69 66 20 28 5c | 6e 28 2e 48 3d 34 75 29 |h..if (\|n(.H=4u)|
|00006190| 26 28 31 6d 3d 32 30 75 | 29 20 2e 64 73 20 2d 2d |&(1m=20u|) .ds --|
|000061a0| 20 5c 28 62 73 5c 68 27 | 2d 31 32 75 27 5c 28 62 | \(bs\h'|-12u'\(b|
|000061b0| 73 5c 68 27 2d 38 75 27 | 2d 5c 22 20 64 69 61 62 |s\h'-8u'|-\" diab|
|000061c0| 6c 6f 20 31 32 20 70 69 | 74 63 68 0a 2e 64 73 20 |lo 12 pi|tch..ds |
|000061d0| 4c 22 20 22 22 0a 2e 64 | 73 20 52 22 20 22 22 0a |L" ""..d|s R" "".|
|000061e0| 2e 64 73 20 4c 27 20 27 | 0a 2e 64 73 20 52 27 20 |.ds L' '|..ds R' |
|000061f0| 27 0a 27 62 72 5c 7d 0a | 2e 65 6c 5c 7b 5c 0a 2e |'.'br\}.|.el\{\..|
|00006200| 61 63 63 65 73 73 2d 6c | 69 73 74 73 2f 65 64 61 |access-l|ists/eda|
|00006210| 63 6c 2e 6c 00 00 00 00 | 00 00 00 00 00 00 00 00 |cl.l....|........|
|00006220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006260| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00006270| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00006280| 20 20 20 34 36 34 35 20 | 20 34 34 30 32 31 31 30 | 4645 | 4402110|
|00006290| 33 37 33 20 20 20 37 37 | 32 36 00 20 00 00 00 00 |373 77|26. ....|
|000062a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.