home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3525 < prev    next >
SHell self-extracting ARchive  |  1991-06-23  |  59.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: SHell self-extracting ARchive (archive/shar).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news or mail, ASCII text default
100% TrID E-Mail message (Var. 2) default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/rfc822 default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 3a 20 64 66 | 40 73 65 69 2e 63 6d 75 |From: df|@sei.cmu|
|00000010| 2e 65 64 75 20 28 44 61 | 6e 20 46 61 72 6d 65 72 |.edu (Da|n Farmer|
|00000020| 29 0a 4e 65 77 73 67 72 | 6f 75 70 73 3a 20 61 6c |).Newsgr|oups: al|
|00000030| 74 2e 73 6f 75 72 63 65 | 73 0a 53 75 62 6a 65 63 |t.source|s.Subjec|
|00000040| 74 3a 20 70 65 72 6c 20 | 43 4f 50 53 2c 20 31 2f |t: perl |COPS, 1/|
|00000050| 33 0a 4d 65 73 73 61 67 | 65 2d 49 44 3a 20 3c 32 |3.Messag|e-ID: <2|
|00000060| 37 35 34 33 40 61 73 30 | 63 2e 73 65 69 2e 63 6d |7543@as0|c.sei.cm|
|00000070| 75 2e 65 64 75 3e 0a 44 | 61 74 65 3a 20 32 32 20 |u.edu>.D|ate: 22 |
|00000080| 4a 75 6e 20 39 31 20 30 | 34 3a 32 38 3a 32 39 20 |Jun 91 0|4:28:29 |
|00000090| 47 4d 54 0a 0a 23 21 2f | 62 69 6e 2f 73 68 0a 23 |GMT..#!/|bin/sh.#|
|000000a0| 20 54 68 69 73 20 69 73 | 20 61 20 73 68 65 6c 6c | This is| a shell|
|000000b0| 20 61 72 63 68 69 76 65 | 20 28 70 72 6f 64 75 63 | archive| (produc|
|000000c0| 65 64 20 62 79 20 73 68 | 61 72 20 33 2e 34 39 29 |ed by sh|ar 3.49)|
|000000d0| 0a 23 20 54 6f 20 65 78 | 74 72 61 63 74 20 74 68 |.# To ex|tract th|
|000000e0| 65 20 66 69 6c 65 73 20 | 66 72 6f 6d 20 74 68 69 |e files |from thi|
|000000f0| 73 20 61 72 63 68 69 76 | 65 2c 20 73 61 76 65 20 |s archiv|e, save |
|00000100| 69 74 20 74 6f 20 61 20 | 66 69 6c 65 2c 20 72 65 |it to a |file, re|
|00000110| 6d 6f 76 65 0a 23 20 65 | 76 65 72 79 74 68 69 6e |move.# e|verythin|
|00000120| 67 20 61 62 6f 76 65 20 | 74 68 65 20 22 21 2f 62 |g above |the "!/b|
|00000130| 69 6e 2f 73 68 22 20 6c | 69 6e 65 20 61 62 6f 76 |in/sh" l|ine abov|
|00000140| 65 2c 20 61 6e 64 20 74 | 79 70 65 20 22 73 68 20 |e, and t|ype "sh |
|00000150| 66 69 6c 65 5f 6e 61 6d | 65 22 2e 0a 23 0a 23 20 |file_nam|e"..#.# |
|00000160| 6d 61 64 65 20 30 36 2f | 32 32 2f 31 39 39 31 20 |made 06/|22/1991 |
|00000170| 30 33 3a 35 37 20 55 54 | 43 20 62 79 20 64 66 40 |03:57 UT|C by df@|
|00000180| 64 65 61 74 68 2e 63 65 | 72 74 2e 73 65 69 2e 63 |death.ce|rt.sei.c|
|00000190| 6d 75 2e 65 64 75 0a 23 | 0a 23 20 65 78 69 73 74 |mu.edu.#|.# exist|
|000001a0| 69 6e 67 20 66 69 6c 65 | 73 20 77 69 6c 6c 20 4e |ing file|s will N|
|000001b0| 4f 54 20 62 65 20 6f 76 | 65 72 77 72 69 74 74 65 |OT be ov|erwritte|
|000001c0| 6e 20 75 6e 6c 65 73 73 | 20 2d 63 20 69 73 20 73 |n unless| -c is s|
|000001d0| 70 65 63 69 66 69 65 64 | 0a 23 0a 23 20 54 68 69 |pecified|.#.# Thi|
|000001e0| 73 20 69 73 20 70 61 72 | 74 20 31 20 6f 66 20 61 |s is par|t 1 of a|
|000001f0| 20 6d 75 6c 74 69 70 61 | 72 74 20 61 72 63 68 69 | multipa|rt archi|
|00000200| 76 65 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ve | |
|00000210| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000220| 20 20 20 20 20 20 0a 23 | 20 64 6f 20 6e 6f 74 20 | .#| do not |
|00000230| 63 6f 6e 63 61 74 65 6e | 61 74 65 20 74 68 65 73 |concaten|ate thes|
|00000240| 65 20 70 61 72 74 73 2c | 20 75 6e 70 61 63 6b 20 |e parts,| unpack |
|00000250| 74 68 65 6d 20 69 6e 20 | 6f 72 64 65 72 20 77 69 |them in |order wi|
|00000260| 74 68 20 2f 62 69 6e 2f | 73 68 20 20 20 20 20 20 |th /bin/|sh |
|00000270| 20 20 0a 23 0a 23 20 54 | 68 69 73 20 73 68 61 72 | .#.# T|his shar|
|00000280| 20 63 6f 6e 74 61 69 6e | 73 3a 0a 23 20 6c 65 6e | contain|s:.# len|
|00000290| 67 74 68 20 20 6d 6f 64 | 65 20 20 20 20 20 20 20 |gth mod|e |
|000002a0| 6e 61 6d 65 0a 23 20 2d | 2d 2d 2d 2d 2d 20 2d 2d |name.# -|----- --|
|000002b0| 2d 2d 2d 2d 2d 2d 2d 2d | 20 2d 2d 2d 2d 2d 2d 2d |--------| -------|
|000002c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000002d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000002e0| 2d 2d 2d 0a 23 20 20 20 | 20 38 34 39 20 2d 72 77 |---.# | 849 -rw|
|000002f0| 2d 2d 2d 2d 2d 2d 2d 20 | 62 65 74 61 2f 73 68 61 |------- |beta/sha|
|00000300| 64 6f 77 2e 73 68 0a 23 | 20 20 20 39 33 30 36 20 |dow.sh.#| 9306 |
|00000310| 2d 72 77 2d 2d 2d 2d 2d | 2d 2d 20 62 65 74 61 2f |-rw-----|-- beta/|
|00000320| 52 45 41 44 4d 45 2e 6b | 75 61 6e 67 0a 23 20 20 |README.k|uang.# |
|00000330| 20 34 38 35 34 20 2d 72 | 77 78 2d 2d 2d 2d 2d 2d | 4854 -r|wx------|
|00000340| 20 62 65 74 61 2f 52 45 | 41 44 4d 45 2e 70 65 72 | beta/RE|ADME.per|
|00000350| 6c 0a 23 20 20 20 31 32 | 39 32 20 2d 72 77 78 2d |l.# 12|92 -rwx-|
|00000360| 2d 2d 2d 2d 2d 20 62 65 | 74 61 2f 63 68 6b 5f 73 |----- be|ta/chk_s|
|00000370| 74 72 69 6e 67 73 0a 23 | 20 20 20 33 36 31 36 20 |trings.#| 3616 |
|00000380| 2d 72 77 78 2d 2d 2d 2d | 2d 2d 20 62 65 74 61 2f |-rwx----|-- beta/|
|00000390| 63 68 6b 5f 73 74 72 69 | 6e 67 73 2e 70 6c 0a 23 |chk_stri|ngs.pl.#|
|000003a0| 20 20 20 36 34 33 37 20 | 2d 72 77 78 2d 2d 2d 2d | 6437 |-rwx----|
|000003b0| 2d 2d 20 62 65 74 61 2f | 63 6f 70 73 0a 23 20 20 |-- beta/|cops.# |
|000003c0| 20 32 36 30 36 20 2d 72 | 77 78 2d 2d 2d 2d 2d 2d | 2606 -r|wx------|
|000003d0| 20 62 65 74 61 2f 63 6f | 70 73 2e 63 66 0a 23 20 | beta/co|ps.cf.# |
|000003e0| 20 20 32 31 39 39 20 2d | 72 77 78 2d 2d 2d 2d 2d | 2199 -|rwx-----|
|000003f0| 2d 20 62 65 74 61 2f 63 | 72 6f 6e 2e 63 68 6b 0a |- beta/c|ron.chk.|
|00000400| 23 20 20 20 32 33 37 38 | 20 2d 72 77 78 2d 2d 2d |# 2378| -rwx---|
|00000410| 2d 2d 2d 20 62 65 74 61 | 2f 64 65 76 2e 63 68 6b |--- beta|/dev.chk|
|00000420| 0a 23 20 20 20 20 34 36 | 33 20 2d 72 77 78 2d 2d |.# 46|3 -rwx--|
|00000430| 2d 2d 2d 2d 20 62 65 74 | 61 2f 66 67 72 65 70 2e |---- bet|a/fgrep.|
|00000440| 70 6c 0a 23 20 20 20 20 | 34 31 34 20 2d 72 77 78 |pl.# |414 -rwx|
|00000450| 2d 2d 2d 2d 2d 2d 20 62 | 65 74 61 2f 66 69 6c 65 |------ b|eta/file|
|00000460| 5f 6d 6f 64 65 2e 70 6c | 0a 23 20 20 20 20 33 39 |_mode.pl|.# 39|
|00000470| 38 20 2d 72 77 78 2d 2d | 2d 2d 2d 2d 20 62 65 74 |8 -rwx--|---- bet|
|00000480| 61 2f 66 69 6c 65 5f 6f | 77 6e 65 72 2e 70 6c 0a |a/file_o|wner.pl.|
|00000490| 23 20 20 20 36 35 38 32 | 20 2d 72 77 78 2d 2d 2d |# 6582| -rwx---|
|000004a0| 2d 2d 2d 20 62 65 74 61 | 2f 66 74 70 2e 63 68 6b |--- beta|/ftp.chk|
|000004b0| 0a 23 20 20 20 31 37 37 | 36 20 2d 72 77 78 2d 2d |.# 177|6 -rwx--|
|000004c0| 2d 2d 2d 2d 20 62 65 74 | 61 2f 67 65 74 2d 63 66 |---- bet|a/get-cf|
|000004d0| 0a 23 20 20 20 20 39 30 | 32 20 2d 72 77 78 2d 2d |.# 90|2 -rwx--|
|000004e0| 2d 2d 2d 2d 20 62 65 74 | 61 2f 67 65 74 6f 70 74 |---- bet|a/getopt|
|000004f0| 73 2e 70 6c 0a 23 20 20 | 20 32 39 36 33 20 2d 72 |s.pl.# | 2963 -r|
|00000500| 77 78 2d 2d 2d 2d 2d 2d | 20 62 65 74 61 2f 67 6c |wx------| beta/gl|
|00000510| 6f 62 2e 70 6c 0a 23 20 | 20 20 34 38 31 39 20 2d |ob.pl.# | 4819 -|
|00000520| 72 77 78 2d 2d 2d 2d 2d | 2d 20 62 65 74 61 2f 67 |rwx-----|- beta/g|
|00000530| 72 6f 75 70 2e 63 68 6b | 0a 23 20 20 20 20 34 37 |roup.chk|.# 47|
|00000540| 35 20 2d 72 77 78 2d 2d | 2d 2d 2d 2d 20 62 65 74 |5 -rwx--|---- bet|
|00000550| 61 2f 68 6f 73 74 6e 61 | 6d 65 2e 70 6c 0a 23 20 |a/hostna|me.pl.# |
|00000560| 20 20 31 32 33 35 20 2d | 72 77 78 2d 2d 2d 2d 2d | 1235 -|rwx-----|
|00000570| 2d 20 62 65 74 61 2f 69 | 73 5f 61 62 6c 65 2e 63 |- beta/i|s_able.c|
|00000580| 68 6b 0a 23 20 20 20 31 | 36 30 33 20 2d 72 77 78 |hk.# 1|603 -rwx|
|00000590| 2d 2d 2d 2d 2d 2d 20 62 | 65 74 61 2f 69 73 5f 61 |------ b|eta/is_a|
|000005a0| 62 6c 65 2e 6c 73 74 0a | 23 20 20 31 35 33 36 33 |ble.lst.|# 15363|
|000005b0| 20 2d 72 77 78 2d 2d 2d | 2d 2d 2d 20 62 65 74 61 | -rwx---|--- beta|
|000005c0| 2f 6b 75 61 6e 67 0a 23 | 20 20 20 32 38 33 35 20 |/kuang.#| 2835 |
|000005d0| 2d 72 77 78 2d 2d 2d 2d | 2d 2d 20 62 65 74 61 2f |-rwx----|-- beta/|
|000005e0| 69 73 5f 61 62 6c 65 2e | 70 6c 0a 23 20 20 20 37 |is_able.|pl.# 7|
|000005f0| 32 35 33 20 2d 72 77 2d | 2d 2d 2d 2d 2d 2d 20 62 |253 -rw-|------ b|
|00000600| 65 74 61 2f 6b 75 61 6e | 67 2e 31 0a 23 20 20 20 |eta/kuan|g.1.# |
|00000610| 33 39 36 37 20 2d 72 77 | 78 2d 2d 2d 2d 2d 2d 20 |3967 -rw|x------ |
|00000620| 62 65 74 61 2f 6d 69 73 | 63 2e 63 68 6b 0a 23 20 |beta/mis|c.chk.# |
|00000630| 20 31 30 36 34 30 20 2d | 72 77 78 2d 2d 2d 2d 2d | 10640 -|rwx-----|
|00000640| 2d 20 62 65 74 61 2f 70 | 61 73 73 2e 63 61 63 68 |- beta/p|ass.cach|
|00000650| 65 2e 70 6c 0a 23 20 20 | 20 37 30 33 34 20 2d 72 |e.pl.# | 7034 -r|
|00000660| 77 78 2d 2d 2d 2d 2d 2d | 20 62 65 74 61 2f 70 61 |wx------| beta/pa|
|00000670| 73 73 2e 63 68 6b 0a 23 | 20 20 20 31 35 35 35 20 |ss.chk.#| 1555 |
|00000680| 2d 72 77 2d 2d 2d 2d 2d | 2d 2d 20 62 65 74 61 2f |-rw-----|-- beta/|
|00000690| 70 61 73 73 77 64 0a 23 | 20 20 20 34 37 37 33 20 |passwd.#| 4773 |
|000006a0| 2d 72 77 78 2d 2d 2d 2d | 2d 2d 20 62 65 74 61 2f |-rwx----|-- beta/|
|000006b0| 70 61 73 73 77 64 2e 63 | 68 6b 0a 23 20 20 20 20 |passwd.c|hk.# |
|000006c0| 36 37 37 20 2d 72 77 78 | 2d 2d 2d 2d 2d 2d 20 62 |677 -rwx|------ b|
|000006d0| 65 74 61 2f 70 61 74 68 | 63 6f 6e 66 2e 70 6c 0a |eta/path|conf.pl.|
|000006e0| 23 20 20 20 20 36 34 34 | 20 2d 72 77 78 2d 2d 2d |# 644| -rwx---|
|000006f0| 2d 2d 2d 20 62 65 74 61 | 2f 70 61 74 68 63 6f 6e |--- beta|/pathcon|
|00000700| 66 2e 73 68 0a 23 20 20 | 20 20 38 39 37 20 2d 72 |f.sh.# | 897 -r|
|00000710| 77 78 2d 2d 2d 2d 2d 2d | 20 62 65 74 61 2f 72 63 |wx------| beta/rc|
|00000720| 2e 63 68 6b 0a 23 20 20 | 20 33 33 35 38 20 2d 72 |.chk.# | 3358 -r|
|00000730| 77 78 2d 2d 2d 2d 2d 2d | 20 62 65 74 61 2f 72 65 |wx------| beta/re|
|00000740| 63 6f 6e 66 69 67 2e 70 | 6c 0a 23 20 20 20 35 36 |config.p|l.# 56|
|00000750| 30 39 20 2d 72 77 78 2d | 2d 2d 2d 2d 2d 20 62 65 |09 -rwx-|----- be|
|00000760| 74 61 2f 72 6f 6f 74 2e | 63 68 6b 0a 23 20 20 20 |ta/root.|chk.# |
|00000770| 32 37 36 38 20 2d 72 77 | 2d 2d 2d 2d 2d 2d 2d 20 |2768 -rw|------- |
|00000780| 62 65 74 61 2f 72 75 6c | 65 73 2e 70 6c 0a 23 20 |beta/rul|es.pl.# |
|00000790| 20 20 20 36 35 33 20 2d | 72 77 78 2d 2d 2d 2d 2d | 653 -|rwx-----|
|000007a0| 2d 20 62 65 74 61 2f 73 | 74 61 74 2e 70 6c 0a 23 |- beta/s|tat.pl.#|
|000007b0| 20 20 20 20 32 32 39 20 | 2d 72 77 78 2d 2d 2d 2d | 229 |-rwx----|
|000007c0| 2d 2d 20 62 65 74 61 2f | 73 75 63 6b 6c 69 6e 65 |-- beta/|suckline|
|000007d0| 2e 70 6c 0a 23 20 20 20 | 34 31 32 38 20 2d 72 77 |.pl.# |4128 -rw|
|000007e0| 78 2d 2d 2d 2d 2d 2d 20 | 62 65 74 61 2f 73 75 69 |x------ |beta/sui|
|000007f0| 64 2e 63 68 6b 0a 23 20 | 20 20 20 20 20 30 20 2d |d.chk.# | 0 -|
|00000800| 72 77 78 2d 2d 2d 2d 2d | 2d 20 62 65 74 61 2f 73 |rwx-----|- beta/s|
|00000810| 75 69 64 2e 73 74 6f 70 | 0a 23 20 20 20 31 38 37 |uid.stop|.# 187|
|00000820| 30 20 2d 72 77 78 2d 2d | 2d 2d 2d 2d 20 62 65 74 |0 -rwx--|---- bet|
|00000830| 61 2f 75 73 65 72 2e 63 | 68 6b 0a 23 20 20 20 31 |a/user.c|hk.# 1|
|00000840| 32 37 34 20 2d 72 77 2d | 2d 2d 2d 2d 2d 2d 20 62 |274 -rw-|------ b|
|00000850| 65 74 61 2f 79 61 67 72 | 69 70 2e 70 6c 0a 23 0a |eta/yagr|ip.pl.#.|
|00000860| 69 66 20 74 65 73 74 20 | 2d 72 20 5f 73 68 61 72 |if test |-r _shar|
|00000870| 5f 73 65 71 5f 2e 74 6d | 70 3b 20 74 68 65 6e 0a |_seq_.tm|p; then.|
|00000880| 09 65 63 68 6f 20 27 4d | 75 73 74 20 75 6e 70 61 |.echo 'M|ust unpa|
|00000890| 63 6b 20 61 72 63 68 69 | 76 65 73 20 69 6e 20 73 |ck archi|ves in s|
|000008a0| 65 71 75 65 6e 63 65 21 | 27 0a 09 65 63 68 6f 20 |equence!|'..echo |
|000008b0| 50 6c 65 61 73 65 20 75 | 6e 70 61 63 6b 20 70 61 |Please u|npack pa|
|000008c0| 72 74 20 60 63 61 74 20 | 5f 73 68 61 72 5f 73 65 |rt `cat |_shar_se|
|000008d0| 71 5f 2e 74 6d 70 60 20 | 6e 65 78 74 0a 09 65 78 |q_.tmp` |next..ex|
|000008e0| 69 74 20 31 0a 66 69 0a | 23 20 3d 3d 3d 3d 3d 3d |it 1.fi.|# ======|
|000008f0| 3d 3d 3d 3d 3d 3d 3d 20 | 62 65 74 61 2f 73 68 61 |======= |beta/sha|
|00000900| 64 6f 77 2e 73 68 20 3d | 3d 3d 3d 3d 3d 3d 3d 3d |dow.sh =|========|
|00000910| 3d 3d 3d 3d 3d 0a 69 66 | 20 74 65 73 74 20 21 20 |=====.if| test ! |
|00000920| 2d 64 20 27 62 65 74 61 | 27 3b 20 74 68 65 6e 0a |-d 'beta|'; then.|
|00000930| 20 20 20 20 65 63 68 6f | 20 27 78 20 2d 20 63 72 | echo| 'x - cr|
|00000940| 65 61 74 69 6e 67 20 64 | 69 72 65 63 74 6f 72 79 |eating d|irectory|
|00000950| 20 62 65 74 61 27 0a 20 | 20 20 20 6d 6b 64 69 72 | beta'. | mkdir|
|00000960| 20 27 62 65 74 61 27 0a | 66 69 0a 69 66 20 74 65 | 'beta'.|fi.if te|
|00000970| 73 74 20 2d 66 20 27 62 | 65 74 61 2f 73 68 61 64 |st -f 'b|eta/shad|
|00000980| 6f 77 2e 73 68 27 20 2d | 61 20 58 22 24 31 22 20 |ow.sh' -|a X"$1" |
|00000990| 21 3d 20 58 22 2d 63 22 | 3b 20 74 68 65 6e 0a 09 |!= X"-c"|; then..|
|000009a0| 65 63 68 6f 20 27 78 20 | 2d 20 73 6b 69 70 70 69 |echo 'x |- skippi|
|000009b0| 6e 67 20 62 65 74 61 2f | 73 68 61 64 6f 77 2e 73 |ng beta/|shadow.s|
|000009c0| 68 20 28 46 69 6c 65 20 | 61 6c 72 65 61 64 79 20 |h (File |already |
|000009d0| 65 78 69 73 74 73 29 27 | 0a 09 72 6d 20 2d 66 20 |exists)'|..rm -f |
|000009e0| 5f 73 68 61 72 5f 77 6e | 74 5f 2e 74 6d 70 0a 65 |_shar_wn|t_.tmp.e|
|000009f0| 6c 73 65 0a 3e 20 5f 73 | 68 61 72 5f 77 6e 74 5f |lse.> _s|har_wnt_|
|00000a00| 2e 74 6d 70 0a 65 63 68 | 6f 20 27 78 20 2d 20 65 |.tmp.ech|o 'x - e|
|00000a10| 78 74 72 61 63 74 69 6e | 67 20 62 65 74 61 2f 73 |xtractin|g beta/s|
|00000a20| 68 61 64 6f 77 2e 73 68 | 20 28 54 65 78 74 29 27 |hadow.sh| (Text)'|
|00000a30| 0a 73 65 64 20 27 73 2f | 5e 58 2f 2f 27 20 3c 3c |.sed 's/|^X//' <<|
|00000a40| 20 27 53 48 41 52 5f 45 | 4f 46 27 20 3e 20 27 62 | 'SHAR_E|OF' > 'b|
|00000a50| 65 74 61 2f 73 68 61 64 | 6f 77 2e 73 68 27 20 26 |eta/shad|ow.sh' &|
|00000a60| 26 0a 23 21 2f 62 69 6e | 2f 73 68 0a 23 0a 23 20 |&.#!/bin|/sh.#.# |
|00000a70| 20 55 73 61 67 65 3a 20 | 73 68 61 64 6f 77 2e 73 | Usage: |shadow.s|
|00000a80| 74 75 66 66 0a 23 0a 23 | 20 20 20 45 78 74 72 61 |tuff.#.#| Extra|
|00000a90| 63 74 73 20 74 68 65 20 | 63 6f 72 72 65 63 74 20 |cts the |correct |
|00000aa0| 69 6e 66 6f 20 66 72 6f | 6d 20 73 68 61 64 6f 77 |info fro|m shadow|
|00000ab0| 20 70 61 73 73 20 74 6f | 20 75 73 65 20 66 6f 72 | pass to| use for|
|00000ac0| 20 70 72 6f 63 65 73 73 | 69 6e 67 20 77 69 74 68 | process|ing with|
|00000ad0| 0a 23 20 74 68 65 20 72 | 65 73 74 20 6f 66 20 74 |.# the r|est of t|
|00000ae0| 68 65 20 70 65 72 6c 20 | 73 74 75 66 66 0a 23 0a |he perl |stuff.#.|
|00000af0| 23 20 20 20 54 68 65 20 | 77 61 79 20 79 6f 75 20 |# The |way you |
|00000b00| 75 73 65 20 74 68 69 73 | 20 69 73 20 6a 75 73 74 |use this| is just|
|00000b10| 20 74 6f 20 74 79 70 65 | 20 22 73 68 61 64 6f 77 | to type| "shadow|
|00000b20| 2e 73 74 75 66 66 20 3e | 20 74 65 6d 70 66 69 6c |.stuff >| tempfil|
|00000b30| 65 22 3b 0a 23 20 74 68 | 69 73 20 77 69 6c 6c 20 |e";.# th|is will |
|00000b40| 63 72 65 61 74 65 20 61 | 20 66 69 6c 65 2c 20 22 |create a| file, "|
|00000b50| 74 65 6d 70 66 69 6c 65 | 22 20 28 6f 72 20 77 68 |tempfile|" (or wh|
|00000b60| 61 74 65 76 65 72 29 2c | 20 74 68 61 74 20 2a 73 |atever),| that *s|
|00000b70| 68 6f 75 6c 64 2a 0a 23 | 20 62 65 20 74 68 65 20 |hould*.#| be the |
|00000b80| 65 71 75 69 76 61 6c 65 | 6e 74 20 74 6f 20 61 20 |equivale|nt to a |
|00000b90| 6e 6f 72 6d 61 6c 20 70 | 61 73 73 77 6f 72 64 20 |normal p|assword |
|00000ba0| 66 69 6c 65 2e 20 20 4f | 66 20 63 6f 75 72 73 65 |file. O|f course|
|00000bb0| 2c 20 79 6f 75 27 6c 6c | 20 68 61 76 65 0a 23 20 |, you'll| have.# |
|00000bc0| 74 6f 20 72 75 6e 20 74 | 68 69 73 20 61 73 20 72 |to run t|his as r|
|00000bd0| 6f 6f 74 20 73 6f 20 74 | 68 61 74 20 79 6f 75 20 |oot so t|hat you |
|00000be0| 63 61 6e 20 72 65 61 64 | 20 74 68 65 20 73 68 61 |can read| the sha|
|00000bf0| 64 6f 77 20 70 61 73 73 | 77 6f 72 64 20 66 69 6c |dow pass|word fil|
|00000c00| 65 2e 0a 58 0a 73 68 61 | 64 6f 77 3d 2f 65 74 63 |e..X.sha|dow=/etc|
|00000c10| 2f 73 68 61 64 6f 77 0a | 70 61 73 73 77 64 3d 2f |/shadow.|passwd=/|
|00000c20| 65 74 63 2f 70 61 73 73 | 77 64 0a 66 6f 6f 5f 70 |etc/pass|wd.foo_p|
|00000c30| 61 73 73 3d 2e 2f 73 68 | 61 64 6f 77 2e 74 6d 70 |ass=./sh|adow.tmp|
|00000c40| 2e 24 24 0a 58 0a 23 20 | 66 6f 6f 5f 70 61 73 73 |.$$.X.# |foo_pass|
|00000c50| 3d 73 68 61 64 6f 77 2e | 70 61 73 73 0a 58 0a 63 |=shadow.|pass.X.c|
|00000c60| 61 74 20 24 70 61 73 73 | 77 64 20 24 73 68 61 64 |at $pass|wd $shad|
|00000c70| 6f 77 20 7c 20 73 6f 72 | 74 20 3e 20 24 66 6f 6f |ow | sor|t > $foo|
|00000c80| 5f 70 61 73 73 0a 58 0a | 61 77 6b 20 2d 46 3a 20 |_pass.X.|awk -F: |
|00000c90| 27 7b 70 61 72 72 61 79 | 5b 24 31 5d 20 3d 20 24 |'{parray|[$1] = $|
|00000ca0| 30 22 3a 22 70 61 72 72 | 61 79 5b 24 31 5d 7d 20 |0":"parr|ay[$1]} |
|00000cb0| 45 4e 44 20 7b 20 5c 0a | 58 09 66 6f 72 20 28 6c |END { \.|X.for (l|
|00000cc0| 69 6e 65 20 69 6e 20 70 | 61 72 72 61 79 29 20 7b |ine in p|array) {|
|00000cd0| 20 5c 0a 58 09 09 6e 66 | 3d 73 70 6c 69 74 28 70 | \.X..nf|=split(p|
|00000ce0| 61 72 72 61 79 5b 6c 69 | 6e 65 5d 2c 20 70 6c 69 |array[li|ne], pli|
|00000cf0| 6e 65 2c 20 22 3a 22 29 | 3b 20 5c 0a 58 09 09 69 |ne, ":")|; \.X..i|
|00000d00| 66 20 28 70 6c 69 6e 65 | 5b 39 5d 20 21 3d 20 22 |f (pline|[9] != "|
|00000d10| 4c 4f 43 4b 45 44 22 20 | 26 26 20 6e 66 20 3d 3d |LOCKED" |&& nf ==|
|00000d20| 20 31 33 29 20 7b 0a 58 | 09 09 09 70 72 69 6e 74 | 13) {.X|...print|
|00000d30| 20 70 6c 69 6e 65 5b 31 | 5d 22 3a 22 70 6c 69 6e | pline[1|]":"plin|
|00000d40| 65 5b 39 5d 22 3a 22 70 | 6c 69 6e 65 5b 33 5d 22 |e[9]":"p|line[3]"|
|00000d50| 3a 22 70 6c 69 6e 65 5b | 34 5d 22 3a 22 20 5c 0a |:"pline[|4]":" \.|
|00000d60| 58 09 09 09 70 6c 69 6e | 65 5b 35 5d 22 3a 22 70 |X...plin|e[5]":"p|
|00000d70| 6c 69 6e 65 5b 36 5d 22 | 3a 22 70 6c 69 6e 65 5b |line[6]"|:"pline[|
|00000d80| 37 5d 3b 20 5c 0a 58 09 | 09 20 20 20 20 20 20 09 |7]; \.X.|. .|
|00000d90| 7d 20 5c 0a 58 09 09 20 | 20 20 20 20 20 7d 20 5c |} \.X.. | } \|
|00000da0| 0a 58 09 09 7d 27 20 24 | 66 6f 6f 5f 70 61 73 73 |.X..}' $|foo_pass|
|00000db0| 0a 72 6d 20 24 66 6f 6f | 5f 70 61 73 73 0a 58 0a |.rm $foo|_pass.X.|
|00000dc0| 53 48 41 52 5f 45 4f 46 | 0a 63 68 6d 6f 64 20 30 |SHAR_EOF|.chmod 0|
|00000dd0| 36 30 30 20 62 65 74 61 | 2f 73 68 61 64 6f 77 2e |600 beta|/shadow.|
|00000de0| 73 68 20 7c 7c 0a 65 63 | 68 6f 20 27 72 65 73 74 |sh ||.ec|ho 'rest|
|00000df0| 6f 72 65 20 6f 66 20 62 | 65 74 61 2f 73 68 61 64 |ore of b|eta/shad|
|00000e00| 6f 77 2e 73 68 20 66 61 | 69 6c 65 64 27 0a 57 63 |ow.sh fa|iled'.Wc|
|00000e10| 5f 63 3d 22 60 77 63 20 | 2d 63 20 3c 20 27 62 65 |_c="`wc |-c < 'be|
|00000e20| 74 61 2f 73 68 61 64 6f | 77 2e 73 68 27 60 22 0a |ta/shado|w.sh'`".|
|00000e30| 74 65 73 74 20 38 34 39 | 20 2d 65 71 20 22 24 57 |test 849| -eq "$W|
|00000e40| 63 5f 63 22 20 7c 7c 0a | 09 65 63 68 6f 20 27 62 |c_c" ||.|.echo 'b|
|00000e50| 65 74 61 2f 73 68 61 64 | 6f 77 2e 73 68 3a 20 6f |eta/shad|ow.sh: o|
|00000e60| 72 69 67 69 6e 61 6c 20 | 73 69 7a 65 20 38 34 39 |riginal |size 849|
|00000e70| 2c 20 63 75 72 72 65 6e | 74 20 73 69 7a 65 27 20 |, curren|t size' |
|00000e80| 22 24 57 63 5f 63 22 0a | 72 6d 20 2d 66 20 5f 73 |"$Wc_c".|rm -f _s|
|00000e90| 68 61 72 5f 77 6e 74 5f | 2e 74 6d 70 0a 66 69 0a |har_wnt_|.tmp.fi.|
|00000ea0| 23 20 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 20 |# ======|======= |
|00000eb0| 62 65 74 61 2f 52 45 41 | 44 4d 45 2e 6b 75 61 6e |beta/REA|DME.kuan|
|00000ec0| 67 20 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |g ======|========|
|00000ed0| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 62 65 74 |.if test| -f 'bet|
|00000ee0| 61 2f 52 45 41 44 4d 45 | 2e 6b 75 61 6e 67 27 20 |a/README|.kuang' |
|00000ef0| 2d 61 20 58 22 24 31 22 | 20 21 3d 20 58 22 2d 63 |-a X"$1"| != X"-c|
|00000f00| 22 3b 20 74 68 65 6e 0a | 09 65 63 68 6f 20 27 78 |"; then.|.echo 'x|
|00000f10| 20 2d 20 73 6b 69 70 70 | 69 6e 67 20 62 65 74 61 | - skipp|ing beta|
|00000f20| 2f 52 45 41 44 4d 45 2e | 6b 75 61 6e 67 20 28 46 |/README.|kuang (F|
|00000f30| 69 6c 65 20 61 6c 72 65 | 61 64 79 20 65 78 69 73 |ile alre|ady exis|
|00000f40| 74 73 29 27 0a 09 72 6d | 20 2d 66 20 5f 73 68 61 |ts)'..rm| -f _sha|
|00000f50| 72 5f 77 6e 74 5f 2e 74 | 6d 70 0a 65 6c 73 65 0a |r_wnt_.t|mp.else.|
|00000f60| 3e 20 5f 73 68 61 72 5f | 77 6e 74 5f 2e 74 6d 70 |> _shar_|wnt_.tmp|
|00000f70| 0a 65 63 68 6f 20 27 78 | 20 2d 20 65 78 74 72 61 |.echo 'x| - extra|
|00000f80| 63 74 69 6e 67 20 62 65 | 74 61 2f 52 45 41 44 4d |cting be|ta/READM|
|00000f90| 45 2e 6b 75 61 6e 67 20 | 28 54 65 78 74 29 27 0a |E.kuang |(Text)'.|
|00000fa0| 73 65 64 20 27 73 2f 5e | 58 2f 2f 27 20 3c 3c 20 |sed 's/^|X//' << |
|00000fb0| 27 53 48 41 52 5f 45 4f | 46 27 20 3e 20 27 62 65 |'SHAR_EO|F' > 'be|
|00000fc0| 74 61 2f 52 45 41 44 4d | 45 2e 6b 75 61 6e 67 27 |ta/READM|E.kuang'|
|00000fd0| 20 26 26 0a 54 68 69 73 | 20 69 73 20 61 20 70 65 | &&.This| is a pe|
|00000fe0| 72 6c 20 76 65 72 73 69 | 6f 6e 20 6f 66 20 44 61 |rl versi|on of Da|
|00000ff0| 6e 27 73 20 76 65 72 73 | 69 6f 6e 20 6f 66 20 42 |n's vers|ion of B|
|00001000| 6f 62 20 42 61 6c 64 77 | 69 6e 27 73 20 4b 75 61 |ob Baldw|in's Kua|
|00001010| 6e 67 20 70 72 6f 67 72 | 61 6d 0a 28 6f 72 69 67 |ng progr|am.(orig|
|00001020| 69 6e 61 6c 6c 79 20 77 | 72 69 74 74 65 6e 20 61 |inally w|ritten a|
|00001030| 73 20 73 6f 6d 65 20 73 | 68 65 6c 6c 20 73 63 72 |s some s|hell scr|
|00001040| 69 70 74 73 20 61 6e 64 | 20 43 20 70 72 6f 67 72 |ipts and| C progr|
|00001050| 61 6d 73 29 2e 20 0a 58 | 0a 54 68 65 20 6f 72 69 |ams). .X|.The ori|
|00001060| 67 69 6e 61 6c 20 69 6e | 74 65 6e 74 20 77 61 73 |ginal in|tent was|
|00001070| 20 74 6f 20 69 6d 70 72 | 6f 76 65 20 74 68 65 20 | to impr|ove the |
|00001080| 73 70 65 65 64 20 6f 66 | 20 6b 75 61 6e 67 2c 20 |speed of| kuang, |
|00001090| 77 68 69 63 68 20 69 73 | 0a 65 73 70 65 63 69 61 |which is|.especia|
|000010a0| 6c 6c 79 20 69 6d 70 6f | 72 74 61 6e 74 20 66 6f |lly impo|rtant fo|
|000010b0| 72 20 69 6e 73 74 61 6c | 6c 61 74 69 6f 6e 73 20 |r instal|lations |
|000010c0| 6c 69 6b 65 20 6f 75 72 | 73 20 77 69 74 68 20 73 |like our|s with s|
|000010d0| 65 76 65 72 61 6c 20 74 | 68 6f 75 73 61 6e 64 0a |everal t|housand.|
|000010e0| 61 63 63 6f 75 6e 74 73 | 20 61 6e 64 20 4e 46 53 |accounts| and NFS|
|000010f0| 20 74 68 69 6e 67 73 20 | 61 6e 64 20 61 6c 6c 20 | things |and all |
|00001100| 74 68 61 74 2e 20 20 54 | 68 65 20 73 68 65 6c 6c |that. T|he shell|
|00001110| 20 76 65 72 73 69 6f 6e | 20 6f 66 20 4b 75 61 6e | version| of Kuan|
|00001120| 67 20 75 73 65 64 0a 43 | 20 70 72 6f 67 72 61 6d |g used.C| program|
|00001130| 73 20 74 6f 20 61 64 64 | 20 72 75 6c 65 73 2c 20 |s to add| rules, |
|00001140| 67 65 74 20 61 20 67 72 | 6f 75 70 73 20 6d 65 6d |get a gr|oups mem|
|00001150| 62 65 72 73 2c 20 64 65 | 74 65 72 6d 69 6e 65 20 |bers, de|termine |
|00001160| 74 68 65 20 77 72 69 74 | 65 72 73 0a 6f 66 20 61 |the writ|ers.of a|
|00001170| 20 66 69 6c 65 2c 20 61 | 6e 64 20 73 6f 20 6f 6e | file, a|nd so on|
|00001180| 2c 20 77 68 69 63 68 20 | 72 65 61 6c 6c 79 20 73 |, which |really s|
|00001190| 6c 6f 77 65 64 20 74 68 | 69 6e 67 73 20 64 6f 77 |lowed th|ings dow|
|000011a0| 6e 2e 0a 58 0a 58 09 09 | 22 6e 6f 22 20 70 72 6f |n..X.X..|"no" pro|
|000011b0| 62 6c 65 6d 73 09 2f 65 | 74 63 20 73 74 61 66 66 |blems./e|tc staff|
|000011c0| 20 77 72 69 74 65 61 62 | 6c 65 0a 58 09 09 2d 2d | writeab|le.X..--|
|000011d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 09 2d 2d 2d 2d |--------|---.----|
|000011e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000011f0| 0a 73 68 65 6c 6c 20 6b | 75 61 6e 67 09 32 3a 31 |.shell k|uang.2:1|
|00001200| 34 20 28 31 34 29 09 31 | 32 3a 32 36 20 28 39 38 |4 (14).1|2:26 (98|
|00001210| 29 09 30 2e 31 20 70 2f | 73 0a 70 65 72 6c 20 6b |).0.1 p/|s.perl k|
|00001220| 75 61 6e 67 09 31 3a 31 | 30 20 28 31 38 29 09 20 |uang.1:1|0 (18). |
|00001230| 32 3a 33 34 20 28 35 38 | 38 29 09 33 2e 38 20 70 |2:34 (58|8).3.8 p|
|00001240| 2f 73 0a 58 0a 2d 2d 2d | 20 53 74 65 76 65 20 52 |/s.X.---| Steve R|
|00001250| 6f 6d 69 67 2c 20 43 49 | 53 2c 20 4f 68 69 6f 20 |omig, CI|S, Ohio |
|00001260| 53 74 61 74 65 2c 20 4f | 63 74 6f 62 65 72 20 31 |State, O|ctober 1|
|00001270| 39 39 30 0a 58 0a 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |990.X.--|--------|
|00001280| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001290| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000012a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000012b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000012c0| 2d 2d 2d 2d 0a 58 0a 53 | 6f 6d 65 20 46 65 61 74 |----.X.S|ome Feat|
|000012d0| 75 72 65 73 0a 2d 2d 2d | 2d 20 2d 2d 2d 2d 2d 2d |ures.---|- ------|
|000012e0| 2d 2d 0a 58 0a 58 20 20 | 43 61 63 68 65 73 20 70 |--.X.X |Caches p|
|000012f0| 61 73 73 77 64 2f 67 72 | 6f 75 70 20 66 69 6c 65 |asswd/gr|oup file|
|00001300| 20 65 6e 74 72 69 65 73 | 20 69 6e 20 61 6e 20 61 | entries| in an a|
|00001310| 73 73 6f 63 69 61 74 69 | 76 65 20 61 72 72 61 79 |ssociati|ve array|
|00001320| 20 66 6f 72 20 66 61 73 | 74 65 72 0a 58 20 20 6c | for fas|ter.X l|
|00001330| 6f 6f 6b 75 70 73 2e 20 | 20 54 68 69 73 20 69 73 |ookups. | This is|
|00001340| 20 70 61 72 74 69 63 75 | 6c 61 72 6c 79 20 68 65 | particu|larly he|
|00001350| 6c 70 66 75 6c 20 6f 6e | 20 69 6e 73 65 63 75 72 |lpful on| insecur|
|00001360| 65 20 73 79 73 74 65 6d | 73 20 75 73 69 6e 67 20 |e system|s using |
|00001370| 59 50 0a 58 20 20 77 68 | 65 72 65 20 70 61 73 73 |YP.X wh|ere pass|
|00001380| 77 6f 72 64 20 61 6e 64 | 20 67 72 6f 75 70 20 6c |word and| group l|
|00001390| 6f 6f 6b 75 70 73 20 61 | 72 65 20 73 6c 6f 77 20 |ookups a|re slow |
|000013a0| 61 6e 64 20 79 6f 75 20 | 68 61 76 65 20 74 6f 20 |and you |have to |
|000013b0| 64 6f 20 61 6c 6f 74 20 | 6f 66 0a 58 20 20 74 68 |do alot |of.X th|
|000013c0| 65 6d 2e 2e 2e 3a 2d 29 | 0a 58 0a 58 20 20 43 61 |em...:-)|.X.X Ca|
|000013d0| 6e 20 73 70 65 63 69 66 | 79 20 74 61 72 67 65 74 |n specif|y target|
|000013e0| 20 28 75 69 64 20 6f 72 | 20 67 69 64 29 20 6f 6e | (uid or| gid) on|
|000013f0| 20 63 6f 6d 6d 61 6e 64 | 20 6c 69 6e 65 2e 0a 58 | command| line..X|
|00001400| 0a 58 20 20 43 61 6e 20 | 75 73 65 20 2d 6c 20 6f |.X Can |use -l o|
|00001410| 70 74 69 6f 6e 20 74 6f | 20 67 65 6e 65 72 61 74 |ption to| generat|
|00001420| 65 20 50 41 54 20 66 6f | 72 20 61 20 67 6f 61 6c |e PAT fo|r a goal|
|00001430| 2e 0a 58 0a 58 20 20 43 | 61 6e 20 75 73 65 20 2d |..X.X C|an use -|
|00001440| 66 20 74 6f 20 70 72 65 | 6c 6f 61 64 20 66 69 6c |f to pre|load fil|
|00001450| 65 20 6f 77 6e 65 72 2c | 20 67 72 6f 75 70 20 61 |e owner,| group a|
|00001460| 6e 64 20 6d 6f 64 65 20 | 69 6e 66 6f 2c 20 77 68 |nd mode |info, wh|
|00001470| 69 63 68 20 69 73 0a 58 | 20 20 68 65 6c 70 66 75 |ich is.X| helpfu|
|00001480| 6c 20 69 6e 20 73 70 65 | 65 64 69 6e 67 20 74 68 |l in spe|eding th|
|00001490| 69 6e 67 73 20 75 70 20 | 61 6e 64 20 69 6e 20 61 |ings up |and in a|
|000014a0| 76 6f 69 64 69 6e 67 20 | 66 69 6c 65 20 73 79 73 |voiding |file sys|
|000014b0| 74 65 6d 0a 58 20 20 27 | 73 68 61 64 6f 77 73 27 |tem.X '|shadows'|
|000014c0| 2e 2e 2e 20 20 53 65 65 | 20 74 68 65 20 6d 61 6e |... See| the man|
|000014d0| 20 70 61 67 65 20 66 6f | 72 20 64 65 74 61 69 6c | page fo|r detail|
|000014e0| 73 2e 0a 58 0a 46 75 74 | 75 72 65 20 70 6c 61 6e |s..X.Fut|ure plan|
|000014f0| 73 2c 20 74 68 69 6e 67 | 73 20 74 6f 20 66 69 78 |s, thing|s to fix|
|00001500| 3a 0a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |:.------|--------|
|00001510| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 0a 58 |--------|------.X|
|00001520| 0a 2d 20 49 6e 20 61 20 | 6c 61 72 67 65 20 65 6e |.- In a |large en|
|00001530| 76 69 72 6f 6e 6d 65 6e | 74 20 28 6c 69 6b 65 20 |vironmen|t (like |
|00001540| 6f 75 72 73 2c 20 32 36 | 30 2b 20 6d 61 63 68 69 |ours, 26|0+ machi|
|00001550| 6e 65 73 2c 20 33 30 2b | 20 66 69 6c 65 20 73 79 |nes, 30+| file sy|
|00001560| 73 74 65 6d 73 0a 58 20 | 20 6f 6e 20 61 73 20 6d |stems.X | on as m|
|00001570| 61 6e 79 20 73 65 72 76 | 65 72 73 2c 20 32 30 30 |any serv|ers, 200|
|00001580| 30 20 70 61 73 73 77 6f | 72 64 20 66 69 6c 65 20 |0 passwo|rd file |
|00001590| 65 6e 74 72 69 65 73 20 | 73 65 72 76 65 64 20 62 |entries |served b|
|000015a0| 79 20 59 50 29 20 69 74 | 0a 58 20 20 77 6f 75 6c |y YP) it|.X woul|
|000015b0| 64 20 62 65 20 6e 69 63 | 65 20 74 6f 20 27 70 72 |d be nic|e to 'pr|
|000015c0| 65 63 6f 6d 70 75 74 65 | 27 20 73 75 63 63 65 73 |ecompute|' succes|
|000015d0| 73 66 75 6c 20 70 6c 61 | 6e 73 20 74 68 61 74 20 |sful pla|ns that |
|000015e0| 77 6f 75 6c 64 20 62 65 | 20 63 6f 6d 6d 6f 6e 0a |would be| common.|
|000015f0| 58 20 20 74 6f 20 61 6c | 6c 20 73 79 73 74 65 6d |X to al|l system|
|00001600| 73 2e 20 20 49 6e 20 70 | 61 72 74 69 63 75 6c 61 |s. In p|articula|
|00001610| 72 2c 20 70 6c 61 6e 73 | 20 66 6f 72 20 62 65 63 |r, plans| for bec|
|00001620| 6f 6d 69 6e 67 20 6d 6f | 73 74 20 6f 66 20 74 68 |oming mo|st of th|
|00001630| 65 20 75 73 65 72 73 0a | 58 20 20 77 69 74 68 20 |e users.|X with |
|00001640| 68 6f 6d 65 20 64 69 72 | 65 63 74 6f 72 69 65 73 |home dir|ectories|
|00001650| 20 6f 6e 20 74 68 65 20 | 4e 46 53 20 66 69 6c 65 | on the |NFS file|
|00001660| 20 73 79 73 74 65 6d 73 | 20 77 6f 75 6c 64 20 62 | systems| would b|
|00001670| 65 20 75 73 65 66 75 6c | 2c 20 73 69 6e 63 65 0a |e useful|, since.|
|00001680| 58 20 20 77 65 20 64 6f | 6e 27 74 20 72 65 61 6c |X we do|n't real|
|00001690| 6c 79 20 77 61 6e 74 20 | 74 6f 20 72 65 63 68 65 |ly want |to reche|
|000016a0| 63 6b 20 74 68 65 73 65 | 20 6f 6e 20 65 61 63 68 |ck these| on each|
|000016b0| 20 68 6f 73 74 2e 20 20 | 59 6f 75 20 77 6f 75 6c | host. |You woul|
|000016c0| 64 6e 27 74 0a 58 20 20 | 77 61 6e 74 20 74 68 65 |dn't.X |want the|
|000016d0| 20 70 6c 61 6e 20 74 6f | 20 62 65 20 74 6f 6f 20 | plan to| be too |
|000016e0| 64 65 65 70 20 2d 20 70 | 72 6f 62 61 62 6c 79 20 |deep - p|robably |
|000016f0| 73 68 6f 75 6c 64 6e 27 | 74 20 73 70 61 6e 20 6d |shouldn'|t span m|
|00001700| 6f 72 65 20 74 68 61 6e | 20 32 0a 58 20 20 75 69 |ore than| 2.X ui|
|00001710| 64 73 20 28 31 20 6f 6e | 20 65 61 63 68 20 65 6e |ds (1 on| each en|
|00001720| 64 3a 20 67 72 61 6e 74 | 20 75 2e 72 6f 6d 69 67 |d: grant| u.romig|
|00001730| 20 67 72 61 6e 74 20 67 | 2e 73 74 61 66 66 20 77 | grant g|.staff w|
|00001740| 72 69 74 65 20 7e 66 6f | 6f 2f 2e 6c 6f 67 69 6e |rite ~fo|o/.login|
|00001750| 0a 58 20 20 67 72 61 6e | 74 20 75 2e 66 6f 6f 29 |.X gran|t u.foo)|
|00001760| 2e 20 20 49 27 6d 20 74 | 68 69 6e 6b 69 6e 67 20 |. I'm t|hinking |
|00001770| 74 68 61 74 20 79 6f 75 | 20 63 6f 75 6c 64 20 66 |that you| could f|
|00001780| 65 65 64 20 61 20 6c 69 | 73 74 20 6f 66 20 74 68 |eed a li|st of th|
|00001790| 65 73 65 0a 58 20 20 70 | 72 65 63 6f 6d 70 75 74 |ese.X p|recomput|
|000017a0| 65 64 20 70 6c 61 6e 73 | 20 74 6f 20 6b 75 61 6e |ed plans| to kuan|
|000017b0| 67 20 61 6e 64 20 61 64 | 64 20 73 6f 6d 65 20 63 |g and ad|d some c|
|000017c0| 6f 64 65 20 74 68 61 74 | 20 63 61 75 73 65 73 20 |ode that| causes |
|000017d0| 69 74 20 74 6f 0a 58 20 | 20 73 70 6c 69 63 65 20 |it to.X | splice |
|000017e0| 69 6e 20 72 65 6c 65 76 | 65 6e 74 20 70 6c 61 6e |in relev|ent plan|
|000017f0| 73 20 77 68 65 72 65 20 | 69 74 20 63 61 6e 20 74 |s where |it can t|
|00001800| 6f 20 73 68 6f 72 74 20 | 63 75 74 20 74 68 65 20 |o short |cut the |
|00001810| 70 6c 61 6e 6e 69 6e 67 | 0a 58 20 20 73 74 65 70 |planning|.X step|
|00001820| 73 2e 20 20 46 6f 72 20 | 65 78 61 6d 70 6c 65 2c |s. For |example,|
|00001830| 20 69 66 20 6f 6e 65 20 | 6f 66 20 74 68 65 20 70 | if one |of the p|
|00001840| 6c 61 6e 73 20 69 6e 20 | 75 69 64 73 2e 6e 65 78 |lans in |uids.nex|
|00001850| 74 20 69 73 20 73 6f 6d | 65 74 68 69 6e 67 0a 58 |t is som|ething.X|
|00001860| 20 20 6c 69 6b 65 20 22 | 67 72 61 6e 74 20 75 2e | like "|grant u.|
|00001870| 66 6f 6f 20 2e 2e 2e 22 | 2c 20 61 6e 64 20 49 20 |foo ..."|, and I |
|00001880| 68 61 76 65 20 74 68 65 | 20 70 72 65 63 6f 6d 70 |have the| precomp|
|00001890| 75 74 65 64 20 70 6c 61 | 6e 20 6d 65 6e 74 69 6f |uted pla|n mentio|
|000018a0| 6e 65 64 0a 58 20 20 61 | 62 6f 76 65 2c 20 49 20 |ned.X a|bove, I |
|000018b0| 63 6f 75 6c 64 20 73 70 | 6c 69 63 65 20 74 68 65 |could sp|lice the|
|000018c0| 20 74 77 6f 3a 20 22 67 | 72 61 6e 74 20 75 2e 72 | two: "g|rant u.r|
|000018d0| 6f 6d 69 67 20 67 72 61 | 6e 74 20 67 2e 73 74 61 |omig gra|nt g.sta|
|000018e0| 66 66 20 77 72 69 74 65 | 0a 58 20 20 7e 66 6f 6f |ff write|.X ~foo|
|000018f0| 2f 2e 6c 6f 67 69 6e 20 | 67 72 61 6e 74 20 75 2e |/.login |grant u.|
|00001900| 66 6f 6f 20 2e 2e 2e 22 | 20 61 6e 64 20 73 6b 69 |foo ..."| and ski|
|00001910| 70 20 61 6c 6c 20 74 68 | 65 20 6e 6f 72 6d 61 6c |p all th|e normal|
|00001920| 20 73 74 65 70 73 20 74 | 68 61 74 0a 58 20 20 77 | steps t|hat.X w|
|00001930| 6f 75 6c 64 27 76 65 20 | 62 65 65 6e 20 74 61 6b |ould've |been tak|
|00001940| 65 6e 20 74 6f 20 67 65 | 74 20 74 68 65 72 65 2e |en to ge|t there.|
|00001950| 0a 58 0a 2d 20 48 6d 6d | 6d 2e 2e 2e 74 68 69 6e |.X.- Hmm|m...thin|
|00001960| 6b 69 6e 67 20 61 62 6f | 75 74 20 69 74 2c 20 69 |king abo|ut it, i|
|00001970| 74 20 73 65 65 6d 73 20 | 6c 69 6b 65 20 73 6f 6d |t seems |like som|
|00001980| 65 20 6f 66 20 74 68 65 | 20 73 74 65 70 73 20 61 |e of the| steps a|
|00001990| 72 65 20 61 20 62 69 74 | 0a 58 20 20 74 6f 6f 20 |re a bit|.X too |
|000019a0| 69 6d 70 6c 69 63 69 74 | 2e 2e 2e 6d 61 79 62 65 |implicit|...maybe|
|000019b0| 20 74 68 65 20 72 75 6c | 65 73 20 73 68 6f 75 6c | the rul|es shoul|
|000019c0| 64 20 62 65 20 62 72 6f | 6b 65 6e 20 6f 75 74 20 |d be bro|ken out |
|000019d0| 61 20 62 69 74 20 6d 6f | 72 65 2e 0a 58 20 20 54 |a bit mo|re..X T|
|000019e0| 68 61 74 20 77 69 6c 6c | 20 63 6f 73 74 20 69 6e |hat will| cost in|
|000019f0| 20 70 72 6f 63 65 73 73 | 69 6e 67 20 74 69 6d 65 | process|ing time|
|00001a00| 2c 20 74 68 6f 75 67 68 | 2e 0a 58 0a 2d 20 57 6f |, though|..X.- Wo|
|00001a10| 75 6c 64 20 62 65 20 72 | 65 61 6c 6c 79 2c 20 72 |uld be r|eally, r|
|00001a20| 65 61 6c 6c 79 20 6e 69 | 63 65 20 74 6f 20 62 65 |eally ni|ce to be|
|00001a30| 20 61 62 6c 65 20 74 6f | 20 64 65 61 6c 20 77 69 | able to| deal wi|
|00001a40| 74 68 20 50 41 54 48 20 | 76 61 72 69 61 62 6c 65 |th PATH |variable|
|00001a50| 73 0a 58 20 20 2d 20 6c | 6f 63 61 74 69 6f 6e 20 |s.X - l|ocation |
|00001a60| 6f 66 20 2e 2c 20 77 68 | 6f 20 63 61 6e 20 77 72 |of ., wh|o can wr|
|00001a70| 69 74 65 20 65 6c 65 6d | 65 6e 74 73 20 6f 66 20 |ite elem|ents of |
|00001a80| 70 61 74 68 2c 20 65 74 | 63 2e 20 20 42 61 73 69 |path, et|c. Basi|
|00001a90| 63 20 72 75 6c 65 20 69 | 73 0a 58 20 20 22 61 6e |c rule i|s.X "an|
|00001aa0| 79 6f 6e 65 20 77 68 6f | 20 63 61 6e 20 72 65 70 |yone who| can rep|
|00001ab0| 6c 61 63 65 20 61 6e 79 | 74 68 69 6e 67 20 69 6e |lace any|thing in|
|00001ac0| 20 61 6e 79 20 6f 66 20 | 70 61 74 68 20 64 69 72 | any of |path dir|
|00001ad0| 65 63 74 6f 72 69 65 73 | 20 6f 72 20 74 68 65 0a |ectories| or the.|
|00001ae0| 58 20 20 70 61 74 68 20 | 64 69 72 65 63 74 6f 72 |X path |director|
|00001af0| 69 65 73 20 74 68 65 6d | 73 65 6c 76 65 73 20 63 |ies them|selves c|
|00001b00| 61 6e 20 62 65 63 6f 6d | 65 20 74 68 61 74 20 50 |an becom|e that P|
|00001b10| 41 54 48 27 73 20 75 73 | 65 72 2e 2e 2e 22 20 20 |ATH's us|er..." |
|00001b20| 54 68 69 73 0a 58 20 20 | 63 61 6e 20 62 65 20 72 |This.X |can be r|
|00001b30| 65 61 6c 6c 79 20 6d 65 | 73 73 79 20 74 68 6f 75 |eally me|ssy thou|
|00001b40| 67 68 20 2d 20 69 6e 20 | 6f 75 72 20 65 6e 76 69 |gh - in |our envi|
|00001b50| 72 6f 6e 6d 65 6e 74 2c | 20 74 68 65 20 70 61 74 |ronment,| the pat|
|00001b60| 68 20 66 6f 72 20 61 20 | 75 73 65 72 0a 58 20 20 |h for a |user.X |
|00001b70| 77 69 6c 6c 20 64 65 70 | 65 6e 64 20 6f 6e 20 74 |will dep|end on t|
|00001b80| 68 65 20 61 72 63 68 69 | 74 65 63 74 75 72 65 20 |he archi|tecture |
|00001b90| 74 79 70 65 20 6f 66 20 | 74 68 65 20 6d 61 63 68 |type of |the mach|
|00001ba0| 69 6e 65 20 74 68 61 74 | 20 68 65 20 69 73 0a 58 |ine that| he is.X|
|00001bb0| 20 20 6c 6f 67 67 65 64 | 20 69 6e 74 6f 2c 20 61 | logged| into, a|
|00001bc0| 6e 64 20 74 6f 20 67 65 | 74 20 74 68 65 20 70 61 |nd to ge|t the pa|
|00001bd0| 74 68 2c 20 79 6f 75 27 | 64 20 68 61 76 65 20 74 |th, you'|d have t|
|00001be0| 6f 20 72 65 61 64 20 61 | 6e 64 20 69 6e 74 65 72 |o read a|nd inter|
|00001bf0| 70 72 65 74 0a 58 20 20 | 68 69 73 20 2e 6c 6f 67 |pret.X |his .log|
|00001c00| 69 6e 20 28 69 6e 63 6c | 75 64 69 6e 67 20 76 61 |in (incl|uding va|
|00001c10| 72 69 61 62 6c 65 20 61 | 73 73 69 67 6e 6d 65 6e |riable a|ssignmen|
|00001c20| 74 73 2c 20 73 6f 75 72 | 63 65 27 73 20 61 6e 64 |ts, sour|ce's and|
|00001c30| 0a 58 20 20 63 6f 6e 64 | 69 74 69 6f 6e 61 6c 73 |.X cond|itionals|
|00001c40| 29 2e 20 20 55 72 66 2e | 20 20 4f 6e 65 20 77 6f |). Urf.| One wo|
|00001c50| 6e 64 65 72 73 20 77 68 | 65 74 68 65 72 20 69 74 |nders wh|ether it|
|00001c60| 20 6d 69 67 68 74 20 62 | 65 20 62 65 74 74 65 72 | might b|e better|
|00001c70| 20 74 6f 20 68 61 76 65 | 0a 58 20 20 73 6f 6d 65 | to have|.X some|
|00001c80| 74 68 69 6e 67 20 72 75 | 6e 6e 69 6e 67 20 61 73 |thing ru|nning as|
|00001c90| 20 72 6f 6f 74 20 74 68 | 61 74 20 73 75 27 73 20 | root th|at su's |
|00001ca0| 74 6f 20 65 61 63 68 20 | 75 73 65 72 6e 61 6d 65 |to each |username|
|00001cb0| 20 69 6e 20 74 75 72 6e | 20 61 6e 64 0a 58 20 20 | in turn| and.X |
|00001cc0| 67 65 74 73 20 74 68 65 | 20 70 61 74 68 20 74 68 |gets the| path th|
|00001cd0| 61 74 20 77 61 79 2e 2e | 2e 0a 58 0a 2d 20 69 67 |at way..|..X.- ig|
|00001ce0| 6e 6f 72 65 20 70 6c 61 | 6e 73 20 74 68 61 74 20 |nore pla|ns that |
|00001cf0| 73 74 61 72 74 20 77 69 | 74 68 20 22 75 69 64 20 |start wi|th "uid |
|00001d00| 72 6f 6f 74 22 2c 20 75 | 6e 6c 65 73 73 20 74 68 |root", u|nless th|
|00001d10| 61 74 27 73 20 74 68 65 | 20 6f 6e 6c 79 20 65 6c |at's the| only el|
|00001d20| 65 6d 65 6e 74 20 2d 20 | 72 6f 6f 74 0a 58 20 20 |ement - |root.X |
|00001d30| 63 61 6e 20 67 65 74 20 | 74 6f 20 61 6e 79 74 68 |can get |to anyth|
|00001d40| 69 6e 67 2c 20 61 6e 64 | 20 68 6f 70 65 66 75 6c |ing, and| hopeful|
|00001d50| 6c 79 20 6e 6f 74 68 69 | 6e 67 20 63 61 6e 20 67 |ly nothi|ng can g|
|00001d60| 65 74 20 74 6f 20 72 6f | 6f 74 2e 2e 2e 3f 0a 58 |et to ro|ot...?.X|
|00001d70| 0a 2d 20 72 65 6d 6f 76 | 65 20 64 75 70 6c 69 63 |.- remov|e duplic|
|00001d80| 61 74 65 20 6e 61 6d 65 | 73 20 66 72 6f 6d 20 75 |ate name|s from u|
|00001d90| 69 64 32 6e 61 6d 65 73 | 20 61 6e 64 20 67 69 64 |id2names| and gid|
|00001da0| 32 6e 61 6d 65 73 2e 2e | 2e 0a 58 0a 2d 20 77 69 |2names..|..X.- wi|
|00001db0| 74 68 20 7e 2f 2e 6c 6f | 67 69 6e 20 77 6f 72 6c |th ~/.lo|gin worl|
|00001dc0| 64 20 77 72 69 74 65 61 | 62 6c 65 20 2d 20 6f 6e |d writea|ble - on|
|00001dd0| 6c 79 20 66 6f 6c 6c 6f | 77 73 20 67 72 6f 75 70 |ly follo|ws group|
|00001de0| 20 70 61 74 68 2c 20 62 | 75 74 20 6e 6f 74 20 4f | path, b|ut not O|
|00001df0| 54 48 45 52 2e 0a 58 0a | 2d 20 61 64 64 20 70 6c |THER..X.|- add pl|
|00001e00| 61 6e 73 20 74 6f 20 61 | 73 73 65 63 63 69 62 6c |ans to a|sseccibl|
|00001e10| 65 20 6c 69 73 74 2e 0a | 58 0a 44 6f 6e 65 0a 2d |e list..|X.Done.-|
|00001e20| 2d 2d 2d 0a 58 0a 2d 20 | 4e 65 65 64 20 74 6f 20 |---.X.- |Need to |
|00001e30| 66 69 6e 64 20 61 6c 6c | 20 70 6c 61 6e 73 20 74 |find all| plans t|
|00001e40| 68 61 74 20 6c 65 61 64 | 20 74 6f 20 63 6f 6d 70 |hat lead| to comp|
|00001e50| 72 6f 6d 69 73 65 2c 20 | 6e 6f 74 20 6a 75 73 74 |romise, |not just|
|00001e60| 20 61 20 70 6c 61 6e 2e | 0a 58 0a 2d 20 41 6e 20 | a plan.|.X.- An |
|00001e70| 65 61 72 6c 69 65 72 20 | 76 65 72 73 69 6f 6e 20 |earlier |version |
|00001e80| 73 63 61 6e 6e 65 64 20 | 74 68 65 20 70 61 73 73 |scanned |the pass|
|00001e90| 77 6f 72 64 20 66 69 6c | 65 20 6c 6f 6f 6b 69 6e |word fil|e lookin|
|00001ea0| 67 20 66 6f 72 20 67 65 | 6e 65 72 61 6c 6c 79 0a |g for ge|nerally.|
|00001eb0| 58 20 20 61 63 63 65 73 | 69 62 6c 65 20 61 63 63 |X acces|ible acc|
|00001ec0| 6f 75 6e 74 73 20 28 6e | 6f 20 70 61 73 73 77 6f |ounts (n|o passwo|
|00001ed0| 72 64 29 2c 20 77 68 69 | 63 68 20 77 6f 75 6c 64 |rd), whi|ch would|
|00001ee0| 20 62 65 20 61 64 64 65 | 64 20 74 6f 20 74 68 65 | be adde|d to the|
|00001ef0| 0a 58 20 20 75 69 64 73 | 2e 6b 6e 6f 77 6e 20 6c |.X uids|.known l|
|00001f00| 69 73 74 20 28 69 6e 20 | 61 64 64 69 74 69 6f 6e |ist (in |addition|
|00001f10| 20 74 6f 20 2d 31 2c 20 | 22 6f 74 68 65 72 22 29 | to -1, |"other")|
|00001f20| 2e 20 20 49 20 68 61 64 | 20 70 6c 61 6e 6e 65 64 |. I had| planned|
|00001f30| 20 6f 6e 20 61 6c 73 6f | 0a 58 20 20 61 64 64 69 | on also|.X addi|
|00001f40| 6e 67 20 61 20 70 61 73 | 73 77 6f 72 64 20 63 68 |ng a pas|sword ch|
|00001f50| 65 63 6b 65 72 20 77 68 | 69 63 68 20 77 6f 75 6c |ecker wh|ich woul|
|00001f60| 64 20 61 6c 6c 6f 77 20 | 75 73 20 74 6f 20 61 6c |d allow |us to al|
|00001f70| 73 6f 20 61 64 64 20 61 | 63 63 6f 75 6e 74 73 0a |so add a|ccounts.|
|00001f80| 58 20 20 77 69 74 68 20 | 65 61 73 69 6c 79 20 67 |X with |easily g|
|00001f90| 75 65 73 73 65 64 20 70 | 61 73 73 77 6f 72 64 73 |uessed p|asswords|
|00001fa0| 2e 20 20 45 76 65 6e 74 | 75 61 6c 6c 79 20 49 20 |. Event|ually I |
|00001fb0| 6e 75 6b 65 64 20 74 68 | 65 20 63 6f 64 65 20 74 |nuked th|e code t|
|00001fc0| 68 61 74 0a 58 20 20 73 | 63 61 6e 6e 65 64 20 74 |hat.X s|canned t|
|00001fd0| 68 65 20 70 61 73 73 77 | 6f 72 64 20 66 69 6c 65 |he passw|ord file|
|00001fe0| 20 74 6f 20 73 70 65 65 | 64 20 74 68 69 6e 67 73 | to spee|d things|
|00001ff0| 20 75 70 2c 20 61 6e 64 | 20 66 75 72 74 68 65 72 | up, and| further|
|00002000| 20 72 65 66 6c 65 63 74 | 69 6f 6e 0a 58 20 20 72 | reflect|ion.X r|
|00002010| 65 76 65 61 6c 73 20 74 | 68 61 74 20 69 74 20 69 |eveals t|hat it i|
|00002020| 73 6e 27 74 20 77 69 73 | 65 20 74 6f 20 61 64 64 |sn't wis|e to add|
|00002030| 20 74 68 65 20 70 61 73 | 73 77 6f 72 64 20 73 63 | the pas|sword sc|
|00002040| 61 6e 6e 69 6e 67 20 74 | 6f 20 6b 75 61 6e 67 0a |anning t|o kuang.|
|00002050| 58 20 20 69 74 73 65 6c | 66 2e 20 20 41 74 20 73 |X itsel|f. At s|
|00002060| 6f 6d 65 20 70 6f 69 6e | 74 20 77 65 20 73 68 6f |ome poin|t we sho|
|00002070| 75 6c 64 20 61 64 64 20 | 61 20 63 6f 6d 61 6e 64 |uld add |a comand|
|00002080| 20 6c 69 6e 65 20 6f 70 | 74 69 6f 6e 20 74 68 61 | line op|tion tha|
|00002090| 74 0a 58 20 20 61 6c 6c | 6f 77 73 20 75 73 20 74 |t.X all|ows us t|
|000020a0| 6f 20 61 64 64 20 61 64 | 64 69 74 69 6f 6e 61 6c |o add ad|ditional|
|000020b0| 20 75 69 64 27 73 20 28 | 6f 72 20 67 69 64 27 73 | uid's (|or gid's|
|000020c0| 3f 29 20 74 6f 20 74 68 | 65 20 75 69 64 73 2e 6b |?) to th|e uids.k|
|000020d0| 6e 6f 77 6e 0a 58 20 20 | 6c 69 73 74 2e 20 20 54 |nown.X |list. T|
|000020e0| 68 61 74 20 77 61 79 20 | 74 68 65 20 75 73 65 72 |hat way |the user|
|000020f0| 20 63 6f 75 6c 64 20 72 | 75 6e 20 73 6f 6d 65 20 | could r|un some |
|00002100| 6f 74 68 65 72 20 74 6f | 6f 6c 20 74 6f 20 73 63 |other to|ol to sc|
|00002110| 61 6e 20 74 68 65 0a 58 | 20 20 70 61 73 73 77 6f |an the.X| passwo|
|00002120| 72 64 20 66 69 6c 65 20 | 61 6e 64 20 67 65 6e 65 |rd file |and gene|
|00002130| 72 61 74 65 20 61 20 6c | 69 73 74 20 6f 66 20 61 |rate a l|ist of a|
|00002140| 63 63 65 73 73 69 62 6c | 65 20 61 63 63 6f 75 6e |ccessibl|e accoun|
|00002150| 74 73 2c 20 77 68 69 63 | 68 0a 58 20 20 63 6f 75 |ts, whic|h.X cou|
|00002160| 6c 64 20 74 68 65 6e 20 | 62 65 20 66 65 64 20 74 |ld then |be fed t|
|00002170| 6f 20 6b 75 61 6e 67 2e | 20 20 4d 61 6b 65 73 20 |o kuang.| Makes |
|00002180| 69 74 20 66 61 73 74 65 | 72 20 6f 6e 20 63 6c 69 |it faste|r on cli|
|00002190| 65 6e 74 73 20 75 73 69 | 6e 67 20 59 50 0a 58 20 |ents usi|ng YP.X |
|000021a0| 20 73 69 6e 63 65 20 6d | 6f 73 74 20 6f 66 20 74 | since m|ost of t|
|000021b0| 68 65 20 70 61 73 73 77 | 6f 72 64 20 66 69 6c 65 |he passw|ord file|
|000021c0| 20 69 73 20 74 68 65 20 | 73 61 6d 65 20 66 6f 72 | is the |same for|
|000021d0| 20 61 6c 6c 20 4e 20 63 | 6c 69 65 6e 74 73 2c 20 | all N c|lients, |
|000021e0| 77 68 79 0a 58 20 20 73 | 63 61 6e 20 69 74 20 4e |why.X s|can it N|
|000021f0| 20 74 69 6d 65 73 2e 20 | 20 4d 65 61 6e 73 20 74 | times. | Means t|
|00002200| 68 61 74 20 75 73 65 72 | 20 63 61 6e 20 64 6f 20 |hat user| can do |
|00002210| 73 6d 61 72 74 65 72 20 | 74 68 69 6e 67 73 20 74 |smarter |things t|
|00002220| 6f 2f 77 69 74 68 20 74 | 68 65 0a 58 20 20 70 61 |o/with t|he.X pa|
|00002230| 73 73 77 6f 72 64 20 66 | 69 6c 65 20 63 68 65 63 |ssword f|ile chec|
|00002240| 6b 73 20 28 6c 69 73 74 | 20 61 6c 6c 20 61 63 63 |ks (list| all acc|
|00002250| 6f 75 6e 74 73 20 77 69 | 74 68 20 6e 6f 20 70 61 |ounts wi|th no pa|
|00002260| 73 73 77 6f 72 64 20 6f | 72 20 65 61 73 69 6c 79 |ssword o|r easily|
|00002270| 0a 58 20 20 67 75 65 73 | 73 65 64 20 70 61 73 73 |.X gues|sed pass|
|00002280| 77 6f 72 64 2c 20 66 69 | 6c 74 65 72 20 6f 75 74 |word, fi|lter out|
|00002290| 20 22 6f 6b 22 20 65 6e | 74 72 69 65 73 20 28 65 | "ok" en|tries (e|
|000022a0| 67 2c 20 73 79 6e 63 29 | 20 61 6e 64 20 65 74 63 |g, sync)| and etc|
|000022b0| 2e 29 0a 58 0a 2d 20 57 | 65 20 61 72 65 6e 27 74 |.).X.- W|e aren't|
|000022c0| 20 64 65 61 6c 69 6e 67 | 20 77 69 74 68 20 75 69 | dealing| with ui|
|000022d0| 64 27 73 20 61 6e 64 20 | 67 69 64 27 73 20 63 6f |d's and |gid's co|
|000022e0| 72 72 65 63 74 6c 79 2e | 20 20 49 66 20 74 68 65 |rrectly.| If the|
|000022f0| 72 65 20 61 72 65 0a 58 | 20 20 73 65 76 65 72 61 |re are.X| severa|
|00002300| 6c 20 65 6e 74 72 69 65 | 73 20 74 68 61 74 20 6c |l entrie|s that l|
|00002310| 69 73 74 20 74 68 65 20 | 73 61 6d 65 20 55 49 44 |ist the |same UID|
|00002320| 2c 20 62 75 74 20 77 69 | 74 68 20 64 69 66 66 65 |, but wi|th diffe|
|00002330| 72 65 6e 74 20 6e 61 6d | 65 73 2c 0a 58 20 20 64 |rent nam|es,.X d|
|00002340| 69 72 65 63 74 6f 72 69 | 65 73 20 61 6e 64 20 73 |irectori|es and s|
|00002350| 68 65 6c 6c 73 2c 20 77 | 65 27 6c 6c 20 6f 6e 6c |hells, w|e'll onl|
|00002360| 79 20 63 68 65 63 6b 20 | 70 6c 61 6e 73 20 66 6f |y check |plans fo|
|00002370| 72 20 62 65 63 6f 6d 69 | 6e 67 20 6f 6e 65 20 6f |r becomi|ng one o|
|00002380| 66 0a 58 20 20 74 68 65 | 6d 2c 20 72 61 74 68 65 |f.X the|m, rathe|
|00002390| 72 20 74 68 61 6e 20 61 | 6e 79 20 6f 66 20 74 68 |r than a|ny of th|
|000023a0| 65 6d 2e 20 20 48 6d 6d | 6d 2e 2e 2e 74 68 69 73 |em. Hmm|m...this|
|000023b0| 20 69 73 20 65 61 73 69 | 65 72 20 74 68 61 6e 20 | is easi|er than |
|000023c0| 49 0a 58 20 20 74 68 6f | 75 67 68 74 2c 20 77 68 |I.X tho|ught, wh|
|000023d0| 65 6e 20 77 65 20 65 76 | 61 6c 75 61 74 65 20 73 |en we ev|aluate s|
|000023e0| 6f 6d 65 20 70 6c 61 6e | 20 66 6f 72 20 67 72 61 |ome plan| for gra|
|000023f0| 6e 74 69 6e 67 20 61 20 | 70 61 72 74 69 63 75 6c |nting a |particul|
|00002400| 61 72 20 75 69 64 2c 0a | 58 20 20 77 65 20 6e 65 |ar uid,.|X we ne|
|00002410| 65 64 20 74 6f 20 65 76 | 61 6c 75 61 74 65 20 70 |ed to ev|aluate p|
|00002420| 6c 61 6e 73 20 66 6f 72 | 20 61 6c 6c 20 75 73 65 |lans for| all use|
|00002430| 72 6e 61 6d 65 73 20 74 | 68 61 74 20 63 61 6e 20 |rnames t|hat can |
|00002440| 62 65 63 6f 6d 65 20 74 | 68 61 74 0a 58 20 20 75 |become t|hat.X u|
|00002450| 69 64 2e 20 20 4a 75 73 | 74 20 73 74 69 63 6b 20 |id. Jus|t stick |
|00002460| 61 20 6c 6f 6f 70 20 69 | 6e 20 74 68 65 72 65 20 |a loop i|n there |
|00002470| 73 6f 6d 65 77 68 65 72 | 65 2e 2e 2e 67 65 74 20 |somewher|e...get |
|00002480| 43 46 27 73 20 66 6f 72 | 20 65 61 63 68 20 6f 66 |CF's for| each of|
|00002490| 0a 58 20 20 75 73 65 72 | 6e 61 6d 65 27 73 20 69 |.X user|name's i|
|000024a0| 6e 20 74 75 72 6e 2e 20 | 20 42 61 68 2c 20 68 61 |n turn. | Bah, ha|
|000024b0| 72 64 65 72 20 74 68 61 | 6e 20 49 20 74 68 6f 75 |rder tha|n I thou|
|000024c0| 67 68 74 2c 20 73 69 6e | 63 65 20 69 74 27 64 20 |ght, sin|ce it'd |
|000024d0| 68 61 76 65 20 74 6f 0a | 58 20 20 73 63 61 6e 20 |have to.|X scan |
|000024e0| 74 68 65 20 77 68 6f 6c | 65 20 70 61 73 73 77 6f |the whol|e passwo|
|000024f0| 72 64 20 66 69 6c 65 20 | 74 6f 20 66 69 67 75 72 |rd file |to figur|
|00002500| 65 20 77 68 69 63 68 20 | 75 73 65 72 6e 61 6d 65 |e which |username|
|00002510| 2f 68 6f 6d 65 20 64 69 | 72 65 63 74 6f 72 69 65 |/home di|rectorie|
|00002520| 73 0a 58 20 20 63 61 6e | 20 62 65 63 6f 6d 65 20 |s.X can| become |
|00002530| 77 68 69 63 68 20 75 69 | 64 27 73 2e 20 20 53 69 |which ui|d's. Si|
|00002540| 6d 69 6c 61 72 6c 79 20 | 77 69 74 68 20 67 72 6f |milarly |with gro|
|00002550| 75 70 73 2e 0a 58 0a 58 | 20 20 43 75 72 72 65 6e |ups..X.X| Curren|
|00002560| 74 20 70 6c 61 6e 3a 20 | 62 79 20 64 65 66 61 75 |t plan: |by defau|
|00002570| 6c 74 2c 20 6b 75 61 6e | 67 20 77 69 6c 6c 20 68 |lt, kuan|g will h|
|00002580| 61 76 65 20 74 6f 20 73 | 63 61 6e 20 74 68 65 20 |ave to s|can the |
|00002590| 77 68 6f 6c 65 20 70 61 | 73 73 77 6f 72 64 0a 58 |whole pa|ssword.X|
|000025a0| 20 20 61 6e 64 20 67 72 | 6f 75 70 20 66 69 6c 65 | and gr|oup file|
|000025b0| 73 20 73 6f 20 69 74 20 | 63 61 6e 20 62 65 20 73 |s so it |can be s|
|000025c0| 75 72 65 20 74 6f 20 67 | 65 74 20 61 6c 6c 20 70 |ure to g|et all p|
|000025d0| 6f 73 73 69 62 6c 65 20 | 77 61 79 73 20 74 6f 20 |ossible |ways to |
|000025e0| 62 65 63 6f 6d 65 0a 58 | 20 20 73 6f 6d 65 20 75 |become.X| some u|
|000025f0| 69 64 20 6f 72 20 67 69 | 64 2e 20 20 49 6e 74 65 |id or gi|d. Inte|
|00002600| 72 6e 61 6c 6c 79 2c 20 | 72 65 61 6c 6c 79 20 6e |rnally, |really n|
|00002610| 65 65 64 20 73 65 76 65 | 72 61 6c 20 6c 69 73 74 |eed seve|ral list|
|00002620| 73 3a 0a 58 0a 58 09 6d | 61 70 70 69 6e 67 20 66 |s:.X.X.m|apping f|
|00002630| 72 6f 6d 20 75 69 64 20 | 74 6f 20 6c 69 73 74 20 |rom uid |to list |
|00002640| 6f 66 20 75 73 65 72 6e | 61 6d 65 73 20 74 68 61 |of usern|ames tha|
|00002650| 74 20 68 61 76 65 20 74 | 68 61 74 20 75 69 64 0a |t have t|hat uid.|
|00002660| 58 09 6d 61 70 70 69 6e | 67 20 66 72 6f 6d 20 61 |X.mappin|g from a|
|00002670| 20 75 73 65 72 6e 61 6d | 65 20 74 6f 20 68 6f 6d | usernam|e to hom|
|00002680| 65 20 64 69 72 65 63 74 | 6f 72 79 2c 20 73 68 65 |e direct|ory, she|
|00002690| 6c 6c 0a 58 09 6d 61 70 | 70 69 6e 67 20 66 72 6f |ll.X.map|ping fro|
|000026a0| 6d 20 67 69 64 20 74 6f | 20 6c 69 73 74 20 6f 66 |m gid to| list of|
|000026b0| 20 75 69 64 73 20 74 68 | 61 74 20 68 61 76 65 20 | uids th|at have |
|000026c0| 61 63 63 65 73 73 20 74 | 6f 20 74 68 61 74 0a 58 |access t|o that.X|
|000026d0| 09 20 20 67 69 64 20 77 | 68 65 6e 20 74 68 65 79 |. gid w|hen they|
|000026e0| 20 6c 6f 67 69 6e 20 28 | 65 69 74 68 65 72 20 6d | login (|either m|
|000026f0| 65 6d 62 65 72 20 6f 66 | 20 67 72 6f 75 70 20 77 |ember of| group w|
|00002700| 69 74 68 20 74 68 61 74 | 20 67 69 64 20 6f 72 0a |ith that| gid or.|
|00002710| 58 09 20 20 67 69 76 65 | 6e 20 61 73 20 6c 6f 67 |X. give|n as log|
|00002720| 69 6e 20 67 72 6f 75 70 | 20 69 6e 20 70 61 73 73 |in group| in pass|
|00002730| 77 64 20 66 69 6c 65 29 | 0a 58 09 6d 61 70 70 69 |wd file)|.X.mappi|
|00002740| 6e 67 20 66 72 6f 6d 20 | 67 69 64 20 74 6f 20 6c |ng from |gid to l|
|00002750| 69 73 74 20 6f 66 20 67 | 72 6f 75 70 20 6e 61 6d |ist of g|roup nam|
|00002760| 65 73 20 66 6f 72 20 74 | 68 61 74 20 67 69 64 0a |es for t|hat gid.|
|00002770| 58 0a 58 20 20 43 6f 75 | 72 73 65 2c 20 74 68 69 |X.X Cou|rse, thi|
|00002780| 73 20 6d 65 61 6e 73 20 | 74 68 61 74 20 77 65 20 |s means |that we |
|00002790| 68 61 76 65 20 74 6f 20 | 72 65 61 64 20 74 68 65 |have to |read the|
|000027a0| 20 77 68 6f 6c 65 20 70 | 61 73 73 77 6f 72 64 20 | whole p|assword |
|000027b0| 61 6e 64 20 67 72 6f 75 | 70 0a 58 20 20 66 69 6c |and grou|p.X fil|
|000027c0| 65 2c 20 6d 6f 73 74 20 | 6f 66 20 77 68 69 63 68 |e, most |of which|
|000027d0| 20 77 69 6c 6c 20 62 65 | 20 63 6f 6d 6d 6f 6e 20 | will be| common |
|000027e0| 74 6f 20 6d 61 6e 79 20 | 6d 61 63 68 69 6e 65 73 |to many |machines|
|000027f0| 20 28 6c 69 6b 65 20 69 | 6e 20 61 20 59 50 0a 58 | (like i|n a YP.X|
|00002800| 20 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 29 2e 20 | enviro|nment). |
|00002810| 20 57 65 20 63 6f 75 6c | 64 20 70 72 65 6c 6f 61 | We coul|d preloa|
|00002820| 64 20 74 68 65 20 74 61 | 62 6c 65 73 20 61 62 6f |d the ta|bles abo|
|00002830| 76 65 20 66 72 6f 6d 20 | 66 69 6c 65 73 20 63 72 |ve from |files cr|
|00002840| 65 61 74 65 64 0a 58 20 | 20 6f 6e 63 65 2c 20 63 |eated.X | once, c|
|00002850| 6f 6e 74 61 69 6e 69 6e | 67 20 74 68 65 20 62 72 |ontainin|g the br|
|00002860| 75 6e 74 20 6f 66 20 74 | 68 65 20 59 50 20 69 6e |unt of t|he YP in|
|00002870| 66 6f 2c 20 61 6e 64 20 | 74 68 65 6e 20 61 75 67 |fo, and |then aug|
|00002880| 6d 65 6e 74 20 74 68 61 | 74 0a 58 20 20 77 69 74 |ment tha|t.X wit|
|00002890| 68 74 68 65 20 6c 6f 63 | 61 6c 20 70 61 73 73 77 |hthe loc|al passw|
|000028a0| 64 20 61 6e 64 20 67 72 | 6f 75 70 20 69 6e 66 6f |d and gr|oup info|
|000028b0| 20 6f 6e 20 65 61 63 68 | 20 68 6f 73 74 20 77 68 | on each| host wh|
|000028c0| 65 6e 20 6b 75 61 6e 67 | 20 69 73 0a 58 20 20 69 |en kuang| is.X i|
|000028d0| 6e 76 6f 6b 65 64 2c 20 | 62 75 74 20 74 68 65 6e |nvoked, |but then|
|000028e0| 20 77 65 20 6e 65 65 64 | 20 74 6f 20 63 6f 72 72 | we need| to corr|
|000028f0| 65 63 74 6c 79 20 69 6e | 74 65 72 70 72 65 74 20 |ectly in|terpret |
|00002900| 66 75 6e 6b 79 20 59 50 | 20 74 68 69 6e 67 73 0a |funky YP| things.|
|00002910| 58 20 20 6c 69 6b 65 20 | 2b 40 6e 65 74 67 72 6f |X like |+@netgro|
|00002920| 75 70 3a 3a 3a 2a 3a 2e | 2e 2e 2c 20 77 68 69 63 |up:::*:.|.., whic|
|00002930| 68 20 6d 65 61 6e 73 20 | 74 68 61 74 20 74 68 65 |h means |that the|
|00002940| 20 75 69 64 20 68 61 73 | 20 61 20 6e 61 6d 65 20 | uid has| a name |
|00002950| 62 75 74 20 6e 6f 0a 58 | 20 20 70 61 73 73 77 6f |but no.X| passwo|
|00002960| 72 64 20 68 65 72 65 2e | 2e 2e 61 6e 64 20 73 69 |rd here.|..and si|
|00002970| 6d 69 6c 61 72 6c 79 20 | 77 69 74 68 20 73 68 65 |milarly |with she|
|00002980| 6c 6c 20 73 75 62 73 74 | 69 74 75 74 69 6f 6e 73 |ll subst|itutions|
|00002990| 20 61 6e 64 20 73 6f 20 | 6f 6e 2e 0a 58 20 20 42 | and so |on..X B|
|000029a0| 61 68 2e 20 0a 58 0a 2d | 20 54 68 65 20 6b 75 61 |ah. .X.-| The kua|
|000029b0| 6e 67 20 64 65 73 63 72 | 69 62 65 64 20 69 6e 20 |ng descr|ibed in |
|000029c0| 42 61 6c 64 77 69 6e 27 | 73 20 64 69 73 73 65 72 |Baldwin'|s disser|
|000029d0| 74 61 74 69 6f 6e 20 69 | 73 20 73 6f 6d 65 77 68 |tation i|s somewh|
|000029e0| 61 74 20 64 69 66 66 65 | 72 65 6e 74 0a 58 20 20 |at diffe|rent.X |
|000029f0| 69 6e 20 6e 61 74 75 72 | 65 20 66 72 6f 6d 20 74 |in natur|e from t|
|00002a00| 68 69 73 20 6f 6e 65 2e | 20 20 54 68 65 20 6f 72 |his one.| The or|
|00002a10| 69 67 69 6e 61 6c 20 63 | 6f 6d 70 75 74 65 73 20 |iginal c|omputes |
|00002a20| 61 20 50 72 69 76 69 6c | 65 67 65 20 41 63 63 65 |a Privil|ege Acce|
|00002a30| 73 73 0a 58 20 20 54 61 | 62 6c 65 20 28 50 41 54 |ss.X Ta|ble (PAT|
|00002a40| 29 20 77 68 69 63 68 20 | 64 65 73 63 72 69 62 65 |) which |describe|
|00002a50| 73 20 66 6f 72 20 65 61 | 63 68 20 75 69 64 20 61 |s for ea|ch uid a|
|00002a60| 6e 64 20 67 69 64 20 77 | 68 69 63 68 20 75 69 64 |nd gid w|hich uid|
|00002a70| 73 20 68 61 76 65 0a 58 | 20 20 61 63 63 65 73 73 |s have.X| access|
|00002a80| 20 74 6f 20 74 68 61 74 | 20 75 69 64 2e 20 20 54 | to that| uid. T|
|00002a90| 6f 20 61 73 73 65 73 73 | 20 73 65 63 75 72 69 74 |o assess| securit|
|00002aa0| 79 2c 20 77 65 20 63 6f | 6d 70 61 72 65 20 74 68 |y, we co|mpare th|
|00002ab0| 69 73 20 61 67 61 69 6e | 73 74 20 74 68 65 0a 58 |is again|st the.X|
|00002ac0| 20 20 73 65 63 75 72 69 | 74 79 20 70 6f 6c 69 63 | securi|ty polic|
|00002ad0| 79 20 66 6f 72 20 74 68 | 65 20 73 69 74 65 2c 20 |y for th|e site, |
|00002ae0| 77 68 69 63 68 20 73 69 | 6d 69 6c 61 72 6c 79 20 |which si|milarly |
|00002af0| 64 65 73 63 72 69 62 65 | 73 20 77 68 69 63 68 20 |describe|s which |
|00002b00| 75 69 64 27 73 0a 58 20 | 20 61 72 65 20 73 75 70 |uid's.X | are sup|
|00002b10| 70 6f 73 65 64 20 74 6f | 20 68 61 76 65 20 61 63 |posed to| have ac|
|00002b20| 63 65 73 73 20 74 6f 20 | 65 61 63 68 20 75 69 64 |cess to |each uid|
|00002b30| 20 61 6e 64 20 67 69 64 | 2e 20 20 41 20 73 61 6d | and gid|. A sam|
|00002b40| 70 6c 65 20 53 50 20 6d | 69 67 68 74 0a 58 20 20 |ple SP m|ight.X |
|00002b50| 62 65 20 74 68 61 74 20 | 65 61 63 68 20 75 69 64 |be that |each uid|
|00002b60| 20 73 68 6f 75 6c 64 20 | 62 65 20 61 63 63 65 73 | should |be acces|
|00002b70| 73 69 62 6c 65 20 6f 6e | 6c 79 20 62 79 20 69 74 |sible on|ly by it|
|00002b80| 73 65 6c 66 20 61 6e 64 | 20 72 6f 6f 74 2c 20 61 |self and| root, a|
|00002b90| 6e 64 0a 58 20 20 65 61 | 63 68 20 67 69 64 20 73 |nd.X ea|ch gid s|
|00002ba0| 68 6f 75 6c 64 20 62 65 | 20 61 63 63 65 73 73 69 |hould be| accessi|
|00002bb0| 62 6c 65 20 6f 6e 6c 79 | 20 74 6f 20 74 68 65 20 |ble only| to the |
|00002bc0| 6d 65 6d 62 65 72 73 20 | 6f 66 20 74 68 61 74 20 |members |of that |
|00002bd0| 67 72 6f 75 70 20 61 6e | 64 0a 58 20 20 72 6f 6f |group an|d.X roo|
|00002be0| 74 2e 20 20 49 66 20 74 | 68 65 20 50 41 54 20 6c |t. If t|he PAT l|
|00002bf0| 69 73 74 65 64 20 61 64 | 64 69 74 69 6f 6e 61 6c |isted ad|ditional|
|00002c00| 20 75 69 64 27 73 20 66 | 6f 72 20 73 6f 6d 65 20 | uid's f|or some |
|00002c10| 70 72 69 76 2c 20 74 68 | 61 74 20 77 6f 75 6c 64 |priv, th|at would|
|00002c20| 0a 58 20 20 63 6f 6e 73 | 74 69 74 75 74 65 20 61 |.X cons|titute a|
|00002c30| 20 76 69 6f 6c 61 74 69 | 6f 6e 20 6f 66 20 74 68 | violati|on of th|
|00002c40| 65 20 53 65 63 75 72 69 | 74 79 20 50 6f 6c 69 63 |e Securi|ty Polic|
|00002c50| 79 20 66 6f 72 20 74 68 | 65 20 73 69 74 65 2e 0a |y for th|e site..|
|00002c60| 58 0a 58 20 20 54 68 65 | 20 63 75 72 72 65 6e 74 |X.X The| current|
|00002c70| 20 6b 75 61 6e 67 20 69 | 73 20 64 69 66 66 65 72 | kuang i|s differ|
|00002c80| 65 6e 74 2e 20 20 49 74 | 20 72 65 67 69 73 74 65 |ent. It| registe|
|00002c90| 72 73 20 53 75 63 63 65 | 73 73 20 28 61 20 70 72 |rs Succe|ss (a pr|
|00002ca0| 6f 62 6c 65 6d 20 77 61 | 73 0a 58 20 20 66 6f 75 |oblem wa|s.X fou|
|00002cb0| 6e 64 29 20 69 66 20 69 | 74 20 64 65 74 65 72 6d |nd) if i|t determ|
|00002cc0| 69 6e 65 73 20 74 68 61 | 74 20 73 6f 6d 65 20 75 |ines tha|t some u|
|00002cd0| 69 64 20 69 6e 20 74 68 | 65 20 75 69 64 73 2e 6b |id in th|e uids.k|
|00002ce0| 6e 6f 77 6e 20 6c 69 73 | 74 20 28 2d 31 2c 0a 58 |nown lis|t (-1,.X|
|00002cf0| 20 20 22 6f 74 68 65 72 | 22 20 62 79 20 64 65 66 | "other|" by def|
|00002d00| 61 75 6c 74 29 20 63 61 | 6e 20 61 63 63 65 73 73 |ault) ca|n access|
|00002d10| 20 74 68 65 20 74 61 72 | 67 65 74 20 70 72 69 76 | the tar|get priv|
|00002d20| 69 6c 65 67 65 2e 20 20 | 49 74 20 6d 61 79 20 66 |ilege. |It may f|
|00002d30| 69 6e 64 0a 58 20 20 61 | 6c 6f 6e 67 20 74 68 65 |ind.X a|long the|
|00002d40| 20 77 61 79 20 74 68 61 | 74 20 65 78 74 72 61 20 | way tha|t extra |
|00002d50| 75 69 64 73 20 63 61 6e | 20 61 63 63 65 73 73 20 |uids can| access |
|00002d60| 73 6f 6d 65 20 75 69 64 | 2c 20 62 75 74 20 74 68 |some uid|, but th|
|00002d70| 65 73 65 20 61 72 65 6e | 27 74 0a 58 20 20 72 65 |ese aren|'t.X re|
|00002d80| 70 6f 72 74 65 64 20 61 | 73 20 73 70 65 63 69 66 |ported a|s specif|
|00002d90| 69 63 20 70 72 6f 62 6c | 65 6d 73 20 75 6e 6c 65 |ic probl|ems unle|
|00002da0| 73 73 20 74 68 65 79 20 | 61 72 65 20 61 64 64 65 |ss they |are adde|
|00002db0| 64 20 74 6f 20 74 68 65 | 0a 58 20 20 75 69 64 73 |d to the|.X uids|
|00002dc0| 2e 6b 6e 6f 77 6e 20 6c | 69 73 74 2e 20 0a 58 0a |.known l|ist. .X.|
|00002dd0| 58 20 20 57 65 20 63 6f | 75 6c 64 20 64 6f 20 73 |X We co|uld do s|
|00002de0| 6f 6d 65 74 68 69 6e 67 | 20 73 69 6d 69 6c 61 72 |omething| similar|
|00002df0| 20 74 6f 20 74 68 65 20 | 6b 75 61 6e 67 20 64 65 | to the |kuang de|
|00002e00| 73 63 72 69 62 65 64 20 | 69 6e 20 74 68 65 20 70 |scribed |in the p|
|00002e10| 61 70 65 72 20 62 79 0a | 58 20 20 73 65 74 74 69 |aper by.|X setti|
|00002e20| 6e 67 20 75 69 64 73 2e | 6b 6e 6f 77 6e 20 74 6f |ng uids.|known to|
|00002e30| 20 62 65 20 61 6c 6c 20 | 74 68 65 20 75 69 64 73 | be all |the uids|
|00002e40| 20 74 68 61 74 20 61 72 | 65 6e 27 74 20 69 6e 20 | that ar|en't in |
|00002e50| 74 68 65 20 73 65 63 75 | 72 69 74 79 0a 58 20 20 |the secu|rity.X |
|00002e60| 70 6f 6c 69 63 79 20 74 | 61 62 6c 65 20 66 6f 72 |policy t|able for|
|00002e70| 20 74 68 65 20 74 61 72 | 67 65 74 20 75 69 64 2c | the tar|get uid,|
|00002e80| 20 61 6e 64 20 72 75 6e | 6e 69 6e 67 20 6b 75 61 | and run|ning kua|
|00002e90| 6e 67 20 61 67 61 69 6e | 73 74 20 74 68 65 0a 58 |ng again|st the.X|
|00002ea0| 20 20 74 61 72 67 65 74 | 2e 20 20 54 68 69 73 20 | target|. This |
|00002eb0| 77 6f 75 6c 64 20 72 65 | 70 6f 72 74 20 73 75 63 |would re|port suc|
|00002ec0| 63 65 73 73 20 66 6f 72 | 20 65 61 63 68 20 75 69 |cess for| each ui|
|00002ed0| 64 20 74 68 61 74 20 63 | 6f 75 6c 64 20 61 63 63 |d that c|ould acc|
|00002ee0| 65 73 73 0a 58 20 20 74 | 68 65 20 74 61 72 67 65 |ess.X t|he targe|
|00002ef0| 74 2e 20 20 59 6f 75 20 | 63 6f 75 6c 64 20 64 6f |t. You |could do|
|00002f00| 20 73 69 6d 69 6c 61 72 | 20 74 68 69 6e 67 73 20 | similar| things |
|00002f10| 77 69 74 68 20 67 72 6f | 75 70 73 20 2d 20 75 69 |with gro|ups - ui|
|00002f20| 64 73 2e 6b 6e 6f 77 6e | 0a 58 20 20 77 6f 75 6c |ds.known|.X woul|
|00002f30| 64 20 62 65 20 61 6c 6c | 20 74 68 65 20 75 69 64 |d be all| the uid|
|00002f40| 73 20 74 68 61 74 20 61 | 72 65 6e 27 74 20 6d 65 |s that a|ren't me|
|00002f50| 6d 62 65 72 73 20 6f 66 | 20 74 68 65 20 67 72 6f |mbers of| the gro|
|00002f60| 75 70 2e 2e 2e 0a 58 0a | 58 20 20 41 6c 74 65 72 |up....X.|X Alter|
|00002f70| 6e 61 74 65 6c 79 2c 20 | 77 65 20 63 6f 75 6c 64 |nately, |we could|
|00002f80| 20 73 69 6d 70 6c 79 20 | 68 61 76 65 20 6b 75 61 | simply |have kua|
|00002f90| 6e 67 20 72 65 63 6f 72 | 64 20 74 68 65 20 6c 69 |ng recor|d the li|
|00002fa0| 73 74 20 6f 66 20 75 69 | 64 73 20 74 68 61 74 0a |st of ui|ds that.|
|00002fb0| 58 20 20 63 61 6e 20 61 | 63 63 65 73 73 20 74 68 |X can a|ccess th|
|00002fc0| 65 20 74 61 72 67 65 74 | 20 70 72 69 76 20 61 6e |e target| priv an|
|00002fd0| 64 20 70 72 69 6e 74 20 | 74 68 65 20 6c 69 73 74 |d print |the list|
|00002fe0| 20 77 68 65 6e 20 69 74 | 73 20 64 6f 6e 65 2e 20 | when it|s done. |
|00002ff0| 20 54 68 61 74 0a 58 20 | 20 77 61 79 20 79 6f 75 | That.X | way you|
|00003000| 20 63 6f 75 6c 64 20 69 | 74 65 72 61 74 65 20 6b | could i|terate k|
|00003010| 75 61 6e 67 20 61 67 61 | 69 6e 73 74 20 61 6c 6c |uang aga|inst all|
|00003020| 20 75 69 64 73 20 61 6e | 64 20 67 69 64 73 20 61 | uids an|d gids a|
|00003030| 6e 64 20 63 6f 6d 70 61 | 72 65 0a 58 20 20 74 68 |nd compa|re.X th|
|00003040| 65 20 72 65 73 75 6c 74 | 69 6e 67 20 50 41 54 20 |e result|ing PAT |
|00003050| 61 67 61 69 6e 73 74 20 | 79 6f 75 72 20 73 65 63 |against |your sec|
|00003060| 75 72 69 74 79 20 70 6f | 6c 69 63 79 20 61 6e 64 |urity po|licy and|
|00003070| 20 72 65 63 6f 72 64 20 | 74 68 65 0a 58 20 20 64 | record |the.X d|
|00003080| 69 66 66 65 72 65 6e 63 | 65 73 2e 20 20 59 6f 75 |ifferenc|es. You|
|00003090| 27 64 20 70 72 6f 62 61 | 62 6c 79 20 77 61 6e 74 |'d proba|bly want|
|000030a0| 20 74 6f 20 72 65 63 6f | 72 64 20 74 68 65 20 70 | to reco|rd the p|
|000030b0| 6c 61 6e 20 66 6f 72 20 | 65 61 63 68 20 75 69 64 |lan for |each uid|
|000030c0| 0a 58 20 20 72 65 70 6f | 72 74 65 64 20 61 6c 73 |.X repo|rted als|
|000030d0| 6f 2e 0a 58 0a 58 20 20 | 4f 6e 20 6f 75 72 20 73 |o..X.X |On our s|
|000030e0| 79 73 74 65 6d 20 74 68 | 69 73 20 77 6f 75 6c 64 |ystem th|is would|
|000030f0| 20 6d 65 61 6e 20 72 75 | 6e 6e 69 6e 67 20 6b 75 | mean ru|nning ku|
|00003100| 61 6e 67 20 72 6f 75 67 | 68 6c 79 20 32 35 30 30 |ang roug|hly 2500|
|00003110| 0a 58 20 20 74 69 6d 65 | 73 20 74 6f 20 63 68 65 |.X time|s to che|
|00003120| 63 6b 20 31 20 68 6f 73 | 74 2c 20 61 6e 64 20 77 |ck 1 hos|t, and w|
|00003130| 65 20 68 61 76 65 20 61 | 62 6f 75 74 20 33 30 30 |e have a|bout 300|
|00003140| 20 68 6f 73 74 73 2e 2e | 2e 75 72 66 2e 2e 2e 61 | hosts..|.urf...a|
|00003150| 73 73 75 6d 69 6e 67 0a | 58 20 20 74 68 61 74 20 |ssuming.|X that |
|00003160| 65 61 63 68 20 6b 75 61 | 6e 67 20 69 6e 76 6f 63 |each kua|ng invoc|
|00003170| 61 74 69 6f 6e 20 68 61 | 73 20 74 6f 20 63 68 65 |ation ha|s to che|
|00003180| 63 6b 20 35 30 20 70 6c | 61 6e 73 2c 20 74 68 61 |ck 50 pl|ans, tha|
|00003190| 74 27 73 20 61 20 74 6f | 74 61 6c 20 6f 66 0a 58 |t's a to|tal of.X|
|000031a0| 20 20 31 32 35 2c 30 30 | 30 20 70 6c 61 6e 73 20 | 125,00|0 plans |
|000031b0| 70 65 72 20 68 6f 73 74 | 2c 20 6f 72 20 61 62 6f |per host|, or abo|
|000031c0| 75 74 20 61 6e 20 68 6f | 75 72 20 6f 66 20 72 65 |ut an ho|ur of re|
|000031d0| 61 6c 20 74 69 6d 65 2e | 2e 2e 6e 6f 74 20 61 73 |al time.|..not as|
|000031e0| 20 62 61 64 0a 58 20 20 | 61 73 20 69 74 20 63 6f | bad.X |as it co|
|000031f0| 75 6c 64 20 62 65 2c 20 | 74 68 6f 75 67 68 2e 0a |uld be, |though..|
|00003200| 58 0a 2d 20 49 74 20 77 | 6f 75 6c 64 20 62 65 20 |X.- It w|ould be |
|00003210| 6e 69 63 65 20 74 6f 20 | 61 64 64 20 74 6f 20 74 |nice to |add to t|
|00003220| 68 65 20 6c 69 73 74 20 | 6f 66 20 72 75 6c 65 73 |he list |of rules|
|00003230| 2e 20 20 49 74 20 77 6f | 75 6c 64 20 62 65 20 65 |. It wo|uld be e|
|00003240| 73 70 65 63 69 61 6c 79 | 0a 58 20 20 6e 69 63 65 |specialy|.X nice|
|00003250| 20 74 6f 20 65 78 74 72 | 61 63 74 20 74 68 65 20 | to extr|act the |
|00003260| 72 75 6c 65 73 20 66 72 | 6f 6d 20 74 68 65 20 63 |rules fr|om the c|
|00003270| 6f 64 65 20 73 6f 20 74 | 68 61 74 20 77 65 20 63 |ode so t|hat we c|
|00003280| 61 6e 20 63 72 65 61 74 | 65 20 73 69 74 65 0a 58 |an creat|e site.X|
|00003290| 20 20 73 70 65 63 69 66 | 69 63 20 72 75 6c 65 20 | specif|ic rule |
|000032a0| 66 69 6c 65 73 20 28 66 | 6f 72 20 65 78 61 6d 70 |files (f|or examp|
|000032b0| 6c 65 2c 20 77 65 20 75 | 73 65 20 58 31 31 72 34 |le, we u|se X11r4|
|000032c0| 20 68 65 72 65 2c 20 61 | 6e 64 20 6d 61 6e 79 20 | here, a|nd many |
|000032d0| 75 73 65 72 73 0a 58 20 | 20 68 61 76 65 20 61 20 |users.X | have a |
|000032e0| 2e 58 69 6e 69 74 72 63 | 20 74 68 61 74 20 63 6f |.Xinitrc| that co|
|000032f0| 6e 74 61 69 6e 73 20 73 | 68 65 6c 6c 20 63 6f 6d |ntains s|hell com|
|00003300| 6d 61 6e 64 73 20 74 68 | 61 74 20 67 65 74 20 65 |mands th|at get e|
|00003310| 78 65 63 75 74 65 64 20 | 77 68 65 6e 0a 58 20 20 |xecuted |when.X |
|00003320| 74 68 65 79 20 6c 6f 67 | 69 6e 2e 29 0a 58 0a 58 |they log|in.).X.X|
|00003330| 20 20 45 61 73 69 65 73 | 74 20 77 61 79 20 74 6f | Easies|t way to|
|00003340| 20 64 6f 20 74 68 69 73 | 20 77 6f 75 6c 64 20 62 | do this| would b|
|00003350| 65 20 74 6f 20 65 78 74 | 72 61 63 74 20 74 68 65 |e to ext|ract the|
|00003360| 20 72 75 6c 65 73 20 61 | 73 20 50 65 72 6c 20 63 | rules a|s Perl c|
|00003370| 6f 64 65 20 73 6f 0a 58 | 20 20 77 65 20 63 61 6e |ode so.X| we can|
|00003380| 20 74 61 6b 65 20 61 64 | 76 61 6e 74 61 67 65 20 | take ad|vantage |
|00003390| 6f 66 20 63 6f 6e 64 69 | 74 69 6f 6e 61 6c 73 20 |of condi|tionals |
|000033a0| 61 6e 64 20 73 6f 20 6f | 6e 2c 20 61 6e 64 20 69 |and so o|n, and i|
|000033b0| 6e 63 6c 75 64 65 20 74 | 68 65 6d 0a 58 20 20 77 |nclude t|hem.X w|
|000033c0| 69 74 68 69 6e 20 74 68 | 65 20 62 6f 64 79 20 6f |ithin th|e body o|
|000033d0| 66 20 6b 75 61 6e 67 20 | 73 6f 6d 65 68 6f 77 2e |f kuang |somehow.|
|000033e0| 20 20 41 20 73 61 6d 70 | 6c 65 20 72 75 6c 65 20 | A samp|le rule |
|000033f0| 69 6e 20 70 65 72 6c 3a | 0a 58 0a 58 09 69 66 20 |in perl:|.X.X.if |
|00003400| 28 26 73 68 65 6c 6c 28 | 24 75 69 64 29 20 65 71 |(&shell(|$uid) eq|
|00003410| 20 22 2f 62 69 6e 2f 63 | 73 68 22 29 20 7b 0a 58 | "/bin/c|sh") {.X|
|00003420| 09 20 20 20 20 26 61 64 | 64 74 6f 28 22 66 69 6c |. &ad|dto("fil|
|00003430| 65 73 22 2c 20 26 68 6f | 6d 65 28 24 75 69 64 29 |es", &ho|me($uid)|
|00003440| 2e 22 2f 2e 6c 6f 67 69 | 6e 22 2c 20 0a 58 09 09 |."/.logi|n", .X..|
|00003450| 09 22 72 65 70 6c 61 63 | 65 20 2e 6c 6f 67 69 6e |."replac|e .login|
|00003460| 20 24 70 6c 61 6e 22 29 | 3b 0a 58 09 7d 0a 58 0a | $plan")|;.X.}.X.|
|00003470| 58 20 20 77 68 69 63 68 | 20 73 69 6d 70 6c 79 20 |X which| simply |
|00003480| 6d 65 61 6e 73 20 22 69 | 66 20 74 68 65 20 75 73 |means "i|f the us|
|00003490| 65 72 27 73 20 73 68 65 | 6c 6c 20 69 73 20 63 73 |er's she|ll is cs|
|000034a0| 68 2c 20 74 68 65 6e 20 | 74 72 79 20 74 6f 20 72 |h, then |try to r|
|000034b0| 65 70 6c 61 63 65 0a 58 | 20 20 68 69 73 20 2e 6c |eplace.X| his .l|
|000034c0| 6f 67 69 6e 20 66 69 6c | 65 2e 22 20 0a 53 48 41 |ogin fil|e." .SHA|
|000034d0| 52 5f 45 4f 46 0a 63 68 | 6d 6f 64 20 30 36 30 30 |R_EOF.ch|mod 0600|
|000034e0| 20 62 65 74 61 2f 52 45 | 41 44 4d 45 2e 6b 75 61 | beta/RE|ADME.kua|
|000034f0| 6e 67 20 7c 7c 0a 65 63 | 68 6f 20 27 72 65 73 74 |ng ||.ec|ho 'rest|
|00003500| 6f 72 65 20 6f 66 20 62 | 65 74 61 2f 52 45 41 44 |ore of b|eta/READ|
|00003510| 4d 45 2e 6b 75 61 6e 67 | 20 66 61 69 6c 65 64 27 |ME.kuang| failed'|
|00003520| 0a 57 63 5f 63 3d 22 60 | 77 63 20 2d 63 20 3c 20 |.Wc_c="`|wc -c < |
|00003530| 27 62 65 74 61 2f 52 45 | 41 44 4d 45 2e 6b 75 61 |'beta/RE|ADME.kua|
|00003540| 6e 67 27 60 22 0a 74 65 | 73 74 20 39 33 30 36 20 |ng'`".te|st 9306 |
|00003550| 2d 65 71 20 22 24 57 63 | 5f 63 22 20 7c 7c 0a 09 |-eq "$Wc|_c" ||..|
|00003560| 65 63 68 6f 20 27 62 65 | 74 61 2f 52 45 41 44 4d |echo 'be|ta/READM|
|00003570| 45 2e 6b 75 61 6e 67 3a | 20 6f 72 69 67 69 6e 61 |E.kuang:| origina|
|00003580| 6c 20 73 69 7a 65 20 39 | 33 30 36 2c 20 63 75 72 |l size 9|306, cur|
|00003590| 72 65 6e 74 20 73 69 7a | 65 27 20 22 24 57 63 5f |rent siz|e' "$Wc_|
|000035a0| 63 22 0a 72 6d 20 2d 66 | 20 5f 73 68 61 72 5f 77 |c".rm -f| _shar_w|
|000035b0| 6e 74 5f 2e 74 6d 70 0a | 66 69 0a 23 20 3d 3d 3d |nt_.tmp.|fi.# ===|
|000035c0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 20 62 65 74 61 2f |========|== beta/|
|000035d0| 52 45 41 44 4d 45 2e 70 | 65 72 6c 20 3d 3d 3d 3d |README.p|erl ====|
|000035e0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 0a 69 66 20 74 65 |========|==.if te|
|000035f0| 73 74 20 2d 66 20 27 62 | 65 74 61 2f 52 45 41 44 |st -f 'b|eta/READ|
|00003600| 4d 45 2e 70 65 72 6c 27 | 20 2d 61 20 58 22 24 31 |ME.perl'| -a X"$1|
|00003610| 22 20 21 3d 20 58 22 2d | 63 22 3b 20 74 68 65 6e |" != X"-|c"; then|
|00003620| 0a 09 65 63 68 6f 20 27 | 78 20 2d 20 73 6b 69 70 |..echo '|x - skip|
|00003630| 70 69 6e 67 20 62 65 74 | 61 2f 52 45 41 44 4d 45 |ping bet|a/README|
|00003640| 2e 70 65 72 6c 20 28 46 | 69 6c 65 20 61 6c 72 65 |.perl (F|ile alre|
|00003650| 61 64 79 20 65 78 69 73 | 74 73 29 27 0a 09 72 6d |ady exis|ts)'..rm|
|00003660| 20 2d 66 20 5f 73 68 61 | 72 5f 77 6e 74 5f 2e 74 | -f _sha|r_wnt_.t|
|00003670| 6d 70 0a 65 6c 73 65 0a | 3e 20 5f 73 68 61 72 5f |mp.else.|> _shar_|
|00003680| 77 6e 74 5f 2e 74 6d 70 | 0a 65 63 68 6f 20 27 78 |wnt_.tmp|.echo 'x|
|00003690| 20 2d 20 65 78 74 72 61 | 63 74 69 6e 67 20 62 65 | - extra|cting be|
|000036a0| 74 61 2f 52 45 41 44 4d | 45 2e 70 65 72 6c 20 28 |ta/READM|E.perl (|
|000036b0| 54 65 78 74 29 27 0a 73 | 65 64 20 27 73 2f 5e 58 |Text)'.s|ed 's/^X|
|000036c0| 2f 2f 27 20 3c 3c 20 27 | 53 48 41 52 5f 45 4f 46 |//' << '|SHAR_EOF|
|000036d0| 27 20 3e 20 27 62 65 74 | 61 2f 52 45 41 44 4d 45 |' > 'bet|a/README|
|000036e0| 2e 70 65 72 6c 27 20 26 | 26 0a 58 0a 2a 2a 42 45 |.perl' &|&.X.**BE|
|000036f0| 54 41 20 41 4c 45 52 54 | 2a 2a 42 45 54 41 20 41 |TA ALERT|**BETA A|
|00003700| 4c 45 52 54 2a 2a 42 45 | 54 41 20 41 4c 45 52 54 |LERT**BE|TA ALERT|
|00003710| 2a 2a 42 45 54 41 20 41 | 4c 45 52 54 2a 2a 42 45 |**BETA A|LERT**BE|
|00003720| 54 41 20 41 4c 45 52 54 | 2a 2a 0a 58 0a 28 57 61 |TA ALERT|**.X.(Wa|
|00003730| 72 6e 69 6e 67 21 20 20 | 54 68 69 73 20 69 73 20 |rning! |This is |
|00003740| 74 68 65 20 62 65 74 61 | 20 76 65 72 73 69 6f 6e |the beta| version|
|00003750| 20 6f 66 20 70 2d 63 6f | 70 73 2c 20 6f 72 20 70 | of p-co|ps, or p|
|00003760| 65 72 6c 20 63 6f 70 73 | 2e 2e 2e 20 74 68 65 0a |erl cops|... the.|
|00003770| 72 65 61 6c 20 76 65 72 | 73 69 6f 6e 20 77 69 6c |real ver|sion wil|
|00003780| 6c 20 62 65 20 66 6f 72 | 74 68 63 6f 6d 69 6e 67 |l be for|thcoming|
|00003790| 20 73 68 6f 72 74 6c 79 | 2e 2e 2e 29 0a 58 0a 58 | shortly|...).X.X|
|000037a0| 20 20 54 68 69 73 20 77 | 69 6c 6c 20 61 74 74 65 | This w|ill atte|
|000037b0| 6d 70 74 20 74 6f 20 66 | 61 6d 69 6c 69 61 72 69 |mpt to f|amiliari|
|000037c0| 7a 65 20 79 6f 75 20 77 | 69 74 68 20 74 68 65 20 |ze you w|ith the |
|000037d0| 70 65 72 6c 20 76 65 72 | 73 69 6f 6e 20 6f 66 20 |perl ver|sion of |
|000037e0| 63 6f 70 73 2e 20 20 49 | 66 0a 79 6f 75 20 68 61 |cops. I|f.you ha|
|000037f0| 76 65 20 6e 65 76 65 72 | 20 75 73 65 64 20 63 6f |ve never| used co|
|00003800| 70 73 20 62 65 66 6f 72 | 65 2c 20 79 6f 75 20 63 |ps befor|e, you c|
|00003810| 61 6e 20 67 65 74 20 74 | 68 65 20 63 6f 6d 70 6c |an get t|he compl|
|00003820| 65 74 65 20 64 6f 63 75 | 6d 65 6e 74 61 74 69 6f |ete docu|mentatio|
|00003830| 6e 2c 0a 61 6c 6f 6e 67 | 20 77 69 74 68 20 73 68 |n,.along| with sh|
|00003840| 65 6c 6c 2f 43 20 63 6f | 64 65 2c 20 76 69 61 20 |ell/C co|de, via |
|00003850| 61 6e 6f 6e 2d 66 74 70 | 2c 20 61 74 20 63 65 72 |anon-ftp|, at cer|
|00003860| 74 2e 73 65 69 2e 63 6d | 75 2e 65 64 75 2c 20 7e |t.sei.cm|u.edu, ~|
|00003870| 66 74 70 2f 70 75 62 2f | 63 6f 70 73 2f 31 2e 30 |ftp/pub/|cops/1.0|
|00003880| 32 2e 0a 4f 6b 3b 20 74 | 68 65 20 6d 61 69 6e 20 |2..Ok; t|he main |
|00003890| 64 69 66 66 65 72 65 6e | 63 65 20 77 69 74 68 20 |differen|ce with |
|000038a0| 74 68 69 73 20 76 65 72 | 73 69 6f 6e 20 69 73 20 |this ver|sion is |
|000038b0| 74 68 61 74 20 28 62 65 | 73 69 64 65 73 20 62 65 |that (be|sides be|
|000038c0| 69 6e 67 20 77 72 69 74 | 74 65 6e 0a 69 6e 20 70 |ing writ|ten.in p|
|000038d0| 65 72 6c 29 20 74 68 65 | 72 65 20 69 73 20 61 20 |erl) the|re is a |
|000038e0| 63 6f 6e 66 69 67 20 66 | 69 6c 65 20 2d 2d 20 22 |config f|ile -- "|
|000038f0| 63 6f 70 73 2e 63 66 22 | 2c 20 74 68 61 74 20 69 |cops.cf"|, that i|
|00003900| 73 20 75 73 65 64 20 74 | 6f 20 63 6f 6e 74 72 6f |s used t|o contro|
|00003910| 6c 20 74 68 65 0a 63 72 | 75 66 74 20 69 6e 73 69 |l the.cr|uft insi|
|00003920| 64 65 20 61 6c 6c 20 6f | 66 20 74 68 65 20 6d 6f |de all o|f the mo|
|00003930| 64 75 6c 65 73 2e 20 20 | 4e 6f 20 6d 6f 72 65 20 |dules. |No more |
|00003940| 6d 75 73 73 2c 20 6e 6f | 20 6d 6f 72 65 20 66 75 |muss, no| more fu|
|00003950| 73 73 2e 20 20 49 27 6c | 6c 20 74 72 79 0a 74 6f |ss. I'l|l try.to|
|00003960| 20 67 6f 20 6f 76 65 72 | 20 74 68 65 20 6d 61 69 | go over| the mai|
|00003970| 6e 20 6f 6e 65 73 20 68 | 65 72 65 2e 20 20 54 68 |n ones h|ere. Th|
|00003980| 65 20 6f 6e 6c 79 20 69 | 6d 70 6f 72 74 61 6e 74 |e only i|mportant|
|00003990| 20 74 68 69 6e 67 20 79 | 6f 75 20 68 61 76 65 20 | thing y|ou have |
|000039a0| 74 6f 20 73 65 74 20 69 | 6e 0a 74 68 65 20 22 63 |to set i|n.the "c|
|000039b0| 6f 70 73 22 20 6d 61 69 | 6e 20 66 69 6c 65 20 28 |ops" mai|n file (|
|000039c0| 6f 72 20 76 69 61 20 74 | 68 65 20 22 2d 73 22 20 |or via t|he "-s" |
|000039d0| 66 6c 61 67 29 20 69 73 | 20 74 68 65 20 73 65 63 |flag) is| the sec|
|000039e0| 75 72 65 20 64 69 72 65 | 63 74 6f 72 79 2c 20 77 |ure dire|ctory, w|
|000039f0| 68 69 63 68 20 0a 62 79 | 20 64 65 66 61 75 6c 74 |hich .by| default|
|00003a00| 20 69 73 20 22 2e 22 3b | 20 74 68 69 73 20 69 73 | is ".";| this is|
|00003a10| 20 77 68 65 72 65 20 63 | 6f 70 73 20 77 69 6c 6c | where c|ops will|
|00003a20| 20 6c 6f 6f 6b 20 66 6f | 72 20 74 68 65 20 63 6f | look fo|r the co|
|00003a30| 6e 66 69 67 20 66 69 6c | 65 20 61 6e 64 20 61 6c |nfig fil|e and al|
|00003a40| 6c 0a 74 68 65 20 70 72 | 6f 67 72 61 6d 73 2e 20 |l.the pr|ograms. |
|00003a50| 20 41 6c 73 6f 2c 20 69 | 66 20 73 6f 6d 65 74 68 | Also, i|f someth|
|00003a60| 69 6e 67 20 69 73 20 66 | 6c 61 67 67 65 64 20 61 |ing is f|lagged a|
|00003a70| 73 20 77 6f 72 6c 64 2d | 77 72 69 74 61 62 6c 65 |s world-|writable|
|00003a80| 2c 20 61 6e 64 20 74 68 | 65 20 66 69 6c 65 0a 69 |, and th|e file.i|
|00003a90| 74 73 65 6c 66 20 69 73 | 20 6e 6f 74 20 77 72 69 |tself is| not wri|
|00003aa0| 74 61 62 6c 65 2c 20 62 | 75 74 20 74 68 65 20 70 |table, b|ut the p|
|00003ab0| 61 72 65 6e 74 20 64 69 | 72 65 63 74 6f 72 79 20 |arent di|rectory |
|00003ac0| 69 73 2c 20 74 68 65 6e | 20 74 68 65 72 65 20 77 |is, then| there w|
|00003ad0| 69 6c 6c 20 62 65 20 61 | 6e 0a 61 73 74 65 72 69 |ill be a|n.asteri|
|00003ae0| 78 20 61 66 74 65 72 20 | 74 68 65 20 77 61 72 6e |x after |the warn|
|00003af0| 69 6e 67 20 28 65 2e 67 | 2e 20 2f 75 73 72 2f 66 |ing (e.g|. /usr/f|
|00003b00| 6f 6f 2f 62 61 72 20 69 | 73 20 57 6f 72 6c 64 20 |oo/bar i|s World |
|00003b10| 57 72 69 74 61 62 6c 65 | 21 20 28 2a 29 2e 29 20 |Writable|! (*).) |
|00003b20| 20 0a 46 69 6e 61 6c 6c | 79 2c 20 74 68 65 20 73 | .Finall|y, the s|
|00003b30| 75 69 64 2e 63 68 6b 20 | 70 72 6f 67 72 61 6d 2c |uid.chk |program,|
|00003b40| 20 6c 69 6b 65 20 61 6c | 6c 20 74 68 65 20 72 65 | like al|l the re|
|00003b50| 73 74 20 6f 66 20 74 68 | 65 20 70 72 6f 67 72 61 |st of th|e progra|
|00003b60| 6d 73 2c 20 69 73 20 6d | 65 61 6e 74 20 0a 74 6f |ms, is m|eant .to|
|00003b70| 20 62 65 20 72 75 6e 20 | 61 73 20 61 20 70 61 72 | be run |as a par|
|00003b80| 74 20 6f 66 20 22 63 6f | 70 73 22 3b 20 69 74 27 |t of "co|ps"; it'|
|00003b90| 73 20 6f 75 74 70 75 74 | 20 77 69 6c 6c 20 67 6f |s output| will go|
|00003ba0| 20 74 6f 20 73 74 64 6f | 75 74 20 69 66 20 72 75 | to stdo|ut if ru|
|00003bb0| 6e 20 0a 73 74 61 6e 64 | 61 6c 6f 6e 65 2c 20 6f |n .stand|alone, o|
|00003bc0| 72 20 65 69 74 68 65 72 | 20 67 65 74 20 6d 61 69 |r either| get mai|
|00003bd0| 6c 65 64 20 6f 72 20 73 | 61 76 65 64 20 74 6f 20 |led or s|aved to |
|00003be0| 74 68 65 20 72 65 73 75 | 6c 74 20 66 69 6c 65 20 |the resu|lt file |
|00003bf0| 69 66 20 72 75 6e 20 75 | 6e 64 65 72 20 0a 63 6f |if run u|nder .co|
|00003c00| 70 73 2e 20 20 54 68 61 | 74 27 73 20 61 20 62 69 |ps. Tha|t's a bi|
|00003c10| 74 20 64 69 66 66 65 72 | 65 6e 74 20 74 68 61 6e |t differ|ent than|
|00003c20| 20 74 68 65 20 6f 6c 64 | 20 76 65 72 73 69 6f 6e | the old| version|
|00003c30| 2e 20 20 44 65 70 65 6e | 64 69 6e 67 20 6f 6e 20 |. Depen|ding on |
|00003c40| 63 6f 6d 6d 65 6e 74 73 | 2c 0a 49 27 6c 6c 20 65 |comments|,.I'll e|
|00003c50| 69 74 68 65 72 20 6b 65 | 65 70 20 69 74 20 74 68 |ither ke|ep it th|
|00003c60| 69 73 20 77 61 79 2c 20 | 6f 72 20 70 75 74 20 69 |is way, |or put i|
|00003c70| 6e 20 73 6f 6d 65 20 6d | 6f 72 65 20 6f 70 74 69 |n some m|ore opti|
|00003c80| 6f 6e 73 2e 0a 58 0a 58 | 20 20 41 73 20 73 61 69 |ons..X.X| As sai|
|00003c90| 64 20 69 6e 20 74 68 65 | 20 63 6f 6e 66 69 67 20 |d in the| config |
|00003ca0| 66 69 6c 65 20 2d 2d 20 | 22 63 6f 70 73 2e 63 66 |file -- |"cops.cf|
|00003cb0| 22 20 28 61 20 22 23 22 | 20 73 69 67 6e 20 64 65 |" (a "#"| sign de|
|00003cc0| 6e 6f 74 65 73 20 63 6f | 6d 6d 65 6e 74 73 29 3a |notes co|mments):|
|00003cd0| 0a 58 0a 23 20 61 6e 79 | 74 68 69 6e 67 20 62 65 |.X.# any|thing be|
|00003ce0| 67 69 6e 6e 69 6e 67 20 | 77 69 74 68 20 2f 5e 5c |ginning |with /^\|
|00003cf0| 73 2a 5b 24 40 25 26 5d | 2f 20 77 69 6c 6c 20 62 |s*[$@%&]|/ will b|
|00003d00| 65 20 65 76 61 6c 27 64 | 0a 58 0a 58 20 20 49 6e |e eval'd|.X.X In|
|00003d10| 20 67 65 6e 65 72 61 6c | 2c 20 79 6f 75 20 63 61 | general|, you ca|
|00003d20| 6e 20 70 75 74 20 76 61 | 72 69 61 62 6c 65 73 20 |n put va|riables |
|00003d30| 61 6e 64 20 70 72 6f 67 | 72 61 6d 73 20 74 68 61 |and prog|rams tha|
|00003d40| 74 20 77 69 6c 6c 20 62 | 65 20 72 75 6e 20 69 6e |t will b|e run in|
|00003d50| 73 69 64 65 0a 74 68 65 | 20 63 6f 6e 66 69 67 20 |side.the| config |
|00003d60| 66 69 6c 65 2e 20 20 56 | 61 72 69 61 62 6c 65 73 |file. V|ariables|
|00003d70| 20 6c 6f 6f 6b 20 73 74 | 61 72 74 6c 69 6e 67 6c | look st|artlingl|
|00003d80| 79 20 6c 69 6b 65 20 74 | 68 65 79 20 64 6f 20 69 |y like t|hey do i|
|00003d90| 6e 20 6e 6f 72 6d 61 6c | 20 70 65 72 6c 0a 28 6c |n normal| perl.(l|
|00003da0| 6f 6f 6b 20 61 74 20 74 | 68 65 20 22 50 52 4f 47 |ook at t|he "PROG|
|00003db0| 52 41 4d 53 22 20 73 65 | 63 74 69 6f 6e 20 62 65 |RAMS" se|ction be|
|00003dc0| 6c 6f 77 20 66 6f 72 20 | 6d 6f 72 65 20 6f 6e 20 |low for |more on |
|00003dd0| 72 75 6e 6e 69 6e 67 20 | 70 72 6f 67 72 61 6d 73 |running |programs|
|00003de0| 29 3b 20 65 2e 67 2e 3a | 0a 58 0a 24 4e 4d 41 49 |); e.g.:|.X.$NMAI|
|00003df0| 4c 20 09 09 3d 20 30 3b | 20 09 09 23 20 73 65 6e |L ..= 0;| ..# sen|
|00003e00| 64 20 6d 61 69 6c 20 69 | 6e 73 74 65 61 64 20 6f |d mail i|nstead o|
|00003e10| 66 20 67 65 6e 65 72 61 | 74 69 6e 67 20 72 65 70 |f genera|ting rep|
|00003e20| 6f 72 74 73 0a 24 4f 4e | 4c 59 5f 44 49 46 46 20 |orts.$ON|LY_DIFF |
|00003e30| 09 3d 20 30 3b 20 20 09 | 09 23 20 6f 6e 6c 79 20 |.= 0; .|.# only |
|00003e40| 73 65 6e 64 20 64 69 66 | 66 20 66 72 6f 6d 20 6c |send dif|f from l|
|00003e50| 61 73 74 20 74 69 6d 65 | 0a 24 53 45 43 55 52 45 |ast time|.$SECURE|
|00003e60| 5f 55 53 45 52 53 20 20 | 20 3d 20 22 72 6f 6f 74 |_USERS | = "root|
|00003e70| 22 3b 20 09 23 20 75 73 | 65 72 20 74 6f 20 72 65 |"; .# us|er to re|
|00003e80| 63 65 69 76 65 20 6d 61 | 69 6c 65 64 20 72 65 70 |ceive ma|iled rep|
|00003e90| 6f 72 74 0a 58 0a 58 20 | 20 53 65 74 74 69 6e 67 |ort.X.X | Setting|
|00003ea0| 20 73 6f 6d 65 74 68 69 | 6e 67 20 74 6f 20 22 30 | somethi|ng to "0|
|00003eb0| 22 20 28 77 69 74 68 6f | 75 74 20 71 75 6f 74 65 |" (witho|ut quote|
|00003ec0| 73 20 69 73 20 66 69 6e | 65 29 20 67 65 6e 65 72 |s is fin|e) gener|
|00003ed0| 61 6c 6c 79 20 6d 65 61 | 6e 73 20 74 68 61 74 20 |ally mea|ns that |
|00003ee0| 0a 74 68 65 20 6f 70 74 | 69 6f 6e 20 69 73 20 6e |.the opt|ion is n|
|00003ef0| 6f 74 20 75 73 65 64 2e | 20 20 22 31 22 20 28 6f |ot used.| "1" (o|
|00003f00| 72 20 6e 6f 6e 2d 7a 65 | 72 6f 20 76 61 6c 75 65 |r non-ze|ro value|
|00003f10| 73 2c 20 69 66 20 79 6f | 75 20 66 65 65 6c 20 67 |s, if yo|u feel g|
|00003f20| 75 74 73 79 29 20 69 73 | 20 0a 75 73 65 64 20 66 |utsy) is| .used f|
|00003f30| 6f 72 20 61 20 70 6f 73 | 69 74 69 76 65 2f 74 72 |or a pos|itive/tr|
|00003f40| 75 65 2f 77 68 61 74 65 | 76 65 72 20 76 61 6c 75 |ue/whate|ver valu|
|00003f50| 65 2e 20 20 54 68 65 20 | 76 61 72 69 61 62 6c 65 |e. The |variable|
|00003f60| 73 20 69 6e 20 67 65 6e | 65 72 61 6c 20 73 68 6f |s in gen|eral sho|
|00003f70| 75 6c 64 0a 62 65 20 76 | 65 72 79 20 73 69 6d 69 |uld.be v|ery simi|
|00003f80| 6c 61 72 20 74 6f 20 74 | 68 65 69 72 20 6e 6f 72 |lar to t|heir nor|
|00003f90| 6d 61 6c 20 63 6f 70 73 | 20 63 6f 75 6e 74 65 72 |mal cops| counter|
|00003fa0| 70 61 72 74 73 3b 20 69 | 6e 20 74 68 69 73 20 63 |parts; i|n this c|
|00003fb0| 61 73 65 2c 20 73 65 74 | 74 69 6e 67 0a 4e 4d 41 |ase, set|ting.NMA|
|00003fc0| 49 4c 20 74 6f 20 31 20 | 77 6f 75 6c 64 20 6d 65 |IL to 1 |would me|
|00003fd0| 61 6e 20 74 6f 20 6d 61 | 69 6c 20 69 6e 66 6f 20 |an to ma|il info |
|00003fe0| 74 6f 20 74 68 65 20 75 | 73 65 72 20 6c 69 73 74 |to the u|ser list|
|00003ff0| 65 64 20 69 6e 20 53 45 | 43 55 52 45 5f 55 53 45 |ed in SE|CURE_USE|
|00004000| 52 53 2e 0a 49 66 20 4f | 4e 4c 59 5f 44 49 46 46 |RS..If O|NLY_DIFF|
|00004010| 20 69 73 20 31 2c 20 69 | 74 20 77 69 6c 6c 20 6f | is 1, i|t will o|
|00004020| 6e 6c 79 20 6d 61 69 6c | 20 72 65 70 6f 72 74 73 |nly mail| reports|
|00004030| 20 69 66 20 63 68 61 6e | 67 65 20 68 61 73 20 6f | if chan|ge has o|
|00004040| 63 63 75 72 72 65 64 2e | 0a 58 0a 58 20 20 49 6e |ccurred.|.X.X In|
|00004050| 20 67 65 6e 65 72 61 6c | 2c 20 76 61 72 69 61 62 | general|, variab|
|00004060| 6c 65 73 20 69 6e 20 70 | 61 63 6b 61 67 65 20 6d |les in p|ackage m|
|00004070| 61 69 6e 20 61 72 65 20 | 66 6f 72 20 63 6f 70 73 |ain are |for cops|
|00004080| 20 69 74 73 65 6c 66 2c | 20 77 68 65 72 65 61 73 | itself,| whereas|
|00004090| 0a 74 68 6f 73 65 20 77 | 69 74 68 20 70 61 63 6b |.those w|ith pack|
|000040a0| 61 67 65 20 71 75 61 6c | 69 66 69 65 72 73 20 61 |age qual|ifiers a|
|000040b0| 72 65 20 66 6f 72 20 61 | 20 70 61 72 74 69 63 75 |re for a| particu|
|000040c0| 6c 61 72 20 63 68 6b 20 | 72 6f 75 74 69 6e 65 20 |lar chk |routine |
|000040d0| 6f 72 0a 66 6f 72 20 61 | 75 78 69 6c 69 61 72 79 |or.for a|uxiliary|
|000040e0| 20 72 6f 75 74 69 6e 65 | 73 2e 20 20 46 6f 72 20 | routine|s. For |
|000040f0| 69 6e 73 74 61 6e 63 65 | 2c 20 74 68 65 20 66 6f |instance|, the fo|
|00004100| 6c 6c 6f 77 69 6e 67 20 | 6c 69 6e 65 73 3a 0a 58 |llowing |lines:.X|
|00004110| 0a 23 20 74 68 69 73 20 | 6f 6e 65 20 73 61 79 73 |.# this |one says|
|00004120| 20 74 6f 20 69 67 6e 6f | 72 65 20 77 61 72 6e 69 | to igno|re warni|
|00004130| 6e 67 73 20 61 62 6f 75 | 74 20 70 61 74 68 73 20 |ngs abou|t paths |
|00004140| 6d 61 74 63 68 69 6e 67 | 20 74 68 65 73 65 20 72 |matching| these r|
|00004150| 65 67 65 78 70 73 0a 40 | 63 68 6b 5f 73 74 72 69 |egexps.@|chk_stri|
|00004160| 6e 67 73 27 69 67 6e 6f | 72 65 73 20 3d 20 28 20 |ngs'igno|res = ( |
|00004170| 27 5e 2f 74 6d 70 2f 3f | 27 2c 20 27 5e 2f 28 76 |'^/tmp/?|', '^/(v|
|00004180| 61 72 7c 75 73 72 29 2f | 74 6d 70 2f 3f 27 20 29 |ar|usr)/|tmp/?' )|
|00004190| 3b 0a 58 0a 58 20 20 22 | 63 68 6b 5f 73 74 72 69 |;.X.X "|chk_stri|
|000041a0| 6e 67 73 22 20 69 73 20 | 61 20 72 6f 75 74 69 6e |ngs" is |a routin|
|000041b0| 65 20 74 68 61 74 20 63 | 68 65 63 6b 73 20 66 6f |e that c|hecks fo|
|000041c0| 72 20 77 72 69 74 61 62 | 6c 65 20 70 72 6f 67 72 |r writab|le progr|
|000041d0| 61 6d 73 20 77 69 74 68 | 69 6e 20 6f 74 68 65 72 |ams with|in other|
|000041e0| 0a 70 72 6f 67 72 61 6d | 73 2c 20 75 73 75 61 6c |.program|s, usual|
|000041f0| 6c 79 20 65 78 65 63 75 | 74 65 64 20 62 79 20 72 |ly execu|ted by r|
|00004200| 6f 6f 74 2c 20 73 75 63 | 68 20 61 73 20 2f 65 74 |oot, suc|h as /et|
|00004210| 63 2f 72 63 20 61 6e 64 | 20 63 72 6f 6e 74 61 62 |c/rc and| crontab|
|00004220| 2e 20 20 54 68 69 73 20 | 6c 69 6e 65 0a 73 61 79 |. This |line.say|
|00004230| 73 20 74 6f 20 69 67 6e | 6f 72 65 20 61 6e 79 20 |s to ign|ore any |
|00004240| 66 69 6c 65 73 20 74 68 | 61 74 20 73 74 61 72 74 |files th|at start|
|00004250| 20 77 69 74 68 20 61 20 | 22 2f 74 6d 70 22 2c 20 | with a |"/tmp", |
|00004260| 22 2f 76 61 72 2f 74 6d | 70 22 2c 20 6f 72 20 22 |"/var/tm|p", or "|
|00004270| 2f 75 73 72 2f 74 6d 70 | 22 2e 0a 49 66 20 79 6f |/usr/tmp|"..If yo|
|00004280| 75 20 68 61 76 65 20 61 | 20 66 69 6c 65 20 6f 72 |u have a| file or|
|00004290| 20 73 65 74 20 6f 66 20 | 66 69 6c 65 73 20 74 68 | set of |files th|
|000042a0| 61 74 20 61 6c 77 61 79 | 73 20 61 72 65 20 72 65 |at alway|s are re|
|000042b0| 74 75 72 6e 69 6e 67 20 | 77 72 69 74 61 62 6c 65 |turning |writable|
|000042c0| 20 74 68 61 74 0a 61 72 | 65 20 69 6e 73 69 64 65 | that.ar|e inside|
|000042d0| 20 79 6f 75 72 20 72 63 | 20 61 6e 64 20 63 72 6f | your rc| and cro|
|000042e0| 6e 20 66 69 6c 65 73 2c | 20 74 68 65 6e 20 79 6f |n files,| then yo|
|000042f0| 75 20 63 61 6e 20 70 75 | 74 20 65 78 63 65 70 74 |u can pu|t except|
|00004300| 69 6f 6e 73 20 68 65 72 | 65 2e 20 20 4f 6e 65 0a |ions her|e. One.|
|00004310| 70 6f 73 73 69 62 69 6c | 69 74 79 20 69 73 20 74 |possibil|ity is t|
|00004320| 68 61 74 20 79 6f 75 20 | 64 6f 6e 27 74 20 63 61 |hat you |don't ca|
|00004330| 72 65 20 61 62 6f 75 74 | 20 66 69 6c 65 73 20 63 |re about| files c|
|00004340| 72 65 61 74 65 64 20 62 | 79 20 6f 74 68 65 72 20 |reated b|y other |
|00004350| 70 72 6f 67 72 61 6d 73 | 2c 0a 73 6f 20 74 68 61 |programs|,.so tha|
|00004360| 74 20 61 6e 79 74 68 69 | 6e 67 20 61 66 74 65 72 |t anythi|ng after|
|00004370| 20 61 20 22 3e 22 20 73 | 68 6f 75 6c 64 20 62 65 | a ">" s|hould be|
|00004380| 20 69 67 6e 6f 72 65 64 | 2e 20 20 59 6f 75 20 6d | ignored|. You m|
|00004390| 69 67 68 74 20 61 64 64 | 20 73 6f 6d 65 74 68 69 |ight add| somethi|
|000043a0| 6e 67 0a 6c 69 6b 65 20 | 27 3e 2e 2a 27 20 74 6f |ng.like |'>.*' to|
|000043b0| 20 69 67 6e 6f 72 65 20 | 66 69 6c 65 73 20 6c 69 | ignore |files li|
|000043c0| 6b 65 20 22 2f 75 73 72 | 2f 62 61 72 2f 73 6e 6f |ke "/usr|/bar/sno|
|000043d0| 77 63 6f 6e 65 22 2c 20 | 69 6e 20 61 20 6c 69 6e |wcone", |in a lin|
|000043e0| 65 20 6c 69 6b 65 0a 22 | 2f 66 6f 6f 2f 62 61 72 |e like."|/foo/bar|
|000043f0| 2f 63 6f 6d 6d 61 6e 64 | 20 3e 20 2f 75 73 72 2f |/command| > /usr/|
|00004400| 62 61 72 2f 73 6e 6f 77 | 63 6f 6e 65 22 2e 0a 58 |bar/snow|cone"..X|
|00004410| 0a 58 20 20 4e 65 78 74 | 2c 20 74 68 65 72 65 20 |.X Next|, there |
|00004420| 69 73 20 61 20 6e 69 66 | 74 79 20 6f 70 74 69 6f |is a nif|ty optio|
|00004430| 6e 2c 20 74 68 61 74 20 | 64 6f 65 73 20 72 65 63 |n, that |does rec|
|00004440| 75 72 73 69 76 65 20 73 | 65 61 72 63 68 69 6e 67 |ursive s|earching|
|00004450| 20 69 6e 73 69 64 65 20 | 74 68 65 0a 66 69 6c 65 | inside |the.file|
|00004460| 73 20 63 68 6b 5f 73 74 | 72 69 6e 67 73 20 6c 6f |s chk_st|rings lo|
|00004470| 6f 6b 73 20 61 74 2e 20 | 20 54 68 69 73 20 69 73 |oks at. | This is|
|00004480| 20 6e 65 61 74 2e 2e 2e | 20 67 65 74 20 69 74 20 | neat...| get it |
|00004490| 77 6f 72 6b 69 6e 67 20 | 62 79 20 73 65 74 74 69 |working |by setti|
|000044a0| 6e 67 20 74 68 69 73 0a | 74 6f 20 31 3a 0a 58 0a |ng this.|to 1:.X.|
|000044b0| 24 63 68 6b 5f 73 74 72 | 69 6e 67 73 27 72 65 63 |$chk_str|ings'rec|
|000044c0| 75 72 73 65 20 3d 20 31 | 3b 0a 58 0a 58 20 20 53 |urse = 1|;.X.X S|
|000044d0| 6f 2c 20 69 66 20 79 6f | 75 20 68 61 76 65 20 61 |o, if yo|u have a|
|000044e0| 20 6c 69 6e 65 20 6c 69 | 6b 65 20 74 68 69 73 20 | line li|ke this |
|000044f0| 69 6e 20 2f 65 74 63 2f | 72 63 3a 0a 58 0a 2f 75 |in /etc/|rc:.X./u|
|00004500| 73 72 2f 62 69 6e 2f 66 | 6f 6f 20 3e 20 2f 64 65 |sr/bin/f|oo > /de|
|00004510| 76 2f 63 6f 6e 73 6f 6c | 65 0a 58 0a 58 20 20 49 |v/consol|e.X.X I|
|00004520| 74 20 77 69 6c 6c 20 65 | 78 61 6d 69 6e 65 20 22 |t will e|xamine "|
|00004530| 2f 75 73 72 2f 62 69 6e | 2f 66 6f 6f 22 20 66 6f |/usr/bin|/foo" fo|
|00004540| 72 20 70 72 6f 67 72 61 | 6d 73 20 69 6e 73 69 64 |r progra|ms insid|
|00004550| 65 20 6f 66 20 69 74 20 | 2d 2d 20 61 6e 64 20 69 |e of it |-- and i|
|00004560| 74 20 77 69 6c 6c 0a 6b | 65 65 70 20 67 6f 69 6e |t will.k|eep goin|
|00004570| 67 20 75 6e 74 69 6c 20 | 69 74 20 68 61 73 20 65 |g until |it has e|
|00004580| 78 68 61 75 73 74 65 64 | 20 61 6c 6c 20 70 6f 73 |xhausted| all pos|
|00004590| 73 69 62 69 6c 69 74 69 | 65 73 2e 20 20 53 6f 20 |sibiliti|es. So |
|000045a0| 79 6f 75 20 63 61 6e 20 | 67 65 74 20 77 61 72 6e |you can |get warn|
|000045b0| 69 6e 67 0a 6d 65 73 73 | 61 67 65 73 20 6c 69 6b |ing.mess|ages lik|
|000045c0| 65 3a 0a 58 0a 57 61 72 | 6e 69 6e 67 21 20 20 46 |e:.X.War|ning! F|
|000045d0| 69 6c 65 20 2f 66 6f 6f | 2f 62 61 72 20 28 69 6e |ile /foo|/bar (in|
|000045e0| 73 69 64 65 20 2f 75 73 | 72 2f 6c 6f 63 61 6c 2f |side /us|r/local/|
|000045f0| 58 31 31 52 34 2f 62 69 | 6e 2f 58 20 69 6e 73 69 |X11R4/bi|n/X insi|
|00004600| 64 65 20 2f 75 73 72 2f | 6c 6f 63 61 6c 2f 58 31 |de /usr/|local/X1|
|00004610| 31 52 34 0a 2f 62 69 6e | 2f 78 64 6d 20 69 6e 73 |1R4./bin|/xdm ins|
|00004620| 69 64 65 20 2f 65 74 63 | 2f 72 63 2e 6c 6f 63 61 |ide /etc|/rc.loca|
|00004630| 6c 29 20 69 73 20 5f 57 | 6f 72 6c 64 5f 20 77 72 |l) is _W|orld_ wr|
|00004640| 69 74 61 62 6c 65 21 0a | 58 0a 58 20 20 46 75 6e |itable!.|X.X Fun|
|00004650| 20 73 74 75 66 66 2e 20 | 20 4e 6f 20 6f 6e 65 20 | stuff. | No one |
|00004660| 63 61 6e 20 68 69 64 65 | 2c 20 6e 6f 77 2e 2e 2e |can hide|, now...|
|00004670| 0a 58 0a 50 52 4f 47 52 | 41 4d 53 0a 3d 3d 3d 3d |.X.PROGR|AMS.====|
|00004680| 3d 3d 3d 3d 3d 0a 58 0a | 58 20 20 52 75 6e 6e 69 |=====.X.|X Runni|
|00004690| 6e 67 20 61 20 70 72 6f | 67 72 61 6d 20 77 69 74 |ng a pro|gram wit|
|000046a0| 68 69 6e 20 63 6f 70 73 | 20 69 73 20 65 61 73 79 |hin cops| is easy|
|000046b0| 3b 20 79 6f 75 20 6a 75 | 73 74 20 68 61 76 65 20 |; you ju|st have |
|000046c0| 74 68 65 20 70 72 6f 67 | 72 61 6d 20 77 69 74 68 |the prog|ram with|
|000046d0| 0a 61 6e 79 20 6f 70 74 | 69 6f 6e 73 20 62 79 20 |.any opt|ions by |
|000046e0| 69 74 73 65 6c 66 20 6f | 6e 20 61 20 6c 69 6e 65 |itself o|n a line|
|000046f0| 2e 20 20 53 65 6d 69 2d | 63 6f 6c 6f 6e 73 20 61 |. Semi-|colons a|
|00004700| 72 65 20 6e 6f 74 20 77 | 65 6c 63 6f 6d 65 20 68 |re not w|elcome h|
|00004710| 65 72 65 2e 0a 45 2e 67 | 2e 3a 0a 58 0a 23 20 66 |ere..E.g|.:.X.# f|
|00004720| 69 72 73 74 20 74 65 73 | 74 20 74 68 65 20 73 65 |irst tes|t the se|
|00004730| 63 75 72 69 74 79 20 6f | 66 20 74 68 65 20 72 6f |curity o|f the ro|
|00004740| 6f 74 20 61 63 63 6f 75 | 6e 74 0a 72 6f 6f 74 2e |ot accou|nt.root.|
|00004750| 63 68 6b 0a 58 0a 58 20 | 20 53 6f 6d 65 20 76 61 |chk.X.X | Some va|
|00004760| 72 69 61 62 6c 65 73 20 | 73 70 65 63 69 66 69 63 |riables |specific|
|00004770| 20 74 6f 20 74 68 65 20 | 76 61 72 69 6f 75 73 20 | to the |various |
|00004780| 70 72 6f 67 72 61 6d 73 | 20 61 72 65 20 68 65 72 |programs| are her|
|00004790| 65 20 61 73 20 77 65 6c | 6c 2c 20 65 2e 67 2e 3a |e as wel|l, e.g.:|
|000047a0| 0a 58 0a 23 20 6e 6f 77 | 20 6f 66 20 74 68 65 20 |.X.# now| of the |
|000047b0| 76 61 72 69 6f 75 73 20 | 64 65 76 69 63 65 73 2e |various |devices.|
|000047c0| 20 20 2d 67 20 6d 65 61 | 6e 73 20 74 6f 20 63 68 | -g mea|ns to ch|
|000047d0| 65 63 6b 20 67 72 6f 75 | 70 20 77 72 69 74 61 62 |eck grou|p writab|
|000047e0| 69 6c 69 74 79 2c 20 74 | 6f 6f 0a 24 4d 54 41 42 |ility, t|oo.$MTAB|
|000047f0| 20 20 20 20 3d 20 27 2f | 65 74 63 2f 66 73 74 61 | = '/|etc/fsta|
|00004800| 62 27 3b 0a 24 45 58 50 | 4f 52 54 53 20 3d 20 27 |b';.$EXP|ORTS = '|
|00004810| 2f 65 74 63 2f 65 78 70 | 6f 72 74 73 27 3b 0a 24 |/etc/exp|orts';.$|
|00004820| 54 41 42 5f 53 54 59 4c | 45 20 3d 20 27 6e 65 77 |TAB_STYL|E = 'new|
|00004830| 27 3b 0a 64 65 76 2e 63 | 68 6b 20 2d 67 20 0a 58 |';.dev.c|hk -g .X|
|00004840| 0a 58 20 20 54 68 69 73 | 20 69 73 20 73 70 65 63 |.X This| is spec|
|00004850| 69 66 79 69 6e 67 20 74 | 68 65 20 65 78 70 6f 72 |ifying t|he expor|
|00004860| 74 20 66 69 6c 65 73 2c | 20 65 74 63 2e 2c 20 61 |t files,| etc., a|
|00004870| 6e 64 20 73 61 79 69 6e | 67 20 74 68 61 74 20 79 |nd sayin|g that y|
|00004880| 6f 75 20 73 68 6f 75 6c | 64 0a 75 73 65 20 74 68 |ou shoul|d.use th|
|00004890| 65 20 22 6e 65 77 22 20 | 66 6f 72 6d 61 74 20 73 |e "new" |format s|
|000048a0| 74 79 6c 65 20 69 6e 20 | 74 68 65 20 65 78 70 6f |tyle in |the expo|
|000048b0| 72 74 73 20 66 69 6c 65 | 2e 20 20 55 6c 74 72 69 |rts file|. Ultri|
|000048c0| 78 2c 20 65 74 63 2e 20 | 75 73 65 73 20 74 68 65 |x, etc. |uses the|
|000048d0| 0a 6f 6c 64 20 73 74 79 | 6c 65 2e 20 20 53 75 69 |.old sty|le. Sui|
|000048e0| 64 2e 63 68 6b 20 65 61 | 74 73 20 75 70 20 74 69 |d.chk ea|ts up ti|
|000048f0| 6d 65 20 2d 2d 20 63 6f | 6e 73 69 64 65 72 20 74 |me -- co|nsider t|
|00004900| 68 65 20 22 2d 6e 22 20 | 66 6c 61 67 20 66 6f 72 |he "-n" |flag for|
|00004910| 20 73 79 73 74 65 6d 73 | 0a 74 68 61 74 20 68 61 | systems|.that ha|
|00004920| 76 65 20 62 69 67 20 4e | 46 53 20 6d 6f 75 6e 74 |ve big N|FS mount|
|00004930| 65 64 20 64 69 73 6b 73 | 2e 20 20 41 6e 64 20 74 |ed disks|. And t|
|00004940| 68 61 74 27 73 20 69 74 | 20 2d 2d 20 74 68 65 20 |hat's it| -- the |
|00004950| 72 65 73 74 20 73 68 6f | 75 6c 64 20 62 65 20 76 |rest sho|uld be v|
|00004960| 65 72 79 20 0a 73 69 6d | 69 6c 61 72 20 74 6f 20 |ery .sim|ilar to |
|00004970| 74 68 65 20 6f 6c 64 20 | 63 6f 70 73 2c 20 61 6e |the old |cops, an|
|00004980| 64 20 74 68 65 6f 72 65 | 74 69 63 61 6c 6c 79 2c |d theore|tically,|
|00004990| 20 73 68 6f 75 6c 64 20 | 67 69 76 65 20 79 6f 75 | should |give you|
|000049a0| 20 73 69 6d 69 6c 61 72 | 20 6f 72 0a 74 68 65 20 | similar| or.the |
|000049b0| 73 61 6d 65 20 72 65 73 | 75 6c 74 73 2e 0a 58 0a |same res|ults..X.|
|000049c0| 58 20 20 47 6f 6f 64 20 | 6c 75 63 6b 21 20 20 53 |X Good |luck! S|
|000049d0| 65 6e 64 20 62 75 67 73 | 2c 20 66 6c 61 6d 65 73 |end bugs|, flames|
|000049e0| 2c 20 65 74 63 2e 20 74 | 6f 20 64 66 40 63 65 72 |, etc. t|o df@cer|
|000049f0| 74 2e 73 65 69 2e 63 6d | 75 2e 65 64 75 0a 58 0a |t.sei.cm|u.edu.X.|
|00004a00| 58 20 2d 2d 20 64 61 6e | 0a 53 48 41 52 5f 45 4f |X -- dan|.SHAR_EO|
|00004a10| 46 0a 63 68 6d 6f 64 20 | 30 37 30 30 20 62 65 74 |F.chmod |0700 bet|
|00004a20| 61 2f 52 45 41 44 4d 45 | 2e 70 65 72 6c 20 7c 7c |a/README|.perl |||
|00004a30| 0a 65 63 68 6f 20 27 72 | 65 73 74 6f 72 65 20 6f |.echo 'r|estore o|
|00004a40| 66 20 62 65 74 61 2f 52 | 45 41 44 4d 45 2e 70 65 |f beta/R|EADME.pe|
|00004a50| 72 6c 20 66 61 69 6c 65 | 64 27 0a 57 63 5f 63 3d |rl faile|d'.Wc_c=|
|00004a60| 22 60 77 63 20 2d 63 20 | 3c 20 27 62 65 74 61 2f |"`wc -c |< 'beta/|
|00004a70| 52 45 41 44 4d 45 2e 70 | 65 72 6c 27 60 22 0a 74 |README.p|erl'`".t|
|00004a80| 65 73 74 20 34 38 35 34 | 20 2d 65 71 20 22 24 57 |est 4854| -eq "$W|
|00004a90| 63 5f 63 22 20 7c 7c 0a | 09 65 63 68 6f 20 27 62 |c_c" ||.|.echo 'b|
|00004aa0| 65 74 61 2f 52 45 41 44 | 4d 45 2e 70 65 72 6c 3a |eta/READ|ME.perl:|
|00004ab0| 20 6f 72 69 67 69 6e 61 | 6c 20 73 69 7a 65 20 34 | origina|l size 4|
|00004ac0| 38 35 34 2c 20 63 75 72 | 72 65 6e 74 20 73 69 7a |854, cur|rent siz|
|00004ad0| 65 27 20 22 24 57 63 5f | 63 22 0a 72 6d 20 2d 66 |e' "$Wc_|c".rm -f|
|00004ae0| 20 5f 73 68 61 72 5f 77 | 6e 74 5f 2e 74 6d 70 0a | _shar_w|nt_.tmp.|
|00004af0| 66 69 0a 23 20 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |fi.# ===|========|
|00004b00| 3d 3d 20 62 65 74 61 2f | 63 68 6b 5f 73 74 72 69 |== beta/|chk_stri|
|00004b10| 6e 67 73 20 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |ngs ====|========|
|00004b20| 3d 3d 0a 69 66 20 74 65 | 73 74 20 2d 66 20 27 62 |==.if te|st -f 'b|
|00004b30| 65 74 61 2f 63 68 6b 5f | 73 74 72 69 6e 67 73 27 |eta/chk_|strings'|
|00004b40| 20 2d 61 20 58 22 24 31 | 22 20 21 3d 20 58 22 2d | -a X"$1|" != X"-|
|00004b50| 63 22 3b 20 74 68 65 6e | 0a 09 65 63 68 6f 20 27 |c"; then|..echo '|
|00004b60| 78 20 2d 20 73 6b 69 70 | 70 69 6e 67 20 62 65 74 |x - skip|ping bet|
|00004b70| 61 2f 63 68 6b 5f 73 74 | 72 69 6e 67 73 20 28 46 |a/chk_st|rings (F|
|00004b80| 69 6c 65 20 61 6c 72 65 | 61 64 79 20 65 78 69 73 |ile alre|ady exis|
|00004b90| 74 73 29 27 0a 09 72 6d | 20 2d 66 20 5f 73 68 61 |ts)'..rm| -f _sha|
|00004ba0| 72 5f 77 6e 74 5f 2e 74 | 6d 70 0a 65 6c 73 65 0a |r_wnt_.t|mp.else.|
|00004bb0| 3e 20 5f 73 68 61 72 5f | 77 6e 74 5f 2e 74 6d 70 |> _shar_|wnt_.tmp|
|00004bc0| 0a 65 63 68 6f 20 27 78 | 20 2d 20 65 78 74 72 61 |.echo 'x| - extra|
|00004bd0| 63 74 69 6e 67 20 62 65 | 74 61 2f 63 68 6b 5f 73 |cting be|ta/chk_s|
|00004be0| 74 72 69 6e 67 73 20 28 | 54 65 78 74 29 27 0a 73 |trings (|Text)'.s|
|00004bf0| 65 64 20 27 73 2f 5e 58 | 2f 2f 27 20 3c 3c 20 27 |ed 's/^X|//' << '|
|00004c00| 53 48 41 52 5f 45 4f 46 | 27 20 3e 20 27 62 65 74 |SHAR_EOF|' > 'bet|
|00004c10| 61 2f 63 68 6b 5f 73 74 | 72 69 6e 67 73 27 20 26 |a/chk_st|rings' &|
|00004c20| 26 0a 23 21 2f 62 69 6e | 2f 73 68 20 20 23 20 6e |&.#!/bin|/sh # n|
|00004c30| 65 65 64 20 74 6f 20 6d | 65 6e 74 69 6f 6e 20 70 |eed to m|ention p|
|00004c40| 65 72 6c 20 68 65 72 65 | 20 74 6f 20 61 76 6f 69 |erl here| to avoi|
|00004c50| 64 20 72 65 63 75 72 73 | 69 6f 6e 0a 23 0a 23 20 |d recurs|ion.#.# |
|00004c60| 20 55 73 61 67 65 3a 20 | 63 68 6b 5f 73 74 72 69 | Usage: |chk_stri|
|00004c70| 6e 67 73 20 66 69 6c 65 | 6e 61 6d 65 0a 23 0a 23 |ngs file|name.#.#|
|00004c80| 20 20 54 68 69 73 20 77 | 69 6c 6c 20 63 68 65 63 | This w|ill chec|
|00004c90| 6b 20 70 61 74 68 6e 61 | 6d 65 73 20 69 6e 73 69 |k pathna|mes insi|
|00004ca0| 64 65 20 65 78 65 63 75 | 74 61 62 6c 65 20 66 69 |de execu|table fi|
|00004cb0| 6c 65 73 20 66 6f 72 20 | 77 72 69 74 61 62 69 6c |les for |writabil|
|00004cc0| 69 74 79 2c 0a 23 20 54 | 68 65 20 62 69 67 20 73 |ity,.# T|he big s|
|00004cd0| 74 72 69 6e 67 20 22 40 | 69 67 6e 6f 72 65 73 22 |tring "@|ignores"|
|00004ce0| 20 69 73 20 61 20 6c 69 | 73 74 20 6f 66 20 66 69 | is a li|st of fi|
|00004cf0| 6c 65 73 20 74 68 61 74 | 20 61 72 65 20 69 67 6e |les that| are ign|
|00004d00| 6f 72 65 64 20 62 79 0a | 23 20 74 68 69 73 3b 20 |ored by.|# this; |
|00004d10| 79 6f 75 20 63 61 6e 20 | 73 65 74 20 69 74 20 74 |you can |set it t|
|00004d20| 6f 20 77 68 61 74 65 76 | 65 72 20 79 6f 75 20 77 |o whatev|er you w|
|00004d30| 61 6e 74 20 2d 2d 20 64 | 65 66 61 75 6c 74 20 69 |ant -- d|efault i|
|00004d40| 73 3a 0a 23 20 27 5e 2f | 74 6d 70 2f 3f 27 20 61 |s:.# '^/|tmp/?' a|
|00004d50| 6e 64 20 27 5e 2f 28 76 | 61 72 7c 75 73 72 29 2f |nd '^/(v|ar|usr)/|
|00004d60| 74 6d 70 2f 3f 27 0a 23 | 20 0a 23 20 20 4e 6f 20 |tmp/?'.#| .# No |
|00004d70| 70 72 6f 67 72 61 6d 20 | 72 6f 6f 74 20 45 56 45 |program |root EVE|
|00004d80| 52 20 72 75 6e 73 20 73 | 68 6f 75 6c 64 20 62 65 |R runs s|hould be|
|00004d90| 20 73 68 6f 77 20 75 70 | 20 68 65 72 65 2e 0a 23 | show up| here..#|
|00004da0| 0a 23 20 4e 4f 54 45 3a | 0a 23 20 20 20 49 66 20 |.# NOTE:|.# If |
|00004db0| 79 6f 75 20 6b 6e 6f 77 | 20 77 68 65 72 65 20 70 |you know| where p|
|00004dc0| 65 72 6c 20 69 73 20 61 | 6e 64 20 79 6f 75 72 20 |erl is a|nd your |
|00004dd0| 73 79 73 74 65 6d 20 67 | 72 6f 6b 73 20 23 21 2c |system g|roks #!,|
|00004de0| 20 70 75 74 20 69 74 73 | 0a 23 20 70 61 74 68 6e | put its|.# pathn|
|00004df0| 61 6d 65 20 61 74 20 74 | 68 65 20 74 6f 70 20 74 |ame at t|he top t|
|00004e00| 6f 20 6d 61 6b 65 20 74 | 68 69 73 20 61 20 74 61 |o make t|his a ta|
|00004e10| 64 20 66 61 73 74 65 72 | 2e 0a 23 0a 23 20 74 68 |d faster|..#.# th|
|00004e20| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 6d 61 67 69 |e follow|ing magi|
|00004e30| 63 20 69 73 20 66 72 6f | 6d 20 74 68 65 20 70 65 |c is fro|m the pe|
|00004e40| 72 6c 20 6d 61 6e 20 70 | 61 67 65 0a 23 20 61 6e |rl man p|age.# an|
|00004e50| 64 20 73 68 6f 75 6c 64 | 20 77 6f 72 6b 20 74 6f |d should| work to|
|00004e60| 20 67 65 74 20 75 73 20 | 74 6f 20 72 75 6e 20 77 | get us |to run w|
|00004e70| 69 74 68 20 70 65 72 6c | 20 0a 23 20 65 76 65 6e |ith perl| .# even|
|00004e80| 20 69 66 20 69 6e 76 6f | 6b 65 64 20 61 73 20 61 | if invo|ked as a|
|00004e90| 6e 20 73 68 20 6f 72 20 | 63 73 68 20 6f 72 20 66 |n sh or |csh or f|
|00004ea0| 6f 6f 73 68 20 73 63 72 | 69 70 74 2e 0a 23 20 6e |oosh scr|ipt..# n|
|00004eb0| 6f 74 69 63 65 20 77 65 | 20 64 6f 6e 27 74 20 75 |otice we| don't u|
|00004ec0| 73 65 20 66 75 6c 6c 20 | 70 61 74 68 20 63 61 75 |se full |path cau|
|00004ed0| 73 65 20 77 65 20 64 6f | 6e 27 74 0a 23 20 6b 6e |se we do|n't.# kn|
|00004ee0| 6f 77 20 77 68 65 72 65 | 20 74 68 65 20 75 73 65 |ow where| the use|
|00004ef0| 72 20 68 61 73 20 70 65 | 72 6c 20 6f 6e 20 74 68 |r has pe|rl on th|
|00004f00| 65 69 72 20 73 79 73 74 | 65 6d 2e 0a 23 0a 65 76 |eir syst|em..#.ev|
|00004f10| 61 6c 20 27 28 65 78 69 | 74 20 24 3f 30 29 27 20 |al '(exi|t $?0)' |
|00004f20| 26 26 20 65 76 61 6c 20 | 27 65 78 65 63 20 70 65 |&& eval |'exec pe|
|00004f30| 72 6c 20 2d 53 20 24 30 | 20 24 7b 31 2b 22 24 40 |rl -S $0| ${1+"$@|
|00004f40| 22 7d 27 20 0a 26 20 65 | 76 61 6c 20 27 65 78 65 |"}' .& e|val 'exe|
|00004f50| 63 20 70 65 72 6c 20 2d | 53 20 24 30 20 24 61 72 |c perl -|S $0 $ar|
|00004f60| 67 76 3a 71 27 0a 58 20 | 20 20 20 69 66 20 24 72 |gv:q'.X | if $r|
|00004f70| 75 6e 6e 69 6e 67 5f 75 | 6e 64 65 72 5f 73 6f 6d |unning_u|nder_som|
|00004f80| 65 5f 73 74 75 70 69 64 | 5f 73 68 65 6c 6c 5f 69 |e_stupid|_shell_i|
|00004f90| 6e 73 74 65 61 64 5f 6f | 66 5f 70 65 72 6c 3b 0a |nstead_o|f_perl;.|
|00004fa0| 58 0a 70 61 63 6b 61 67 | 65 20 6d 61 69 6e 3b 0a |X.packag|e main;.|
|00004fb0| 58 0a 24 7c 20 3d 20 31 | 3b 0a 58 0a 72 65 71 75 |X.$| = 1|;.X.requ|
|00004fc0| 69 72 65 20 27 67 65 74 | 6f 70 74 73 2e 70 6c 27 |ire 'get|opts.pl'|
|00004fd0| 3b 0a 72 65 71 75 69 72 | 65 20 27 63 68 6b 5f 73 |;.requir|e 'chk_s|
|00004fe0| 74 72 69 6e 67 73 2e 70 | 6c 27 3b 0a 58 0a 64 69 |trings.p|l';.X.di|
|00004ff0| 65 20 22 55 73 61 67 65 | 3a 20 24 30 20 5b 2d 72 |e "Usage|: $0 [-r|
|00005000| 64 5d 20 66 69 6c 65 20 | 2e 2e 2e 5c 6e 22 20 75 |d] file |...\n" u|
|00005010| 6e 6c 65 73 73 20 26 47 | 65 74 6f 70 74 73 28 27 |nless &G|etopts('|
|00005020| 72 64 27 29 20 26 26 20 | 40 41 52 47 56 3b 0a 58 |rd') && |@ARGV;.X|
|00005030| 0a 70 61 63 6b 61 67 65 | 20 63 68 6b 5f 73 74 72 |.package| chk_str|
|00005040| 69 6e 67 73 3b 0a 58 0a | 24 64 65 62 75 67 20 3d |ings;.X.|$debug =|
|00005050| 20 24 27 6f 70 74 5f 64 | 3b 0a 24 72 65 63 75 72 | $'opt_d|;.$recur|
|00005060| 73 65 20 3d 20 24 27 6f | 70 74 5f 72 3b 0a 40 69 |se = $'o|pt_r;.@i|
|00005070| 67 6e 6f 72 65 73 20 3d | 20 28 20 27 5e 2f 74 6d |gnores =| ( '^/tm|
|00005080| 70 2f 3f 27 2c 20 27 5e | 2f 28 76 61 72 7c 75 73 |p/?', '^|/(var|us|
|00005090| 72 29 2f 74 6d 70 2f 3f | 27 20 29 0a 58 20 20 20 |r)/tmp/?|' ).X |
|000050a0| 20 75 6e 6c 65 73 73 20 | 64 65 66 69 6e 65 64 20 | unless |defined |
|000050b0| 40 69 67 6e 6f 72 65 73 | 3b 0a 58 0a 23 25 70 61 |@ignores|;.X.#%pa|
|000050c0| 74 68 73 20 3d 20 28 29 | 3b 20 20 23 20 66 61 73 |ths = ()|; # fas|
|000050d0| 74 65 72 20 74 68 61 6e | 20 6c 6f 63 61 6c 0a 58 |ter than| local.X|
|000050e0| 0a 66 6f 72 20 28 40 27 | 41 52 47 56 29 20 7b 20 |.for (@'|ARGV) { |
|000050f0| 0a 58 20 20 20 20 28 77 | 61 72 6e 28 22 24 30 3a |.X (w|arn("$0:|
|00005100| 20 24 5f 3a 20 24 21 5c | 6e 22 29 2c 20 6e 65 78 | $_: $!\|n"), nex|
|00005110| 74 29 20 75 6e 6c 65 73 | 73 20 2d 65 3b 0a 58 20 |t) unles|s -e;.X |
|00005120| 20 20 20 26 27 63 68 6b | 5f 73 74 72 69 6e 67 73 | &'chk|_strings|
|00005130| 28 24 5f 29 3b 20 0a 7d | 20 0a 53 48 41 52 5f 45 |($_); .}| .SHAR_E|
|00005140| 4f 46 0a 63 68 6d 6f 64 | 20 30 37 30 30 20 62 65 |OF.chmod| 0700 be|
|00005150| 74 61 2f 63 68 6b 5f 73 | 74 72 69 6e 67 73 20 7c |ta/chk_s|trings ||
|00005160| 7c 0a 65 63 68 6f 20 27 | 72 65 73 74 6f 72 65 20 ||.echo '|restore |
|00005170| 6f 66 20 62 65 74 61 2f | 63 68 6b 5f 73 74 72 69 |of beta/|chk_stri|
|00005180| 6e 67 73 20 66 61 69 6c | 65 64 27 0a 57 63 5f 63 |ngs fail|ed'.Wc_c|
|00005190| 3d 22 60 77 63 20 2d 63 | 20 3c 20 27 62 65 74 61 |="`wc -c| < 'beta|
|000051a0| 2f 63 68 6b 5f 73 74 72 | 69 6e 67 73 27 60 22 0a |/chk_str|ings'`".|
|000051b0| 74 65 73 74 20 31 32 39 | 32 20 2d 65 71 20 22 24 |test 129|2 -eq "$|
|000051c0| 57 63 5f 63 22 20 7c 7c | 0a 09 65 63 68 6f 20 27 |Wc_c" |||..echo '|
|000051d0| 62 65 74 61 2f 63 68 6b | 5f 73 74 72 69 6e 67 73 |beta/chk|_strings|
|000051e0| 3a 20 6f 72 69 67 69 6e | 61 6c 20 73 69 7a 65 20 |: origin|al size |
|000051f0| 31 32 39 32 2c 20 63 75 | 72 72 65 6e 74 20 73 69 |1292, cu|rrent si|
|00005200| 7a 65 27 20 22 24 57 63 | 5f 63 22 0a 72 6d 20 2d |ze' "$Wc|_c".rm -|
|00005210| 66 20 5f 73 68 61 72 5f | 77 6e 74 5f 2e 74 6d 70 |f _shar_|wnt_.tmp|
|00005220| 0a 66 69 0a 23 20 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |.fi.# ==|========|
|00005230| 3d 3d 3d 20 62 65 74 61 | 2f 63 68 6b 5f 73 74 72 |=== beta|/chk_str|
|00005240| 69 6e 67 73 2e 70 6c 20 | 3d 3d 3d 3d 3d 3d 3d 3d |ings.pl |========|
|00005250| 3d 3d 3d 3d 3d 3d 0a 69 | 66 20 74 65 73 74 20 2d |======.i|f test -|
|00005260| 66 20 27 62 65 74 61 2f | 63 68 6b 5f 73 74 72 69 |f 'beta/|chk_stri|
|00005270| 6e 67 73 2e 70 6c 27 20 | 2d 61 20 58 22 24 31 22 |ngs.pl' |-a X"$1"|
|00005280| 20 21 3d 20 58 22 2d 63 | 22 3b 20 74 68 65 6e 0a | != X"-c|"; then.|
|00005290| 09 65 63 68 6f 20 27 78 | 20 2d 20 73 6b 69 70 70 |.echo 'x| - skipp|
|000052a0| 69 6e 67 20 62 65 74 61 | 2f 63 68 6b 5f 73 74 72 |ing beta|/chk_str|
|000052b0| 69 6e 67 73 2e 70 6c 20 | 28 46 69 6c 65 20 61 6c |ings.pl |(File al|
|000052c0| 72 65 61 64 79 20 65 78 | 69 73 74 73 29 27 0a 09 |ready ex|ists)'..|
|000052d0| 72 6d 20 2d 66 20 5f 73 | 68 61 72 5f 77 6e 74 5f |rm -f _s|har_wnt_|
|000052e0| 2e 74 6d 70 0a 65 6c 73 | 65 0a 3e 20 5f 73 68 61 |.tmp.els|e.> _sha|
|000052f0| 72 5f 77 6e 74 5f 2e 74 | 6d 70 0a 65 63 68 6f 20 |r_wnt_.t|mp.echo |
|00005300| 27 78 20 2d 20 65 78 74 | 72 61 63 74 69 6e 67 20 |'x - ext|racting |
|00005310| 62 65 74 61 2f 63 68 6b | 5f 73 74 72 69 6e 67 73 |beta/chk|_strings|
|00005320| 2e 70 6c 20 28 54 65 78 | 74 29 27 0a 73 65 64 20 |.pl (Tex|t)'.sed |
|00005330| 27 73 2f 5e 58 2f 2f 27 | 20 3c 3c 20 27 53 48 41 |'s/^X//'| << 'SHA|
|00005340| 52 5f 45 4f 46 27 20 3e | 20 27 62 65 74 61 2f 63 |R_EOF' >| 'beta/c|
|00005350| 68 6b 5f 73 74 72 69 6e | 67 73 2e 70 6c 27 20 26 |hk_strin|gs.pl' &|
|00005360| 26 0a 23 0a 23 20 20 54 | 68 69 73 20 69 73 20 61 |&.#.# T|his is a|
|00005370| 20 62 69 67 20 6f 6e 65 | 2e 20 20 53 75 70 70 6f | big one|. Suppo|
|00005380| 72 74 20 72 6f 75 74 69 | 6e 65 73 20 74 6f 20 63 |rt routi|nes to c|
|00005390| 68 65 63 6b 20 66 6f 72 | 20 73 74 72 69 6e 67 73 |heck for| strings|
|000053a0| 20 0a 23 20 74 68 61 74 | 20 6c 6f 6f 6b 20 6c 69 | .# that| look li|
|000053b0| 6b 65 20 70 61 74 68 6e | 61 6d 65 73 20 61 6e 64 |ke pathn|ames and|
|000053c0| 20 6d 61 6b 65 20 73 75 | 72 65 20 74 68 65 79 27 | make su|re they'|
|000053d0| 72 65 20 6e 6f 74 20 77 | 72 69 74 61 62 6c 65 2e |re not w|ritable.|
|000053e0| 0a 23 20 57 69 6c 6c 20 | 72 65 63 75 72 73 65 20 |.# Will |recurse |
|000053f0| 69 66 20 24 72 65 63 75 | 72 73 65 20 69 73 20 73 |if $recu|rse is s|
|00005400| 65 74 2e 20 20 74 68 65 | 20 73 68 65 6c 6c 20 76 |et. the| shell v|
|00005410| 65 72 73 69 6f 6e 20 63 | 61 6e 27 74 20 64 6f 0a |ersion c|an't do.|
|00005420| 23 20 74 68 69 73 20 28 | 79 65 74 29 2e 20 20 63 |# this (|yet). c|
|00005430| 61 6c 6c 20 26 69 67 6e | 6f 72 65 20 77 69 74 68 |all &ign|ore with|
|00005440| 20 6c 69 73 74 20 6f 66 | 20 72 65 67 65 78 70 73 | list of| regexps|
|00005450| 20 74 68 61 74 20 79 6f | 75 20 64 6f 6e 27 74 0a | that yo|u don't.|
|00005460| 23 20 63 61 72 65 20 61 | 62 6f 75 74 2e 20 20 28 |# care a|bout. (|
|00005470| 6f 72 20 73 65 74 20 40 | 69 67 6e 6f 72 65 73 29 |or set @|ignores)|
|00005480| 0a 23 0a 23 20 6f 72 69 | 67 69 6e 61 6c 6c 79 20 |.#.# ori|ginally |
|00005490| 62 79 20 54 6f 6d 20 43 | 68 72 69 73 74 69 61 6e |by Tom C|hristian|
|000054a0| 73 65 6e 20 3c 74 63 68 | 72 69 73 74 40 63 6f 6e |sen <tch|rist@con|
|000054b0| 76 65 78 2e 63 6f 6d 3e | 0a 23 20 73 69 6e 63 65 |vex.com>|.# since|
|000054c0| 20 68 61 63 6b 65 64 20 | 6f 6e 20 62 79 20 70 61 | hacked |on by pa|
|000054d0| 72 74 69 65 73 20 76 61 | 72 69 6f 75 73 20 61 6e |rties va|rious an|
|000054e0| 64 20 73 75 6e 64 72 79 | 2e 0a 58 0a 72 65 71 75 |d sundry|..X.requ|
|000054f0| 69 72 65 20 27 69 73 5f | 61 62 6c 65 2e 70 6c 27 |ire 'is_|able.pl'|
|00005500| 3b 0a 72 65 71 75 69 72 | 65 20 27 66 69 6c 65 5f |;.requir|e 'file_|
|00005510| 6d 6f 64 65 2e 70 6c 27 | 3b 0a 72 65 71 75 69 72 |mode.pl'|;.requir|
|00005520| 65 20 27 70 61 74 68 63 | 6f 6e 66 2e 70 6c 27 3b |e 'pathc|onf.pl';|
|00005530| 0a 58 0a 70 61 63 6b 61 | 67 65 20 63 68 6b 5f 73 |.X.packa|ge chk_s|
|00005540| 74 72 69 6e 67 73 3b 0a | 58 0a 58 0a 24 27 53 54 |trings;.|X.X.$'ST|
|00005550| 52 49 4e 47 53 20 3d 20 | 24 27 53 54 52 49 4e 47 |RINGS = |$'STRING|
|00005560| 53 20 7c 7c 20 27 2f 75 | 73 72 2f 75 63 62 2f 73 |S || '/u|sr/ucb/s|
|00005570| 74 72 69 6e 67 73 27 3b | 0a 58 0a 66 6f 72 20 28 |trings';|.X.for (|
|00005580| 20 27 2f 64 65 76 2f 6e | 75 6c 6c 27 2c 20 27 2f | '/dev/n|ull', '/|
|00005590| 64 65 76 2f 74 74 79 27 | 20 29 20 7b 0a 58 20 20 |dev/tty'| ) {.X |
|000055a0| 20 20 24 73 65 65 6e 7b | 24 5f 7d 2b 2b 3b 0a 7d | $seen{|$_}++;.}|
|000055b0| 20 0a 58 0a 73 75 62 20 | 6d 61 69 6e 27 63 68 6b | .X.sub |main'chk|
|000055c0| 5f 73 74 72 69 6e 67 73 | 20 7b 0a 58 20 20 20 20 |_strings| {.X |
|000055d0| 6c 6f 63 61 6c 28 24 41 | 52 47 56 29 20 3d 20 40 |local($A|RGV) = @|
|000055e0| 5f 3b 0a 58 20 20 20 20 | 6c 6f 63 61 6c 28 24 5f |_;.X |local($_|
|000055f0| 29 3b 0a 58 20 20 20 20 | 6c 6f 63 61 6c 28 24 77 |);.X |local($w|
|00005600| 6f 72 64 29 3b 0a 58 20 | 20 20 20 6c 6f 63 61 6c |ord);.X | local|
|00005610| 28 2a 53 54 52 49 4e 47 | 53 29 3b 20 20 23 20 58 |(*STRING|S); # X|
|00005620| 58 58 3a 20 6d 69 67 68 | 74 20 72 75 6e 20 6f 75 |XX: migh|t run ou|
|00005630| 74 20 6f 66 20 66 64 27 | 73 20 6f 6e 20 64 65 65 |t of fd'|s on dee|
|00005640| 70 20 72 65 63 75 72 73 | 69 6f 6e 21 20 20 2d 74 |p recurs|ion! -t|
|00005650| 63 68 72 69 73 74 0a 58 | 20 20 20 20 6c 6f 63 61 |christ.X| loca|
|00005660| 6c 28 25 70 61 74 68 73 | 2c 20 24 74 65 78 74 29 |l(%paths|, $text)|
|00005670| 3b 20 0a 58 20 20 20 20 | 6c 6f 63 61 6c 28 24 53 |; .X |local($S|
|00005680| 54 52 49 4e 47 53 29 20 | 3d 20 22 24 27 53 54 52 |TRINGS) |= "$'STR|
|00005690| 49 4e 47 53 20 24 41 52 | 47 56 20 7c 22 3b 0a 58 |INGS $AR|GV |";.X|
|000056a0| 0a 58 20 20 20 20 26 69 | 67 6e 6f 72 65 28 40 69 |.X &i|gnore(@i|
|000056b0| 67 6e 6f 72 65 73 29 20 | 69 66 20 64 65 66 69 6e |gnores) |if defin|
|000056c0| 65 64 20 40 69 67 6e 6f | 72 65 73 20 26 26 20 21 |ed @igno|res && !|
|000056d0| 24 61 6c 72 65 61 64 79 | 5f 69 67 6e 6f 72 65 64 |$already|_ignored|
|000056e0| 3b 0a 58 0a 58 20 20 20 | 20 24 53 54 52 49 4e 47 |;.X.X | $STRING|
|000056f0| 53 3d 22 3c 20 24 41 52 | 47 56 22 2c 20 24 74 65 |S="< $AR|GV", $te|
|00005700| 78 74 3d 31 20 69 66 20 | 2d 54 20 24 41 52 47 56 |xt=1 if |-T $ARGV|
|00005710| 3b 0a 58 20 20 20 20 70 | 72 69 6e 74 20 22 4f 70 |;.X p|rint "Op|
|00005720| 65 6e 69 6e 67 20 76 69 | 61 3a 20 24 53 54 52 49 |ening vi|a: $STRI|
|00005730| 4e 47 53 5c 6e 22 20 69 | 66 20 24 64 65 62 75 67 |NGS\n" i|f $debug|
|00005740| 3b 0a 58 0a 58 20 20 20 | 20 6f 70 65 6e 20 28 53 |;.X.X | open (S|
|00005750| 54 52 49 4e 47 53 2c 20 | 24 53 54 52 49 4e 47 53 |TRINGS, |$STRINGS|
|00005760| 29 3b 20 0a 58 20 20 20 | 20 77 68 69 6c 65 20 28 |); .X | while (|
|00005770| 3c 53 54 52 49 4e 47 53 | 3e 29 20 7b 20 0a 58 09 |<STRINGS|>) { .X.|
|00005780| 6e 65 78 74 20 75 6e 6c | 65 73 73 20 6d 23 2f 23 |next unl|ess m#/#|
|00005790| 3b 20 20 20 23 20 77 61 | 73 20 6d 23 2f 2e 2a 2f |; # wa|s m#/.*/|
|000057a0| 23 3b 0a 23 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |#;.#----|--------|
|000057b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000057c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000057d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000057e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0a |--------|-------.|
|000057f0| 23 20 43 6f 6d 6d 65 6e | 74 73 20 61 6e 64 20 6d |# Commen|ts and m|
|00005800| 6f 64 69 66 69 63 61 74 | 69 6f 6e 73 20 62 79 20 |odificat|ions by |
|00005810| 4d 61 72 74 69 6e 20 46 | 6f 6f 72 64 20 28 6d 61 |Martin F|oord (ma|
|00005820| 66 25 64 62 73 6d 2e 6f | 7a 2e 61 75 40 6d 75 6e |f%dbsm.o|z.au@mun|
|00005830| 6e 61 72 69 2e 6f 7a 2e | 61 75 29 2e 0a 58 09 23 |nari.oz.|au)..X.#|
|00005840| 73 2f 23 2e 2a 24 2f 2f | 20 69 66 20 24 74 65 78 |s/#.*$//| if $tex|
|00005850| 74 3b 20 20 23 20 73 74 | 72 69 70 20 6f 75 74 20 |t; # st|rip out |
|00005860| 63 6f 6d 6d 65 6e 74 73 | 20 69 66 20 2d 54 20 66 |comments| if -T f|
|00005870| 69 6c 65 0a 58 09 23 20 | 43 6f 6d 6d 65 6e 74 73 |ile.X.# |Comments|
|00005880| 20 73 74 61 72 74 20 69 | 6e 20 74 68 65 20 73 68 | start i|n the sh|
|00005890| 65 6c 6c 20 61 74 20 74 | 68 65 20 62 65 67 69 6e |ell at t|he begin|
|000058a0| 6e 69 6e 67 20 6f 66 20 | 61 20 77 6f 72 64 20 6f |ning of |a word o|
|000058b0| 72 20 61 74 20 74 68 65 | 0a 58 09 23 20 62 65 67 |r at the|.X.# beg|
|000058c0| 67 69 6e 69 6e 67 20 6f | 66 20 61 20 6c 69 6e 65 |gining o|f a line|
|000058d0| 0a 58 09 69 66 20 28 24 | 74 65 78 74 29 20 7b 0a |.X.if ($|text) {.|
|000058e0| 58 09 09 73 2f 5c 73 2b | 23 2e 2a 24 2f 2f 3b 0a |X..s/\s+|#.*$//;.|
|000058f0| 58 09 09 73 2f 5e 23 2e | 2a 24 2f 2f 3b 0a 58 09 |X..s/^#.|*$//;.X.|
|00005900| 7d 0a 58 0a 58 09 23 20 | 47 65 74 20 72 69 64 20 |}.X.X.# |Get rid |
|00005910| 6f 66 20 73 65 6d 69 63 | 6f 6c 6f 6e 73 2c 20 74 |of semic|olons, t|
|00005920| 68 65 79 20 63 61 6e 20 | 68 61 6e 67 20 61 72 6f |hey can |hang aro|
|00005930| 75 6e 64 20 6f 6e 20 66 | 69 6c 65 6e 61 6d 65 73 |und on f|ilenames|
|00005940| 20 2e 2e 2e 0a 58 09 73 | 2f 3b 2f 2f 67 3b 0a 23 | ....X.s|/;//g;.#|
|00005950| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005960| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005970| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005980| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005990| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0a 58 0a 58 09 |--------|---.X.X.|
|000059a0| 73 2f 22 28 5b 5e 22 5d | 2a 29 22 2f 20 24 31 20 |s/"([^"]|*)"/ $1 |
|000059b0| 2f 67 3b 0a 58 09 73 2f | 27 28 5b 5e 27 5d 2a 29 |/g;.X.s/|'([^']*)|
|000059c0| 27 2f 20 24 31 20 2f 67 | 3b 0a 58 09 23 20 53 65 |'/ $1 /g|;.X.# Se|
|000059d0| 65 20 6d 79 20 63 6f 6d | 6d 65 6e 74 73 20 62 65 |e my com|ments be|
|000059e0| 6c 6f 77 20 6f 6e 20 68 | 6f 77 20 74 6f 20 64 65 |low on h|ow to de|
|000059f0| 61 6c 20 77 69 74 68 20 | 74 68 69 73 20 73 74 75 |al with |this stu|
|00005a00| 66 66 20 2e 2e 2e 20 28 | 6c 69 6e 65 20 36 34 29 |ff ... (|line 64)|
|00005a10| 2e 0a 58 09 23 73 2f 60 | 28 5b 5e 60 5d 2a 29 60 |..X.#s/`|([^`]*)`|
|00005a20| 2f 20 24 31 20 2f 67 3b | 0a 58 0a 58 0a 58 09 73 |/ $1 /g;|.X.X.X.s|
|00005a30| 21 28 5b 3c 3e 5d 29 5c | 73 2b 2f 21 24 31 2f 21 |!([<>])\|s+/!$1/!|
|00005a40| 67 3b 20 20 23 20 22 3e | 20 2f 66 6f 6f 22 20 67 |g; # ">| /foo" g|
|00005a50| 6f 65 73 20 74 6f 20 22 | 3e 2f 66 6f 6f 22 3b 0a |oes to "|>/foo";.|
|00005a60| 58 0a 58 09 73 2f 3d 2f | 20 2f 67 3b 20 20 23 20 |X.X.s/=/| /g; # |
|00005a70| 77 61 72 6e 69 6e 67 20 | 2d 2d 20 6d 61 6e 67 6c |warning |-- mangl|
|00005a80| 65 64 20 66 69 6c 65 73 | 20 77 69 74 68 20 3d 20 |ed files| with = |
|00005a90| 69 6e 20 74 68 65 6d 0a | 58 09 66 6f 72 20 24 77 |in them.|X.for $w|
|00005aa0| 6f 72 64 20 28 73 70 6c | 69 74 29 20 7b 0a 58 09 |ord (spl|it) {.X.|
|00005ab0| 20 20 20 20 69 66 20 28 | 24 77 6f 72 64 20 3d 7e | if (|$word =~|
|00005ac0| 20 6d 23 3a 2f 23 29 20 | 7b 0a 58 09 09 70 72 69 | m#:/#) |{.X..pri|
|00005ad0| 6e 74 20 22 70 75 73 68 | 20 24 77 6f 72 64 20 28 |nt "push| $word (|
|00005ae0| 73 70 6c 69 74 20 6f 6e | 20 74 68 65 20 63 6f 6c |split on| the col|
|00005af0| 6f 6e 73 29 5c 6e 22 20 | 69 66 20 24 64 65 62 75 |ons)\n" |if $debu|
|00005b00| 67 3b 0a 58 09 09 40 70 | 61 74 68 73 7b 73 70 6c |g;.X..@p|aths{spl|
|00005b10| 69 74 28 2f 3a 2f 2c 20 | 24 77 6f 72 64 29 7d 20 |it(/:/, |$word)} |
|00005b20| 3d 20 28 29 3b 0a 58 09 | 20 20 20 20 7d 20 65 6c |= ();.X.| } el|
|00005b30| 73 69 66 20 28 24 77 6f | 72 64 20 3d 7e 20 6d 23 |sif ($wo|rd =~ m#|
|00005b40| 5e 5b 3c 3e 5d 3f 2f 23 | 29 20 7b 0a 58 09 09 70 |^[<>]?/#|) {.X..p|
|00005b50| 72 69 6e 74 20 22 70 75 | 73 68 20 24 77 6f 72 64 |rint "pu|sh $word|
|00005b60| 5c 6e 22 20 69 66 20 24 | 64 65 62 75 67 3b 0a 58 |\n" if $|debug;.X|
|00005b70| 09 09 24 70 61 74 68 73 | 7b 24 77 6f 72 64 7d 2b |..$paths|{$word}+|
|00005b80| 2b 3b 0a 58 09 20 20 20 | 20 7d 0a 58 09 7d 0a 58 |+;.X. | }.X.}.X|
|00005b90| 20 20 20 20 7d 0a 58 20 | 20 20 20 63 6c 6f 73 65 | }.X | close|
|00005ba0| 20 28 53 54 52 49 4e 47 | 53 29 3b 0a 58 20 20 20 | (STRING|S);.X |
|00005bb0| 20 70 75 73 68 28 40 66 | 69 6c 65 73 2c 20 24 41 | push(@f|iles, $A|
|00005bc0| 52 47 56 29 3b 0a 58 0a | 58 20 20 20 20 66 6f 72 |RGV);.X.|X for|
|00005bd0| 20 28 6b 65 79 73 20 25 | 70 61 74 68 73 29 20 7b | (keys %|paths) {|
|00005be0| 0a 58 09 73 2f 5c 29 24 | 2f 2f 3b 0a 58 09 73 2f |.X.s/\)$|//;.X.s/|
|00005bf0| 5e 5c 28 2f 2f 3b 0a 58 | 09 73 23 5e 2f 2b 23 2f |^\(//;.X|.s#^/+#/|
|00005c00| 23 3b 0a 58 09 73 23 5e | 28 2f 2e 2a 29 2f 24 23 |#;.X.s#^|(/.*)/$#|
|00005c10| 24 31 23 3b 09 20 20 20 | 20 23 20 67 65 74 20 72 |$1#;. | # get r|
|00005c20| 69 64 20 6f 66 20 74 72 | 61 69 6c 69 6e 67 20 73 |id of tr|ailing s|
|00005c30| 6c 61 73 68 0a 58 0a 23 | 2d 2d 2d 2d 2d 2d 2d 2d |lash.X.#|--------|
|00005c40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005c50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005c60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005c70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005c80| 2d 2d 2d 0a 23 20 43 6f | 6d 6d 65 6e 74 73 20 61 |---.# Co|mments a|
|00005c90| 6e 64 20 6d 6f 64 69 66 | 69 63 61 74 69 6f 6e 73 |nd modif|ications|
|00005ca0| 20 62 79 20 4d 61 72 74 | 69 6e 20 46 6f 6f 72 64 | by Mart|in Foord|
|00005cb0| 20 28 6d 61 66 25 64 62 | 73 6d 2e 6f 7a 2e 61 75 | (maf%db|sm.oz.au|
|00005cc0| 40 6d 75 6e 6e 61 72 69 | 2e 6f 7a 2e 61 75 29 2e |@munnari|.oz.au).|
|00005cd0| 0a 58 09 23 20 49 74 27 | 73 20 62 65 73 74 20 74 |.X.# It'|s best t|
|00005ce0| 6f 20 65 76 61 6c 75 61 | 74 65 20 77 68 61 74 27 |o evalua|te what'|
|00005cf0| 73 20 69 6e 20 62 61 63 | 6b 71 75 6f 74 65 73 20 |s in bac|kquotes |
|00005d00| 72 61 74 68 65 72 20 74 | 68 61 6e 20 72 65 6d 6f |rather t|han remo|
|00005d10| 76 65 20 74 68 65 6d 0a | 58 09 23 20 61 73 20 69 |ve them.|X.# as i|
|00005d20| 6e 20 74 68 65 20 73 75 | 62 73 74 69 74 75 74 69 |n the su|bstituti|
|00005d30| 6f 6e 20 61 62 6f 76 65 | 2c 20 64 75 65 20 74 6f |on above|, due to|
|00005d40| 20 66 69 6c 65 73 20 77 | 68 69 63 68 0a 58 09 23 | files w|hich.X.#|
|00005d50| 20 6c 6f 6f 6b 20 6c 69 | 6b 65 20 74 68 69 73 20 | look li|ke this |
|00005d60| 2f 76 61 72 2f 79 70 2f | 60 64 6f 6d 61 69 6e 6e |/var/yp/|`domainn|
|00005d70| 61 6d 65 60 20 28 65 67 | 20 69 6e 20 6d 79 20 2f |ame` (eg| in my /|
|00005d80| 65 74 63 2f 72 63 2e 6c | 6f 63 61 6c 29 2e 0a 58 |etc/rc.l|ocal)..X|
|00005d90| 09 73 60 5c 60 28 2e 2b | 29 5c 60 60 24 31 60 3b |.s`\`(.+|)\``$1`;|
|00005da0| 20 23 20 65 76 61 6c 20 | 77 68 61 74 27 73 20 69 | # eval |what's i|
|00005db0| 6e 20 62 61 63 6b 71 75 | 6f 74 65 73 2e 0a 58 09 |n backqu|otes..X.|
|00005dc0| 63 68 6f 70 20 69 66 20 | 2f 5c 6e 24 2f 3b 09 23 |chop if |/\n$/;.#|
|00005dd0| 20 66 61 6e 67 20 6f 66 | 66 20 5c 6e 20 69 66 20 | fang of|f \n if |
|00005de0| 74 68 65 72 65 20 2e 2e | 2e 0a 23 2d 2d 2d 2d 2d |there ..|..#-----|
|00005df0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005e00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005e10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005e20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005e30| 2d 2d 2d 2d 2d 2d 0a 58 | 09 6e 65 78 74 20 69 66 |------.X|.next if|
|00005e40| 20 26 69 67 6e 6f 72 65 | 64 28 24 5f 29 3b 0a 58 | &ignore|d($_);.X|
|00005e50| 09 73 2f 5e 5b 3c 3e 5d | 2f 2f 3b 0a 58 09 6e 65 |.s/^[<>]|//;.X.ne|
|00005e60| 78 74 20 69 66 20 24 5f | 20 65 71 20 27 27 3b 0a |xt if $_| eq '';.|
|00005e70| 58 09 6e 65 78 74 20 75 | 6e 6c 65 73 73 20 21 24 |X.next u|nless !$|
|00005e80| 73 65 65 6e 7b 24 5f 7d | 2b 2b 20 26 26 20 2d 65 |seen{$_}|++ && -e|
|00005e90| 20 26 26 20 21 2d 53 20 | 5f 3b 0a 58 09 70 72 69 | && !-S |_;.X.pri|
|00005ea0| 6e 74 20 22 63 68 65 63 | 6b 69 6e 67 20 24 5f 5c |nt "chec|king $_\|
|00005eb0| 6e 22 20 69 66 20 24 64 | 65 62 75 67 3b 0a 58 09 |n" if $d|ebug;.X.|
|00005ec0| 69 66 20 28 24 68 6f 77 | 20 3d 20 26 27 69 73 5f |if ($how| = &'is_|
|00005ed0| 77 72 69 74 61 62 6c 65 | 28 24 5f 29 29 20 7b 0a |writable|($_)) {.|
|00005ee0| 58 09 20 20 20 20 70 72 | 69 6e 74 20 22 57 61 72 |X. pr|int "War|
|00005ef0| 6e 69 6e 67 21 20 20 46 | 69 6c 65 20 24 5f 20 28 |ning! F|ile $_ (|
|00005f00| 69 6e 73 69 64 65 20 22 | 2c 0a 58 09 09 09 6a 6f |inside "|,.X...jo|
|00005f10| 69 6e 28 27 20 69 6e 73 | 69 64 65 20 27 2c 20 72 |in(' ins|ide ', r|
|00005f20| 65 76 65 72 73 65 20 40 | 66 69 6c 65 73 29 2c 20 |everse @|files), |
|00005f30| 22 29 20 69 73 20 5f 57 | 6f 72 6c 64 5f 20 24 68 |") is _W|orld_ $h|
|00005f40| 6f 77 21 5c 6e 22 3b 0a | 58 09 7d 20 65 6c 73 69 |ow!\n";.|X.} elsi|
|00005f50| 66 20 28 24 72 65 63 75 | 72 73 65 20 26 26 20 28 |f ($recu|rse && (|
|00005f60| 26 27 4d 6f 64 65 28 24 | 5f 29 20 26 20 30 31 31 |&'Mode($|_) & 011|
|00005f70| 31 29 20 26 26 20 2d 66 | 20 5f 29 20 7b 0a 58 09 |1) && -f| _) {.X.|
|00005f80| 20 20 20 20 20 70 72 69 | 6e 74 20 22 72 65 63 75 | pri|nt "recu|
|00005f90| 72 73 69 6e 67 20 24 5f | 5c 6e 22 20 69 66 20 24 |rsing $_|\n" if $|
|00005fa0| 64 65 62 75 67 3b 0a 58 | 09 20 20 20 20 20 26 27 |debug;.X|. &'|
|00005fb0| 63 68 6b 5f 73 74 72 69 | 6e 67 73 28 24 5f 29 3b |chk_stri|ngs($_);|
|00005fc0| 20 20 20 0a 58 09 7d 20 | 0a 58 20 20 20 20 7d 0a | .X.} |.X }.|
|00005fd0| 58 20 20 20 20 20 70 6f | 70 28 40 66 69 6c 65 73 |X po|p(@files|
|00005fe0| 29 3b 0a 7d 20 0a 58 0a | 73 75 62 20 69 67 6e 6f |);.} .X.|sub igno|
|00005ff0| 72 65 20 7b 0a 58 20 20 | 20 20 6c 6f 63 61 6c 28 |re {.X | local(|
|00006000| 24 5f 29 3b 0a 58 20 20 | 20 20 6c 6f 63 61 6c 28 |$_);.X | local(|
|00006010| 24 70 72 6f 67 29 3b 0a | 58 0a 58 20 20 20 20 24 |$prog);.|X.X $|
|00006020| 61 6c 72 65 61 64 79 5f | 69 67 6e 6f 72 65 64 20 |already_|ignored |
|00006030| 3d 20 31 3b 0a 58 0a 58 | 20 20 20 20 24 70 72 6f |= 1;.X.X| $pro|
|00006040| 67 20 3d 20 3c 3c 27 45 | 4f 43 4f 44 45 27 3b 0a |g = <<'E|OCODE';.|
|00006050| 58 0a 73 75 62 20 69 67 | 6e 6f 72 65 64 20 7b 0a |X.sub ig|nored {.|
|00006060| 58 20 20 20 20 6c 6f 63 | 61 6c 28 24 72 65 74 75 |X loc|al($retu|
|00006070| 72 6e 29 20 3d 20 31 3b | 0a 58 20 20 20 20 6c 6f |rn) = 1;|.X lo|
|00006080| 63 61 6c 28 24 70 72 6f | 67 29 3b 0a 58 20 20 20 |cal($pro|g);.X |
|00006090| 20 6c 6f 63 61 6c 28 24 | 5f 29 20 3d 20 40 5f 3b | local($|_) = @_;|
|000060a0| 0a 58 20 20 20 20 7b 0a | 45 4f 43 4f 44 45 0a 58 |.X {.|EOCODE.X|
|000060b0| 20 20 20 20 66 6f 72 20 | 28 40 5f 29 20 7b 0a 58 | for |(@_) {.X|
|000060c0| 09 24 70 72 6f 67 20 2e | 3d 20 22 5c 74 6c 61 73 |.$prog .|= "\tlas|
|000060d0| 74 20 69 66 20 6d 5c 32 | 30 31 24 7b 5f 7d 5c 32 |t if m\2|01${_}\2|
|000060e0| 30 31 3b 5c 6e 22 3b 0a | 58 20 20 20 20 7d 20 0a |01;\n";.|X } .|
|000060f0| 58 20 20 20 20 24 70 72 | 6f 67 20 2e 3d 20 3c 3c |X $pr|og .= <<|
|00006100| 27 45 4f 43 4f 44 45 27 | 3b 0a 58 09 24 72 65 74 |'EOCODE'|;.X.$ret|
|00006110| 75 72 6e 20 3d 20 30 3b | 0a 58 20 20 20 20 7d 0a |urn = 0;|.X }.|
|00006120| 58 20 20 20 20 70 72 69 | 6e 74 20 22 24 5f 20 49 |X pri|nt "$_ I|
|00006130| 47 4e 4f 52 45 44 5c 6e | 22 20 69 66 20 24 64 65 |GNORED\n|" if $de|
|00006140| 62 75 67 20 26 26 20 24 | 72 65 74 75 72 6e 3b 0a |bug && $|return;.|
|00006150| 58 20 20 20 20 24 72 65 | 74 75 72 6e 3b 0a 7d 0a |X $re|turn;.}.|
|00006160| 45 4f 43 4f 44 45 0a 58 | 20 20 20 20 0a 58 20 20 |EOCODE.X| .X |
|00006170| 20 20 70 72 69 6e 74 20 | 24 70 72 6f 67 20 69 66 | print |$prog if|
|00006180| 20 24 64 65 62 75 67 3b | 0a 58 20 20 20 20 65 76 | $debug;|.X ev|
|00006190| 61 6c 20 24 70 72 6f 67 | 3b 0a 58 20 20 20 20 64 |al $prog|;.X d|
|000061a0| 69 65 20 24 40 20 69 66 | 20 24 40 3b 0a 7d 20 0a |ie $@ if| $@;.} .|
|000061b0| 58 0a 73 75 62 20 69 67 | 6e 6f 72 65 64 20 7b 7d |X.sub ig|nored {}|
|000061c0| 3b 20 23 20 69 6e 20 63 | 61 73 65 20 74 68 65 79 |; # in c|ase they|
|000061d0| 20 6e 65 76 65 72 20 69 | 67 6e 6f 72 65 20 61 6e | never i|gnore an|
|000061e0| 79 74 68 69 6e 67 0a 58 | 0a 31 3b 0a 53 48 41 52 |ything.X|.1;.SHAR|
|000061f0| 5f 45 4f 46 0a 63 68 6d | 6f 64 20 30 37 30 30 20 |_EOF.chm|od 0700 |
|00006200| 62 65 74 61 2f 63 68 6b | 5f 73 74 72 69 6e 67 73 |beta/chk|_strings|
|00006210| 2e 70 6c 20 7c 7c 0a 65 | 63 68 6f 20 27 72 65 73 |.pl ||.e|cho 'res|
|00006220| 74 6f 72 65 20 6f 66 20 | 62 65 74 61 2f 63 68 6b |tore of |beta/chk|
|00006230| 5f 73 74 72 69 6e 67 73 | 2e 70 6c 20 66 61 69 6c |_strings|.pl fail|
|00006240| 65 64 27 0a 57 63 5f 63 | 3d 22 60 77 63 20 2d 63 |ed'.Wc_c|="`wc -c|
|00006250| 20 3c 20 27 62 65 74 61 | 2f 63 68 6b 5f 73 74 72 | < 'beta|/chk_str|
|00006260| 69 6e 67 73 2e 70 6c 27 | 60 22 0a 74 65 73 74 20 |ings.pl'|`".test |
|00006270| 33 36 31 36 20 2d 65 71 | 20 22 24 57 63 5f 63 22 |3616 -eq| "$Wc_c"|
|00006280| 20 7c 7c 0a 09 65 63 68 | 6f 20 27 62 65 74 61 2f | ||..ech|o 'beta/|
|00006290| 63 68 6b 5f 73 74 72 69 | 6e 67 73 2e 70 6c 3a 20 |chk_stri|ngs.pl: |
|000062a0| 6f 72 69 67 69 6e 61 6c | 20 73 69 7a 65 20 33 36 |original| size 36|
|000062b0| 31 36 2c 20 63 75 72 72 | 65 6e 74 20 73 69 7a 65 |16, curr|ent size|
|000062c0| 27 20 22 24 57 63 5f 63 | 22 0a 72 6d 20 2d 66 20 |' "$Wc_c|".rm -f |
|000062d0| 5f 73 68 61 72 5f 77 6e | 74 5f 2e 74 6d 70 0a 66 |_shar_wn|t_.tmp.f|
|000062e0| 69 0a 23 20 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |i.# ====|========|
|000062f0| 3d 20 62 65 74 61 2f 63 | 6f 70 73 20 3d 3d 3d 3d |= beta/c|ops ====|
|00006300| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 0a 69 66 20 74 65 |========|==.if te|
|00006310| 73 74 20 2d 66 20 27 62 | 65 74 61 2f 63 6f 70 73 |st -f 'b|eta/cops|
|00006320| 27 20 2d 61 20 58 22 24 | 31 22 20 21 3d 20 58 22 |' -a X"$|1" != X"|
|00006330| 2d 63 22 3b 20 74 68 65 | 6e 0a 09 65 63 68 6f 20 |-c"; the|n..echo |
|00006340| 27 78 20 2d 20 73 6b 69 | 70 70 69 6e 67 20 62 65 |'x - ski|pping be|
|00006350| 74 61 2f 63 6f 70 73 20 | 28 46 69 6c 65 20 61 6c |ta/cops |(File al|
|00006360| 72 65 61 64 79 20 65 78 | 69 73 74 73 29 27 0a 09 |ready ex|ists)'..|
|00006370| 72 6d 20 2d 66 20 5f 73 | 68 61 72 5f 77 6e 74 5f |rm -f _s|har_wnt_|
|00006380| 2e 74 6d 70 0a 65 6c 73 | 65 0a 3e 20 5f 73 68 61 |.tmp.els|e.> _sha|
|00006390| 72 5f 77 6e 74 5f 2e 74 | 6d 70 0a 65 63 68 6f 20 |r_wnt_.t|mp.echo |
|000063a0| 27 78 20 2d 20 65 78 74 | 72 61 63 74 69 6e 67 20 |'x - ext|racting |
|000063b0| 62 65 74 61 2f 63 6f 70 | 73 20 28 54 65 78 74 29 |beta/cop|s (Text)|
|000063c0| 27 0a 73 65 64 20 27 73 | 2f 5e 58 2f 2f 27 20 3c |'.sed 's|/^X//' <|
|000063d0| 3c 20 27 53 48 41 52 5f | 45 4f 46 27 20 3e 20 27 |< 'SHAR_|EOF' > '|
|000063e0| 62 65 74 61 2f 63 6f 70 | 73 27 20 26 26 0a 23 21 |beta/cop|s' &&.#!|
|000063f0| 2f 62 69 6e 2f 73 68 20 | 2d 2d 20 6e 65 65 64 20 |/bin/sh |-- need |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.