home *** CD-ROM | disk | FTP | other *** search
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).
Confidence | Program | Detection | Match Type | Support
|
---|
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%
| 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| 53 75 62 6a 65 63 74 3a | 20 20 76 32 33 69 30 33 |Subject:| v23i03|
|00000010| 32 3a 20 20 52 75 6e 20 | 61 20 70 72 6f 67 72 61 |2: Run |a progra|
|00000020| 6d 20 75 6e 64 65 72 20 | 61 20 70 74 79 20 73 65 |m under |a pty se|
|00000030| 73 73 69 6f 6e 2c 20 50 | 61 72 74 30 32 2f 30 36 |ssion, P|art02/06|
|00000040| 0a 4e 65 77 73 67 72 6f | 75 70 73 3a 20 63 6f 6d |.Newsgro|ups: com|
|00000050| 70 2e 73 6f 75 72 63 65 | 73 2e 75 6e 69 78 0a 41 |p.source|s.unix.A|
|00000060| 70 70 72 6f 76 65 64 3a | 20 72 73 61 6c 7a 40 75 |pproved:| rsalz@u|
|00000070| 75 6e 65 74 2e 55 55 2e | 4e 45 54 0a 58 2d 43 68 |unet.UU.|NET.X-Ch|
|00000080| 65 63 6b 73 75 6d 2d 53 | 6e 65 66 72 75 3a 20 36 |ecksum-S|nefru: 6|
|00000090| 66 65 31 61 30 38 34 20 | 36 34 64 38 33 63 31 34 |fe1a084 |64d83c14|
|000000a0| 20 61 63 33 39 63 33 37 | 65 20 62 66 35 32 64 39 | ac39c37|e bf52d9|
|000000b0| 66 33 0a 0a 53 75 62 6d | 69 74 74 65 64 2d 62 79 |f3..Subm|itted-by|
|000000c0| 3a 20 44 61 6e 20 42 65 | 72 6e 73 74 65 69 6e 20 |: Dan Be|rnstein |
|000000d0| 3c 62 72 6e 73 74 6e 64 | 40 6b 72 61 6d 64 65 6e |<brnstnd|@kramden|
|000000e0| 2e 61 63 66 2e 6e 79 75 | 2e 65 64 75 3e 0a 50 6f |.acf.nyu|.edu>.Po|
|000000f0| 73 74 69 6e 67 2d 6e 75 | 6d 62 65 72 3a 20 56 6f |sting-nu|mber: Vo|
|00000100| 6c 75 6d 65 20 32 33 2c | 20 49 73 73 75 65 20 33 |lume 23,| Issue 3|
|00000110| 32 0a 41 72 63 68 69 76 | 65 2d 6e 61 6d 65 3a 20 |2.Archiv|e-name: |
|00000120| 70 74 79 2f 70 61 72 74 | 30 32 0a 0a 23 21 20 2f |pty/part|02..#! /|
|00000130| 62 69 6e 2f 73 68 0a 23 | 20 54 68 69 73 20 69 73 |bin/sh.#| This is|
|00000140| 20 61 20 73 68 65 6c 6c | 20 61 72 63 68 69 76 65 | a shell| archive|
|00000150| 2e 20 20 52 65 6d 6f 76 | 65 20 61 6e 79 74 68 69 |. Remov|e anythi|
|00000160| 6e 67 20 62 65 66 6f 72 | 65 20 74 68 69 73 20 6c |ng befor|e this l|
|00000170| 69 6e 65 2c 20 74 68 65 | 6e 20 66 65 65 64 20 69 |ine, the|n feed i|
|00000180| 74 0a 23 20 69 6e 74 6f | 20 61 20 73 68 65 6c 6c |t.# into| a shell|
|00000190| 20 76 69 61 20 22 73 68 | 20 66 69 6c 65 22 20 6f | via "sh| file" o|
|000001a0| 72 20 73 69 6d 69 6c 61 | 72 2e 20 20 54 6f 20 6f |r simila|r. To o|
|000001b0| 76 65 72 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |verwrite| existin|
|000001c0| 67 20 66 69 6c 65 73 2c | 0a 23 20 74 79 70 65 20 |g files,|.# type |
|000001d0| 22 73 68 20 66 69 6c 65 | 20 2d 63 22 2e 0a 23 20 |"sh file| -c"..# |
|000001e0| 54 68 65 20 74 6f 6f 6c | 20 74 68 61 74 20 67 65 |The tool| that ge|
|000001f0| 6e 65 72 61 74 65 64 20 | 74 68 69 73 20 61 70 70 |nerated |this app|
|00000200| 65 61 72 65 64 20 69 6e | 20 74 68 65 20 63 6f 6d |eared in| the com|
|00000210| 70 2e 73 6f 75 72 63 65 | 73 2e 75 6e 69 78 20 6e |p.source|s.unix n|
|00000220| 65 77 73 67 72 6f 75 70 | 3b 0a 23 20 73 65 6e 64 |ewsgroup|;.# send|
|00000230| 20 6d 61 69 6c 20 74 6f | 20 63 6f 6d 70 2d 73 6f | mail to| comp-so|
|00000240| 75 72 63 65 73 2d 75 6e | 69 78 40 75 75 6e 65 74 |urces-un|ix@uunet|
|00000250| 2e 75 75 2e 6e 65 74 20 | 69 66 20 79 6f 75 20 77 |.uu.net |if you w|
|00000260| 61 6e 74 20 74 68 61 74 | 20 74 6f 6f 6c 2e 0a 23 |ant that| tool..#|
|00000270| 20 43 6f 6e 74 65 6e 74 | 73 3a 20 20 49 4e 53 54 | Content|s: INST|
|00000280| 41 4c 4c 52 45 41 44 41 | 42 4c 45 20 6d 61 73 74 |ALLREADA|BLE mast|
|00000290| 65 72 2e 63 20 70 74 79 | 2e 63 0a 23 20 57 72 61 |er.c pty|.c.# Wra|
|000002a0| 70 70 65 64 20 62 79 20 | 72 73 61 6c 7a 40 6c 69 |pped by |rsalz@li|
|000002b0| 74 63 68 69 2e 62 62 6e | 2e 63 6f 6d 20 6f 6e 20 |tchi.bbn|.com on |
|000002c0| 57 65 64 20 4f 63 74 20 | 31 30 20 31 30 3a 31 31 |Wed Oct |10 10:11|
|000002d0| 3a 33 37 20 31 39 39 30 | 0a 50 41 54 48 3d 2f 62 |:37 1990|.PATH=/b|
|000002e0| 69 6e 3a 2f 75 73 72 2f | 62 69 6e 3a 2f 75 73 72 |in:/usr/|bin:/usr|
|000002f0| 2f 75 63 62 20 3b 20 65 | 78 70 6f 72 74 20 50 41 |/ucb ; e|xport PA|
|00000300| 54 48 0a 65 63 68 6f 20 | 49 66 20 74 68 69 73 20 |TH.echo |If this |
|00000310| 61 72 63 68 69 76 65 20 | 69 73 20 63 6f 6d 70 6c |archive |is compl|
|00000320| 65 74 65 2c 20 79 6f 75 | 20 77 69 6c 6c 20 73 65 |ete, you| will se|
|00000330| 65 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |e the fo|llowing |
|00000340| 6d 65 73 73 61 67 65 3a | 0a 65 63 68 6f 20 27 20 |message:|.echo ' |
|00000350| 20 20 20 20 20 20 20 20 | 20 22 73 68 61 72 3a 20 | | "shar: |
|00000360| 45 6e 64 20 6f 66 20 61 | 72 63 68 69 76 65 20 32 |End of a|rchive 2|
|00000370| 20 28 6f 66 20 36 29 2e | 22 27 0a 69 66 20 74 65 | (of 6).|"'.if te|
|00000380| 73 74 20 2d 66 20 27 49 | 4e 53 54 41 4c 4c 52 45 |st -f 'I|NSTALLRE|
|00000390| 41 44 41 42 4c 45 27 20 | 2d 61 20 22 24 7b 31 7d |ADABLE' |-a "${1}|
|000003a0| 22 20 21 3d 20 22 2d 63 | 22 20 3b 20 74 68 65 6e |" != "-c|" ; then|
|000003b0| 20 0a 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 57 | . echo| shar: W|
|000003c0| 69 6c 6c 20 6e 6f 74 20 | 63 6c 6f 62 62 65 72 20 |ill not |clobber |
|000003d0| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 5c 22 |existing| file \"|
|000003e0| 27 49 4e 53 54 41 4c 4c | 52 45 41 44 41 42 4c 45 |'INSTALL|READABLE|
|000003f0| 27 5c 22 0a 65 6c 73 65 | 0a 20 20 65 63 68 6f 20 |'\".else|. echo |
|00000400| 73 68 61 72 3a 20 45 78 | 74 72 61 63 74 69 6e 67 |shar: Ex|tracting|
|00000410| 20 5c 22 27 49 4e 53 54 | 41 4c 4c 52 45 41 44 41 | \"'INST|ALLREADA|
|00000420| 42 4c 45 27 5c 22 20 5c | 28 32 32 36 32 31 20 63 |BLE'\" \|(22621 c|
|00000430| 68 61 72 61 63 74 65 72 | 73 5c 29 0a 20 20 73 65 |haracter|s\). se|
|00000440| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 49 4e 53 |d "s/^X/|/" >'INS|
|00000450| 54 41 4c 4c 52 45 41 44 | 41 42 4c 45 27 20 3c 3c |TALLREAD|ABLE' <<|
|00000460| 27 45 4e 44 5f 4f 46 5f | 46 49 4c 45 27 0a 58 54 |'END_OF_|FILE'.XT|
|00000470| 68 69 73 20 69 73 20 61 | 20 74 79 70 65 73 63 72 |his is a| typescr|
|00000480| 69 70 74 20 6f 66 20 49 | 4e 53 54 41 4c 4c 20 6f |ipt of I|NSTALL o|
|00000490| 6e 20 61 20 53 75 6e 20 | 34 20 72 75 6e 6e 69 6e |n a Sun |4 runnin|
|000004a0| 67 20 53 75 6e 4f 53 20 | 34 2e 30 2e 33 2e 0a 58 |g SunOS |4.0.3..X|
|000004b0| 49 27 76 65 20 69 6e 73 | 65 72 74 65 64 20 73 6f |I've ins|erted so|
|000004c0| 6d 65 20 66 75 72 74 68 | 65 72 20 63 6f 6d 6d 65 |me furth|er comme|
|000004d0| 6e 74 73 20 61 74 20 73 | 70 6f 74 73 20 77 68 65 |nts at s|pots whe|
|000004e0| 72 65 20 49 4e 53 54 41 | 4c 4c 20 6d 69 67 68 74 |re INSTA|LL might|
|000004f0| 20 67 69 76 65 0a 58 64 | 69 66 66 65 72 65 6e 74 | give.Xd|ifferent|
|00000500| 20 72 65 73 75 6c 74 73 | 20 6f 6e 20 64 69 66 66 | results| on diff|
|00000510| 65 72 65 6e 74 20 6d 61 | 63 68 69 6e 65 73 2e 0a |erent ma|chines..|
|00000520| 58 0a 58 0a 58 0a 58 48 | 69 2c 20 61 6e 64 20 77 |X.X.X.XH|i, and w|
|00000530| 65 6c 63 6f 6d 65 20 74 | 6f 20 74 68 65 20 70 74 |elcome t|o the pt|
|00000540| 79 20 69 6e 73 74 61 6c | 6c 20 73 63 72 69 70 74 |y instal|l script|
|00000550| 2e 0a 58 70 74 79 20 69 | 73 20 61 20 70 72 6f 67 |..Xpty i|s a prog|
|00000560| 72 61 6d 20 66 6f 72 20 | 6d 61 6e 61 67 69 6e 67 |ram for |managing|
|00000570| 20 70 73 65 75 64 6f 2d | 74 65 72 6d 69 6e 61 6c | pseudo-|terminal|
|00000580| 73 2e 0a 58 0a 58 49 27 | 6d 20 6e 6f 74 20 61 63 |s..X.XI'|m not ac|
|00000590| 74 75 61 6c 6c 79 20 67 | 6f 69 6e 67 20 74 6f 20 |tually g|oing to |
|000005a0| 69 6e 73 74 61 6c 6c 20 | 61 6e 79 74 68 69 6e 67 |install |anything|
|000005b0| 2e 0a 58 49 27 6c 6c 20 | 6a 75 73 74 20 67 75 69 |..XI'll |just gui|
|000005c0| 64 65 20 79 6f 75 20 74 | 68 72 6f 75 67 68 20 77 |de you t|hrough w|
|000005d0| 68 61 74 20 68 61 73 20 | 74 6f 20 62 65 20 64 6f |hat has |to be do|
|000005e0| 6e 65 2c 0a 58 66 72 6f | 6d 20 63 6f 6d 70 69 6c |ne,.Xfro|m compil|
|000005f0| 69 6e 67 20 74 68 72 6f | 75 67 68 20 69 6e 73 74 |ing thro|ugh inst|
|00000600| 61 6c 6c 61 74 69 6f 6e | 2e 0a 58 0a 58 4f 6e 65 |allation|..X.XOne|
|00000610| 20 61 64 76 61 6e 74 61 | 67 65 20 6f 66 20 74 68 | advanta|ge of th|
|00000620| 69 73 20 68 61 6e 64 73 | 2d 6f 66 66 20 70 68 69 |is hands|-off phi|
|00000630| 6c 6f 73 6f 70 68 79 20 | 69 73 20 74 68 61 74 0a |losophy |is that.|
|00000640| 58 79 6f 75 20 63 61 6e | 20 6b 69 6c 6c 20 61 6e |Xyou can| kill an|
|00000650| 64 20 72 65 73 74 61 72 | 74 20 74 68 69 73 20 73 |d restar|t this s|
|00000660| 63 72 69 70 74 20 61 74 | 20 61 6e 79 20 74 69 6d |cript at| any tim|
|00000670| 65 2e 0a 58 59 6f 75 20 | 6d 61 79 20 70 72 65 66 |e..XYou |may pref|
|00000680| 65 72 20 74 6f 20 72 65 | 61 64 20 74 68 72 6f 75 |er to re|ad throu|
|00000690| 67 68 20 49 4e 53 54 41 | 4c 4c 52 45 41 44 41 42 |gh INSTA|LLREADAB|
|000006a0| 4c 45 2c 0a 58 77 68 69 | 63 68 20 68 61 73 20 74 |LE,.Xwhi|ch has t|
|000006b0| 68 65 20 73 61 6d 65 20 | 69 6e 66 6f 72 6d 61 74 |he same |informat|
|000006c0| 69 6f 6e 2e 0a 58 0a 58 | 49 6e 20 74 68 65 20 66 |ion..X.X|In the f|
|000006d0| 69 72 73 74 20 70 61 72 | 74 20 6f 66 20 74 68 69 |irst par|t of thi|
|000006e0| 73 20 73 63 72 69 70 74 | 2c 20 49 27 6c 6c 20 6c |s script|, I'll l|
|000006f0| 65 61 64 20 79 6f 75 20 | 74 68 72 6f 75 67 68 20 |ead you |through |
|00000700| 63 6f 6e 66 69 67 75 72 | 61 74 69 6f 6e 2e 0a 58 |configur|ation..X|
|00000710| 46 6f 72 20 74 68 65 20 | 6d 6f 6d 65 6e 74 2c 20 |For the |moment, |
|00000720| 64 6f 6e 27 74 20 61 63 | 74 75 61 6c 6c 79 20 63 |don't ac|tually c|
|00000730| 68 61 6e 67 65 20 61 6e | 79 74 68 69 6e 67 20 69 |hange an|ything i|
|00000740| 6e 20 79 6f 75 72 20 73 | 79 73 74 65 6d 2e 20 4a |n your s|ystem. J|
|00000750| 75 73 74 0a 58 61 6c 74 | 65 72 6e 61 74 65 20 62 |ust.Xalt|ernate b|
|00000760| 65 74 77 65 65 6e 20 72 | 65 61 64 69 6e 67 20 74 |etween r|eading t|
|00000770| 68 69 73 20 73 63 72 69 | 70 74 20 61 6e 64 20 66 |his scri|pt and f|
|00000780| 6f 6f 6c 69 6e 67 20 61 | 72 6f 75 6e 64 20 77 69 |ooling a|round wi|
|00000790| 74 68 20 74 68 65 0a 58 | 4d 61 6b 65 66 69 6c 65 |th the.X|Makefile|
|000007a0| 2c 20 61 6e 64 20 49 27 | 6c 6c 20 72 65 6d 69 6e |, and I'|ll remin|
|000007b0| 64 20 79 6f 75 20 6c 61 | 74 65 72 2c 20 61 66 74 |d you la|ter, aft|
|000007c0| 65 72 20 63 6f 6d 70 69 | 6c 61 74 69 6f 6e 2c 20 |er compi|lation, |
|000007d0| 6f 66 20 77 68 61 74 20 | 68 61 73 0a 58 74 6f 20 |of what |has.Xto |
|000007e0| 62 65 20 63 68 61 6e 67 | 65 64 20 65 6c 73 65 77 |be chang|ed elsew|
|000007f0| 68 65 72 65 2e 0a 58 0a | 58 49 20 6e 65 65 64 20 |here..X.|XI need |
|00000800| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 70 72 |the foll|owing pr|
|00000810| 6f 67 72 61 6d 73 3a 20 | 65 63 68 6f 2c 20 74 72 |ograms: |echo, tr|
|00000820| 20 5b 2d 64 5d 2c 20 6d | 61 6e 2c 20 73 65 64 20 | [-d], m|an, sed |
|00000830| 5b 2d 6e 5d 2c 20 67 72 | 65 70 2c 20 74 65 73 74 |[-n], gr|ep, test|
|00000840| 2e 0a 58 0a 58 2d 2d 2d | 2d 2d 20 50 72 65 73 73 |..X.X---|-- Press|
|00000850| 20 72 65 74 75 72 6e 20 | 74 6f 20 63 6f 6e 74 69 | return |to conti|
|00000860| 6e 75 65 2e 20 0a 58 0a | 58 54 68 65 20 66 69 72 |nue. .X.|XThe fir|
|00000870| 73 74 20 76 65 72 73 69 | 6f 6e 73 20 6f 66 20 70 |st versi|ons of p|
|00000880| 74 79 20 77 65 72 65 20 | 64 65 73 69 67 6e 65 64 |ty were |designed|
|00000890| 20 6f 6e 20 61 20 42 53 | 44 20 34 2e 32 2d 62 61 | on a BS|D 4.2-ba|
|000008a0| 73 65 64 20 73 79 73 74 | 65 6d 2e 0a 58 44 75 72 |sed syst|em..XDur|
|000008b0| 69 6e 67 20 4d 61 79 20 | 31 39 39 30 20 70 74 79 |ing May |1990 pty|
|000008c0| 20 33 2e 30 20 77 61 73 | 20 77 72 69 74 74 65 6e | 3.0 was| written|
|000008d0| 20 63 6f 6d 70 6c 65 74 | 65 6c 79 20 66 72 6f 6d | complet|ely from|
|000008e0| 20 73 63 72 61 74 63 68 | 2c 0a 58 6f 6e 20 61 20 | scratch|,.Xon a |
|000008f0| 42 53 44 20 34 2e 33 2d | 62 61 73 65 64 20 73 79 |BSD 4.3-|based sy|
|00000900| 73 74 65 6d 2e 20 49 74 | 20 68 61 73 20 62 65 65 |stem. It| has bee|
|00000910| 6e 20 74 68 6f 72 6f 75 | 67 68 6c 79 20 74 65 73 |n thorou|ghly tes|
|00000920| 74 65 64 20 6f 6e 0a 58 | 73 65 76 65 72 61 6c 20 |ted on.X|several |
|00000930| 42 53 44 20 34 2e 33 2d | 62 61 73 65 64 20 73 79 |BSD 4.3-|based sy|
|00000940| 73 74 65 6d 73 2c 20 74 | 65 73 74 65 64 20 77 69 |stems, t|ested wi|
|00000950| 74 68 20 61 20 66 65 77 | 20 4d 61 6b 65 66 69 6c |th a few| Makefil|
|00000960| 65 20 63 68 61 6e 67 65 | 73 0a 58 6f 6e 20 73 65 |e change|s.Xon se|
|00000970| 76 65 72 61 6c 20 42 53 | 44 20 34 2e 32 2d 62 61 |veral BS|D 4.2-ba|
|00000980| 73 65 64 20 73 79 73 74 | 65 6d 73 2c 20 61 6e 64 |sed syst|ems, and|
|00000990| 20 72 75 6e 20 6f 6e 20 | 61 74 20 6c 65 61 73 74 | run on |at least|
|000009a0| 20 6f 6e 65 20 6d 75 74 | 61 6e 74 2e 0a 58 0a 58 | one mut|ant..X.X|
|000009b0| 49 66 20 79 6f 75 20 6d | 61 6b 65 20 69 74 20 74 |If you m|ake it t|
|000009c0| 68 72 6f 75 67 68 20 69 | 6e 73 74 61 6c 6c 61 74 |hrough i|nstallat|
|000009d0| 69 6f 6e 20 61 6e 64 20 | 74 65 73 74 69 6e 67 20 |ion and |testing |
|000009e0| 61 6e 64 20 67 65 74 20 | 70 74 79 20 72 75 6e 6e |and get |pty runn|
|000009f0| 69 6e 67 2c 0a 58 70 6c | 65 61 73 65 20 73 65 6e |ing,.Xpl|ease sen|
|00000a00| 64 20 61 20 6e 6f 74 65 | 20 74 6f 20 74 68 65 20 |d a note| to the |
|00000a10| 61 75 74 68 6f 72 2c 20 | 44 61 6e 20 42 65 72 6e |author, |Dan Bern|
|00000a20| 73 74 65 69 6e 2c 20 6f | 6e 20 74 68 65 20 49 6e |stein, o|n the In|
|00000a30| 74 65 72 6e 65 74 0a 58 | 61 74 20 62 72 6e 73 74 |ternet.X|at brnst|
|00000a40| 6e 64 40 6e 79 75 2e 65 | 64 75 2e 20 4c 65 74 20 |nd@nyu.e|du. Let |
|00000a50| 68 69 6d 20 6b 6e 6f 77 | 20 79 6f 75 72 20 63 6f |him know| your co|
|00000a60| 6d 70 75 74 65 72 20 6d | 6f 64 65 6c 2c 20 4f 53 |mputer m|odel, OS|
|00000a70| 20 76 65 72 73 69 6f 6e | 2c 20 61 6e 64 0a 58 77 | version|, and.Xw|
|00000a80| 68 61 74 20 63 68 61 6e | 67 65 73 20 79 6f 75 20 |hat chan|ges you |
|00000a90| 68 61 64 20 74 6f 20 6d | 61 6b 65 2e 20 49 66 20 |had to m|ake. If |
|00000aa0| 79 6f 75 20 68 61 76 65 | 20 61 6e 79 20 74 72 6f |you have| any tro|
|00000ab0| 75 62 6c 65 2c 20 70 6c | 65 61 73 65 20 61 6c 73 |uble, pl|ease als|
|00000ac0| 6f 20 67 65 74 0a 58 69 | 6e 20 74 6f 75 63 68 20 |o get.Xi|n touch |
|00000ad0| 77 69 74 68 20 74 68 65 | 20 61 75 74 68 6f 72 2e |with the| author.|
|00000ae0| 20 49 66 20 79 6f 75 20 | 68 61 76 65 20 61 20 64 | If you |have a d|
|00000af0| 69 66 66 65 72 65 6e 74 | 20 6b 69 6e 64 20 6f 66 |ifferent| kind of|
|00000b00| 20 73 79 73 74 65 6d 20 | 77 69 74 68 0a 58 70 73 | system |with.Xps|
|00000b10| 65 75 64 6f 2d 74 65 72 | 6d 69 6e 61 6c 20 73 75 |eudo-ter|minal su|
|00000b20| 70 70 6f 72 74 20 74 68 | 61 74 20 63 6f 75 6c 64 |pport th|at could|
|00000b30| 20 75 73 65 20 61 20 70 | 74 79 20 70 6f 72 74 2c | use a p|ty port,|
|00000b40| 20 74 68 65 20 61 75 74 | 68 6f 72 20 77 6f 75 6c | the aut|hor woul|
|00000b50| 64 0a 58 6c 6f 76 65 20 | 74 6f 20 68 65 61 72 20 |d.Xlove |to hear |
|00000b60| 61 62 6f 75 74 20 69 74 | 2e 0a 58 0a 58 4f 6e 65 |about it|..X.XOne|
|00000b70| 20 6e 6f 74 65 3a 20 4c | 69 6b 65 20 61 6c 6c 20 | note: L|ike all |
|00000b80| 73 6f 66 74 77 61 72 65 | 2c 20 70 74 79 20 63 6f |software|, pty co|
|00000b90| 6d 65 73 20 77 69 74 68 | 6f 75 74 20 77 61 72 72 |mes with|out warr|
|00000ba0| 61 6e 74 79 2c 20 74 6f | 20 74 68 65 20 65 78 74 |anty, to| the ext|
|00000bb0| 65 6e 74 0a 58 70 65 72 | 6d 69 74 74 65 64 20 62 |ent.Xper|mitted b|
|00000bc0| 79 20 61 70 70 6c 69 63 | 61 62 6c 65 20 6c 61 77 |y applic|able law|
|00000bd0| 2e 20 55 73 65 20 69 74 | 20 61 74 20 79 6f 75 72 |. Use it| at your|
|00000be0| 20 6f 77 6e 20 72 69 73 | 6b 2e 0a 58 0a 58 2d 2d | own ris|k..X.X--|
|00000bf0| 2d 2d 2d 20 50 72 65 73 | 73 20 72 65 74 75 72 6e |--- Pres|s return|
|00000c00| 20 74 6f 20 63 6f 6e 74 | 69 6e 75 65 2e 20 0a 58 | to cont|inue. .X|
|00000c10| 0a 58 49 20 61 73 73 75 | 6d 65 20 74 68 61 74 20 |.XI assu|me that |
|00000c20| 79 6f 75 20 64 6f 6e 27 | 74 20 77 61 6e 74 20 74 |you don'|t want t|
|00000c30| 6f 20 6d 61 6b 65 20 61 | 6e 79 20 6d 61 6a 6f 72 |o make a|ny major|
|00000c40| 20 63 68 61 6e 67 65 73 | 0a 58 74 6f 20 79 6f 75 | changes|.Xto you|
|00000c50| 72 20 63 6f 6d 70 75 74 | 65 72 20 6a 75 73 74 20 |r comput|er just |
|00000c60| 74 6f 20 74 61 6b 65 20 | 61 64 76 61 6e 74 61 67 |to take |advantag|
|00000c70| 65 20 6f 66 20 70 74 79 | 27 73 20 63 61 70 61 62 |e of pty|'s capab|
|00000c80| 69 6c 69 74 69 65 73 2e | 0a 58 59 6f 75 20 6d 69 |ilities.|.XYou mi|
|00000c90| 67 68 74 20 6e 6f 74 20 | 65 76 65 6e 20 68 61 76 |ght not |even hav|
|00000ca0| 65 20 61 20 70 72 69 76 | 69 6c 65 67 65 64 20 61 |e a priv|ileged a|
|00000cb0| 63 63 6f 75 6e 74 2c 20 | 66 6f 72 20 61 6c 6c 20 |ccount, |for all |
|00000cc0| 49 20 6b 6e 6f 77 2e 0a | 58 0a 58 54 68 65 20 66 |I know..|X.XThe f|
|00000cd0| 69 72 73 74 20 6d 61 6a | 6f 72 20 64 65 63 69 73 |irst maj|or decis|
|00000ce0| 69 6f 6e 20 79 6f 75 20 | 68 61 76 65 20 74 6f 20 |ion you |have to |
|00000cf0| 6d 61 6b 65 20 69 73 20 | 77 68 61 74 20 70 72 69 |make is |what pri|
|00000d00| 76 69 6c 65 67 65 73 20 | 74 6f 20 67 69 76 65 20 |vileges |to give |
|00000d10| 70 74 79 2e 0a 58 4f 62 | 76 69 6f 75 73 6c 79 20 |pty..XOb|viously |
|00000d20| 69 66 20 79 6f 75 20 64 | 6f 6e 27 74 20 68 61 76 |if you d|on't hav|
|00000d30| 65 20 70 72 69 76 69 6c | 65 67 65 73 20 74 68 65 |e privil|eges the|
|00000d40| 6e 20 70 74 79 20 77 6f | 6e 27 74 20 65 69 74 68 |n pty wo|n't eith|
|00000d50| 65 72 3b 0a 58 74 68 69 | 73 20 69 73 20 43 61 73 |er;.Xthi|s is Cas|
|00000d60| 65 20 55 4e 2e 0a 58 0a | 58 2d 2d 2d 2d 2d 20 50 |e UN..X.|X----- P|
|00000d70| 72 65 73 73 20 72 65 74 | 75 72 6e 20 74 6f 20 63 |ress ret|urn to c|
|00000d80| 6f 6e 74 69 6e 75 65 2e | 20 0a 58 0a 58 54 68 65 |ontinue.| .X.XThe|
|00000d90| 72 65 20 61 72 65 20 73 | 65 76 65 72 61 6c 20 67 |re are s|everal g|
|00000da0| 6f 6f 64 20 72 65 61 73 | 6f 6e 73 20 66 6f 72 20 |ood reas|ons for |
|00000db0| 67 69 76 69 6e 67 20 70 | 72 6f 67 72 61 6d 73 20 |giving p|rograms |
|00000dc0| 70 72 69 76 69 6c 65 67 | 65 73 2e 0a 58 4d 6f 73 |privileg|es..XMos|
|00000dd0| 74 20 69 6d 70 6f 72 74 | 61 6e 74 6c 79 2c 20 70 |t import|antly, p|
|00000de0| 72 69 76 69 6c 65 67 65 | 64 20 70 72 6f 67 72 61 |rivilege|d progra|
|00000df0| 6d 73 20 63 61 6e 20 70 | 72 65 63 69 73 65 6c 79 |ms can p|recisely|
|00000e00| 20 63 6f 6e 74 72 6f 6c | 20 61 63 63 65 73 73 0a | control| access.|
|00000e10| 58 74 6f 20 61 20 73 68 | 61 72 65 64 20 72 65 73 |Xto a sh|ared res|
|00000e20| 6f 75 72 63 65 2e 20 70 | 74 79 20 73 75 70 70 6f |ource. p|ty suppo|
|00000e30| 72 74 73 20 61 6e 20 69 | 6e 74 65 72 61 63 74 69 |rts an i|nteracti|
|00000e40| 76 65 20 75 73 65 72 20 | 6c 69 73 74 20 69 6e 0a |ve user |list in.|
|00000e50| 58 2f 65 74 63 2f 75 74 | 6d 70 2c 20 61 20 6c 6f |X/etc/ut|mp, a lo|
|00000e60| 67 69 6e 2d 6c 6f 67 6f | 75 74 20 72 65 63 6f 72 |gin-logo|ut recor|
|00000e70| 64 20 69 6e 20 2f 75 73 | 72 2f 61 64 6d 2f 77 74 |d in /us|r/adm/wt|
|00000e80| 6d 70 2c 20 61 6e 64 20 | 63 6f 6e 74 72 6f 6c 6c |mp, and |controll|
|00000e90| 65 64 0a 58 61 63 63 65 | 73 73 20 74 6f 20 74 68 |ed.Xacce|ss to th|
|00000ea0| 65 20 70 73 65 75 64 6f | 2d 74 65 72 6d 69 6e 61 |e pseudo|-termina|
|00000eb0| 6c 20 66 69 6c 65 73 20 | 74 68 65 6d 73 65 6c 76 |l files |themselv|
|00000ec0| 65 73 2c 20 69 6e 63 6c | 75 64 69 6e 67 20 73 65 |es, incl|uding se|
|00000ed0| 63 75 72 69 74 79 20 61 | 6e 64 0a 58 6d 6f 64 65 |curity a|nd.Xmode|
|00000ee0| 20 63 68 61 6e 67 69 6e | 67 2e 20 4e 6f 6e 65 20 | changin|g. None |
|00000ef0| 6f 66 20 74 68 65 73 65 | 20 61 72 65 20 70 6f 73 |of these| are pos|
|00000f00| 73 69 62 6c 65 20 69 66 | 20 70 74 79 20 69 73 6e |sible if| pty isn|
|00000f10| 27 74 20 73 65 74 75 69 | 64 2e 0a 58 0a 58 49 66 |'t setui|d..X.XIf|
|00000f20| 20 79 6f 75 72 20 73 79 | 73 74 65 6d 20 68 61 73 | your sy|stem has|
|00000f30| 20 61 20 6c 6f 74 20 6d | 6f 72 65 20 74 74 79 20 | a lot m|ore tty |
|00000f40| 73 65 63 75 72 69 74 79 | 20 74 68 61 6e 20 75 73 |security| than us|
|00000f50| 75 61 6c 2c 20 79 6f 75 | 20 70 72 6f 62 61 62 6c |ual, you| probabl|
|00000f60| 79 0a 58 77 6f 6e 27 74 | 20 62 65 20 61 62 6c 65 |y.Xwon't| be able|
|00000f70| 20 74 6f 20 72 75 6e 20 | 70 74 79 20 77 69 74 68 | to run |pty with|
|00000f80| 6f 75 74 20 70 72 69 76 | 69 6c 65 67 65 73 2e 20 |out priv|ileges. |
|00000f90| 28 48 6f 77 65 76 65 72 | 2c 20 69 66 20 79 6f 75 |(However|, if you|
|00000fa0| 72 20 73 79 73 74 65 6d | 0a 58 68 61 73 20 61 20 |r system|.Xhas a |
|00000fb0| 6c 6f 74 20 6d 6f 72 65 | 20 74 74 79 20 73 65 63 |lot more| tty sec|
|00000fc0| 75 72 69 74 79 20 74 68 | 61 6e 20 75 73 75 61 6c |urity th|an usual|
|00000fd0| 2c 20 69 74 27 73 20 61 | 6c 6d 6f 73 74 20 63 65 |, it's a|lmost ce|
|00000fe0| 72 74 61 69 6e 6c 79 20 | 72 75 6e 6e 69 6e 67 0a |rtainly |running.|
|00000ff0| 58 70 74 79 20 61 6e 79 | 77 61 79 2e 29 0a 58 0a |Xpty any|way.).X.|
|00001000| 58 2d 2d 2d 2d 2d 20 50 | 72 65 73 73 20 72 65 74 |X----- P|ress ret|
|00001010| 75 72 6e 20 74 6f 20 63 | 6f 6e 74 69 6e 75 65 2e |urn to c|ontinue.|
|00001020| 20 0a 58 0a 58 49 66 20 | 79 6f 75 20 64 6f 20 77 | .X.XIf |you do w|
|00001030| 61 6e 74 20 70 74 79 20 | 74 6f 20 68 61 76 65 20 |ant pty |to have |
|00001040| 70 72 69 76 69 6c 65 67 | 65 73 2c 20 79 6f 75 20 |privileg|es, you |
|00001050| 68 61 76 65 20 74 6f 20 | 64 65 63 69 64 65 20 62 |have to |decide b|
|00001060| 65 74 77 65 65 6e 0a 58 | 73 65 74 74 69 6e 67 20 |etween.X|setting |
|00001070| 75 70 20 70 74 79 20 61 | 73 20 72 6f 6f 74 20 28 |up pty a|s root (|
|00001080| 43 61 73 65 20 52 4f 4f | 54 29 20 6f 72 20 61 73 |Case ROO|T) or as|
|00001090| 20 73 6f 6d 65 20 6f 74 | 68 65 72 20 75 73 65 72 | some ot|her user|
|000010a0| 2c 20 73 61 79 20 60 60 | 70 74 79 27 27 0a 58 28 |, say ``|pty''.X(|
|000010b0| 43 61 73 65 20 50 54 59 | 29 2e 20 53 74 61 79 69 |Case PTY|). Stayi|
|000010c0| 6e 67 20 61 77 61 79 20 | 66 72 6f 6d 20 72 6f 6f |ng away |from roo|
|000010d0| 74 20 68 61 73 20 74 68 | 65 20 61 64 76 61 6e 74 |t has th|e advant|
|000010e0| 61 67 65 20 74 68 61 74 | 20 70 72 6f 62 6c 65 6d |age that| problem|
|000010f0| 73 0a 58 63 61 6e 27 74 | 20 70 6f 73 73 69 62 6c |s.Xcan't| possibl|
|00001100| 79 20 64 65 73 74 72 6f | 79 20 61 6c 6c 20 73 65 |y destro|y all se|
|00001110| 63 75 72 69 74 79 20 69 | 6e 20 6f 6e 65 20 62 6c |curity i|n one bl|
|00001120| 6f 77 2e 20 48 6f 77 65 | 76 65 72 2c 20 72 6f 6f |ow. Howe|ver, roo|
|00001130| 74 20 68 61 73 0a 58 73 | 65 76 65 72 61 6c 20 61 |t has.Xs|everal a|
|00001140| 64 76 61 6e 74 61 67 65 | 73 2c 20 6d 61 69 6e 6c |dvantage|s, mainl|
|00001150| 79 20 62 65 63 61 75 73 | 65 20 6f 66 20 42 53 44 |y becaus|e of BSD|
|00001160| 20 6c 69 6d 69 74 61 74 | 69 6f 6e 73 3a 20 31 2e | limitat|ions: 1.|
|00001170| 20 41 20 70 72 6f 63 65 | 73 73 0a 58 63 61 6e 27 | A proce|ss.Xcan'|
|00001180| 74 20 63 68 61 6e 67 65 | 20 6f 77 6e 65 72 73 68 |t change| ownersh|
|00001190| 69 70 20 6f 66 20 61 20 | 66 69 6c 65 20 62 65 74 |ip of a |file bet|
|000011a0| 77 65 65 6e 20 69 74 73 | 20 65 75 69 64 20 61 6e |ween its| euid an|
|000011b0| 64 20 75 69 64 2e 20 4f | 6e 6c 79 20 72 6f 6f 74 |d uid. O|nly root|
|000011c0| 0a 58 63 61 6e 20 63 68 | 61 6e 67 65 20 6f 77 6e |.Xcan ch|ange own|
|000011d0| 65 72 73 68 69 70 2e 20 | 49 74 20 73 68 6f 75 6c |ership. |It shoul|
|000011e0| 64 6e 27 74 20 62 65 20 | 6e 65 63 65 73 73 61 72 |dn't be |necessar|
|000011f0| 79 20 74 6f 20 63 68 61 | 6e 67 65 20 6f 77 6e 65 |y to cha|nge owne|
|00001200| 72 73 68 69 70 0a 58 6f | 66 20 70 74 79 73 20 61 |rship.Xo|f ptys a|
|00001210| 6e 79 77 61 79 2c 20 62 | 75 74 20 74 68 61 74 27 |nyway, b|ut that'|
|00001220| 73 20 77 68 61 74 20 6d | 61 6e 79 20 70 72 6f 67 |s what m|any prog|
|00001230| 72 61 6d 73 20 61 73 73 | 75 6d 65 2e 20 32 2e 20 |rams ass|ume. 2. |
|00001240| 4d 41 58 55 50 52 43 20 | 69 6e 0a 58 3c 73 79 73 |MAXUPRC |in.X<sys|
|00001250| 2f 70 61 72 61 6d 2e 68 | 3e 20 6c 69 6d 69 74 73 |/param.h|> limits|
|00001260| 20 74 68 65 20 6e 75 6d | 62 65 72 20 6f 66 20 70 | the num|ber of p|
|00001270| 72 6f 63 65 73 73 65 73 | 20 75 6e 64 65 72 20 61 |rocesses| under a|
|00001280| 20 67 69 76 65 6e 20 2a | 65 66 66 65 63 74 69 76 | given *|effectiv|
|00001290| 65 2a 0a 58 75 69 64 2e | 20 54 68 69 73 20 61 62 |e*.Xuid.| This ab|
|000012a0| 73 6f 6c 75 74 65 6c 79 | 20 69 64 69 6f 74 69 63 |solutely| idiotic|
|000012b0| 20 62 65 68 61 76 69 6f | 72 20 69 73 20 61 20 73 | behavio|r is a s|
|000012c0| 65 72 69 6f 75 73 20 70 | 72 6f 62 6c 65 6d 20 66 |erious p|roblem f|
|000012d0| 6f 72 20 70 72 6f 67 72 | 61 6d 73 0a 58 73 65 74 |or progr|ams.Xset|
|000012e0| 75 69 64 20 74 6f 20 61 | 6e 79 74 68 69 6e 67 20 |uid to a|nything |
|000012f0| 6f 74 68 65 72 20 74 68 | 61 6e 20 72 6f 6f 74 2e |other th|an root.|
|00001300| 20 70 74 79 20 74 72 69 | 65 73 20 74 6f 20 77 6f | pty tri|es to wo|
|00001310| 72 6b 20 61 72 6f 75 6e | 64 20 74 68 69 73 0a 58 |rk aroun|d this.X|
|00001320| 70 72 6f 62 6c 65 6d 2c | 20 62 75 74 20 74 68 65 |problem,| but the|
|00001330| 72 65 20 61 72 65 20 6e | 6f 20 74 72 75 65 20 73 |re are n|o true s|
|00001340| 6f 6c 75 74 69 6f 6e 73 | 2e 20 33 2e 20 44 65 73 |olutions|. 3. Des|
|00001350| 70 69 74 65 20 74 68 65 | 20 64 6f 63 75 6d 65 6e |pite the| documen|
|00001360| 74 61 74 69 6f 6e 0a 58 | 69 6e 20 6b 69 6c 6c 28 |tation.X|in kill(|
|00001370| 32 29 2c 20 6d 61 6e 79 | 20 6d 61 63 68 69 6e 65 |2), many| machine|
|00001380| 73 20 64 6f 6e 27 74 20 | 61 6c 6c 6f 77 20 6e 6f |s don't |allow no|
|00001390| 6e 2d 72 6f 6f 74 20 70 | 72 6f 63 65 73 73 65 73 |n-root p|rocesses|
|000013a0| 20 74 6f 20 73 65 6e 64 | 0a 58 43 4f 4e 54 20 74 | to send|.XCONT t|
|000013b0| 6f 20 63 68 69 6c 64 72 | 65 6e 20 77 69 74 68 20 |o childr|en with |
|000013c0| 61 20 64 69 66 66 65 72 | 65 6e 74 20 75 69 64 2e |a differ|ent uid.|
|000013d0| 20 55 6e 6c 69 6b 65 20 | 61 6c 6d 6f 73 74 20 61 | Unlike |almost a|
|000013e0| 6c 6c 20 6f 74 68 65 72 | 20 70 72 6f 67 72 61 6d |ll other| program|
|000013f0| 73 2c 0a 58 70 74 79 20 | 73 65 6e 73 69 62 6c 79 |s,.Xpty |sensibly|
|00001400| 20 68 61 6e 64 6c 65 73 | 20 69 74 73 20 63 68 69 | handles| its chi|
|00001410| 6c 64 20 73 74 6f 70 70 | 69 6e 67 20 61 6e 64 20 |ld stopp|ing and |
|00001420| 72 65 73 74 61 72 74 69 | 6e 67 3b 20 62 75 74 20 |restarti|ng; but |
|00001430| 74 68 69 73 20 77 6f 6e | 27 74 0a 58 77 6f 72 6b |this won|'t.Xwork|
|00001440| 20 6f 6e 20 74 68 6f 73 | 65 20 6d 61 63 68 69 6e | on thos|e machin|
|00001450| 65 73 20 69 66 20 70 74 | 79 20 69 73 6e 27 74 20 |es if pt|y isn't |
|00001460| 72 6f 6f 74 2e 0a 58 0a | 58 59 6f 75 20 73 68 6f |root..X.|XYou sho|
|00001470| 75 6c 64 20 64 65 63 69 | 64 65 20 6e 6f 77 20 62 |uld deci|de now b|
|00001480| 65 74 77 65 65 6e 20 43 | 61 73 65 20 52 4f 4f 54 |etween C|ase ROOT|
|00001490| 20 61 6e 64 20 43 61 73 | 65 20 50 54 59 2e 0a 58 | and Cas|e PTY..X|
|000014a0| 0a 58 2d 2d 2d 2d 2d 20 | 50 72 65 73 73 20 72 65 |.X----- |Press re|
|000014b0| 74 75 72 6e 20 74 6f 20 | 63 6f 6e 74 69 6e 75 65 |turn to |continue|
|000014c0| 2e 20 0a 58 0a 58 57 68 | 65 74 68 65 72 20 79 6f |. .X.XWh|ether yo|
|000014d0| 75 27 76 65 20 64 65 63 | 69 64 65 64 20 6f 6e 20 |u've dec|ided on |
|000014e0| 52 4f 4f 54 2c 20 50 54 | 59 2c 20 6f 72 20 55 4e |ROOT, PT|Y, or UN|
|000014f0| 2c 0a 58 6e 6f 77 20 69 | 73 20 74 68 65 20 74 69 |,.Xnow i|s the ti|
|00001500| 6d 65 20 74 6f 20 63 68 | 65 63 6b 20 74 68 65 20 |me to ch|eck the |
|00001510| 73 65 63 75 72 69 74 79 | 20 6f 66 20 74 68 65 20 |security| of the |
|00001520| 65 6e 74 69 72 65 20 70 | 74 79 20 70 61 63 6b 61 |entire p|ty packa|
|00001530| 67 65 2e 0a 58 49 74 27 | 64 20 62 65 20 64 69 66 |ge..XIt'|d be dif|
|00001540| 66 69 63 75 6c 74 20 66 | 6f 72 20 61 6e 79 74 68 |ficult f|or anyth|
|00001550| 69 6e 67 20 74 6f 20 73 | 6c 69 70 20 74 68 72 6f |ing to s|lip thro|
|00001560| 75 67 68 20 74 68 65 20 | 63 68 65 63 6b 73 20 62 |ugh the |checks b|
|00001570| 79 20 74 68 65 0a 58 61 | 75 74 68 6f 72 2c 20 74 |y the.Xa|uthor, t|
|00001580| 65 73 74 65 72 73 2c 20 | 61 6e 64 20 73 6f 75 72 |esters, |and sour|
|00001590| 63 65 20 67 72 6f 75 70 | 20 6d 6f 64 65 72 61 74 |ce group| moderat|
|000015a0| 6f 72 2c 20 62 75 74 20 | 79 6f 75 20 73 68 6f 75 |or, but |you shou|
|000015b0| 6c 64 20 74 61 6b 65 0a | 58 61 74 20 6c 65 61 73 |ld take.|Xat leas|
|000015c0| 74 20 61 20 6d 6f 6d 65 | 6e 74 20 74 6f 20 6c 6f |t a mome|nt to lo|
|000015d0| 6f 6b 20 66 6f 72 20 79 | 6f 75 72 20 70 65 74 20 |ok for y|our pet |
|000015e0| 73 65 63 75 72 69 74 79 | 20 70 65 65 76 65 73 2e |security| peeves.|
|000015f0| 0a 58 0a 58 41 20 63 6f | 75 70 6c 65 20 6f 66 20 |.X.XA co|uple of |
|00001600| 73 65 63 75 72 69 74 79 | 20 6e 6f 74 65 73 3a 20 |security| notes: |
|00001610| 54 68 65 20 6f 6e 6c 79 | 20 6f 70 65 6e 28 2c 4f |The only| open(,O|
|00001620| 5f 43 52 45 41 54 29 20 | 69 6e 20 70 74 79 20 69 |_CREAT) |in pty i|
|00001630| 73 20 69 6e 0a 58 6d 61 | 73 74 65 72 2e 63 2c 20 |s in.Xma|ster.c, |
|00001640| 61 74 20 74 68 65 20 74 | 6f 70 20 6f 66 20 6d 61 |at the t|op of ma|
|00001650| 73 74 65 72 28 29 2c 20 | 6f 66 20 61 20 66 69 6c |ster(), |of a fil|
|00001660| 65 20 77 69 74 68 20 61 | 20 76 65 72 79 20 72 65 |e with a| very re|
|00001670| 73 74 72 69 63 74 65 64 | 0a 58 66 6f 72 6d 20 63 |stricted|.Xform c|
|00001680| 6f 6e 73 74 72 75 63 74 | 65 64 20 66 72 6f 6d 20 |onstruct|ed from |
|00001690| 74 68 65 20 66 69 6c 65 | 6e 61 6d 65 20 6f 66 20 |the file|name of |
|000016a0| 61 20 2f 64 65 76 2f 74 | 74 79 78 78 2e 20 54 68 |a /dev/t|tyxx. Th|
|000016b0| 65 72 65 20 61 72 65 20 | 6e 6f 0a 58 63 72 65 61 |ere are |no.Xcrea|
|000016c0| 74 28 29 73 2e 20 54 68 | 65 20 6f 6e 6c 79 20 62 |t()s. Th|e only b|
|000016d0| 69 6e 64 28 29 20 69 73 | 20 69 6e 20 73 6f 63 6b |ind() is| in sock|
|000016e0| 2e 63 27 73 20 70 74 79 | 5f 72 65 61 64 73 6f 63 |.c's pty|_readsoc|
|000016f0| 6b 28 29 2c 20 77 68 69 | 63 68 20 69 73 0a 58 63 |k(), whi|ch is.Xc|
|00001700| 61 6c 6c 65 64 20 6f 6e | 6c 79 20 66 72 6f 6d 20 |alled on|ly from |
|00001710| 6d 61 73 74 65 72 2e 63 | 27 73 20 6d 61 73 74 65 |master.c|'s maste|
|00001720| 72 28 29 20 74 6f 20 63 | 72 65 61 74 65 20 61 20 |r() to c|reate a |
|00001730| 73 6f 63 6b 65 74 20 77 | 69 74 68 20 61 0a 58 73 |socket w|ith a.Xs|
|00001740| 69 6d 69 6c 61 72 6c 79 | 20 72 65 73 74 72 69 63 |imilarly| restric|
|00001750| 74 65 64 20 6e 61 6d 65 | 2e 20 28 66 6e 73 74 79 |ted name|. (fnsty|
|00001760| 20 69 73 20 63 68 61 6e | 67 65 64 20 69 6e 20 73 | is chan|ged in s|
|00001770| 69 67 6c 65 72 20 62 75 | 74 20 6e 6f 74 20 69 6e |igler bu|t not in|
|00001780| 0a 58 6d 61 73 74 65 72 | 2e 29 20 54 68 65 20 6f |.Xmaster|.) The o|
|00001790| 6e 6c 79 20 65 78 65 63 | 28 29 20 69 73 20 69 6e |nly exec|() is in|
|000017a0| 20 73 6c 61 76 65 2e 63 | 2c 20 61 66 74 65 72 20 | slave.c|, after |
|000017b0| 61 20 66 6f 72 63 65 64 | 20 73 65 74 72 65 75 69 |a forced| setreui|
|000017c0| 64 28 29 0a 58 74 6f 20 | 61 20 75 69 64 20 74 68 |d().Xto |a uid th|
|000017d0| 61 74 20 69 73 20 6f 6e | 6c 79 20 73 65 74 20 74 |at is on|ly set t|
|000017e0| 6f 20 67 65 74 75 69 64 | 28 29 2e 20 75 6e 6c 69 |o getuid|(). unli|
|000017f0| 6e 6b 28 29 2c 20 6d 6b | 64 69 72 28 29 2c 20 61 |nk(), mk|dir(), a|
|00001800| 6e 64 20 72 65 6e 61 6d | 65 28 29 0a 58 61 72 65 |nd renam|e().Xare|
|00001810| 20 6f 6e 6c 79 20 75 73 | 65 64 20 77 69 74 68 20 | only us|ed with |
|00001820| 72 65 73 74 72 69 63 74 | 65 64 20 70 61 74 68 6e |restrict|ed pathn|
|00001830| 61 6d 65 73 2e 0a 58 0a | 58 2d 2d 2d 2d 2d 20 50 |ames..X.|X----- P|
|00001840| 72 65 73 73 20 72 65 74 | 75 72 6e 20 74 6f 20 63 |ress ret|urn to c|
|00001850| 6f 6e 74 69 6e 75 65 2e | 20 0a 58 0a 58 49 6e 20 |ontinue.| .X.XIn |
|00001860| 43 61 73 65 20 50 54 59 | 2c 20 79 6f 75 20 68 61 |Case PTY|, you ha|
|00001870| 76 65 20 74 6f 20 73 65 | 74 20 75 70 20 61 20 6e |ve to se|t up a n|
|00001880| 65 77 20 75 69 64 2c 20 | 73 61 79 20 60 60 70 74 |ew uid, |say ``pt|
|00001890| 79 27 27 20 28 6f 72 20 | 77 68 61 74 65 76 65 72 |y'' (or |whatever|
|000018a0| 0a 58 75 73 65 72 6e 61 | 6d 65 20 79 6f 75 20 77 |.Xuserna|me you w|
|000018b0| 61 6e 74 29 2e 20 70 74 | 79 20 73 68 6f 75 6c 64 |ant). pt|y should|
|000018c0| 20 6e 6f 74 20 61 6c 6c | 6f 77 20 6c 6f 67 69 6e | not all|ow login|
|000018d0| 73 2e 20 49 74 73 20 70 | 61 73 73 77 6f 72 64 20 |s. Its p|assword |
|000018e0| 73 68 6f 75 6c 64 0a 58 | 62 65 20 61 6e 20 61 73 |should.X|be an as|
|000018f0| 74 65 72 69 73 6b 3b 20 | 69 74 73 20 68 6f 6d 65 |terisk; |its home|
|00001900| 20 64 69 72 65 63 74 6f | 72 79 20 73 68 6f 75 6c | directo|ry shoul|
|00001910| 64 20 62 65 20 2f 6e 6f | 6e 65 78 69 73 74 65 6e |d be /no|nexisten|
|00001920| 74 3b 20 69 74 73 20 73 | 68 65 6c 6c 0a 58 73 68 |t; its s|hell.Xsh|
|00001930| 6f 75 6c 64 20 62 65 20 | 2f 62 69 6e 2f 74 72 75 |ould be |/bin/tru|
|00001940| 65 2e 20 49 6e 20 6f 74 | 68 65 72 20 77 6f 72 64 |e. In ot|her word|
|00001950| 73 2c 20 74 68 65 20 6f | 6e 6c 79 20 61 63 63 65 |s, the o|nly acce|
|00001960| 73 73 20 74 6f 20 75 73 | 65 72 20 70 74 79 0a 58 |ss to us|er pty.X|
|00001970| 73 68 6f 75 6c 64 20 62 | 65 20 74 68 72 6f 75 67 |should b|e throug|
|00001980| 68 20 74 68 65 73 65 20 | 73 65 74 75 69 64 20 70 |h these |setuid p|
|00001990| 72 6f 67 72 61 6d 73 2e | 0a 58 0a 58 49 6e 20 61 |rograms.|.X.XIn a|
|000019a0| 6e 79 20 70 72 69 76 69 | 6c 65 67 65 64 20 63 61 |ny privi|leged ca|
|000019b0| 73 65 20 79 6f 75 20 73 | 68 6f 75 6c 64 20 68 61 |se you s|hould ha|
|000019c0| 76 65 20 67 72 6f 75 70 | 20 74 74 79 2c 0a 58 77 |ve group| tty,.Xw|
|000019d0| 68 69 63 68 20 6d 6f 73 | 74 20 42 53 44 20 34 2e |hich mos|t BSD 4.|
|000019e0| 33 20 73 79 73 74 65 6d | 73 20 68 61 76 65 20 61 |3 system|s have a|
|000019f0| 73 20 67 69 64 20 34 2e | 20 0a 58 0a 58 52 75 6e |s gid 4.| .X.XRun|
|00001a00| 6e 69 6e 67 20 24 20 74 | 74 79 67 72 6f 75 70 3d |ning $ t|tygroup=|
|00001a10| 22 60 73 65 64 20 2d 6e | 20 27 73 2f 5e 74 74 79 |"`sed -n| 's/^tty|
|00001a20| 3a 5b 5e 3a 5d 2a 3a 5c | 28 2e 2a 5c 29 3a 2e 2a |:[^:]*:\|(.*\):.*|
|00001a30| 2f 5c 31 2f 70 27 20 3c | 20 2f 65 74 63 2f 67 72 |/\1/p' <| /etc/gr|
|00001a40| 6f 75 70 60 22 20 2e 2e | 2e 0a 58 0a 58 49 20 73 |oup`" ..|..X.XI s|
|00001a50| 65 65 20 74 68 61 74 20 | 79 6f 75 20 68 61 76 65 |ee that |you have|
|00001a60| 20 61 20 74 74 79 20 67 | 72 6f 75 70 2c 20 34 20 | a tty g|roup, 4 |
|00001a70| 61 73 20 75 73 75 61 6c | 2e 20 47 6f 6f 64 2e 0a |as usual|. Good..|
|00001a80| 58 0a 58 5b 4e 6f 74 65 | 3a 20 55 6e 64 65 72 20 |X.X[Note|: Under |
|00001a90| 53 75 6e 4f 53 20 34 2e | 30 2e 33 2c 20 74 74 79 |SunOS 4.|0.3, tty|
|00001aa0| 67 72 6f 75 70 20 63 6f | 6d 65 73 20 6f 75 74 20 |group co|mes out |
|00001ab0| 74 6f 20 34 2e 20 4f 6e | 20 73 79 73 74 65 6d 73 |to 4. On| systems|
|00001ac0| 20 77 68 65 72 65 20 69 | 74 0a 58 63 6f 6d 65 73 | where i|t.Xcomes|
|00001ad0| 20 6f 75 74 20 74 6f 20 | 6e 6f 74 68 69 6e 67 20 | out to |nothing |
|00001ae0| 61 74 20 61 6c 6c 2c 20 | 79 6f 75 20 68 61 76 65 |at all, |you have|
|00001af0| 20 74 6f 20 61 64 64 20 | 74 68 65 20 6c 69 6e 65 | to add |the line|
|00001b00| 20 74 74 79 3a 34 3a 2a | 3a 72 6f 6f 74 20 74 6f | tty:4:*|:root to|
|00001b10| 0a 58 2f 65 74 63 2f 67 | 72 6f 75 70 2e 20 4f 6e |.X/etc/g|roup. On|
|00001b20| 20 73 79 73 74 65 6d 73 | 20 77 68 65 72 65 20 74 | systems| where t|
|00001b30| 68 65 20 74 74 79 20 67 | 72 6f 75 70 20 69 73 20 |he tty g|roup is |
|00001b40| 73 6f 6d 65 74 68 69 6e | 67 20 6f 74 68 65 72 20 |somethin|g other |
|00001b50| 74 68 61 6e 20 34 2c 0a | 58 6a 75 73 74 20 72 65 |than 4,.|Xjust re|
|00001b60| 6d 65 6d 62 65 72 20 69 | 74 2e 5d 0a 58 0a 58 2d |member i|t.].X.X-|
|00001b70| 2d 2d 2d 2d 20 50 72 65 | 73 73 20 72 65 74 75 72 |---- Pre|ss retur|
|00001b80| 6e 20 74 6f 20 63 6f 6e | 74 69 6e 75 65 2e 20 0a |n to con|tinue. .|
|00001b90| 58 0a 58 4e 65 78 74 2c | 20 77 65 27 72 65 20 67 |X.XNext,| we're g|
|00001ba0| 6f 69 6e 67 20 74 6f 20 | 64 72 75 64 67 65 20 74 |oing to |drudge t|
|00001bb0| 68 72 6f 75 67 68 20 74 | 68 65 20 63 6f 6e 66 69 |hrough t|he confi|
|00001bc0| 67 2e 68 20 66 69 6c 65 | 2e 0a 58 0a 58 49 6e 20 |g.h file|..X.XIn |
|00001bd0| 43 61 73 65 73 20 52 4f | 4f 54 20 6f 72 20 50 54 |Cases RO|OT or PT|
|00001be0| 59 2c 20 79 6f 75 20 68 | 61 76 65 20 74 6f 20 73 |Y, you h|ave to s|
|00001bf0| 65 74 20 75 70 20 61 20 | 73 79 73 74 65 6d 2d 77 |et up a |system-w|
|00001c00| 69 64 65 20 64 69 72 65 | 63 74 6f 72 79 0a 58 66 |ide dire|ctory.Xf|
|00001c10| 6f 72 20 73 74 6f 72 69 | 6e 67 20 69 6e 66 6f 72 |or stori|ng infor|
|00001c20| 6d 61 74 69 6f 6e 20 61 | 62 6f 75 74 20 70 74 79 |mation a|bout pty|
|00001c30| 20 73 65 73 73 69 6f 6e | 73 2e 20 28 41 20 73 65 | session|s. (A se|
|00001c40| 73 73 69 6f 6e 20 69 73 | 20 61 20 70 72 6f 67 72 |ssion is| a progr|
|00001c50| 61 6d 0a 58 73 74 75 63 | 6b 20 75 6e 64 65 72 20 |am.Xstuc|k under |
|00001c60| 61 20 70 74 79 20 74 68 | 61 74 20 79 6f 75 20 63 |a pty th|at you c|
|00001c70| 61 6e 20 64 69 73 63 6f | 6e 6e 65 63 74 20 61 6e |an disco|nnect an|
|00001c80| 64 20 72 65 63 6f 6e 6e | 65 63 74 2e 29 20 55 73 |d reconn|ect.) Us|
|00001c90| 65 72 73 20 63 61 6e 0a | 58 67 65 74 20 61 72 6f |ers can.|Xget aro|
|00001ca0| 75 6e 64 20 74 68 69 73 | 20 64 69 72 65 63 74 6f |und this| directo|
|00001cb0| 72 79 2c 20 73 74 6f 72 | 69 6e 67 20 74 68 65 20 |ry, stor|ing the |
|00001cc0| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 69 6e 20 7e |informat|ion in ~|
|00001cd0| 2f 2e 70 74 79 20 61 6e | 64 0a 58 72 65 76 6f 6b |/.pty an|d.Xrevok|
|00001ce0| 69 6e 67 20 61 6e 79 20 | 70 72 69 76 69 6c 65 67 |ing any |privileg|
|00001cf0| 65 73 2c 20 77 69 74 68 | 20 70 74 79 20 2d 78 53 |es, with| pty -xS|
|00001d00| 3b 20 79 6f 75 20 63 61 | 6e 20 65 76 65 6e 20 6d |; you ca|n even m|
|00001d10| 61 6b 65 20 74 68 69 73 | 20 64 65 66 61 75 6c 74 |ake this| default|
|00001d20| 0a 58 62 79 20 73 65 74 | 74 69 6e 67 20 66 6c 61 |.Xby set|ting fla|
|00001d30| 67 78 73 65 74 75 69 64 | 20 3d 20 30 20 69 6e 20 |gxsetuid| = 0 in |
|00001d40| 67 6c 6f 62 61 6c 73 2e | 63 2e 20 48 6f 77 65 76 |globals.|c. Howev|
|00001d50| 65 72 2c 20 61 20 73 69 | 6e 67 6c 65 20 73 79 73 |er, a si|ngle sys|
|00001d60| 74 65 6d 2d 77 69 64 65 | 0a 58 64 69 72 65 63 74 |tem-wide|.Xdirect|
|00001d70| 6f 72 79 20 69 73 20 73 | 61 66 65 72 2e 0a 58 0a |ory is s|afer..X.|
|00001d80| 58 41 6e 79 77 61 79 2c | 20 74 68 61 74 20 64 69 |XAnyway,| that di|
|00001d90| 72 65 63 74 6f 72 79 2c | 20 50 54 59 44 49 52 2c |rectory,| PTYDIR,|
|00001da0| 20 73 68 6f 75 6c 64 20 | 62 65 20 6d 6f 64 65 20 | should |be mode |
|00001db0| 30 37 30 30 2c 20 6f 77 | 6e 65 72 20 72 6f 6f 74 |0700, ow|ner root|
|00001dc0| 20 69 6e 20 63 61 73 65 | 0a 58 52 4f 4f 54 20 6f | in case|.XROOT o|
|00001dd0| 72 20 70 74 79 20 69 6e | 20 63 61 73 65 20 50 54 |r pty in| case PT|
|00001de0| 59 2c 20 67 72 6f 75 70 | 20 69 72 72 65 6c 65 76 |Y, group| irrelev|
|00001df0| 61 6e 74 2e 20 50 54 59 | 44 49 52 20 69 73 20 64 |ant. PTY|DIR is d|
|00001e00| 65 66 69 6e 65 64 20 69 | 6e 20 63 6f 6e 66 69 67 |efined i|n config|
|00001e10| 2e 68 0a 58 61 73 20 2f | 75 73 72 2f 65 74 63 2f |.h.Xas /|usr/etc/|
|00001e20| 70 74 79 20 62 79 20 64 | 65 66 61 75 6c 74 3b 20 |pty by d|efault; |
|00001e30| 69 66 20 79 6f 75 20 63 | 68 6f 6f 73 65 20 61 20 |if you c|hoose a |
|00001e40| 64 69 66 66 65 72 65 6e | 74 20 64 69 72 65 63 74 |differen|t direct|
|00001e50| 6f 72 79 2c 20 61 64 64 | 0a 58 2d 44 50 54 59 44 |ory, add|.X-DPTYD|
|00001e60| 49 52 3d 5c 22 2f 77 68 | 61 74 2f 65 76 65 72 2f |IR=\"/wh|at/ever/|
|00001e70| 64 69 72 2f 65 63 74 2f | 6f 72 79 5c 22 20 74 6f |dir/ect/|ory\" to|
|00001e80| 20 43 43 4f 50 54 53 20 | 69 6e 20 74 68 65 20 4d | CCOPTS |in the M|
|00001e90| 61 6b 65 66 69 6c 65 2e | 0a 58 0a 58 49 6e 20 43 |akefile.|.X.XIn C|
|00001ea0| 61 73 65 20 55 4e 2c 20 | 79 6f 75 20 6d 61 79 20 |ase UN, |you may |
|00001eb0| 77 61 6e 74 20 74 6f 20 | 73 65 74 20 75 70 20 61 |want to |set up a|
|00001ec0| 20 64 69 72 65 63 74 6f | 72 79 20 7e 2f 50 54 59 | directo|ry ~/PTY|
|00001ed0| 20 69 6e 73 69 64 65 20 | 79 6f 75 72 20 68 6f 6d | inside |your hom|
|00001ee0| 65 0a 58 64 69 72 65 63 | 74 6f 72 79 2c 20 61 6e |e.Xdirec|tory, an|
|00001ef0| 64 20 73 65 74 20 50 54 | 59 44 49 52 20 74 6f 20 |d set PT|YDIR to |
|00001f00| 74 68 61 74 3b 20 79 6f | 75 20 6d 61 79 20 77 61 |that; yo|u may wa|
|00001f10| 6e 74 20 74 6f 20 73 65 | 74 20 66 6c 61 67 78 73 |nt to se|t flagxs|
|00001f20| 65 74 75 69 64 20 3d 20 | 30 0a 58 69 6e 20 67 6c |etuid = |0.Xin gl|
|00001f30| 6f 62 61 6c 73 2e 63 3b | 20 6f 72 20 79 6f 75 20 |obals.c;| or you |
|00001f40| 6d 61 79 20 77 61 6e 74 | 20 74 6f 20 6a 75 73 74 |may want| to just|
|00001f50| 20 74 79 70 65 20 2d 78 | 53 20 74 6f 20 70 74 79 | type -x|S to pty|
|00001f60| 20 61 6c 6c 20 74 68 65 | 20 74 69 6d 65 2e 20 49 | all the| time. I|
|00001f70| 0a 58 72 65 63 6f 6d 6d | 65 6e 64 20 74 68 65 20 |.Xrecomm|end the |
|00001f80| 66 69 72 73 74 20 73 74 | 72 61 74 65 67 79 2e 0a |first st|rategy..|
|00001f90| 58 0a 58 2d 2d 2d 2d 2d | 20 50 72 65 73 73 20 72 |X.X-----| Press r|
|00001fa0| 65 74 75 72 6e 20 74 6f | 20 63 6f 6e 74 69 6e 75 |eturn to| continu|
|00001fb0| 65 2e 20 0a 58 0a 58 4e | 65 78 74 20 63 6f 6d 65 |e. .X.XN|ext come|
|00001fc0| 20 70 73 65 75 64 6f 2d | 74 65 72 6d 69 6e 61 6c | pseudo-|terminal|
|00001fd0| 20 70 61 74 68 6e 61 6d | 65 73 2e 20 49 20 61 73 | pathnam|es. I as|
|00001fe0| 73 75 6d 65 20 74 68 61 | 74 20 79 6f 75 72 20 70 |sume tha|t your p|
|00001ff0| 74 79 73 20 61 72 65 0a | 58 6c 61 62 65 6c 6c 65 |tys are.|Xlabelle|
|00002000| 64 20 61 73 20 2f 64 65 | 76 2f 70 74 79 78 78 20 |d as /de|v/ptyxx |
|00002010| 61 6e 64 20 2f 64 65 76 | 2f 74 74 79 78 78 2c 20 |and /dev|/ttyxx, |
|00002020| 77 68 65 72 65 20 78 78 | 20 69 73 20 61 6e 79 20 |where xx| is any |
|00002030| 74 77 6f 2d 6c 65 74 74 | 65 72 0a 58 65 78 74 65 |two-lett|er.Xexte|
|00002040| 6e 73 69 6f 6e 2e 20 70 | 74 79 20 63 61 6e 20 73 |nsion. p|ty can s|
|00002050| 75 70 70 6f 72 74 20 61 | 6e 79 20 69 6e 69 74 69 |upport a|ny initi|
|00002060| 61 6c 20 73 74 72 69 6e | 67 73 20 69 6e 73 74 65 |al strin|gs inste|
|00002070| 61 64 20 6f 66 20 74 68 | 65 73 65 2c 0a 58 62 75 |ad of th|ese,.Xbu|
|00002080| 74 20 73 6f 6d 65 20 6f | 66 20 74 68 65 20 75 74 |t some o|f the ut|
|00002090| 69 6c 69 74 69 65 73 20 | 68 61 76 65 20 2f 64 65 |ilities |have /de|
|000020a0| 76 2f 74 74 79 20 68 61 | 72 64 63 6f 64 65 64 2c |v/tty ha|rdcoded,|
|000020b0| 20 61 6e 64 20 6c 6f 74 | 73 20 6f 66 20 6f 74 68 | and lot|s of oth|
|000020c0| 65 72 0a 58 70 72 6f 67 | 72 61 6d 73 20 72 75 6e |er.Xprog|rams run|
|000020d0| 6e 69 6e 67 20 61 72 6f | 75 6e 64 20 61 73 73 75 |ning aro|und assu|
|000020e0| 6d 65 20 74 68 6f 73 65 | 20 6e 61 6d 65 73 2e 20 |me those| names. |
|000020f0| 49 66 20 79 6f 75 27 72 | 65 20 64 65 73 70 65 72 |If you'r|e desper|
|00002100| 61 74 65 2c 0a 58 64 65 | 66 69 6e 65 20 44 45 56 |ate,.Xde|fine DEV|
|00002110| 4d 54 59 20 61 6e 64 20 | 44 45 56 53 54 59 20 69 |MTY and |DEVSTY i|
|00002120| 6e 20 74 68 65 20 4d 61 | 6b 65 66 69 6c 65 2c 20 |n the Ma|kefile, |
|00002130| 61 6e 64 20 66 69 67 75 | 72 65 20 6f 75 74 20 77 |and figu|re out w|
|00002140| 68 61 74 20 68 61 73 20 | 74 6f 0a 58 62 65 20 63 |hat has |to.Xbe c|
|00002150| 68 61 6e 67 65 64 20 69 | 6e 20 75 74 69 6c 2f 2a |hanged i|n util/*|
|00002160| 2e 20 28 53 6f 72 72 79 | 2e 29 0a 58 0a 58 2d 2d |. (Sorry|.).X.X--|
|00002170| 2d 2d 2d 20 50 72 65 73 | 73 20 72 65 74 75 72 6e |--- Pres|s return|
|00002180| 20 74 6f 20 63 6f 6e 74 | 69 6e 75 65 2e 20 0a 58 | to cont|inue. .X|
|00002190| 0a 58 54 68 65 20 65 78 | 74 65 6e 73 69 6f 6e 20 |.XThe ex|tension |
|000021a0| 69 73 20 74 72 61 64 69 | 74 69 6f 6e 61 6c 6c 79 |is tradi|tionally|
|000021b0| 20 5b 70 2d 7a 61 2d 6f | 5d 5b 30 2d 39 61 2d 66 | [p-za-o|][0-9a-f|
|000021c0| 5d 2e 20 54 68 65 20 66 | 69 72 73 74 20 6c 65 74 |]. The f|irst let|
|000021d0| 74 65 72 20 6f 66 20 74 | 68 65 0a 58 73 65 63 6f |ter of t|he.Xseco|
|000021e0| 6e 64 20 73 74 72 69 6e | 67 20 69 73 20 73 70 65 |nd strin|g is spe|
|000021f0| 63 69 61 6c 3a 20 69 66 | 20 2f 64 65 76 2f 74 74 |cial: if| /dev/tt|
|00002200| 79 71 30 20 64 6f 65 73 | 6e 27 74 20 65 78 69 73 |yq0 does|n't exis|
|00002210| 74 2c 20 66 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |t, for e|xample, |
|00002220| 74 68 65 6e 0a 58 6e 6f | 6e 65 20 6f 66 20 2f 64 |then.Xno|ne of /d|
|00002230| 65 76 2f 74 74 79 71 5b | 30 2d 39 61 2d 66 5d 20 |ev/ttyq[|0-9a-f] |
|00002240| 77 69 6c 6c 20 62 65 20 | 75 73 65 64 2e 20 28 54 |will be |used. (T|
|00002250| 68 61 74 27 73 20 63 61 | 6c 6c 65 64 20 61 20 70 |hat's ca|lled a p|
|00002260| 74 79 20 62 61 6e 6b 2e | 29 0a 58 0a 58 59 6f 75 |ty bank.|).X.XYou|
|00002270| 20 63 61 6e 20 63 68 61 | 6e 67 65 20 74 68 6f 73 | can cha|nge thos|
|00002280| 65 20 73 74 72 69 6e 67 | 73 20 62 79 20 64 65 66 |e string|s by def|
|00002290| 69 6e 69 6e 67 2c 20 65 | 2e 67 2e 2c 20 50 54 59 |ining, e|.g., PTY|
|000022a0| 31 3d 5c 22 41 42 43 44 | 45 46 47 5c 22 20 6f 72 |1=\"ABCD|EFG\" or|
|000022b0| 0a 58 50 54 59 32 3d 5c | 22 30 32 34 36 38 61 62 |.XPTY2=\|"02468ab|
|000022c0| 66 71 5c 22 20 69 6e 20 | 74 68 65 20 4d 61 6b 65 |fq\" in |the Make|
|000022d0| 66 69 6c 65 2e 20 59 6f | 75 20 68 61 76 65 20 61 |file. Yo|u have a|
|000022e0| 74 20 6c 65 61 73 74 20 | 66 6f 75 72 20 63 68 6f |t least |four cho|
|000022f0| 69 63 65 73 20 68 65 72 | 65 3a 0a 58 31 2e 20 47 |ices her|e:.X1. G|
|00002300| 69 76 65 20 70 74 79 20 | 69 74 73 20 6f 77 6e 2c |ive pty |its own,|
|00002310| 20 6e 65 77 2c 20 62 61 | 6e 6b 73 20 6f 66 20 6e | new, ba|nks of n|
|00002320| 65 77 20 70 73 65 75 64 | 6f 2d 74 65 72 6d 69 6e |ew pseud|o-termin|
|00002330| 61 6c 73 20 77 69 74 68 | 20 77 65 69 72 64 20 62 |als with| weird b|
|00002340| 61 6e 6b 0a 58 6e 61 6d | 65 73 20 6e 6f 74 20 69 |ank.Xnam|es not i|
|00002350| 6e 63 6c 75 64 69 6e 67 | 20 61 20 74 68 72 6f 75 |ncluding| a throu|
|00002360| 67 68 20 7a 2c 20 61 6e | 64 20 64 65 66 69 6e 65 |gh z, an|d define|
|00002370| 20 50 54 59 31 20 61 70 | 70 72 6f 70 72 69 61 74 | PTY1 ap|propriat|
|00002380| 65 6c 79 2e 20 70 74 79 | 20 77 69 6c 6c 0a 58 6f |ely. pty| will.Xo|
|00002390| 6e 6c 79 20 75 73 65 20 | 74 68 6f 73 65 20 6e 65 |nly use |those ne|
|000023a0| 77 20 70 74 79 73 2c 20 | 61 6e 64 20 6f 6c 64 65 |w ptys, |and olde|
|000023b0| 72 20 70 72 6f 67 72 61 | 6d 73 20 77 69 6c 6c 20 |r progra|ms will |
|000023c0| 6a 75 73 74 20 75 73 65 | 20 74 68 65 20 6f 6c 64 |just use| the old|
|000023d0| 20 70 74 79 73 2e 0a 58 | 54 68 69 73 20 6d 61 79 | ptys..X|This may|
|000023e0| 20 72 65 71 75 69 72 65 | 20 72 65 63 6f 6e 66 69 | require| reconfi|
|000023f0| 67 75 72 69 6e 67 20 79 | 6f 75 72 20 73 79 73 74 |guring y|our syst|
|00002400| 65 6d 20 66 6f 72 20 74 | 68 65 20 6c 61 72 67 65 |em for t|he large|
|00002410| 72 20 6e 75 6d 62 65 72 | 20 6f 66 0a 58 74 65 72 |r number| of.Xter|
|00002420| 6d 69 6e 61 6c 73 2e 20 | 32 2e 20 47 69 76 65 20 |minals. |2. Give |
|00002430| 70 74 79 20 73 6f 6d 65 | 20 6e 65 77 20 62 61 6e |pty some| new ban|
|00002440| 6b 73 2c 20 61 6e 64 20 | 74 61 6b 65 20 6f 75 74 |ks, and |take out|
|00002450| 20 73 6f 6d 65 20 6f 6c | 64 20 6f 6e 65 73 20 74 | some ol|d ones t|
|00002460| 6f 0a 58 6d 61 6b 65 20 | 75 70 20 66 6f 72 20 69 |o.Xmake |up for i|
|00002470| 74 2e 20 33 2e 20 47 69 | 76 65 20 70 74 79 20 61 |t. 3. Gi|ve pty a|
|00002480| 20 63 68 75 6e 6b 20 6f | 66 20 74 68 65 20 6f 6c | chunk o|f the ol|
|00002490| 64 20 62 61 6e 6b 73 2e | 20 34 2e 20 47 69 76 65 |d banks.| 4. Give|
|000024a0| 20 70 74 79 20 61 6c 6c | 0a 58 74 68 65 20 6f 6c | pty all|.Xthe ol|
|000024b0| 64 20 62 61 6e 6b 73 2e | 0a 58 0a 58 4e 6f 74 65 |d banks.|.X.XNote|
|000024c0| 20 74 68 61 74 20 70 74 | 79 20 73 65 61 72 63 68 | that pt|y search|
|000024d0| 65 73 20 72 61 6e 64 6f | 6d 6c 79 20 74 68 72 6f |es rando|mly thro|
|000024e0| 75 67 68 20 50 54 59 31 | 20 61 6e 64 20 50 54 59 |ugh PTY1| and PTY|
|000024f0| 32 20 62 79 20 64 65 66 | 61 75 6c 74 3b 20 66 6f |2 by def|ault; fo|
|00002500| 72 0a 58 65 66 66 69 63 | 69 65 6e 63 79 2c 20 50 |r.Xeffic|iency, P|
|00002510| 54 59 31 20 72 65 61 6c | 6c 79 20 73 68 6f 75 6c |TY1 real|ly shoul|
|00002520| 64 20 72 65 66 6c 65 63 | 74 20 65 78 61 63 74 6c |d reflec|t exactl|
|00002530| 79 20 74 68 65 20 70 74 | 79 20 62 61 6e 6b 73 20 |y the pt|y banks |
|00002540| 79 6f 75 20 68 61 76 65 | 2e 0a 58 0a 58 2d 2d 2d |you have|..X.X---|
|00002550| 2d 2d 20 50 72 65 73 73 | 20 72 65 74 75 72 6e 20 |-- Press| return |
|00002560| 74 6f 20 63 6f 6e 74 69 | 6e 75 65 2e 20 0a 58 0a |to conti|nue. .X.|
|00002570| 58 53 6f 20 6e 6f 77 20 | 79 6f 75 27 76 65 20 64 |XSo now |you've d|
|00002580| 65 63 69 64 65 64 20 6f | 6e 20 6e 65 77 20 70 74 |ecided o|n new pt|
|00002590| 79 73 2c 20 6f 72 20 73 | 65 74 20 61 73 69 64 65 |ys, or s|et aside|
|000025a0| 20 73 6f 6d 65 20 6f 72 | 20 61 6c 6c 20 6f 66 20 | some or| all of |
|000025b0| 79 6f 75 72 0a 58 6f 6c | 64 20 70 74 79 73 2c 20 |your.Xol|d ptys, |
|000025c0| 61 6e 64 20 63 68 61 6e | 67 65 64 20 50 54 59 31 |and chan|ged PTY1|
|000025d0| 20 61 6e 64 20 50 54 59 | 32 20 61 70 70 72 6f 70 | and PTY|2 approp|
|000025e0| 72 69 61 74 65 6c 79 2e | 20 42 65 63 61 75 73 65 |riately.| Because|
|000025f0| 20 42 53 44 20 67 69 76 | 65 73 20 61 0a 58 70 72 | BSD giv|es a.Xpr|
|00002600| 6f 63 65 73 73 20 76 65 | 72 79 20 6c 69 74 74 6c |ocess ve|ry littl|
|00002610| 65 20 63 6f 6e 74 72 6f | 6c 20 6f 76 65 72 20 69 |e contro|l over i|
|00002620| 74 73 20 63 6f 6e 74 72 | 6f 6c 6c 69 6e 67 20 74 |ts contr|olling t|
|00002630| 65 72 6d 69 6e 61 6c 2c | 20 70 74 79 20 68 61 73 |erminal,| pty has|
|00002640| 20 74 6f 0a 58 70 61 73 | 73 20 61 20 74 65 72 6d | to.Xpas|s a term|
|00002650| 69 6e 61 6c 20 6e 61 6d | 65 20 65 78 70 6c 69 63 |inal nam|e explic|
|00002660| 69 74 6c 79 20 77 68 65 | 6e 20 69 74 20 72 65 63 |itly whe|n it rec|
|00002670| 6f 6e 6e 65 63 74 73 2e | 20 49 66 20 61 6e 79 20 |onnects.| If any |
|00002680| 6f 66 20 79 6f 75 72 20 | 74 74 79 0a 58 28 6e 6f |of your |tty.X(no|
|00002690| 74 20 6a 75 73 74 20 70 | 73 65 75 64 6f 2d 74 74 |t just p|seudo-tt|
|000026a0| 79 21 29 20 66 69 6c 65 | 6e 61 6d 65 73 20 61 72 |y!) file|names ar|
|000026b0| 65 20 6c 6f 6e 67 65 72 | 20 74 68 61 6e 20 33 30 |e longer| than 30|
|000026c0| 20 63 68 61 72 61 63 74 | 65 72 73 2c 20 79 6f 75 | charact|ers, you|
|000026d0| 20 68 61 76 65 0a 58 74 | 6f 20 73 65 74 20 2d 44 | have.Xt|o set -D|
|000026e0| 54 54 59 4e 41 4d 45 4c | 45 4e 3d 36 30 20 28 6f |TTYNAMEL|EN=60 (o|
|000026f0| 72 20 77 68 61 74 65 76 | 65 72 29 20 69 6e 20 74 |r whatev|er) in t|
|00002700| 68 65 20 4d 61 6b 65 66 | 69 6c 65 2e 0a 58 0a 58 |he Makef|ile..X.X|
|00002710| 2d 2d 2d 2d 2d 20 50 72 | 65 73 73 20 72 65 74 75 |----- Pr|ess retu|
|00002720| 72 6e 20 74 6f 20 63 6f | 6e 74 69 6e 75 65 2e 20 |rn to co|ntinue. |
|00002730| 0a 58 0a 58 2f 65 74 63 | 2f 75 74 6d 70 20 68 61 |.X.X/etc|/utmp ha|
|00002740| 73 20 74 72 61 64 69 74 | 69 6f 6e 61 6c 6c 79 20 |s tradit|ionally |
|00002750| 6c 69 73 74 65 64 20 61 | 6c 6c 20 75 73 65 72 73 |listed a|ll users|
|00002760| 20 6c 6f 67 67 65 64 20 | 6f 6e 2e 0a 58 54 68 69 | logged |on..XThi|
|00002770| 73 20 6e 65 62 75 6c 6f | 75 73 20 63 6f 6e 63 65 |s nebulo|us conce|
|00002780| 70 74 20 68 61 73 20 65 | 76 6f 6c 76 65 64 20 74 |pt has e|volved t|
|00002790| 68 72 6f 75 67 68 20 74 | 68 65 20 79 65 61 72 73 |hrough t|he years|
|000027a0| 3b 20 67 69 76 65 6e 20 | 74 68 65 20 77 61 79 0a |; given |the way.|
|000027b0| 58 74 68 61 74 20 6d 6f | 73 74 20 70 72 6f 67 72 |Xthat mo|st progr|
|000027c0| 61 6d 73 20 75 73 65 20 | 75 74 6d 70 2c 20 75 74 |ams use |utmp, ut|
|000027d0| 6d 70 20 69 73 20 70 72 | 6f 62 61 62 6c 79 20 62 |mp is pr|obably b|
|000027e0| 65 74 74 65 72 20 64 65 | 66 69 6e 65 64 20 61 73 |etter de|fined as|
|000027f0| 20 61 0a 58 6c 69 73 74 | 20 6f 66 20 61 6c 6c 20 | a.Xlist| of all |
|00002800| 69 6e 74 65 72 61 63 74 | 69 76 65 20 73 65 73 73 |interact|ive sess|
|00002810| 69 6f 6e 73 2e 20 41 6e | 79 77 61 79 2c 20 70 74 |ions. An|yway, pt|
|00002820| 79 20 73 75 70 70 6f 72 | 74 73 20 74 68 69 73 20 |y suppor|ts this |
|00002830| 66 69 6c 65 2c 0a 58 61 | 6e 64 20 77 69 6c 6c 20 |file,.Xa|nd will |
|00002840| 6d 61 6b 65 20 61 6e 20 | 65 6e 74 72 79 20 69 6e |make an |entry in|
|00002850| 20 69 74 20 77 68 65 6e | 20 67 69 76 65 6e 20 2d | it when| given -|
|00002860| 78 75 2e 20 49 66 20 79 | 6f 75 20 68 61 76 65 20 |xu. If y|ou have |
|00002870| 61 20 64 69 66 66 65 72 | 65 6e 74 0a 58 66 69 6c |a differ|ent.Xfil|
|00002880| 65 2c 20 61 64 64 20 2d | 44 50 54 59 55 54 4d 50 |e, add -|DPTYUTMP|
|00002890| 5f 46 49 4c 45 3d 5c 22 | 2f 66 6f 6f 2f 62 61 72 |_FILE=\"|/foo/bar|
|000028a0| 2f 75 74 6d 70 5c 22 20 | 74 6f 20 44 45 46 49 4e |/utmp\" |to DEFIN|
|000028b0| 45 53 20 69 6e 20 74 68 | 65 20 4d 61 6b 65 66 69 |ES in th|e Makefi|
|000028c0| 6c 65 2e 0a 58 0a 58 4e | 6f 74 65 20 74 68 61 74 |le..X.XN|ote that|
|000028d0| 20 2f 65 74 63 2f 75 74 | 6d 70 20 69 73 20 75 6e | /etc/ut|mp is un|
|000028e0| 70 72 6f 74 65 63 74 65 | 64 20 28 6d 6f 64 65 20 |protecte|d (mode |
|000028f0| 36 36 36 29 20 6f 6e 20 | 53 75 6e 73 2e 20 54 68 |666) on |Suns. Th|
|00002900| 69 73 20 77 61 73 20 53 | 75 6e 27 73 0a 58 61 74 |is was S|un's.Xat|
|00002910| 74 65 6d 70 74 20 74 6f | 20 6c 65 74 20 75 6e 70 |tempt to| let unp|
|00002920| 72 69 76 69 6c 65 67 65 | 64 20 70 72 6f 67 72 61 |rivilege|d progra|
|00002930| 6d 73 20 6d 61 6e 61 67 | 65 20 74 68 65 20 66 69 |ms manag|e the fi|
|00002940| 6c 65 2e 20 55 6e 66 6f | 72 75 6e 61 74 65 6c 79 |le. Unfo|runately|
|00002950| 2c 20 74 68 69 73 0a 58 | 65 72 72 6f 72 20 69 6e |, this.X|error in|
|00002960| 20 6a 75 64 67 6d 65 6e | 74 20 6f 70 65 6e 73 20 | judgmen|t opens |
|00002970| 75 70 20 61 20 68 75 67 | 65 20 73 65 63 75 72 69 |up a hug|e securi|
|00002980| 74 79 20 68 6f 6c 65 2c | 20 77 68 69 63 68 20 65 |ty hole,| which e|
|00002990| 76 65 6e 20 6f 6e 0a 58 | 73 69 6e 67 6c 65 2d 75 |ven on.X|single-u|
|000029a0| 73 65 72 20 6d 61 63 68 | 69 6e 65 73 20 69 73 20 |ser mach|ines is |
|000029b0| 61 6e 20 69 6e 76 69 74 | 61 74 69 6f 6e 20 74 6f |an invit|ation to|
|000029c0| 20 6d 61 6b 65 20 6d 69 | 73 74 61 6b 65 73 2e 20 | make mi|stakes. |
|000029d0| 49 20 61 64 76 69 73 65 | 20 79 6f 75 20 74 6f 0a |I advise| you to.|
|000029e0| 58 6d 61 6b 65 20 2f 65 | 74 63 2f 75 74 6d 70 20 |Xmake /e|tc/utmp |
|000029f0| 6f 77 6e 65 64 20 62 79 | 20 72 6f 6f 74 20 69 6e |owned by| root in|
|00002a00| 20 43 61 73 65 20 52 4f | 4f 54 20 6f 72 20 70 74 | Case RO|OT or pt|
|00002a10| 79 20 69 6e 20 43 61 73 | 65 20 50 54 59 2c 20 6d |y in Cas|e PTY, m|
|00002a20| 6f 64 65 20 36 34 34 2e | 0a 58 54 68 65 72 65 20 |ode 644.|.XThere |
|00002a30| 61 72 65 6e 27 74 20 6d | 61 6e 79 20 75 6e 70 72 |aren't m|any unpr|
|00002a40| 69 76 69 6c 65 67 65 64 | 20 70 72 6f 67 72 61 6d |ivileged| program|
|00002a50| 73 20 74 68 61 74 20 64 | 6f 6e 27 74 20 75 6e 64 |s that d|on't und|
|00002a60| 65 72 73 74 61 6e 64 20 | 74 68 65 0a 58 70 74 79 |erstand |the.Xpty|
|00002a70| 20 69 6e 74 65 72 66 61 | 63 65 3b 20 70 65 6f 70 | interfa|ce; peop|
|00002a80| 6c 65 20 6f 6e 20 6e 6f | 6e 2d 53 75 6e 73 20 68 |le on no|n-Suns h|
|00002a90| 61 76 65 20 73 75 72 76 | 69 76 65 64 20 73 6f 20 |ave surv|ived so |
|00002aa0| 66 61 72 2c 20 61 6e 64 | 20 74 68 65 72 65 27 73 |far, and| there's|
|00002ab0| 0a 58 6e 6f 20 72 65 61 | 73 6f 6e 20 66 6f 72 20 |.Xno rea|son for |
|00002ac0| 79 6f 75 20 74 6f 20 6b | 65 65 70 20 73 75 62 73 |you to k|eep subs|
|00002ad0| 63 72 69 62 69 6e 67 20 | 74 6f 20 61 6e 20 69 6e |cribing |to an in|
|00002ae0| 73 65 63 75 72 65 20 6d | 6f 64 65 6c 20 6f 66 20 |secure m|odel of |
|00002af0| 72 65 73 6f 75 72 63 65 | 0a 58 73 68 61 72 69 6e |resource|.Xsharin|
|00002b00| 67 2e 0a 58 0a 58 2d 2d | 2d 2d 2d 20 50 72 65 73 |g..X.X--|--- Pres|
|00002b10| 73 20 72 65 74 75 72 6e | 20 74 6f 20 63 6f 6e 74 |s return| to cont|
|00002b20| 69 6e 75 65 2e 20 0a 58 | 0a 58 41 6c 74 68 6f 75 |inue. .X|.XAlthou|
|00002b30| 67 68 20 70 74 79 20 77 | 69 6c 6c 20 70 75 74 20 |gh pty w|ill put |
|00002b40| 61 6e 20 65 6e 74 72 79 | 20 69 6e 74 6f 20 75 74 |an entry| into ut|
|00002b50| 6d 70 2c 20 69 74 20 64 | 6f 65 73 6e 27 74 20 72 |mp, it d|oesn't r|
|00002b60| 65 61 6c 6c 79 20 73 75 | 70 70 6f 72 74 0a 58 74 |eally su|pport.Xt|
|00002b70| 68 65 20 72 65 6d 6f 74 | 65 2d 68 6f 73 74 20 66 |he remot|e-host f|
|00002b80| 69 65 6c 64 2e 20 54 68 | 65 72 65 20 69 73 20 6e |ield. Th|ere is n|
|00002b90| 6f 20 6c 6f 67 69 63 61 | 6c 20 61 73 73 6f 63 69 |o logica|l associ|
|00002ba0| 61 74 69 6f 6e 20 62 65 | 74 77 65 65 6e 20 73 65 |ation be|tween se|
|00002bb0| 73 73 69 6f 6e 73 0a 58 | 61 6e 64 20 63 6f 6e 6e |ssions.X|and conn|
|00002bc0| 65 63 74 69 6f 6e 73 3b | 20 77 68 79 20 73 68 6f |ections;| why sho|
|00002bd0| 75 6c 64 20 61 20 6c 6f | 67 69 6e 20 72 65 71 75 |uld a lo|gin requ|
|00002be0| 69 72 65 20 61 20 70 74 | 79 2c 20 61 6e 64 20 77 |ire a pt|y, and w|
|00002bf0| 68 79 20 73 68 6f 75 6c | 64 20 61 0a 58 73 65 73 |hy shoul|d a.Xses|
|00002c00| 73 69 6f 6e 20 6f 6e 6c | 79 20 73 74 69 63 6b 20 |sion onl|y stick |
|00002c10| 61 72 6f 75 6e 64 20 66 | 6f 72 20 6f 6e 65 20 63 |around f|or one c|
|00002c20| 6f 6e 6e 65 63 74 69 6f | 6e 3f 20 53 6f 20 70 74 |onnectio|n? So pt|
|00002c30| 79 20 6a 75 73 74 20 70 | 75 74 73 20 22 70 74 79 |y just p|uts "pty|
|00002c40| 22 20 69 6e 0a 58 74 68 | 65 20 68 6f 73 74 20 66 |" in.Xth|e host f|
|00002c50| 69 65 6c 64 2e 20 59 6f | 75 20 63 61 6e 20 63 68 |ield. Yo|u can ch|
|00002c60| 61 6e 67 65 20 74 68 69 | 73 20 77 69 74 68 20 2d |ange thi|s with -|
|00002c70| 44 50 54 59 55 54 4d 50 | 5f 48 4f 53 54 3d 5c 22 |DPTYUTMP|_HOST=\"|
|00002c80| 66 6f 6f 5c 22 3b 20 79 | 6f 75 20 6d 61 79 0a 58 |foo\"; y|ou may.X|
|00002c90| 65 76 65 6e 20 77 61 6e | 74 20 74 6f 20 6d 61 6b |even wan|t to mak|
|00002ca0| 65 20 50 54 59 5f 55 54 | 4d 50 48 4f 53 54 20 63 |e PTY_UT|MPHOST c|
|00002cb0| 61 6c 6c 20 61 20 66 75 | 6e 63 74 69 6f 6e 20 74 |all a fu|nction t|
|00002cc0| 68 61 74 20 79 6f 75 20 | 64 65 66 69 6e 65 2e 0a |hat you |define..|
|00002cd0| 58 0a 58 28 53 69 6d 69 | 6c 61 72 20 63 6f 6d 6d |X.X(Simi|lar comm|
|00002ce0| 65 6e 74 73 20 61 70 70 | 6c 79 20 74 6f 20 50 54 |ents app|ly to PT|
|00002cf0| 59 57 54 4d 50 5f 48 4f | 53 54 2e 20 54 68 65 72 |YWTMP_HO|ST. Ther|
|00002d00| 65 20 61 72 65 20 61 6c | 73 6f 20 50 54 59 55 54 |e are al|so PTYUT|
|00002d10| 4d 50 5f 53 57 48 4f 53 | 54 0a 58 61 6e 64 20 50 |MP_SWHOS|T.Xand P|
|00002d20| 54 59 57 54 4d 50 5f 53 | 57 48 4f 53 54 2c 20 64 |TYWTMP_S|WHOST, d|
|00002d30| 65 66 61 75 6c 74 73 20 | 50 54 59 55 54 4d 50 5f |efaults |PTYUTMP_|
|00002d40| 48 4f 53 54 20 61 6e 64 | 20 22 70 74 79 2d 73 65 |HOST and| "pty-se|
|00002d50| 73 73 75 73 65 72 22 0a | 58 72 65 73 70 65 63 74 |ssuser".|Xrespect|
|00002d60| 69 76 65 6c 79 3b 20 73 | 65 65 20 75 74 69 6c 2f |ively; s|ee util/|
|00002d70| 73 65 73 73 75 73 65 72 | 2e 31 20 66 6f 72 20 6d |sessuser|.1 for m|
|00002d80| 6f 72 65 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 2e |ore info|rmation.|
|00002d90| 29 0a 58 0a 58 2d 2d 2d | 2d 2d 20 50 72 65 73 73 |).X.X---|-- Press|
|00002da0| 20 72 65 74 75 72 6e 20 | 74 6f 20 63 6f 6e 74 69 | return |to conti|
|00002db0| 6e 75 65 2e 20 0a 58 0a | 58 2f 75 73 72 2f 61 64 |nue. .X.|X/usr/ad|
|00002dc0| 6d 2f 77 74 6d 70 20 68 | 61 73 20 74 72 61 64 69 |m/wtmp h|as tradi|
|00002dd0| 74 69 6f 6e 61 6c 6c 79 | 20 72 65 63 6f 72 64 65 |tionally| recorde|
|00002de0| 64 20 61 6c 6c 20 6c 6f | 67 69 6e 73 2c 20 6c 6f |d all lo|gins, lo|
|00002df0| 67 6f 75 74 73 2c 20 72 | 65 62 6f 6f 74 73 2c 0a |gouts, r|eboots,.|
|00002e00| 58 66 74 70 20 73 65 73 | 73 69 6f 6e 73 2c 20 61 |Xftp ses|sions, a|
|00002e10| 6e 64 20 76 61 72 69 6f | 75 73 20 6f 74 68 65 72 |nd vario|us other|
|00002e20| 20 69 6e 74 65 72 65 73 | 74 69 6e 67 20 65 76 65 | interes|ting eve|
|00002e30| 6e 74 73 2e 20 28 54 68 | 65 20 65 6e 74 72 79 20 |nts. (Th|e entry |
|00002e40| 66 6f 72 20 61 0a 58 6c | 69 6e 65 20 69 6e 20 75 |for a.Xl|ine in u|
|00002e50| 74 6d 70 20 69 73 20 74 | 68 65 20 6c 61 73 74 20 |tmp is t|he last |
|00002e60| 65 6e 74 72 79 20 66 6f | 72 20 74 68 61 74 20 6c |entry fo|r that l|
|00002e70| 69 6e 65 20 69 6e 20 77 | 74 6d 70 2e 29 20 70 74 |ine in w|tmp.) pt|
|00002e80| 79 20 73 75 70 70 6f 72 | 74 73 20 77 74 6d 70 0a |y suppor|ts wtmp.|
|00002e90| 58 66 75 6c 6c 79 2c 20 | 69 6e 20 74 68 65 20 73 |Xfully, |in the s|
|00002ea0| 61 6d 65 20 77 61 79 20 | 61 73 20 75 74 6d 70 2e |ame way |as utmp.|
|00002eb0| 20 59 6f 75 20 73 68 6f | 75 6c 64 20 6d 61 6b 65 | You sho|uld make|
|00002ec0| 20 77 74 6d 70 20 6d 6f | 64 65 20 36 34 34 2c 20 | wtmp mo|de 644, |
|00002ed0| 6f 77 6e 65 72 0a 58 72 | 6f 6f 74 20 6f 72 20 70 |owner.Xr|oot or p|
|00002ee0| 74 79 20 61 73 20 61 70 | 70 72 6f 70 72 69 61 74 |ty as ap|propriat|
|00002ef0| 65 2e 20 43 68 61 6e 67 | 65 20 50 54 59 57 54 4d |e. Chang|e PTYWTM|
|00002f00| 50 5f 46 49 4c 45 20 69 | 66 20 2f 75 73 72 2f 61 |P_FILE i|f /usr/a|
|00002f10| 64 6d 2f 77 74 6d 70 20 | 69 73 0a 58 73 6f 6d 65 |dm/wtmp |is.Xsome|
|00002f20| 77 68 65 72 65 20 65 6c | 73 65 2e 0a 58 0a 58 2d |where el|se..X.X-|
|00002f30| 2d 2d 2d 2d 20 50 72 65 | 73 73 20 72 65 74 75 72 |---- Pre|ss retur|
|00002f40| 6e 20 74 6f 20 63 6f 6e | 74 69 6e 75 65 2e 20 0a |n to con|tinue. .|
|00002f50| 58 0a 58 59 6f 75 20 63 | 61 6e 20 74 75 72 6e 20 |X.XYou c|an turn |
|00002f60| 6f 66 66 20 75 74 6d 70 | 20 73 75 70 70 6f 72 74 |off utmp| support|
|00002f70| 20 62 79 20 75 6e 63 6f | 6d 6d 65 6e 74 69 6e 67 | by unco|mmenting|
|00002f80| 20 74 68 65 20 4e 4f 5f | 55 54 4d 50 20 6c 69 6e | the NO_|UTMP lin|
|00002f90| 65 20 69 6e 0a 58 63 6f | 6e 66 69 67 2e 68 2e 20 |e in.Xco|nfig.h. |
|00002fa0| 28 4a 75 73 74 20 64 65 | 6c 65 74 65 20 74 68 65 |(Just de|lete the|
|00002fb0| 20 69 6e 69 74 69 61 6c | 20 2f 2a 2e 29 20 59 6f | initial| /*.) Yo|
|00002fc0| 75 20 63 61 6e 20 61 6c | 73 6f 20 74 75 72 6e 20 |u can al|so turn |
|00002fd0| 6f 66 66 20 73 75 70 70 | 6f 72 74 0a 58 66 6f 72 |off supp|ort.Xfor|
|00002fe0| 20 77 74 6d 70 2c 20 64 | 69 73 63 6f 6e 6e 65 63 | wtmp, d|isconnec|
|00002ff0| 74 61 62 6c 65 20 73 65 | 73 73 69 6f 6e 73 2c 20 |table se|ssions, |
|00003000| 6f 72 20 63 68 61 6e 67 | 69 6e 67 20 70 73 65 75 |or chang|ing pseu|
|00003010| 64 6f 2d 74 65 72 6d 69 | 6e 61 6c 20 66 69 6c 65 |do-termi|nal file|
|00003020| 0a 58 6f 77 6e 65 72 73 | 68 69 70 3b 20 6a 75 73 |.Xowners|hip; jus|
|00003030| 74 20 75 6e 63 6f 6d 6d | 65 6e 74 20 74 68 65 20 |t uncomm|ent the |
|00003040| 61 70 70 72 6f 70 72 69 | 61 74 65 20 6c 69 6e 65 |appropri|ate line|
|00003050| 2e 20 59 6f 75 20 63 61 | 6e 20 66 6f 72 63 65 20 |. You ca|n force |
|00003060| 75 73 65 20 6f 66 0a 58 | 65 61 63 68 20 6f 66 20 |use of.X|each of |
|00003070| 74 68 65 73 65 20 66 65 | 61 74 75 72 65 73 20 62 |these fe|atures b|
|00003080| 79 20 64 65 66 69 6e 69 | 6e 67 20 4d 55 53 54 5f |y defini|ng MUST_|
|00003090| 55 54 4d 50 2c 20 65 74 | 63 2e 2c 20 69 6e 20 74 |UTMP, et|c., in t|
|000030a0| 68 65 20 73 61 6d 65 20 | 77 61 79 2e 0a 58 0a 58 |he same |way..X.X|
|000030b0| 4e 6f 74 65 20 74 68 61 | 74 20 74 68 65 20 75 73 |Note tha|t the us|
|000030c0| 75 61 6c 20 6c 6f 67 69 | 6e 20 70 72 6f 67 72 61 |ual logi|n progra|
|000030d0| 6d 73 20 64 6f 20 74 68 | 65 69 72 20 6f 77 6e 20 |ms do th|eir own |
|000030e0| 77 74 6d 70 20 6d 61 6e | 61 67 65 6d 65 6e 74 2c |wtmp man|agement,|
|000030f0| 20 61 6e 64 0a 58 6d 61 | 6e 79 20 61 63 63 6f 75 | and.Xma|ny accou|
|00003100| 6e 74 69 6e 67 20 70 72 | 6f 67 72 61 6d 73 20 69 |nting pr|ograms i|
|00003110| 6e 63 6f 72 72 65 63 74 | 6c 79 20 65 71 75 61 74 |ncorrect|ly equat|
|00003120| 65 20 73 65 73 73 69 6f | 6e 20 74 69 6d 65 20 77 |e sessio|n time w|
|00003130| 69 74 68 20 63 6f 6e 6e | 65 63 74 0a 58 74 69 6d |ith conn|ect.Xtim|
|00003140| 65 2c 20 73 6f 20 75 73 | 65 72 73 20 77 69 6c 6c |e, so us|ers will|
|00003150| 20 72 61 72 65 6c 79 20 | 77 61 6e 74 20 77 74 6d | rarely |want wtm|
|00003160| 70 2e 20 41 73 20 6d 6f | 72 65 20 70 72 6f 67 72 |p. As mo|re progr|
|00003170| 61 6d 73 20 61 70 70 65 | 61 72 20 75 73 69 6e 67 |ams appe|ar using|
|00003180| 20 74 68 65 0a 58 70 74 | 79 20 69 6e 74 65 72 66 | the.Xpt|y interf|
|00003190| 61 63 65 2c 20 61 6e 64 | 20 61 73 20 6c 6f 67 69 |ace, and| as logi|
|000031a0| 6e 20 70 72 6f 67 72 61 | 6d 73 20 73 74 61 72 74 |n progra|ms start|
|000031b0| 20 75 73 69 6e 67 20 61 | 20 6d 6f 72 65 20 6c 6f | using a| more lo|
|000031c0| 67 69 63 61 6c 20 73 79 | 73 74 65 6d 0a 58 66 6f |gical sy|stem.Xfo|
|000031d0| 72 20 61 63 63 6f 75 6e | 74 69 6e 67 2c 20 4d 55 |r accoun|ting, MU|
|000031e0| 53 54 5f 57 54 4d 50 20 | 6d 61 79 20 62 65 63 6f |ST_WTMP |may beco|
|000031f0| 6d 65 20 61 6e 20 61 70 | 70 72 6f 70 72 69 61 74 |me an ap|propriat|
|00003200| 65 20 77 61 79 20 74 6f | 20 6d 6f 6e 69 74 6f 72 |e way to| monitor|
|00003210| 0a 58 70 73 65 75 64 6f | 2d 74 65 72 6d 69 6e 61 |.Xpseudo|-termina|
|00003220| 6c 20 75 73 61 67 65 2e | 20 46 6f 72 20 74 68 65 |l usage.| For the|
|00003230| 20 6d 6f 6d 65 6e 74 2c | 20 49 20 64 6f 20 6e 6f | moment,| I do no|
|00003240| 74 20 61 64 76 69 73 65 | 20 73 65 74 74 69 6e 67 |t advise| setting|
|00003250| 20 61 6e 79 20 4e 4f 0a | 58 6f 72 20 4d 55 53 54 | any NO.|Xor MUST|
|00003260| 2e 0a 58 0a 58 2d 2d 2d | 2d 2d 20 50 72 65 73 73 |..X.X---|-- Press|
|00003270| 20 72 65 74 75 72 6e 20 | 74 6f 20 63 6f 6e 74 69 | return |to conti|
|00003280| 6e 75 65 2e 20 0a 58 0a | 58 70 74 79 20 73 75 62 |nue. .X.|Xpty sub|
|00003290| 73 63 72 69 62 65 73 20 | 28 6e 6f 74 20 76 65 72 |scribes |(not ver|
|000032a0| 79 20 77 69 6c 6c 69 6e | 67 6c 79 29 20 74 6f 20 |y willin|gly) to |
|000032b0| 74 68 65 20 42 53 44 20 | 34 2e 33 20 6d 6f 64 65 |the BSD |4.3 mode|
|000032c0| 6c 20 6f 66 20 70 74 79 | 0a 58 70 72 6f 74 65 63 |l of pty|.Xprotec|
|000032d0| 74 69 6f 6e 2c 20 77 69 | 74 68 20 61 20 66 65 77 |tion, wi|th a few|
|000032e0| 20 74 77 69 73 74 73 2e | 20 41 6c 6c 20 70 74 79 | twists.| All pty|
|000032f0| 73 20 61 72 65 20 75 6e | 64 65 72 20 67 72 6f 75 |s are un|der grou|
|00003300| 70 20 74 74 79 2c 20 61 | 74 20 61 6c 6c 0a 58 74 |p tty, a|t all.Xt|
|00003310| 69 6d 65 73 3b 20 69 66 | 20 79 6f 75 20 64 6f 6e |imes; if| you don|
|00003320| 27 74 20 68 61 76 65 20 | 61 20 74 74 79 20 67 72 |'t have |a tty gr|
|00003330| 6f 75 70 2c 20 61 6c 6c | 20 70 74 79 73 20 73 68 |oup, all| ptys sh|
|00003340| 6f 75 6c 64 20 62 65 20 | 75 6e 64 65 72 20 73 6f |ould be |under so|
|00003350| 6d 65 0a 58 6f 74 68 65 | 72 20 70 72 6f 74 65 63 |me.Xothe|r protec|
|00003360| 74 65 64 20 67 72 6f 75 | 70 20 61 74 20 61 6c 6c |ted grou|p at all|
|00003370| 20 74 69 6d 65 73 2e 20 | 41 6e 79 77 61 79 2c 20 | times. |Anyway, |
|00003380| 70 74 79 20 77 69 6c 6c | 20 63 68 61 6e 67 65 20 |pty will| change |
|00003390| 74 68 65 20 67 72 6f 75 | 70 20 6f 66 0a 58 65 61 |the grou|p of.Xea|
|000033a0| 63 68 20 70 73 65 75 64 | 6f 2d 74 65 72 6d 69 6e |ch pseud|o-termin|
|000033b0| 61 6c 20 66 69 6c 65 20 | 74 6f 20 50 54 59 47 52 |al file |to PTYGR|
|000033c0| 4f 55 50 2c 20 64 65 66 | 61 75 6c 74 20 34 2c 20 |OUP, def|ault 4, |
|000033d0| 75 6e 64 65 72 20 2d 78 | 63 2e 0a 58 0a 58 0a 58 |under -x|c..X.X.X|
|000033e0| 53 69 6e 63 65 20 79 6f | 75 20 61 6c 72 65 61 64 |Since yo|u alread|
|000033f0| 79 20 68 61 76 65 20 61 | 20 74 74 79 20 67 72 6f |y have a| tty gro|
|00003400| 75 70 2c 20 67 69 64 20 | 34 2c 20 79 6f 75 27 72 |up, gid |4, you'r|
|00003410| 65 20 66 69 6e 65 2e 0a | 58 0a 58 5b 4e 6f 74 65 |e fine..|X.X[Note|
|00003420| 3a 20 49 66 20 79 6f 75 | 72 20 74 74 79 20 67 72 |: If you|r tty gr|
|00003430| 6f 75 70 20 69 73 20 73 | 6f 6d 65 74 68 69 6e 67 |oup is s|omething|
|00003440| 20 6f 74 68 65 72 20 74 | 68 61 6e 20 34 2c 20 61 | other t|han 4, a|
|00003450| 64 64 20 2d 44 50 54 59 | 47 52 4f 55 50 3d 36 20 |dd -DPTY|GROUP=6 |
|00003460| 28 6f 72 0a 58 77 68 61 | 74 65 76 65 72 29 20 74 |(or.Xwha|tever) t|
|00003470| 6f 20 74 68 65 20 4d 61 | 6b 65 66 69 6c 65 2e 5d |o the Ma|kefile.]|
|00003480| 0a 58 0a 58 0a 58 28 55 | 6e 64 65 72 20 43 61 73 |.X.X.X(U|nder Cas|
|00003490| 65 20 55 4e 2c 20 64 6f | 6e 27 74 20 77 6f 72 72 |e UN, do|n't worr|
|000034a0| 79 20 61 62 6f 75 74 20 | 61 6c 6c 20 74 68 69 73 |y about |all this|
|000034b0| 20 67 72 6f 75 70 20 73 | 74 75 66 66 2e 20 4a 75 | group s|tuff. Ju|
|000034c0| 73 74 20 6c 65 61 76 65 | 0a 58 50 54 59 47 52 4f |st leave|.XPTYGRO|
|000034d0| 55 50 20 61 6c 6f 6e 65 | 2e 29 0a 58 0a 58 2d 2d |UP alone|.).X.X--|
|000034e0| 2d 2d 2d 20 50 72 65 73 | 73 20 72 65 74 75 72 6e |--- Pres|s return|
|000034f0| 20 74 6f 20 63 6f 6e 74 | 69 6e 75 65 2e 20 0a 58 | to cont|inue. .X|
|00003500| 0a 58 55 6e 64 65 72 20 | 2d 78 63 2c 20 70 74 79 |.XUnder |-xc, pty|
|00003510| 20 63 68 61 6e 67 65 73 | 20 74 68 65 20 70 73 65 | changes| the pse|
|00003520| 75 64 6f 2d 74 65 72 6d | 69 6e 61 6c 20 6f 77 6e |udo-term|inal own|
|00003530| 65 72 20 74 6f 20 74 68 | 65 20 63 75 72 72 65 6e |er to th|e curren|
|00003540| 74 20 72 65 61 6c 0a 58 | 75 69 64 2e 20 54 68 65 |t real.X|uid. The|
|00003550| 20 66 61 63 74 20 74 68 | 61 74 20 74 65 72 6d 69 | fact th|at termi|
|00003560| 6e 61 6c 73 20 6e 65 65 | 64 20 74 6f 20 62 65 20 |nals nee|d to be |
|00003570| 69 6e 20 74 68 65 20 66 | 69 6c 65 20 68 69 65 72 |in the f|ile hier|
|00003580| 61 72 63 68 79 20 72 65 | 66 6c 65 63 74 73 20 61 |archy re|flects a|
|00003590| 0a 58 73 65 72 69 6f 75 | 73 20 66 61 69 6c 75 72 |.Xseriou|s failur|
|000035a0| 65 20 69 6e 20 74 68 65 | 20 42 53 44 20 74 65 72 |e in the| BSD ter|
|000035b0| 6d 69 6e 61 6c 20 6d 6f | 64 65 6c 3b 20 62 75 74 |minal mo|del; but|
|000035c0| 20 61 6e 79 77 61 79 2c | 20 6d 61 6e 79 20 70 72 | anyway,| many pr|
|000035d0| 6f 67 72 61 6d 73 0a 58 | 65 78 70 65 63 74 20 74 |ograms.X|expect t|
|000035e0| 6f 20 62 65 20 61 62 6c | 65 20 74 6f 20 66 6f 6f |o be abl|e to foo|
|000035f0| 6c 20 61 72 6f 75 6e 64 | 20 77 69 74 68 20 2f 64 |l around| with /d|
|00003600| 65 76 2f 74 74 79 2e 20 | 41 66 74 65 72 20 70 74 |ev/tty. |After pt|
|00003610| 79 20 69 73 20 64 6f 6e | 65 20 77 69 74 68 0a 58 |y is don|e with.X|
|00003620| 74 68 65 20 74 65 72 6d | 69 6e 61 6c 2c 20 69 74 |the term|inal, it|
|00003630| 20 73 65 74 73 20 74 68 | 65 20 6f 77 6e 65 72 20 | sets th|e owner |
|00003640| 62 61 63 6b 20 74 6f 20 | 69 74 73 20 65 66 66 65 |back to |its effe|
|00003650| 63 74 69 76 65 20 75 69 | 64 2e 20 59 6f 75 20 63 |ctive ui|d. You c|
|00003660| 61 6e 0a 58 6d 6f 64 69 | 66 79 20 74 68 69 73 20 |an.Xmodi|fy this |
|00003670| 62 65 68 61 76 69 6f 72 | 20 62 79 20 63 68 61 6e |behavior| by chan|
|00003680| 67 69 6e 67 20 50 54 59 | 4f 57 4e 45 52 20 66 72 |ging PTY|OWNER fr|
|00003690| 6f 6d 20 65 75 69 64 20 | 74 6f 20 73 6f 6d 65 74 |om euid |to somet|
|000036a0| 68 69 6e 67 20 65 6c 73 | 65 2e 0a 58 0a 58 55 6e |hing els|e..X.XUn|
|000036b0| 64 65 72 20 43 61 73 65 | 20 55 4e 2c 20 50 54 59 |der Case| UN, PTY|
|000036c0| 4f 57 4e 45 52 20 69 73 | 20 69 72 72 65 6c 65 76 |OWNER is| irrelev|
|000036d0| 61 6e 74 2e 0a 58 0a 58 | 2d 2d 2d 2d 2d 20 50 72 |ant..X.X|----- Pr|
|000036e0| 65 73 73 20 72 65 74 75 | 72 6e 20 74 6f 20 63 6f |ess retu|rn to co|
|000036f0| 6e 74 69 6e 75 65 2e 20 | 0a 58 0a 58 57 68 69 6c |ntinue. |.X.XWhil|
|00003700| 65 20 61 20 74 74 79 20 | 69 73 20 75 6e 75 73 65 |e a tty |is unuse|
|00003710| 64 2c 20 42 53 44 20 73 | 79 73 74 65 6d 73 20 74 |d, BSD s|ystems t|
|00003720| 72 61 64 69 74 69 6f 6e | 61 6c 6c 79 20 6c 65 61 |radition|ally lea|
|00003730| 76 65 20 69 74 20 75 6e | 70 72 6f 74 65 63 74 65 |ve it un|protecte|
|00003740| 64 2e 0a 58 55 6e 66 6f | 72 74 75 6e 61 74 65 6c |d..XUnfo|rtunatel|
|00003750| 79 2c 20 74 68 69 73 20 | 6c 65 61 76 65 73 20 73 |y, this |leaves s|
|00003760| 6f 6d 65 20 68 75 67 65 | 20 73 65 63 75 72 69 74 |ome huge| securit|
|00003770| 79 20 68 6f 6c 65 73 2e | 20 48 65 72 65 27 73 20 |y holes.| Here's |
|00003780| 6f 6e 65 20 6f 66 0a 58 | 74 68 65 20 62 69 67 67 |one of.X|the bigg|
|00003790| 65 73 74 20 61 64 76 61 | 6e 74 61 67 65 73 20 6f |est adva|ntages o|
|000037a0| 66 20 61 20 70 72 69 76 | 69 6c 65 67 65 64 20 70 |f a priv|ileged p|
|000037b0| 74 79 20 6d 61 6e 61 67 | 65 72 3a 20 75 6e 75 73 |ty manag|er: unus|
|000037c0| 65 64 20 74 74 79 73 20 | 64 6f 6e 27 74 0a 58 68 |ed ttys |don't.Xh|
|000037d0| 61 76 65 20 74 6f 20 62 | 65 20 6c 65 66 74 20 6f |ave to b|e left o|
|000037e0| 70 65 6e 20 66 6f 72 20 | 61 6e 79 20 72 61 6e 64 |pen for |any rand|
|000037f0| 6f 6d 20 70 72 6f 67 72 | 61 6d 20 74 6f 20 75 73 |om progr|am to us|
|00003800| 65 2e 20 41 66 74 65 72 | 20 69 74 27 73 20 64 6f |e. After| it's do|
|00003810| 6e 65 0a 58 77 69 74 68 | 20 61 20 70 73 65 75 64 |ne.Xwith| a pseud|
|00003820| 6f 2d 74 65 72 6d 69 6e | 61 6c 2c 20 70 74 79 20 |o-termin|al, pty |
|00003830| 63 68 61 6e 67 65 73 20 | 69 74 20 74 6f 20 6d 6f |changes |it to mo|
|00003840| 64 65 20 55 4e 55 53 45 | 44 50 54 59 4d 4f 44 45 |de UNUSE|DPTYMODE|
|00003850| 2c 20 64 65 66 61 75 6c | 74 0a 58 30 36 30 30 2e |, defaul|t.X0600.|
|00003860| 20 28 54 68 69 73 20 69 | 73 20 61 6e 6f 74 68 65 | (This i|s anothe|
|00003870| 72 20 63 61 73 65 20 6f | 66 20 61 20 70 6f 6f 72 |r case o|f a poor|
|00003880| 20 6d 6f 64 65 6c 20 66 | 6f 72 20 6b 6c 75 64 67 | model f|or kludg|
|00003890| 69 6e 67 20 70 74 79 20 | 73 75 70 70 6f 72 74 0a |ing pty |support.|
|000038a0| 58 69 6e 74 6f 20 75 6e | 70 72 69 76 69 6c 65 67 |Xinto un|privileg|
|000038b0| 65 64 20 70 72 6f 67 72 | 61 6d 73 2e 20 49 66 20 |ed progr|ams. If |
|000038c0| 79 6f 75 20 68 61 76 65 | 6e 27 74 20 73 65 74 20 |you have|n't set |
|000038d0| 75 70 20 73 65 70 61 72 | 61 74 65 20 70 74 79 20 |up separ|ate pty |
|000038e0| 62 61 6e 6b 73 0a 58 66 | 6f 72 20 70 74 79 2c 20 |banks.Xf|or pty, |
|000038f0| 61 6e 64 20 79 6f 75 20 | 72 65 61 6c 6c 79 20 77 |and you |really w|
|00003900| 61 6e 74 20 74 6f 20 61 | 6c 6c 6f 77 20 75 6e 70 |ant to a|llow unp|
|00003910| 72 69 76 69 6c 65 67 65 | 64 20 61 63 63 65 73 73 |rivilege|d access|
|00003920| 20 74 6f 20 75 6e 75 73 | 65 64 0a 58 70 74 79 73 | to unus|ed.Xptys|
|00003930| 2c 20 74 72 79 20 6d 6f | 64 65 20 30 36 36 30 20 |, try mo|de 0660 |
|00003940| 61 6e 64 20 6d 61 6b 65 | 20 74 68 6f 73 65 20 6f |and make| those o|
|00003950| 74 68 65 72 20 70 72 6f | 67 72 61 6d 73 20 73 65 |ther pro|grams se|
|00003960| 74 67 69 64 20 74 6f 20 | 74 74 79 2e 29 0a 58 0a |tgid to |tty.).X.|
|00003970| 58 41 20 74 74 79 20 74 | 68 61 74 20 73 6f 6d 65 |XA tty t|hat some|
|00003980| 6f 6e 65 27 73 20 75 73 | 69 6e 67 20 63 61 6e 20 |one's us|ing can |
|00003990| 62 65 20 69 6e 20 6d 61 | 6e 79 20 64 69 66 66 65 |be in ma|ny diffe|
|000039a0| 72 65 6e 74 20 6d 6f 64 | 65 73 2e 20 54 79 70 69 |rent mod|es. Typi|
|000039b0| 63 61 6c 6c 79 0a 58 55 | 53 45 44 50 54 59 4d 4f |cally.XU|SEDPTYMO|
|000039c0| 44 45 20 73 68 6f 75 6c | 64 20 62 65 20 30 36 30 |DE shoul|d be 060|
|000039d0| 30 2c 20 77 68 69 63 68 | 20 6d 65 61 6e 73 20 75 |0, which| means u|
|000039e0| 73 65 72 2d 6f 6e 6c 79 | 20 61 63 63 65 73 73 2c |ser-only| access,|
|000039f0| 20 6d 65 73 73 61 67 65 | 73 20 6f 66 66 2c 0a 58 | message|s off,.X|
|00003a00| 62 69 66 66 20 6f 66 66 | 2e 20 49 66 20 79 6f 75 |biff off|. If you|
|00003a10| 20 72 65 61 6c 6c 79 2c | 20 72 65 61 6c 6c 79 2c | really,| really,|
|00003a20| 20 72 65 61 6c 6c 79 20 | 77 61 6e 74 20 74 6f 20 | really |want to |
|00003a30| 6d 61 6b 65 20 74 68 65 | 20 6d 69 73 74 61 6b 65 |make the| mistake|
|00003a40| 20 6f 66 0a 58 68 61 76 | 69 6e 67 20 6d 65 73 73 | of.Xhav|ing mess|
|00003a50| 61 67 65 73 20 6f 72 20 | 62 69 66 66 20 6f 6e 20 |ages or |biff on |
|00003a60| 62 79 20 64 65 66 61 75 | 6c 74 2c 20 74 72 79 20 |by defau|lt, try |
|00003a70| 30 36 32 30 2c 20 30 37 | 30 30 2c 20 6f 72 20 30 |0620, 07|00, or 0|
|00003a80| 37 32 30 2e 20 4e 6f 74 | 65 0a 58 74 68 61 74 20 |720. Not|e.Xthat |
|00003a90| 74 68 65 20 77 6f 72 6c | 64 20 70 72 6f 74 65 63 |the worl|d protec|
|00003aa0| 74 69 6f 6e 20 73 68 6f | 75 6c 64 20 61 6c 77 61 |tion sho|uld alwa|
|00003ab0| 79 73 20 62 65 20 30 3a | 20 74 68 65 20 70 6f 69 |ys be 0:| the poi|
|00003ac0| 6e 74 20 6f 66 20 74 68 | 65 20 74 74 79 20 67 72 |nt of th|e tty gr|
|00003ad0| 6f 75 70 0a 58 69 73 20 | 74 68 61 74 20 6f 6e 6c |oup.Xis |that onl|
|00003ae0| 79 20 73 65 74 67 69 64 | 2d 74 74 79 20 70 72 6f |y setgid|-tty pro|
|00003af0| 67 72 61 6d 73 20 63 61 | 6e 20 61 63 63 65 73 73 |grams ca|n access|
|00003b00| 20 74 74 79 73 2e 0a 58 | 0a 58 41 73 20 75 73 75 | ttys..X|.XAs usu|
|00003b10| 61 6c 2c 20 79 6f 75 20 | 63 61 6e 27 74 20 64 6f |al, you |can't do|
|00003b20| 20 61 6e 79 74 68 69 6e | 67 20 61 62 6f 75 74 20 | anythin|g about |
|00003b30| 74 68 65 73 65 20 69 6e | 20 43 61 73 65 20 55 4e |these in| Case UN|
|00003b40| 2e 0a 58 0a 58 2d 2d 2d | 2d 2d 20 50 72 65 73 73 |..X.X---|-- Press|
|00003b50| 20 72 65 74 75 72 6e 20 | 74 6f 20 63 6f 6e 74 69 | return |to conti|
|00003b60| 6e 75 65 2e 20 0a 58 0a | 58 4e 6f 77 20 77 65 27 |nue. .X.|XNow we'|
|00003b70| 72 65 20 70 61 73 74 20 | 67 65 6e 65 72 69 63 20 |re past |generic |
|00003b80| 63 6f 6e 66 69 67 75 72 | 61 74 69 6f 6e 20 61 6e |configur|ation an|
|00003b90| 64 20 64 6f 77 6e 20 74 | 6f 20 79 6f 75 72 20 73 |d down t|o your s|
|00003ba0| 79 73 74 65 6d 27 73 0a | 58 6e 69 74 74 79 2d 67 |ystem's.|Xnitty-g|
|00003bb0| 72 69 74 74 79 2e 0a 58 | 0a 58 46 6f 72 20 70 75 |ritty..X|.XFor pu|
|00003bc0| 72 69 74 79 2c 20 70 74 | 79 20 68 61 73 20 53 49 |rity, pt|y has SI|
|00003bd0| 47 52 45 54 5f 54 59 50 | 45 2c 20 64 65 66 61 75 |GRET_TYP|E, defau|
|00003be0| 6c 74 20 69 6e 74 2c 20 | 61 73 20 74 68 65 20 74 |lt int, |as the t|
|00003bf0| 79 70 65 20 72 65 74 75 | 72 6e 65 64 20 62 79 20 |ype retu|rned by |
|00003c00| 61 0a 58 73 69 67 6e 61 | 6c 20 68 61 6e 64 6c 65 |a.Xsigna|l handle|
|00003c10| 72 2e 20 4f 6e 20 53 75 | 6e 73 20 61 6e 64 20 41 |r. On Su|ns and A|
|00003c20| 4e 53 49 2d 63 6f 6d 70 | 6c 69 61 6e 74 20 6d 61 |NSI-comp|liant ma|
|00003c30| 63 68 69 6e 65 73 2c 20 | 79 6f 75 20 73 68 6f 75 |chines, |you shou|
|00003c40| 6c 64 20 64 65 66 69 6e | 65 0a 58 53 49 47 52 45 |ld defin|e.XSIGRE|
|00003c50| 54 5f 54 59 50 45 3d 76 | 6f 69 64 2e 20 54 68 65 |T_TYPE=v|oid. The|
|00003c60| 6e 20 79 6f 75 20 63 61 | 6e 20 61 64 6d 69 72 65 |n you ca|n admire|
|00003c70| 20 74 68 65 20 6c 69 6e | 74 20 2d 68 61 78 63 20 | the lin|t -haxc |
|00003c80| 2a 2e 63 20 6f 75 74 70 | 75 74 2e 0a 58 0a 58 2d |*.c outp|ut..X.X-|
|00003c90| 2d 2d 2d 2d 20 50 72 65 | 73 73 20 72 65 74 75 72 |---- Pre|ss retur|
|00003ca0| 6e 20 74 6f 20 63 6f 6e | 74 69 6e 75 65 2e 20 0a |n to con|tinue. .|
|00003cb0| 58 0a 58 4f 55 54 42 55 | 46 53 49 5a 45 2c 20 64 |X.XOUTBU|FSIZE, d|
|00003cc0| 65 66 61 75 6c 74 20 31 | 36 33 38 34 2c 20 69 73 |efault 1|6384, is|
|00003cd0| 20 74 68 65 20 73 69 7a | 65 20 6f 66 20 74 68 65 | the siz|e of the|
|00003ce0| 20 62 75 66 66 65 72 20 | 70 74 79 20 6b 65 65 70 | buffer |pty keep|
|00003cf0| 73 20 62 65 74 77 65 65 | 6e 0a 58 74 68 65 20 69 |s betwee|n.Xthe i|
|00003d00| 6e 63 6f 6d 69 6e 67 20 | 64 61 74 61 20 61 6e 64 |ncoming |data and|
|00003d10| 20 74 68 65 20 70 73 65 | 75 64 6f 2d 74 74 79 2c | the pse|udo-tty,|
|00003d20| 20 61 6e 64 20 62 65 74 | 77 65 65 6e 20 74 68 65 | and bet|ween the|
|00003d30| 20 70 73 65 75 64 6f 2d | 74 74 79 20 61 6e 64 20 | pseudo-|tty and |
|00003d40| 74 68 65 0a 58 6f 75 74 | 67 6f 69 6e 67 20 64 61 |the.Xout|going da|
|00003d50| 74 61 2e 20 49 66 20 79 | 6f 75 20 77 61 6e 74 20 |ta. If y|ou want |
|00003d60| 74 6f 20 73 70 61 72 65 | 20 6c 65 73 73 20 74 68 |to spare| less th|
|00003d70| 61 6e 20 33 32 4b 20 70 | 65 72 20 70 74 79 20 6a |an 32K p|er pty j|
|00003d80| 75 73 74 20 66 6f 72 0a | 58 62 75 66 66 65 72 20 |ust for.|Xbuffer |
|00003d90| 73 70 61 63 65 2c 20 66 | 65 65 6c 20 66 72 65 65 |space, f|eel free|
|00003da0| 20 74 6f 20 63 68 61 6e | 67 65 20 74 68 69 73 2e | to chan|ge this.|
|00003db0| 0a 58 0a 58 2d 2d 2d 2d | 2d 20 50 72 65 73 73 20 |.X.X----|- Press |
|00003dc0| 72 65 74 75 72 6e 20 74 | 6f 20 63 6f 6e 74 69 6e |return t|o contin|
|00003dd0| 75 65 2e 20 0a 58 0a 58 | 47 45 4e 45 52 49 43 20 |ue. .X.X|GENERIC |
|00003de0| 69 73 20 61 6e 6f 74 68 | 65 72 20 63 6f 6e 63 65 |is anoth|er conce|
|00003df0| 73 73 69 6f 6e 20 74 6f | 20 41 4e 53 49 20 74 61 |ssion to| ANSI ta|
|00003e00| 73 74 65 2e 20 47 45 4e | 45 52 49 43 20 2a 20 73 |ste. GEN|ERIC * s|
|00003e10| 68 6f 75 6c 64 20 62 65 | 20 61 0a 58 70 6f 69 6e |hould be| a.Xpoin|
|00003e20| 74 65 72 20 74 79 70 65 | 20 74 68 61 74 20 61 6e |ter type| that an|
|00003e30| 79 20 6f 74 68 65 72 20 | 70 6f 69 6e 74 65 72 20 |y other |pointer |
|00003e40| 63 61 6e 20 62 65 20 73 | 61 66 65 6c 79 20 63 6f |can be s|afely co|
|00003e50| 6e 76 65 72 74 65 64 20 | 74 6f 20 61 6e 64 20 62 |nverted |to and b|
|00003e60| 61 63 6b 3b 0a 58 47 45 | 4e 45 52 49 43 20 69 73 |ack;.XGE|NERIC is|
|00003e70| 20 63 68 61 72 20 62 79 | 20 64 65 66 61 75 6c 74 | char by| default|
|00003e80| 2c 20 62 75 74 20 6f 6e | 20 6e 65 77 65 72 20 6d |, but on| newer m|
|00003e90| 61 63 68 69 6e 65 73 20 | 63 61 6e 20 62 65 20 73 |achines |can be s|
|00003ea0| 65 74 20 74 6f 20 76 6f | 69 64 2e 0a 58 41 73 20 |et to vo|id..XAs |
|00003eb0| 69 74 27 6c 6c 20 62 65 | 20 61 74 20 6c 65 61 73 |it'll be| at leas|
|00003ec0| 74 20 66 69 76 65 20 79 | 65 61 72 73 20 62 65 66 |t five y|ears bef|
|00003ed0| 6f 72 65 20 41 4e 53 49 | 20 6d 61 6e 61 67 65 73 |ore ANSI| manages|
|00003ee0| 20 74 6f 20 6f 75 74 6c | 61 77 20 63 68 61 72 20 | to outl|aw char |
|00003ef0| 2a 2c 0a 58 61 6e 64 20 | 61 73 20 76 6f 69 64 20 |*,.Xand |as void |
|00003f00| 2a 20 69 73 20 6f 66 74 | 65 6e 20 69 6e 76 61 6c |* is oft|en inval|
|00003f10| 69 64 2c 20 49 20 61 64 | 76 69 73 65 20 79 6f 75 |id, I ad|vise you|
|00003f20| 20 74 6f 20 6c 65 61 76 | 65 20 47 45 4e 45 52 49 | to leav|e GENERI|
|00003f30| 43 20 61 6c 6f 6e 65 2e | 0a 58 0a 58 2d 2d 2d 2d |C alone.|.X.X----|
|00003f40| 2d 20 50 72 65 73 73 20 | 72 65 74 75 72 6e 20 74 |- Press |return t|
|00003f50| 6f 20 63 6f 6e 74 69 6e | 75 65 2e 20 0a 58 0a 58 |o contin|ue. .X.X|
|00003f60| 70 74 79 20 61 74 74 65 | 6d 70 74 73 20 74 6f 20 |pty atte|mpts to |
|00003f70| 66 6f 72 77 61 72 64 20 | 77 69 6e 64 6f 77 2d 73 |forward |window-s|
|00003f80| 69 7a 65 20 63 68 61 6e | 67 65 73 20 74 72 61 6e |ize chan|ges tran|
|00003f90| 73 70 61 72 65 6e 74 6c | 79 2e 20 49 74 20 61 6c |sparentl|y. It al|
|00003fa0| 73 6f 0a 58 73 75 70 70 | 6f 72 74 73 20 74 68 65 |so.Xsupp|orts the|
|00003fb0| 20 61 75 78 69 6c 69 61 | 72 79 20 63 68 61 72 61 | auxilia|ry chara|
|00003fc0| 63 74 65 72 73 20 73 74 | 72 75 63 74 75 72 65 2c |cters st|ructure,|
|00003fd0| 20 77 68 69 63 68 20 6c | 65 74 73 20 79 6f 75 20 | which l|ets you |
|00003fe0| 74 79 70 65 20 61 0a 58 | 73 69 6e 67 6c 65 20 63 |type a.X|single c|
|00003ff0| 68 61 72 61 63 74 65 72 | 20 74 6f 20 67 65 74 20 |haracter| to get |
|00004000| 73 79 73 74 65 6d 20 61 | 6e 64 20 74 74 79 20 73 |system a|nd tty s|
|00004010| 74 61 74 75 73 2e 0a 58 | 0a 58 52 75 6e 6e 69 6e |tatus..X|.XRunnin|
|00004020| 67 20 24 20 6d 61 6e 20 | 34 20 74 74 79 20 7c 20 |g $ man |4 tty | |
|00004030| 73 65 64 20 27 73 2f 2f | 2f 67 27 20 7c 20 67 72 |sed 's//|/g' | gr|
|00004040| 65 70 20 2d 73 20 77 69 | 6e 73 69 7a 65 0a 58 52 |ep -s wi|nsize.XR|
|00004050| 65 66 6f 72 6d 61 74 74 | 69 6e 67 20 70 61 67 65 |eformatt|ing page|
|00004060| 2e 20 20 57 61 69 74 2e | 2e 2e 20 64 6f 6e 65 0a |. Wait.|.. done.|
|00004070| 58 0a 58 49 20 73 65 65 | 20 79 6f 75 20 64 6f 6e |X.XI see| you don|
|00004080| 27 74 20 68 61 76 65 20 | 77 69 6e 64 6f 77 20 73 |'t have |window s|
|00004090| 69 7a 65 73 2e 0a 58 59 | 6f 75 27 6c 6c 20 68 61 |izes..XY|ou'll ha|
|000040a0| 76 65 20 74 6f 20 63 6f | 6d 6d 65 6e 74 20 6f 75 |ve to co|mment ou|
|000040b0| 74 20 23 64 65 66 69 6e | 65 20 54 54 59 5f 57 49 |t #defin|e TTY_WI|
|000040c0| 4e 53 49 5a 45 20 69 6e | 20 63 6f 6e 66 69 67 2e |NSIZE in| config.|
|000040d0| 68 2e 0a 58 28 54 68 69 | 73 20 6d 61 79 20 62 65 |h..X(Thi|s may be|
|000040e0| 20 69 6e 61 63 63 75 72 | 61 74 65 20 6f 6e 20 53 | inaccur|ate on S|
|000040f0| 75 6e 73 3b 20 74 72 79 | 20 67 72 65 70 20 77 69 |uns; try| grep wi|
|00004100| 6e 73 69 7a 65 20 2f 75 | 73 72 2f 69 6e 63 6c 75 |nsize /u|sr/inclu|
|00004110| 64 65 2f 73 79 73 2f 74 | 74 2a 2e 68 2e 29 0a 58 |de/sys/t|t*.h.).X|
|00004120| 0a 58 5b 4e 6f 74 65 3a | 20 41 73 20 61 20 6d 61 |.X[Note:| As a ma|
|00004130| 74 74 65 72 20 6f 66 20 | 66 61 63 74 2c 20 74 68 |tter of |fact, th|
|00004140| 65 20 74 65 73 74 20 69 | 73 20 69 6e 61 63 63 75 |e test i|s inaccu|
|00004150| 72 61 74 65 20 75 6e 64 | 65 72 20 53 75 6e 4f 53 |rate und|er SunOS|
|00004160| 20 34 2e 30 2e 33 2c 0a | 58 77 68 69 63 68 20 64 | 4.0.3,.|Xwhich d|
|00004170| 6f 65 73 20 68 61 76 65 | 20 77 69 6e 64 6f 77 20 |oes have| window |
|00004180| 73 69 7a 65 73 2e 20 49 | 66 20 79 6f 75 20 68 61 |sizes. I|f you ha|
|00004190| 76 65 20 77 69 6e 64 6f | 77 20 73 69 7a 65 73 2c |ve windo|w sizes,|
|000041a0| 20 79 6f 75 20 64 6f 6e | 27 74 20 68 61 76 65 0a | you don|'t have.|
|000041b0| 58 74 6f 20 64 6f 20 61 | 6e 79 74 68 69 6e 67 2e |Xto do a|nything.|
|000041c0| 5d 0a 58 0a 58 52 75 6e | 6e 69 6e 67 20 24 20 6d |].X.XRun|ning $ m|
|000041d0| 61 6e 20 34 20 74 74 79 | 20 7c 20 73 65 64 20 27 |an 4 tty| | sed '|
|000041e0| 73 2f 2f 2f 67 27 20 7c | 20 67 72 65 70 20 2d 73 |s///g' || grep -s|
|000041f0| 20 61 75 78 63 68 61 72 | 73 0a 58 52 65 66 6f 72 | auxchar|s.XRefor|
|00004200| 6d 61 74 74 69 6e 67 20 | 70 61 67 65 2e 20 20 57 |matting |page. W|
|00004210| 61 69 74 2e 2e 2e 20 64 | 6f 6e 65 0a 58 0a 58 49 |ait... d|one.X.XI|
|00004220| 20 73 65 65 20 79 6f 75 | 20 64 6f 6e 27 74 20 68 | see you| don't h|
|00004230| 61 76 65 20 61 75 78 69 | 6c 69 61 72 79 20 63 68 |ave auxi|liary ch|
|00004240| 61 72 61 63 74 65 72 73 | 2e 0a 58 0a 58 5b 4e 6f |aracters|..X.X[No|
|00004250| 74 65 3a 20 54 68 69 73 | 20 69 73 20 74 68 65 20 |te: This| is the |
|00004260| 75 73 75 61 6c 2e 20 49 | 66 20 79 6f 75 20 68 61 |usual. I|f you ha|
|00004270| 76 65 20 61 75 78 69 6c | 69 61 72 79 20 63 68 61 |ve auxil|iary cha|
|00004280| 72 61 63 74 65 72 73 20 | 61 6e 64 20 77 61 6e 74 |racters |and want|
|00004290| 20 70 74 79 0a 58 74 6f | 20 75 6e 64 65 72 73 74 | pty.Xto| underst|
|000042a0| 61 6e 64 20 74 68 65 6d | 2c 20 75 6e 63 6f 6d 6d |and them|, uncomm|
|000042b0| 65 6e 74 20 23 64 65 66 | 69 6e 65 20 54 54 59 5f |ent #def|ine TTY_|
|000042c0| 41 55 58 43 48 41 52 53 | 20 69 6e 20 63 6f 6e 66 |AUXCHARS| in conf|
|000042d0| 69 67 2e 68 2e 5d 0a 58 | 0a 58 2d 2d 2d 2d 2d 20 |ig.h.].X|.X----- |
|000042e0| 50 72 65 73 73 20 72 65 | 74 75 72 6e 20 74 6f 20 |Press re|turn to |
|000042f0| 63 6f 6e 74 69 6e 75 65 | 2e 20 0a 58 0a 58 70 74 |continue|. .X.Xpt|
|00004300| 79 20 61 6c 73 6f 20 70 | 75 74 73 20 73 69 67 69 |y also p|uts sigi|
|00004310| 6e 74 65 72 72 75 70 74 | 28 29 20 61 6e 64 20 75 |nterrupt|() and u|
|00004320| 73 6c 65 65 70 28 29 20 | 74 6f 20 67 6f 6f 64 20 |sleep() |to good |
|00004330| 75 73 65 20 69 6e 20 77 | 6f 72 6b 69 6e 67 0a 58 |use in w|orking.X|
|00004340| 61 72 6f 75 6e 64 20 42 | 53 44 20 6c 69 6d 69 74 |around B|SD limit|
|00004350| 61 74 69 6f 6e 73 2e 20 | 57 69 74 68 6f 75 74 20 |ations. |Without |
|00004360| 73 69 67 69 6e 74 65 72 | 72 75 70 74 28 29 2c 20 |siginter|rupt(), |
|00004370| 74 68 65 72 65 20 69 73 | 20 61 62 73 6f 6c 75 74 |there is| absolut|
|00004380| 65 6c 79 0a 58 6e 6f 20 | 77 61 79 20 74 6f 20 67 |ely.Xno |way to g|
|00004390| 65 74 20 70 65 72 2d 70 | 72 6f 63 65 73 73 20 6e |et per-p|rocess n|
|000043a0| 6f 6e 2d 62 6c 6f 63 6b | 69 6e 67 20 49 2f 4f 2c |on-block|ing I/O,|
|000043b0| 20 73 6f 20 70 74 79 20 | 6d 61 79 20 62 6c 6f 63 | so pty |may bloc|
|000043c0| 6b 20 77 68 65 6e 20 69 | 74 0a 58 64 6f 65 73 6e |k when i|t.Xdoesn|
|000043d0| 27 74 20 68 61 76 65 20 | 74 6f 20 28 6e 61 6d 65 |'t have |to (name|
|000043e0| 6c 79 2c 20 77 68 65 6e | 20 69 74 20 68 61 73 20 |ly, when| it has |
|000043f0| 4e 20 62 79 74 65 73 20 | 74 6f 20 77 72 69 74 65 |N bytes |to write|
|00004400| 20 74 6f 20 74 68 65 20 | 6f 75 74 70 75 74 2c 0a | to the |output,.|
|00004410| 58 74 68 65 20 6f 75 74 | 70 75 74 20 69 73 20 61 |Xthe out|put is a|
|00004420| 20 70 69 70 65 20 77 69 | 74 68 20 4d 20 62 79 74 | pipe wi|th M byt|
|00004430| 65 73 20 6f 66 20 73 70 | 61 63 65 2c 20 61 6e 64 |es of sp|ace, and|
|00004440| 20 4e 20 3e 20 4d 20 3e | 20 30 29 2e 20 49 66 20 | N > M >| 0). If |
|00004450| 79 6f 75 0a 58 64 65 66 | 69 6e 65 20 53 49 47 49 |you.Xdef|ine SIGI|
|00004460| 4e 54 45 52 52 55 50 54 | 20 28 61 73 20 64 65 66 |NTERRUPT| (as def|
|00004470| 61 75 6c 74 29 2c 20 70 | 74 79 20 77 69 6c 6c 20 |ault), p|ty will |
|00004480| 74 61 6b 65 20 73 6f 6d | 65 20 65 78 74 72 61 20 |take som|e extra |
|00004490| 65 66 66 6f 72 74 20 74 | 6f 0a 58 6e 65 76 65 72 |effort t|o.Xnever|
|000044a0| 2c 20 65 76 65 72 2c 20 | 65 76 65 72 20 62 6c 6f |, ever, |ever blo|
|000044b0| 63 6b 20 77 68 65 6e 20 | 69 74 20 64 6f 65 73 6e |ck when |it doesn|
|000044c0| 27 74 20 68 61 76 65 20 | 74 6f 2e 0a 58 0a 58 41 |'t have |to..X.XA|
|000044d0| 74 20 6f 6e 65 20 70 6f | 69 6e 74 2c 20 70 74 79 |t one po|int, pty|
|000044e0| 20 70 61 75 73 65 73 20 | 74 6f 20 6b 6c 75 64 67 | pauses |to kludg|
|000044f0| 65 20 61 72 6f 75 6e 64 | 20 61 20 63 6f 6d 6d 6f |e around| a commo|
|00004500| 6e 20 62 75 67 20 69 6e | 20 55 4e 49 58 2d 64 6f |n bug in| UNIX-do|
|00004510| 6d 61 69 6e 0a 58 73 6f | 63 6b 65 74 73 2e 20 57 |main.Xso|ckets. W|
|00004520| 69 74 68 20 75 73 6c 65 | 65 70 28 29 20 69 74 20 |ith usle|ep() it |
|00004530| 77 69 6c 6c 20 70 61 75 | 73 65 20 6d 75 63 68 20 |will pau|se much |
|00004540| 6d 6f 72 65 20 62 72 69 | 65 66 6c 79 2e 20 54 68 |more bri|efly. Th|
|00004550| 69 73 20 6d 61 6b 65 73 | 0a 58 72 65 63 6f 6e 6e |is makes|.Xreconn|
|00004560| 65 63 74 73 20 6d 75 63 | 68 20 66 61 73 74 65 72 |ects muc|h faster|
|00004570| 2e 0a 58 0a 58 52 75 6e | 6e 69 6e 67 20 24 20 6d |..X.XRun|ning $ m|
|00004580| 61 6e 20 73 69 67 69 6e | 74 65 72 72 75 70 74 20 |an sigin|terrupt |
|00004590| 7c 20 73 65 64 20 27 73 | 2f 2f 2f 67 27 20 7c 20 || sed 's|///g' | |
|000045a0| 67 72 65 70 20 2d 73 20 | 73 69 67 69 6e 74 65 72 |grep -s |siginter|
|000045b0| 72 75 70 74 0a 58 52 65 | 66 6f 72 6d 61 74 74 69 |rupt.XRe|formatti|
|000045c0| 6e 67 20 70 61 67 65 2e | 20 20 57 61 69 74 2e 2e |ng page.| Wait..|
|000045d0| 2e 20 64 6f 6e 65 0a 58 | 0a 58 49 20 73 65 65 20 |. done.X|.XI see |
|000045e0| 79 6f 75 20 68 61 76 65 | 20 73 69 67 69 6e 74 65 |you have| siginte|
|000045f0| 72 72 75 70 74 28 29 2e | 20 47 6f 6f 64 2e 0a 58 |rrupt().| Good..X|
|00004600| 0a 58 57 65 69 72 64 2c | 20 61 72 65 20 79 6f 75 |.XWeird,| are you|
|00004610| 20 42 53 44 20 34 2e 33 | 3f 0a 58 0a 58 5b 4e 6f | BSD 4.3|?.X.X[No|
|00004620| 74 65 3a 20 57 69 74 68 | 6f 75 74 20 73 69 67 69 |te: With|out sigi|
|00004630| 6e 74 65 72 72 75 70 74 | 28 29 2c 20 79 6f 75 20 |nterrupt|(), you |
|00004640| 68 61 76 65 20 74 6f 20 | 63 6f 6d 6d 65 6e 74 20 |have to |comment |
|00004650| 6f 75 74 20 23 64 65 66 | 69 6e 65 0a 58 53 49 47 |out #def|ine.XSIG|
|00004660| 49 4e 54 45 52 52 55 50 | 54 20 69 6e 20 63 6f 6e |INTERRUP|T in con|
|00004670| 66 69 67 2e 68 2e 5d 0a | 58 0a 58 52 75 6e 6e 69 |fig.h.].|X.XRunni|
|00004680| 6e 67 20 24 20 6d 61 6e | 20 75 73 6c 65 65 70 20 |ng $ man| usleep |
|00004690| 7c 20 73 65 64 20 27 73 | 2f 2f 2f 67 27 20 7c 20 || sed 's|///g' | |
|000046a0| 67 72 65 70 20 2d 73 20 | 75 73 6c 65 65 70 0a 58 |grep -s |usleep.X|
|000046b0| 52 65 66 6f 72 6d 61 74 | 74 69 6e 67 20 70 61 67 |Reformat|ting pag|
|000046c0| 65 2e 20 20 57 61 69 74 | 2e 2e 2e 20 64 6f 6e 65 |e. Wait|... done|
|000046d0| 0a 58 0a 58 49 20 73 65 | 65 20 79 6f 75 20 68 61 |.X.XI se|e you ha|
|000046e0| 76 65 20 75 73 6c 65 65 | 70 28 29 2e 20 47 6f 6f |ve uslee|p(). Goo|
|000046f0| 64 2e 0a 58 0a 58 5b 4e | 6f 74 65 3a 20 57 69 74 |d..X.X[N|ote: Wit|
|00004700| 68 6f 75 74 20 75 73 6c | 65 65 70 28 29 2c 20 79 |hout usl|eep(), y|
|00004710| 6f 75 20 68 61 76 65 20 | 74 6f 20 63 6f 6d 6d 65 |ou have |to comme|
|00004720| 6e 74 20 6f 75 74 20 23 | 64 65 66 69 6e 65 20 55 |nt out #|define U|
|00004730| 53 4c 45 45 50 20 69 6e | 0a 58 63 6f 6e 66 69 67 |SLEEP in|.Xconfig|
|00004740| 2e 68 2e 5d 0a 58 0a 58 | 2d 2d 2d 2d 2d 20 50 72 |.h.].X.X|----- Pr|
|00004750| 65 73 73 20 72 65 74 75 | 72 6e 20 74 6f 20 63 6f |ess retu|rn to co|
|00004760| 6e 74 69 6e 75 65 2e 20 | 0a 58 0a 58 46 69 6e 61 |ntinue. |.X.XFina|
|00004770| 6c 6c 79 20 28 61 6c 6d | 6f 73 74 20 64 6f 6e 65 |lly (alm|ost done|
|00004780| 20 77 69 74 68 20 63 6f | 6e 66 69 67 75 72 61 74 | with co|nfigurat|
|00004790| 69 6f 6e 21 29 2c 20 77 | 65 20 68 61 76 65 20 74 |ion!), w|e have t|
|000047a0| 6f 20 6d 61 6b 65 20 73 | 75 72 65 20 74 68 61 74 |o make s|ure that|
|000047b0| 20 79 6f 75 0a 58 68 61 | 76 65 20 55 4e 49 58 2d | you.Xha|ve UNIX-|
|000047c0| 64 6f 6d 61 69 6e 20 73 | 6f 63 6b 65 74 73 2c 20 |domain s|ockets, |
|000047d0| 61 6e 64 20 63 68 65 63 | 6b 20 77 68 65 74 68 65 |and chec|k whethe|
|000047e0| 72 20 79 6f 75 20 68 61 | 76 65 20 66 69 6c 65 20 |r you ha|ve file |
|000047f0| 64 65 73 63 72 69 70 74 | 6f 72 0a 58 70 61 73 73 |descript|or.Xpass|
|00004800| 69 6e 67 2e 0a 58 0a 58 | 52 75 6e 6e 69 6e 67 20 |ing..X.X|Running |
|00004810| 24 20 74 65 73 74 20 2d | 72 20 2f 75 73 72 2f 69 |$ test -|r /usr/i|
|00004820| 6e 63 6c 75 64 65 2f 73 | 79 73 2f 75 6e 2e 68 0a |nclude/s|ys/un.h.|
|00004830| 58 0a 58 49 20 73 65 65 | 20 79 6f 75 20 68 61 76 |X.XI see| you hav|
|00004840| 65 20 55 4e 49 58 2d 64 | 6f 6d 61 69 6e 20 73 6f |e UNIX-d|omain so|
|00004850| 63 6b 65 74 73 2e 20 47 | 6f 6f 64 2e 0a 58 0a 58 |ckets. G|ood..X.X|
|00004860| 5b 4e 6f 74 65 3a 20 49 | 66 20 3c 73 79 73 2f 75 |[Note: I|f <sys/u|
|00004870| 6e 2e 68 3e 20 69 73 6e | 27 74 20 74 68 65 72 65 |n.h> isn|'t there|
|00004880| 2c 20 79 6f 75 20 70 72 | 6f 62 61 62 6c 79 20 64 |, you pr|obably d|
|00004890| 6f 6e 27 74 20 68 61 76 | 65 20 55 4e 49 58 2d 64 |on't hav|e UNIX-d|
|000048a0| 6f 6d 61 69 6e 0a 58 73 | 6f 63 6b 65 74 73 2c 20 |omain.Xs|ockets, |
|000048b0| 77 68 69 63 68 20 6d 65 | 61 6e 73 20 79 6f 75 20 |which me|ans you |
|000048c0| 63 61 6e 27 74 20 68 61 | 76 65 20 64 69 73 63 6f |can't ha|ve disco|
|000048d0| 6e 6e 65 63 74 61 62 6c | 65 20 73 65 73 73 69 6f |nnectabl|e sessio|
|000048e0| 6e 73 2e 20 44 65 66 69 | 6e 65 0a 58 4e 4f 5f 55 |ns. Defi|ne.XNO_U|
|000048f0| 4e 49 58 53 4f 43 4b 53 | 20 69 6e 20 63 6f 6e 66 |NIXSOCKS| in conf|
|00004900| 69 67 2e 68 2e 5d 0a 58 | 0a 58 52 75 6e 6e 69 6e |ig.h.].X|.XRunnin|
|00004910| 67 20 24 20 6d 61 6e 20 | 72 65 63 76 6d 73 67 20 |g $ man |recvmsg |
|00004920| 7c 20 73 65 64 20 27 73 | 2f 2f 2f 67 27 20 7c 20 || sed 's|///g' | |
|00004930| 67 72 65 70 20 2d 73 20 | 72 69 67 68 74 73 0a 58 |grep -s |rights.X|
|00004940| 52 65 66 6f 72 6d 61 74 | 74 69 6e 67 20 70 61 67 |Reformat|ting pag|
|00004950| 65 2e 20 20 57 61 69 74 | 2e 2e 2e 20 64 6f 6e 65 |e. Wait|... done|
|00004960| 0a 58 0a 58 49 20 73 65 | 65 20 79 6f 75 20 68 61 |.X.XI se|e you ha|
|00004970| 76 65 20 66 69 6c 65 20 | 64 65 73 63 72 69 70 74 |ve file |descript|
|00004980| 6f 72 20 70 61 73 73 69 | 6e 67 2e 20 47 6f 6f 64 |or passi|ng. Good|
|00004990| 2e 20 28 59 6f 75 72 20 | 66 64 20 70 61 73 73 69 |. (Your |fd passi|
|000049a0| 6e 67 20 6d 61 79 20 62 | 65 0a 58 62 75 67 67 79 |ng may b|e.Xbuggy|
|000049b0| 2c 20 61 73 20 69 74 27 | 73 20 61 20 72 65 6c 61 |, as it'|s a rela|
|000049c0| 74 69 76 65 6c 79 20 6e | 65 77 2c 20 70 6f 77 65 |tively n|ew, powe|
|000049d0| 72 66 75 6c 2c 20 61 6e | 64 20 72 61 72 65 6c 79 |rful, an|d rarely|
|000049e0| 20 65 78 70 6c 6f 69 74 | 65 64 0a 58 66 65 61 74 | exploit|ed.Xfeat|
|000049f0| 75 72 65 2e 20 49 66 20 | 79 6f 75 20 68 61 76 65 |ure. If |you have|
|00004a00| 20 74 72 6f 75 62 6c 65 | 2c 20 74 72 79 20 64 65 | trouble|, try de|
|00004a10| 66 69 6e 69 6e 67 20 4e | 4f 5f 46 44 50 41 53 53 |fining N|O_FDPASS|
|00004a20| 49 4e 47 2e 29 0a 58 0a | 58 5b 4e 6f 74 65 3a 20 |ING.).X.|X[Note: |
|00004a30| 49 66 20 74 68 65 72 65 | 20 69 73 6e 27 74 20 61 |If there| isn't a|
|00004a40| 20 72 65 63 76 6d 73 67 | 28 29 20 6d 61 6e 20 70 | recvmsg|() man p|
|00004a50| 61 67 65 20 6d 65 6e 74 | 69 6f 6e 69 6e 67 20 61 |age ment|ioning a|
|00004a60| 63 63 65 73 73 20 72 69 | 67 68 74 73 2c 20 79 6f |ccess ri|ghts, yo|
|00004a70| 75 0a 58 70 72 6f 62 61 | 62 6c 79 20 64 6f 6e 27 |u.Xproba|bly don'|
|00004a80| 74 20 68 61 76 65 20 66 | 69 6c 65 20 64 65 73 63 |t have f|ile desc|
|00004a90| 72 69 70 74 6f 72 20 70 | 61 73 73 69 6e 67 2e 20 |riptor p|assing. |
|00004aa0| 54 68 69 73 20 69 73 6e | 27 74 20 61 20 64 69 73 |This isn|'t a dis|
|00004ab0| 61 73 74 65 72 2c 0a 58 | 74 68 6f 75 67 68 20 69 |aster,.X|though i|
|00004ac0| 74 20 6d 65 61 6e 73 20 | 74 68 61 74 20 72 65 63 |t means |that rec|
|00004ad0| 6f 6e 6e 65 63 74 65 64 | 20 73 65 73 73 69 6f 6e |onnected| session|
|00004ae0| 73 20 77 69 6c 6c 20 62 | 65 20 61 73 20 73 6c 6f |s will b|e as slo|
|00004af0| 77 20 61 73 20 74 68 65 | 79 20 61 72 65 20 69 6e |w as the|y are in|
|00004b00| 0a 58 70 72 6f 67 72 61 | 6d 73 20 6f 74 68 65 72 |.Xprogra|ms other|
|00004b10| 20 74 68 61 6e 20 70 74 | 79 2e 20 44 65 66 69 6e | than pt|y. Defin|
|00004b20| 65 20 4e 4f 5f 46 44 50 | 41 53 53 49 4e 47 2e 5d |e NO_FDP|ASSING.]|
|00004b30| 0a 58 0a 58 2d 2d 2d 2d | 2d 20 50 72 65 73 73 20 |.X.X----|- Press |
|00004b40| 72 65 74 75 72 6e 20 74 | 6f 20 63 6f 6e 74 69 6e |return t|o contin|
|00004b50| 75 65 2e 20 0a 58 0a 58 | 57 68 65 77 21 20 57 65 |ue. .X.X|Whew! We|
|00004b60| 27 76 65 20 66 69 6e 61 | 6c 6c 79 20 6d 61 64 65 |'ve fina|lly made|
|00004b70| 20 69 74 20 74 68 72 6f | 75 67 68 20 63 6f 6e 66 | it thro|ugh conf|
|00004b80| 69 67 75 72 61 74 69 6f | 6e 2e 20 49 66 20 79 6f |iguratio|n. If yo|
|00004b90| 75 20 77 61 6e 74 2c 20 | 74 72 79 0a 58 72 75 6e |u want, |try.Xrun|
|00004ba0| 6e 69 6e 67 20 6c 69 6e | 74 20 2d 68 61 78 63 20 |ning lin|t -haxc |
|00004bb0| 2a 2e 63 20 6f 72 20 77 | 68 61 74 65 76 65 72 20 |*.c or w|hatever |
|00004bc0| 79 6f 75 72 20 66 61 76 | 6f 72 69 74 65 20 63 6f |your fav|orite co|
|00004bd0| 64 65 20 63 68 65 63 6b | 65 72 20 69 73 3b 20 74 |de check|er is; t|
|00004be0| 68 65 0a 58 6c 69 6e 74 | 20 68 65 72 65 20 67 69 |he.Xlint| here gi|
|00004bf0| 76 65 73 20 73 6f 6d 65 | 20 62 6f 67 75 73 20 65 |ves some| bogus e|
|00004c00| 72 72 6f 72 73 20 61 62 | 6f 75 74 20 63 6f 72 72 |rrors ab|out corr|
|00004c10| 65 63 74 20 63 68 61 72 | 20 2a 20 63 61 73 74 73 |ect char| * casts|
|00004c20| 2c 20 61 6e 20 65 72 72 | 6f 72 0a 58 62 65 63 61 |, an err|or.Xbeca|
|00004c30| 75 73 65 20 74 68 65 20 | 53 49 47 5f 49 47 4e 20 |use the |SIG_IGN |
|00004c40| 64 65 66 69 6e 69 74 69 | 6f 6e 20 69 73 20 75 6e |definiti|on is un|
|00004c50| 70 6f 72 74 61 62 6c 65 | 2c 20 61 6e 64 20 61 20 |portable|, and a |
|00004c60| 63 6f 75 70 6c 65 20 6f | 66 20 62 7a 65 72 6f 0a |couple o|f bzero.|
|00004c70| 58 63 6f 6d 70 6c 61 69 | 6e 74 73 20 62 65 63 61 |Xcomplai|nts beca|
|00004c80| 75 73 65 20 46 44 5f 5a | 45 52 4f 20 69 73 6e 27 |use FD_Z|ERO isn'|
|00004c90| 74 20 64 65 66 69 6e 65 | 64 20 76 65 72 79 20 77 |t define|d very w|
|00004ca0| 65 6c 6c 2e 0a 58 0a 58 | 49 66 20 79 6f 75 27 72 |ell..X.X|If you'r|
|00004cb0| 65 20 6f 6e 20 61 6e 20 | 6f 6c 64 20 73 79 73 74 |e on an |old syst|
|00004cc0| 65 6d 20 77 69 74 68 6f | 75 74 20 46 44 5f 5a 45 |em witho|ut FD_ZE|
|00004cd0| 52 4f 2c 20 46 44 5f 53 | 45 54 2c 20 61 6e 64 20 |RO, FD_S|ET, and |
|00004ce0| 46 44 5f 49 53 53 45 54 | 20 69 6e 0a 58 3c 73 79 |FD_ISSET| in.X<sy|
|00004cf0| 73 2f 74 79 70 65 73 2e | 68 3e 2c 20 49 20 72 65 |s/types.|h>, I re|
|00004d00| 63 6f 6d 6d 65 6e 64 20 | 79 6f 75 20 75 70 67 72 |commend |you upgr|
|00004d10| 61 64 65 2e 20 54 72 79 | 20 63 6f 70 79 69 6e 67 |ade. Try| copying|
|00004d20| 20 66 69 6c 65 2e 68 2e | 6f 6c 64 20 74 6f 20 66 | file.h.|old to f|
|00004d30| 69 6c 65 2e 68 0a 58 28 | 74 68 65 20 6f 72 69 67 |ile.h.X(|the orig|
|00004d40| 69 6e 61 6c 20 76 65 72 | 73 69 6f 6e 20 69 73 20 |inal ver|sion is |
|00004d50| 69 6e 20 66 69 6c 65 2e | 68 2e 6e 65 77 29 2e 0a |in file.|h.new)..|
|00004d60| 58 0a 58 57 65 27 72 65 | 20 6e 65 61 72 6c 79 20 |X.XWe're| nearly |
|00004d70| 61 74 20 74 68 65 20 65 | 6e 64 2e 20 43 68 61 6e |at the e|nd. Chan|
|00004d80| 67 65 20 43 43 20 61 6e | 64 20 43 43 4f 50 54 53 |ge CC an|d CCOPTS|
|00004d90| 20 69 6e 20 74 68 65 20 | 4d 61 6b 65 66 69 6c 65 | in the |Makefile|
|00004da0| 20 66 6f 72 20 61 6e 79 | 0a 58 6c 61 73 74 2d 6d | for any|.Xlast-m|
|00004db0| 69 6e 75 74 65 20 61 64 | 64 69 74 69 6f 6e 73 3b |inute ad|ditions;|
|00004dc0| 20 69 66 20 79 6f 75 27 | 72 65 20 77 6f 72 72 69 | if you'|re worri|
|00004dd0| 65 64 2c 20 63 68 61 6e | 67 65 20 2d 73 20 74 6f |ed, chan|ge -s to|
|00004de0| 20 2d 67 20 66 6f 72 20 | 64 65 62 75 67 67 69 6e | -g for |debuggin|
|00004df0| 67 2e 0a 58 4e 6f 77 20 | 63 6f 6d 70 69 6c 65 21 |g..XNow |compile!|
|00004e00| 20 25 20 28 64 61 74 65 | 3b 20 6d 61 6b 65 29 20 | % (date|; make) |
|00004e10| 3e 3e 26 20 4d 61 6b 65 | 6c 6f 67 20 26 20 61 6e |>>& Make|log & an|
|00004e20| 64 20 63 6f 6d 65 20 62 | 61 63 6b 20 74 6f 20 74 |d come b|ack to t|
|00004e30| 68 69 73 20 73 63 72 69 | 70 74 2e 0a 58 0a 58 2d |his scri|pt..X.X-|
|00004e40| 2d 2d 2d 2d 20 50 72 65 | 73 73 20 72 65 74 75 72 |---- Pre|ss retur|
|00004e50| 6e 20 74 6f 20 63 6f 6e | 74 69 6e 75 65 2e 20 0a |n to con|tinue. .|
|00004e60| 58 0a 58 57 68 69 6c 65 | 20 74 68 65 20 70 72 6f |X.XWhile| the pro|
|00004e70| 67 72 61 6d 20 69 73 20 | 63 6f 6d 70 69 6c 69 6e |gram is |compilin|
|00004e80| 67 2c 20 6c 65 74 27 73 | 20 73 74 61 72 74 20 70 |g, let's| start p|
|00004e90| 72 6f 76 69 64 69 6e 67 | 20 73 6f 6d 65 20 73 75 |roviding| some su|
|00004ea0| 70 70 6f 72 74 2e 0a 58 | 28 49 66 20 74 68 65 20 |pport..X|(If the |
|00004eb0| 63 6f 6d 70 69 6c 65 20 | 66 69 6e 69 73 68 65 73 |compile |finishes|
|00004ec0| 20 6f 72 20 68 61 73 20 | 61 6e 20 65 72 72 6f 72 | or has |an error|
|00004ed0| 2c 20 6a 75 73 74 20 69 | 67 6e 6f 72 65 20 69 74 |, just i|gnore it|
|00004ee0| 20 66 6f 72 20 74 68 65 | 0a 58 6d 6f 6d 65 6e 74 | for the|.Xmoment|
|00004ef0| 2e 29 20 54 68 65 73 65 | 20 61 72 65 20 73 6f 6d |.) These| are som|
|00004f00| 65 20 72 65 61 6c 20 63 | 68 61 6e 67 65 73 2c 20 |e real c|hanges, |
|00004f10| 73 6f 20 77 61 74 63 68 | 20 6f 75 74 21 0a 58 0a |so watch| out!.X.|
|00004f20| 58 46 69 72 73 74 2d 2d | 2d 69 6e 20 43 61 73 65 |XFirst--|-in Case|
|00004f30| 20 50 54 59 20 6f 6e 6c | 79 21 2d 2d 2d 6d 61 6b | PTY onl|y!---mak|
|00004f40| 65 20 61 20 6e 65 77 20 | 75 69 64 2c 20 70 74 79 |e a new |uid, pty|
|00004f50| 2c 20 6e 6f 74 20 61 6c | 6c 6f 77 69 6e 67 20 6c |, not al|lowing l|
|00004f60| 6f 67 69 6e 73 2e 0a 58 | 0a 58 2f 65 74 63 2f 70 |ogins..X|.X/etc/p|
|00004f70| 61 73 73 77 64 3a 20 20 | 70 74 79 3a 2a 3a 77 68 |asswd: |pty:*:wh|
|00004f80| 61 74 65 76 65 72 3a 34 | 3a 3a 3a 2f 62 69 6e 2f |atever:4|:::/bin/|
|00004f90| 74 72 75 65 0a 58 0a 58 | 2d 2d 2d 2d 2d 20 50 72 |true.X.X|----- Pr|
|00004fa0| 65 73 73 20 72 65 74 75 | 72 6e 20 74 6f 20 63 6f |ess retu|rn to co|
|00004fb0| 6e 74 69 6e 75 65 2e 20 | 0a 58 0a 58 53 65 63 6f |ntinue. |.X.XSeco|
|00004fc0| 6e 64 2c 20 6d 61 6b 65 | 20 73 75 72 65 20 79 6f |nd, make| sure yo|
|00004fd0| 75 20 68 61 76 65 20 61 | 20 74 74 79 20 67 72 6f |u have a| tty gro|
|00004fe0| 75 70 20 73 65 74 20 75 | 70 2e 0a 58 0a 58 2f 65 |up set u|p..X.X/e|
|00004ff0| 74 63 2f 67 72 6f 75 70 | 3a 20 20 74 74 79 3a 2a |tc/group|: tty:*|
|00005000| 3a 34 3a 72 6f 6f 74 0a | 58 0a 58 2d 2d 2d 2d 2d |:4:root.|X.X-----|
|00005010| 20 50 72 65 73 73 20 72 | 65 74 75 72 6e 20 74 6f | Press r|eturn to|
|00005020| 20 63 6f 6e 74 69 6e 75 | 65 2e 20 0a 58 0a 58 54 | continu|e. .X.XT|
|00005030| 68 69 72 64 2c 20 6d 61 | 6b 65 20 50 54 59 44 49 |hird, ma|ke PTYDI|
|00005040| 52 2e 0a 58 0a 58 52 4f | 4f 54 3a 20 23 20 6d 6b |R..X.XRO|OT: # mk|
|00005050| 64 69 72 20 2f 75 73 72 | 2f 65 74 63 2f 70 74 79 |dir /usr|/etc/pty|
|00005060| 3b 20 63 68 6d 6f 64 20 | 37 30 30 20 2f 75 73 72 |; chmod |700 /usr|
|00005070| 2f 65 74 63 2f 70 74 79 | 0a 58 50 54 59 3a 20 23 |/etc/pty|.XPTY: #|
|00005080| 20 6d 6b 64 69 72 20 2f | 75 73 72 2f 65 74 63 2f | mkdir /|usr/etc/|
|00005090| 70 74 79 3b 20 63 68 6f | 77 6e 20 70 74 79 20 2f |pty; cho|wn pty /|
|000050a0| 75 73 72 2f 65 74 63 2f | 70 74 79 3b 20 63 68 6d |usr/etc/|pty; chm|
|000050b0| 6f 64 20 37 30 30 20 2f | 75 73 72 2f 65 74 63 2f |od 700 /|usr/etc/|
|000050c0| 70 74 79 0a 58 55 4e 3a | 20 25 20 6d 6b 64 69 72 |pty.XUN:| % mkdir|
|000050d0| 20 7e 2f 50 54 59 3b 20 | 63 68 6d 6f 64 20 37 30 | ~/PTY; |chmod 70|
|000050e0| 30 20 7e 2f 50 54 59 0a | 58 0a 58 2d 2d 2d 2d 2d |0 ~/PTY.|X.X-----|
|000050f0| 20 50 72 65 73 73 20 72 | 65 74 75 72 6e 20 74 6f | Press r|eturn to|
|00005100| 20 63 6f 6e 74 69 6e 75 | 65 2e 20 0a 58 0a 58 46 | continu|e. .X.XF|
|00005110| 6f 75 72 74 68 2c 20 6d | 61 6b 65 20 73 75 72 65 |ourth, m|ake sure|
|00005120| 20 79 6f 75 20 68 61 76 | 65 20 61 6c 6c 20 74 68 | you hav|e all th|
|00005130| 65 20 70 73 65 75 64 6f | 2d 74 65 72 6d 69 6e 61 |e pseudo|-termina|
|00005140| 6c 20 66 69 6c 65 73 20 | 73 65 74 20 75 70 20 61 |l files |set up a|
|00005150| 6e 64 0a 58 61 70 70 72 | 6f 70 72 69 61 74 65 6c |nd.Xappr|opriatel|
|00005160| 79 20 63 6f 6e 66 69 67 | 75 72 65 64 2e 0a 58 0a |y config|ured..X.|
|00005170| 58 43 68 61 6e 67 65 20 | 65 61 63 68 20 6f 66 20 |XChange |each of |
|00005180| 74 68 65 6d 20 74 6f 20 | 67 72 6f 75 70 20 74 74 |them to |group tt|
|00005190| 79 2e 0a 58 0a 58 43 68 | 61 6e 67 65 20 65 61 63 |y..X.XCh|ange eac|
|000051a0| 68 20 6f 66 20 74 68 65 | 6d 20 74 6f 20 6f 77 6e |h of the|m to own|
|000051b0| 65 72 20 70 74 79 20 69 | 6e 20 63 61 73 65 20 50 |er pty i|n case P|
|000051c0| 54 59 20 6f 72 20 72 6f | 6f 74 20 69 6e 20 63 61 |TY or ro|ot in ca|
|000051d0| 73 65 20 52 4f 4f 54 2e | 0a 58 0a 58 43 68 61 6e |se ROOT.|.X.XChan|
|000051e0| 67 65 20 65 61 63 68 20 | 6f 66 20 74 68 65 6d 20 |ge each |of them |
|000051f0| 74 6f 20 6d 6f 64 65 20 | 55 4e 55 53 45 44 50 54 |to mode |UNUSEDPT|
|00005200| 59 4d 4f 44 45 20 28 30 | 36 30 30 29 2e 0a 58 0a |YMODE (0|600)..X.|
|00005210| 58 2d 2d 2d 2d 2d 20 50 | 72 65 73 73 20 72 65 74 |X----- P|ress ret|
|00005220| 75 72 6e 20 74 6f 20 63 | 6f 6e 74 69 6e 75 65 2e |urn to c|ontinue.|
|00005230| 20 0a 58 0a 58 46 69 66 | 74 68 2c 20 6d 61 6b 65 | .X.XFif|th, make|
|00005240| 20 73 75 72 65 20 2f 65 | 74 63 2f 75 74 6d 70 20 | sure /e|tc/utmp |
|00005250| 61 6e 64 20 2f 75 73 72 | 2f 61 64 6d 2f 77 74 6d |and /usr|/adm/wtm|
|00005260| 70 20 65 78 69 73 74 2c | 20 6f 77 6e 65 64 20 62 |p exist,| owned b|
|00005270| 79 20 72 6f 6f 74 20 69 | 6e 0a 58 43 61 73 65 20 |y root i|n.XCase |
|00005280| 52 4f 4f 54 20 6f 72 20 | 70 74 79 20 69 6e 20 43 |ROOT or |pty in C|
|00005290| 61 73 65 20 50 54 59 2c | 20 65 61 63 68 20 6d 6f |ase PTY,| each mo|
|000052a0| 64 65 20 36 34 34 2e 20 | 28 49 6e 20 43 61 73 65 |de 644. |(In Case|
|000052b0| 20 55 4e 2c 20 79 6f 75 | 20 70 72 6f 62 61 62 6c | UN, you| probabl|
|000052c0| 79 0a 58 77 61 6e 74 20 | 74 6f 20 62 65 20 77 6f |y.Xwant |to be wo|
|000052d0| 72 6b 69 6e 67 20 6f 6e | 20 61 20 53 75 6e 20 77 |rking on| a Sun w|
|000052e0| 69 74 68 20 69 74 73 20 | 69 6e 73 65 63 75 72 65 |ith its |insecure|
|000052f0| 20 2f 65 74 63 2f 75 74 | 6d 70 2c 20 73 6f 20 74 | /etc/ut|mp, so t|
|00005300| 68 61 74 20 70 74 79 20 | 63 61 6e 0a 58 74 61 6b |hat pty |can.Xtak|
|00005310| 65 20 61 64 76 61 6e 74 | 61 67 65 20 6f 66 20 69 |e advant|age of i|
|00005320| 74 2e 20 53 69 67 68 2e | 29 0a 58 0a 58 2d 2d 2d |t. Sigh.|).X.X---|
|00005330| 2d 2d 20 50 72 65 73 73 | 20 72 65 74 75 72 6e 20 |-- Press| return |
|00005340| 74 6f 20 63 6f 6e 74 69 | 6e 75 65 2e 20 0a 58 0a |to conti|nue. .X.|
|00005350| 58 53 69 78 74 68 2c 20 | 49 20 61 64 76 69 73 65 |XSixth, |I advise|
|00005360| 20 74 68 61 74 20 79 6f | 75 20 6d 61 6b 65 20 61 | that yo|u make a|
|00005370| 20 73 70 65 63 69 61 6c | 20 64 69 72 65 63 74 6f | special| directo|
|00005380| 72 79 20 2f 75 73 72 2f | 6c 6f 63 61 6c 2f 70 74 |ry /usr/|local/pt|
|00005390| 79 62 69 6e 20 66 6f 72 | 0a 58 70 74 79 20 61 6e |ybin for|.Xpty an|
|000053a0| 64 20 69 74 73 20 61 73 | 73 6f 63 69 61 74 65 64 |d its as|sociated|
|000053b0| 20 75 74 69 6c 69 74 69 | 65 73 2c 20 77 69 74 68 | utiliti|es, with|
|000053c0| 20 73 79 6d 62 6f 6c 69 | 63 20 6c 69 6e 6b 73 20 | symboli|c links |
|000053d0| 69 6e 20 2f 75 73 72 2f | 6c 6f 63 61 6c 2e 0a 58 |in /usr/|local..X|
|000053e0| 54 68 69 73 20 63 68 6f | 69 63 65 20 69 73 6e 27 |This cho|ice isn'|
|000053f0| 74 20 74 6f 6f 20 69 6d | 70 6f 72 74 61 6e 74 2c |t too im|portant,|
|00005400| 20 62 75 74 20 69 74 27 | 73 20 65 61 73 69 65 72 | but it'|s easier|
|00005410| 20 69 66 20 79 6f 75 20 | 6b 6e 6f 77 20 61 0a 58 | if you |know a.X|
|00005420| 70 6c 61 63 65 20 74 6f | 20 70 75 74 20 70 72 6f |place to| put pro|
|00005430| 67 72 61 6d 73 2e 0a 58 | 0a 58 2d 2d 2d 2d 2d 20 |grams..X|.X----- |
|00005440| 50 72 65 73 73 20 72 65 | 74 75 72 6e 20 74 6f 20 |Press re|turn to |
|00005450| 63 6f 6e 74 69 6e 75 65 | 2e 20 0a 58 0a 58 4f 6b |continue|. .X.XOk|
|00005460| 61 79 2e 20 59 6f 75 27 | 76 65 20 64 6f 6e 65 20 |ay. You'|ve done |
|00005470| 61 62 6f 75 74 20 61 6c | 6c 20 74 68 61 74 20 63 |about al|l that c|
|00005480| 61 6e 20 62 65 20 64 6f | 6e 65 20 62 65 66 6f 72 |an be do|ne befor|
|00005490| 65 20 63 6f 6d 70 69 6c | 61 74 69 6f 6e 0a 58 66 |e compil|ation.Xf|
|000054a0| 69 6e 69 73 68 65 73 2c | 20 73 6f 20 67 6f 20 64 |inishes,| so go d|
|000054b0| 6f 20 73 6f 6d 65 74 68 | 69 6e 67 20 65 6c 73 65 |o someth|ing else|
|000054c0| 2e 0a 58 0a 58 2d 2d 2d | 2d 2d 20 50 72 65 73 73 |..X.X---|-- Press|
|000054d0| 20 72 65 74 75 72 6e 20 | 74 6f 20 63 6f 6e 74 69 | return |to conti|
|000054e0| 6e 75 65 2e 20 0a 58 0a | 58 54 68 65 20 63 6f 6d |nue. .X.|XThe com|
|000054f0| 70 69 6c 65 20 73 68 6f | 75 6c 64 20 62 65 20 64 |pile sho|uld be d|
|00005500| 6f 6e 65 20 6e 6f 77 2e | 20 49 66 20 61 6c 6c 20 |one now.| If all |
|00005510| 77 65 6e 74 20 77 65 6c | 6c 2c 20 74 68 65 20 6d |went wel|l, the m|
|00005520| 61 6b 65 20 73 68 6f 75 | 6c 64 20 68 61 76 65 0a |ake shou|ld have.|
|00005530| 58 65 78 69 74 65 64 20 | 6e 6f 72 6d 61 6c 6c 79 |Xexited |normally|
|00005540| 2c 20 4d 61 6b 65 6c 6f | 67 20 73 68 6f 75 6c 64 |, Makelo|g should|
|00005550| 20 73 68 6f 77 20 6e 6f | 20 65 72 72 6f 72 73 2c | show no| errors,|
|00005560| 20 61 6e 64 20 79 6f 75 | 20 73 68 6f 75 6c 64 20 | and you| should |
|00005570| 68 61 76 65 20 61 6e 0a | 58 65 78 65 63 75 74 61 |have an.|Xexecuta|
|00005580| 62 6c 65 20 70 74 79 20 | 70 72 6f 67 72 61 6d 20 |ble pty |program |
|00005590| 73 69 74 74 69 6e 67 20 | 69 6e 20 74 68 69 73 20 |sitting |in this |
|000055a0| 64 69 72 65 63 74 6f 72 | 79 2e 20 55 6e 66 6f 72 |director|y. Unfor|
|000055b0| 74 75 6e 61 74 65 6c 79 | 2c 20 6c 69 66 65 0a 58 |tunately|, life.X|
|000055c0| 69 73 6e 27 74 20 61 6c | 77 61 79 73 20 73 6f 20 |isn't al|ways so |
|000055d0| 67 65 6e 65 72 6f 75 73 | 2e 20 48 65 72 65 20 61 |generous|. Here a|
|000055e0| 72 65 20 61 20 66 65 77 | 20 6f 66 20 74 68 65 20 |re a few| of the |
|000055f0| 6d 6f 72 65 20 63 6f 6d | 6d 6f 6e 20 65 72 72 6f |more com|mon erro|
|00005600| 72 73 2e 0a 58 0a 58 54 | 68 65 20 6c 6f 61 64 65 |rs..X.XT|he loade|
|00005610| 72 20 63 6f 6d 70 6c 61 | 69 6e 73 20 61 62 6f 75 |r compla|ins abou|
|00005620| 74 20 6d 69 73 73 69 6e | 67 20 67 65 74 6f 70 74 |t missin|g getopt|
|00005630| 28 29 2c 20 6f 70 74 61 | 72 67 2c 20 61 6e 64 20 |(), opta|rg, and |
|00005640| 6f 70 74 69 6e 64 3a 20 | 54 68 65 73 65 0a 58 61 |optind: |These.Xa|
|00005650| 72 65 20 61 6c 6c 20 69 | 6e 20 74 68 65 20 67 65 |re all i|n the ge|
|00005660| 74 6f 70 74 20 6c 69 62 | 72 61 72 79 2c 20 61 76 |topt lib|rary, av|
|00005670| 61 69 6c 61 62 6c 65 20 | 69 6e 20 74 68 65 20 65 |ailable |in the e|
|00005680| 61 72 6c 79 20 76 6f 6c | 75 6d 65 73 20 6f 66 0a |arly vol|umes of.|
|00005690| 58 63 6f 6d 70 2e 73 6f | 75 72 63 65 73 2e 75 6e |Xcomp.so|urces.un|
|000056a0| 69 78 2e 20 49 66 20 79 | 6f 75 20 75 73 65 20 47 |ix. If y|ou use G|
|000056b0| 4e 55 20 67 65 74 6f 70 | 74 2c 20 70 6c 65 61 73 |NU getop|t, pleas|
|000056c0| 65 20 6d 61 6b 65 20 73 | 75 72 65 20 79 6f 75 0a |e make s|ure you.|
|000056d0| 58 75 6e 64 65 72 73 74 | 61 6e 64 20 74 68 65 20 |Xunderst|and the |
|000056e0| 69 6d 70 6c 69 63 61 74 | 69 6f 6e 73 20 6f 66 20 |implicat|ions of |
|000056f0| 69 74 73 20 6c 69 63 65 | 6e 73 65 2e 0a 58 0a 58 |its lice|nse..X.X|
|00005700| 54 68 65 20 6c 6f 61 64 | 65 72 20 63 6f 6d 70 6c |The load|er compl|
|00005710| 61 69 6e 73 20 61 62 6f | 75 74 20 6d 69 73 73 69 |ains abo|ut missi|
|00005720| 6e 67 20 46 44 5f 5a 45 | 52 4f 2c 20 46 44 5f 53 |ng FD_ZE|RO, FD_S|
|00005730| 45 54 2c 20 61 6e 64 20 | 46 44 5f 49 53 53 45 54 |ET, and |FD_ISSET|
|00005740| 3a 20 54 72 79 0a 58 63 | 6f 70 79 69 6e 67 20 66 |: Try.Xc|opying f|
|00005750| 69 6c 65 2e 68 2e 6f 6c | 64 20 74 6f 20 66 69 6c |ile.h.ol|d to fil|
|00005760| 65 2e 68 20 61 6e 64 20 | 72 65 63 6f 6d 70 69 6c |e.h and |recompil|
|00005770| 69 6e 67 2e 20 49 66 20 | 74 68 65 20 63 6f 6d 70 |ing. If |the comp|
|00005780| 69 6c 65 72 20 67 69 76 | 65 73 0a 58 76 61 72 69 |iler giv|es.Xvari|
|00005790| 6f 75 73 20 66 75 72 74 | 68 65 72 20 65 72 72 6f |ous furt|her erro|
|000057a0| 72 73 20 72 65 6c 61 74 | 65 64 20 74 6f 20 74 68 |rs relat|ed to th|
|000057b0| 65 73 65 20 6d 61 63 72 | 6f 73 2c 20 75 6e 63 6f |ese macr|os, unco|
|000057c0| 6d 6d 65 6e 74 20 74 68 | 65 0a 58 63 6f 6d 6d 65 |mment th|e.Xcomme|
|000057d0| 6e 74 65 64 2d 6f 75 74 | 20 6c 69 6e 65 73 20 69 |nted-out| lines i|
|000057e0| 6e 20 66 69 6c 65 2e 68 | 2e 6f 6c 64 2c 20 63 6f |n file.h|.old, co|
|000057f0| 70 79 20 74 6f 20 66 69 | 6c 65 2e 68 2c 20 61 6e |py to fi|le.h, an|
|00005800| 64 20 74 72 79 20 6f 6e | 63 65 20 61 67 61 69 6e |d try on|ce again|
|00005810| 2e 0a 58 0a 58 62 63 6f | 70 79 28 29 20 69 73 6e |..X.Xbco|py() isn|
|00005820| 27 74 20 64 65 66 69 6e | 65 64 3a 20 49 6e 20 70 |'t defin|ed: In p|
|00005830| 74 79 2e 68 2c 20 63 68 | 61 6e 67 65 20 62 63 6f |ty.h, ch|ange bco|
|00005840| 70 79 28 73 72 63 2c 64 | 73 74 2c 6e 75 6d 29 20 |py(src,d|st,num) |
|00005850| 74 6f 0a 58 6d 65 6d 63 | 70 79 28 64 73 74 2c 73 |to.Xmemc|py(dst,s|
|00005860| 72 63 2c 6e 75 6d 29 2e | 20 28 4e 6f 74 65 20 74 |rc,num).| (Note t|
|00005870| 68 65 20 6f 72 64 65 72 | 2e 29 20 54 72 79 20 61 |he order|.) Try a|
|00005880| 67 61 69 6e 2e 0a 58 0a | 58 49 66 20 79 6f 75 20 |gain..X.|XIf you |
|00005890| 73 74 69 6c 6c 20 63 61 | 6e 27 74 20 67 65 74 20 |still ca|n't get |
|000058a0| 74 68 65 20 63 6f 64 65 | 20 74 6f 20 63 6f 6d 70 |the code| to comp|
|000058b0| 69 6c 65 2c 20 6c 65 74 | 20 74 68 65 20 61 75 74 |ile, let| the aut|
|000058c0| 68 6f 72 20 6b 6e 6f 77 | 2e 0a 58 0a 58 2d 2d 2d |hor know|..X.X---|
|000058d0| 2d 2d 20 50 72 65 73 73 | 20 72 65 74 75 72 6e 20 |-- Press| return |
|000058e0| 74 6f 20 63 6f 6e 74 69 | 6e 75 65 2e 20 0a 58 0a |to conti|nue. .X.|
|000058f0| 58 4e 65 78 74 2c 20 63 | 6f 6d 70 69 6c 65 20 74 |XNext, c|ompile t|
|00005900| 68 65 20 75 74 69 6c 69 | 74 69 65 73 2e 20 54 68 |he utili|ties. Th|
|00005910| 65 72 65 20 69 73 6e 27 | 74 20 6d 75 63 68 20 74 |ere isn'|t much t|
|00005920| 6f 20 73 61 79 20 61 62 | 6f 75 74 20 74 68 65 6d |o say ab|out them|
|00005930| 3b 0a 58 74 68 65 79 27 | 72 65 20 61 6c 6c 20 70 |;.Xthey'|re all p|
|00005940| 75 62 6c 69 63 20 64 6f | 6d 61 69 6e 2c 20 73 6f |ublic do|main, so|
|00005950| 6d 65 20 6f 66 20 74 68 | 65 6d 20 63 6c 6f 6e 65 |me of th|em clone|
|00005960| 73 20 6f 66 20 6f 72 20 | 69 6d 70 72 6f 76 65 6d |s of or |improvem|
|00005970| 65 6e 74 73 0a 58 6f 76 | 65 72 20 73 74 61 6e 64 |ents.Xov|er stand|
|00005980| 61 72 64 20 75 74 69 6c | 69 74 69 65 73 2c 20 73 |ard util|ities, s|
|00005990| 6f 6d 65 20 6f 66 20 74 | 68 65 6d 20 63 6c 6f 6e |ome of t|hem clon|
|000059a0| 65 73 20 77 69 74 68 20 | 73 70 65 63 69 61 6c 20 |es with |special |
|000059b0| 66 65 61 74 75 72 65 73 | 20 74 6f 0a 58 77 6f 72 |features| to.Xwor|
|000059c0| 6b 20 77 69 74 68 20 70 | 74 79 2c 20 73 6f 6d 65 |k with p|ty, some|
|000059d0| 20 6f 66 20 74 68 65 6d | 20 65 6e 74 69 72 65 6c | of them| entirel|
|000059e0| 79 20 6e 65 77 20 70 72 | 6f 67 72 61 6d 73 20 66 |y new pr|ograms f|
|000059f0| 6f 72 20 70 74 79 27 73 | 20 6e 65 77 0a 58 66 65 |or pty's| new.Xfe|
|00005a00| 61 74 75 72 65 73 2e 20 | 4a 75 73 74 20 67 6c 61 |atures. |Just gla|
|00005a10| 6e 63 65 20 61 74 20 74 | 68 65 20 74 6f 70 20 6f |nce at t|he top o|
|00005a20| 66 20 75 74 69 6c 2f 4d | 61 6b 65 66 69 6c 65 3b |f util/M|akefile;|
|00005a30| 20 74 68 65 6e 0a 58 25 | 20 63 64 20 75 74 69 6c | then.X%| cd util|
|00005a40| 3b 20 28 64 61 74 65 3b | 20 6d 61 6b 65 29 20 3e |; (date;| make) >|
|00005a50| 3e 26 20 4d 61 6b 65 6c | 6f 67 20 26 20 61 6e 64 |>& Makel|og & and|
|00005a60| 20 77 61 69 74 2e 0a 58 | 0a 58 57 61 72 6e 69 6e | wait..X|.XWarnin|
|00005a70| 67 3a 20 54 68 65 20 70 | 74 79 20 73 65 73 73 69 |g: The p|ty sessi|
|00005a80| 6f 6e 20 64 69 72 65 63 | 74 6f 72 79 20 69 73 20 |on direc|tory is |
|00005a90| 68 61 72 64 63 6f 64 65 | 64 20 69 6e 20 75 74 69 |hardcode|d in uti|
|00005aa0| 6c 2f 73 65 73 73 75 74 | 69 6c 2e 63 2e 0a 58 49 |l/sessut|il.c..XI|
|00005ab0| 66 20 79 6f 75 20 68 61 | 76 65 20 63 68 61 6e 67 |f you ha|ve chang|
|00005ac0| 65 64 20 50 54 59 44 49 | 52 2c 20 63 68 65 63 6b |ed PTYDI|R, check|
|00005ad0| 20 74 68 72 6f 75 67 68 | 20 73 65 73 73 75 74 69 | through| sessuti|
|00005ae0| 6c 2e 63 20 63 61 72 65 | 66 75 6c 6c 79 2e 0a 58 |l.c care|fully..X|
|00005af0| 0a 58 2d 2d 2d 2d 2d 20 | 50 72 65 73 73 20 72 65 |.X----- |Press re|
|00005b00| 74 75 72 6e 20 74 6f 20 | 63 6f 6e 74 69 6e 75 65 |turn to |continue|
|00005b10| 2e 20 0a 58 0a 58 53 6f | 20 6e 6f 77 20 79 6f 75 |. .X.XSo| now you|
|00005b20| 20 73 68 6f 75 6c 64 20 | 68 61 76 65 20 73 6f 6d | should |have som|
|00005b30| 65 20 65 78 65 63 75 74 | 61 62 6c 65 73 20 73 69 |e execut|ables si|
|00005b40| 74 74 69 6e 67 20 61 72 | 6f 75 6e 64 20 63 6f 6c |tting ar|ound col|
|00005b50| 6c 65 63 74 69 6e 67 20 | 64 75 73 74 2e 0a 58 49 |lecting |dust..XI|
|00005b60| 6e 20 43 61 73 65 73 20 | 52 4f 4f 54 20 61 6e 64 |n Cases |ROOT and|
|00005b70| 20 50 54 59 2c 20 70 75 | 74 20 7b 70 74 79 2c 62 | PTY, pu|t {pty,b|
|00005b80| 69 66 66 2c 64 69 73 63 | 6f 6e 6e 65 63 74 2c 6d |iff,disc|onnect,m|
|00005b90| 65 73 67 2c 72 65 63 6f | 6e 6e 65 63 74 2c 73 65 |esg,reco|nnect,se|
|00005ba0| 73 73 6b 69 6c 6c 2c 0a | 58 73 65 73 73 6c 69 73 |sskill,.|Xsesslis|
|00005bb0| 74 2c 73 65 73 73 6e 61 | 6d 65 2c 73 65 73 73 75 |t,sessna|me,sessu|
|00005bc0| 73 65 72 7d 20 69 6e 74 | 6f 20 61 20 73 79 73 74 |ser} int|o a syst|
|00005bd0| 65 6d 2d 77 69 64 65 20 | 64 69 72 65 63 74 6f 72 |em-wide |director|
|00005be0| 79 2c 20 6f 77 6e 65 72 | 20 72 6f 6f 74 20 6f 72 |y, owner| root or|
|00005bf0| 0a 58 70 74 79 2c 20 6d | 6f 64 65 20 34 37 35 35 |.Xpty, m|ode 4755|
|00005c00| 2e 20 50 75 74 20 77 61 | 6c 6c 20 61 6e 64 20 77 |. Put wa|ll and w|
|00005c10| 72 69 74 65 20 69 6e 74 | 6f 20 74 68 65 20 73 61 |rite int|o the sa|
|00005c20| 6d 65 20 70 6c 61 63 65 | 2c 20 67 72 6f 75 70 20 |me place|, group |
|00005c30| 74 74 79 2c 20 6d 6f 64 | 65 0a 58 32 37 35 35 2e |tty, mod|e.X2755.|
|00005c40| 20 50 75 74 20 7b 63 6f | 6e 64 6f 6d 2c 65 78 63 | Put {co|ndom,exc|
|00005c50| 6c 6f 66 66 2c 65 78 63 | 6c 6f 6e 2c 6c 61 73 74 |loff,exc|lon,last|
|00005c60| 2c 6c 6f 63 6b 2c 73 63 | 72 69 70 74 2c 73 63 72 |,lock,sc|ript,scr|
|00005c70| 69 70 74 2e 74 69 64 79 | 2c 73 65 73 73 2c 74 69 |ipt.tidy|,sess,ti|
|00005c80| 6f 63 73 74 69 2c 0a 58 | 74 74 79 2c 75 2c 77 68 |ocsti,.X|tty,u,wh|
|00005c90| 6f 2c 78 64 69 73 63 6f | 6e 6e 65 63 74 2c 78 72 |o,xdisco|nnect,xr|
|00005ca0| 65 63 6f 6e 6e 65 63 74 | 2c 78 73 65 73 73 6b 69 |econnect|,xsesski|
|00005cb0| 6c 6c 2c 78 73 65 73 73 | 6c 69 73 74 2c 78 73 65 |ll,xsess|list,xse|
|00005cc0| 73 73 6e 61 6d 65 2c 78 | 73 65 73 73 75 73 65 72 |ssname,x|sessuser|
|00005cd0| 7d 0a 58 69 6e 74 6f 20 | 74 68 65 20 73 61 6d 65 |}.Xinto |the same|
|00005ce0| 20 70 6c 61 63 65 2c 20 | 6d 6f 64 65 20 37 35 35 | place, |mode 755|
|00005cf0| 2e 20 4d 61 6b 65 20 61 | 62 73 6f 6c 75 74 65 6c |. Make a|bsolutel|
|00005d00| 79 20 73 75 72 65 20 6e | 6f 6e 65 20 6f 66 20 74 |y sure n|one of t|
|00005d10| 68 65 20 73 68 65 6c 6c | 0a 58 73 63 72 69 70 74 |he shell|.Xscript|
|00005d20| 73 20 61 72 65 20 73 65 | 74 75 69 64 2e 0a 58 0a |s are se|tuid..X.|
|00005d30| 58 49 6e 20 43 61 73 65 | 20 55 4e 2c 20 6a 75 73 |XIn Case| UN, jus|
|00005d40| 74 20 70 75 74 20 61 6c | 6c 20 74 68 65 20 70 72 |t put al|l the pr|
|00005d50| 6f 67 72 61 6d 73 20 73 | 6f 6d 65 77 68 65 72 65 |ograms s|omewhere|
|00005d60| 20 69 6e 20 79 6f 75 72 | 20 50 41 54 48 2e 0a 58 | in your| PATH..X|
|00005d70| 0a 58 54 68 61 74 27 73 | 20 69 74 21 20 54 72 79 |.XThat's| it! Try|
|00005d80| 20 72 75 6e 6e 69 6e 67 | 20 54 45 53 54 53 20 6e | running| TESTS n|
|00005d90| 6f 77 2e 0a 58 0a 58 28 | 54 77 6f 20 6f 74 68 65 |ow..X.X(|Two othe|
|00005da0| 72 20 74 68 69 6e 67 73 | 20 79 6f 75 20 68 61 76 |r things| you hav|
|00005db0| 65 20 74 6f 20 64 6f 20 | 61 74 20 73 6f 6d 65 20 |e to do |at some |
|00005dc0| 70 6f 69 6e 74 3a 20 6d | 6f 76 65 20 79 6f 75 72 |point: m|ove your|
|00005dd0| 20 6f 6c 64 20 73 63 72 | 69 70 74 2c 0a 58 62 69 | old scr|ipt,.Xbi|
|00005de0| 66 66 2c 20 6d 65 73 67 | 2c 20 61 6e 64 20 73 6f |ff, mesg|, and so|
|00005df0| 20 6f 6e 20 74 6f 20 73 | 63 72 69 70 74 2e 6f 6c | on to s|cript.ol|
|00005e00| 64 2c 20 62 69 66 66 2e | 6f 6c 64 2c 20 6d 65 73 |d, biff.|old, mes|
|00005e10| 67 2e 6f 6c 64 2c 20 65 | 74 63 2e 2c 20 77 69 74 |g.old, e|tc., wit|
|00005e20| 68 0a 58 73 79 6d 62 6f | 6c 69 63 20 6c 69 6e 6b |h.Xsymbo|lic link|
|00005e30| 73 20 74 6f 20 74 68 65 | 20 6e 65 77 20 76 65 72 |s to the| new ver|
|00005e40| 73 69 6f 6e 73 20 69 6e | 20 74 68 65 69 72 20 70 |sions in| their p|
|00005e50| 6c 61 63 65 3b 20 61 6e | 64 20 6d 6f 76 65 20 74 |lace; an|d move t|
|00005e60| 68 65 20 6f 6c 64 0a 58 | 2f 75 73 72 2f 6d 61 6e |he old.X|/usr/man|
|00005e70| 2f 7b 73 63 72 69 70 74 | 2c 62 69 66 66 2c 6d 65 |/{script|,biff,me|
|00005e80| 73 67 2c 2e 2e 2e 7d 2e | 31 20 73 6f 6d 65 77 68 |sg,...}.|1 somewh|
|00005e90| 65 72 65 20 65 6c 73 65 | 2c 20 63 6f 70 79 20 61 |ere else|, copy a|
|00005ea0| 6c 6c 20 74 68 65 20 2a | 2e 31 0a 58 68 65 72 65 |ll the *|.1.Xhere|
|00005eb0| 20 74 6f 20 2f 75 73 72 | 2f 6d 61 6e 2f 6d 61 6e | to /usr|/man/man|
|00005ec0| 31 2c 20 61 6e 64 20 72 | 75 6e 20 2f 65 74 63 2f |1, and r|un /etc/|
|00005ed0| 63 61 74 6d 61 6e 2e 29 | 0a 45 4e 44 5f 4f 46 5f |catman.)|.END_OF_|
|00005ee0| 46 49 4c 45 0a 20 20 69 | 66 20 74 65 73 74 20 32 |FILE. i|f test 2|
|00005ef0| 32 36 32 31 20 2d 6e 65 | 20 60 77 63 20 2d 63 20 |2621 -ne| `wc -c |
|00005f00| 3c 27 49 4e 53 54 41 4c | 4c 52 45 41 44 41 42 4c |<'INSTAL|LREADABL|
|00005f10| 45 27 60 3b 20 74 68 65 | 6e 0a 20 20 20 20 65 63 |E'`; the|n. ec|
|00005f20| 68 6f 20 73 68 61 72 3a | 20 5c 22 27 49 4e 53 54 |ho shar:| \"'INST|
|00005f30| 41 4c 4c 52 45 41 44 41 | 42 4c 45 27 5c 22 20 75 |ALLREADA|BLE'\" u|
|00005f40| 6e 70 61 63 6b 65 64 20 | 77 69 74 68 20 77 72 6f |npacked |with wro|
|00005f50| 6e 67 20 73 69 7a 65 21 | 0a 20 20 66 69 0a 20 20 |ng size!|. fi. |
|00005f60| 23 20 65 6e 64 20 6f 66 | 20 27 49 4e 53 54 41 4c |# end of| 'INSTAL|
|00005f70| 4c 52 45 41 44 41 42 4c | 45 27 0a 66 69 0a 69 66 |LREADABL|E'.fi.if|
|00005f80| 20 74 65 73 74 20 2d 66 | 20 27 6d 61 73 74 65 72 | test -f| 'master|
|00005f90| 2e 63 27 20 2d 61 20 22 | 24 7b 31 7d 22 20 21 3d |.c' -a "|${1}" !=|
|00005fa0| 20 22 2d 63 22 20 3b 20 | 74 68 65 6e 20 0a 20 20 | "-c" ; |then . |
|00005fb0| 65 63 68 6f 20 73 68 61 | 72 3a 20 57 69 6c 6c 20 |echo sha|r: Will |
|00005fc0| 6e 6f 74 20 63 6c 6f 62 | 62 65 72 20 65 78 69 73 |not clob|ber exis|
|00005fd0| 74 69 6e 67 20 66 69 6c | 65 20 5c 22 27 6d 61 73 |ting fil|e \"'mas|
|00005fe0| 74 65 72 2e 63 27 5c 22 | 0a 65 6c 73 65 0a 20 20 |ter.c'\"|.else. |
|00005ff0| 65 63 68 6f 20 73 68 61 | 72 3a 20 45 78 74 72 61 |echo sha|r: Extra|
|00006000| 63 74 69 6e 67 20 5c 22 | 27 6d 61 73 74 65 72 2e |cting \"|'master.|
|00006010| 63 27 5c 22 20 5c 28 31 | 38 30 38 36 20 63 68 61 |c'\" \(1|8086 cha|
|00006020| 72 61 63 74 65 72 73 5c | 29 0a 20 20 73 65 64 20 |racters\|). sed |
|00006030| 22 73 2f 5e 58 2f 2f 22 | 20 3e 27 6d 61 73 74 65 |"s/^X//"| >'maste|
|00006040| 72 2e 63 27 20 3c 3c 27 | 45 4e 44 5f 4f 46 5f 46 |r.c' <<'|END_OF_F|
|00006050| 49 4c 45 27 0a 58 2f 2a | 20 43 6f 70 79 72 69 67 |ILE'.X/*| Copyrig|
|00006060| 68 74 20 31 39 39 30 2c | 20 44 61 6e 69 65 6c 20 |ht 1990,| Daniel |
|00006070| 4a 2e 20 42 65 72 6e 73 | 74 65 69 6e 2e 20 41 6c |J. Berns|tein. Al|
|00006080| 6c 20 72 69 67 68 74 73 | 20 72 65 73 65 72 76 65 |l rights| reserve|
|00006090| 64 2e 20 2a 2f 0a 58 0a | 58 23 69 6e 63 6c 75 64 |d. */.X.|X#includ|
|000060a0| 65 20 3c 73 79 73 2f 74 | 79 70 65 73 2e 68 3e 0a |e <sys/t|ypes.h>.|
|000060b0| 58 23 69 6e 63 6c 75 64 | 65 20 3c 73 79 73 2f 74 |X#includ|e <sys/t|
|000060c0| 69 6d 65 2e 68 3e 0a 58 | 23 69 6e 63 6c 75 64 65 |ime.h>.X|#include|
|000060d0| 20 3c 73 79 73 2f 72 65 | 73 6f 75 72 63 65 2e 68 | <sys/re|source.h|
|000060e0| 3e 0a 58 23 69 6e 63 6c | 75 64 65 20 3c 73 79 73 |>.X#incl|ude <sys|
|000060f0| 2f 77 61 69 74 2e 68 3e | 0a 58 23 69 6e 63 6c 75 |/wait.h>|.X#inclu|
|00006100| 64 65 20 3c 73 74 64 69 | 6f 2e 68 3e 0a 58 23 69 |de <stdi|o.h>.X#i|
|00006110| 6e 63 6c 75 64 65 20 22 | 65 72 72 2e 68 22 0a 58 |nclude "|err.h".X|
|00006120| 23 69 6e 63 6c 75 64 65 | 20 22 63 6f 6e 66 69 67 |#include| "config|
|00006130| 2e 68 22 0a 58 23 69 6e | 63 6c 75 64 65 20 22 70 |.h".X#in|clude "p|
|00006140| 74 79 2e 68 22 0a 58 23 | 69 6e 63 6c 75 64 65 20 |ty.h".X#|include |
|00006150| 22 6d 61 73 74 65 72 2e | 68 22 0a 58 23 69 6e 63 |"master.|h".X#inc|
|00006160| 6c 75 64 65 20 22 73 69 | 67 2e 68 22 0a 58 23 69 |lude "si|g.h".X#i|
|00006170| 6e 63 6c 75 64 65 20 22 | 74 74 79 2e 68 22 0a 58 |nclude "|tty.h".X|
|00006180| 23 69 6e 63 6c 75 64 65 | 20 22 66 69 6c 65 2e 68 |#include| "file.h|
|00006190| 22 0a 58 23 69 6e 63 6c | 75 64 65 20 22 73 6f 63 |".X#incl|ude "soc|
|000061a0| 6b 2e 68 22 0a 58 23 69 | 6e 63 6c 75 64 65 20 22 |k.h".X#i|nclude "|
|000061b0| 6c 6f 67 73 2e 68 22 0a | 58 23 69 6e 63 6c 75 64 |logs.h".|X#includ|
|000061c0| 65 20 22 6d 69 73 63 2e | 68 22 0a 58 0a 58 73 74 |e "misc.|h".X.Xst|
|000061d0| 61 74 69 63 20 63 68 61 | 72 20 66 6e 72 65 5b 32 |atic cha|r fnre[2|
|000061e0| 30 5d 3b 0a 58 0a 58 73 | 74 61 74 69 63 20 63 68 |0];.X.Xs|tatic ch|
|000061f0| 61 72 20 66 6e 73 65 73 | 73 5b 32 30 5d 3b 0a 58 |ar fnses|s[20];.X|
|00006200| 73 74 61 74 69 63 20 69 | 6e 74 20 66 64 73 65 73 |static i|nt fdses|
|00006210| 73 3b 0a 58 0a 58 73 74 | 61 74 69 63 20 63 68 61 |s;.X.Xst|atic cha|
|00006220| 72 20 2a 67 6c 66 6e 73 | 74 79 3b 0a 58 0a 58 73 |r *glfns|ty;.X.Xs|
|00006230| 74 61 74 69 63 20 63 68 | 61 72 20 73 6f 75 74 62 |tatic ch|ar soutb|
|00006240| 75 66 5b 4f 55 54 42 55 | 46 53 49 5a 45 5d 3b 0a |uf[OUTBU|FSIZE];.|
|00006250| 58 73 74 61 74 69 63 20 | 63 68 61 72 20 73 70 74 |Xstatic |char spt|
|00006260| 79 62 75 66 5b 4f 55 54 | 42 55 46 53 49 5a 45 5d |ybuf[OUT|BUFSIZE]|
|00006270| 3b 0a 58 0a 58 73 74 61 | 74 69 63 20 73 74 72 75 |;.X.Xsta|tic stru|
|00006280| 63 74 20 74 74 79 6d 6f | 64 65 73 20 74 6d 6f 77 |ct ttymo|des tmow|
|00006290| 69 6e 70 74 79 3b 0a 58 | 73 74 61 74 69 63 20 73 |inpty;.X|static s|
|000062a0| 74 72 75 63 74 20 74 74 | 79 6d 6f 64 65 73 20 74 |truct tt|ymodes t|
|000062b0| 6d 6f 77 69 6e 74 74 79 | 3b 0a 58 0a 58 73 74 61 |mowintty|;.X.Xsta|
|000062c0| 74 69 63 20 63 68 61 72 | 20 2a 6f 75 74 62 75 66 |tic char| *outbuf|
|000062d0| 20 3d 20 73 6f 75 74 62 | 75 66 3b 0a 58 73 74 61 | = soutb|uf;.Xsta|
|000062e0| 74 69 63 20 69 6e 74 20 | 6f 75 74 62 75 66 73 69 |tic int |outbufsi|
|000062f0| 7a 20 3d 20 4f 55 54 42 | 55 46 53 49 5a 45 3b 0a |z = OUTB|UFSIZE;.|
|00006300| 58 73 74 61 74 69 63 20 | 69 6e 74 20 6f 75 74 62 |Xstatic |int outb|
|00006310| 75 66 6c 65 6e 20 3d 20 | 30 3b 0a 58 73 74 61 74 |uflen = |0;.Xstat|
|00006320| 69 63 20 63 68 61 72 20 | 2a 70 74 79 62 75 66 20 |ic char |*ptybuf |
|00006330| 3d 20 73 70 74 79 62 75 | 66 3b 0a 58 73 74 61 74 |= sptybu|f;.Xstat|
|00006340| 69 63 20 69 6e 74 20 70 | 74 79 62 75 66 73 69 7a |ic int p|tybufsiz|
|00006350| 20 3d 20 4f 55 54 42 55 | 46 53 49 5a 45 3b 0a 58 | = OUTBU|FSIZE;.X|
|00006360| 73 74 61 74 69 63 20 69 | 6e 74 20 70 74 79 62 75 |static i|nt ptybu|
|00006370| 66 6c 65 6e 20 3d 20 30 | 3b 0a 58 0a 58 73 74 61 |flen = 0|;.X.Xsta|
|00006380| 74 69 63 20 69 6e 74 20 | 66 6c 61 67 63 6f 6e 6e |tic int |flagconn|
|00006390| 65 63 74 65 64 20 3d 20 | 31 3b 20 2f 2a 20 30 3a |ected = |1; /* 0:|
|000063a0| 20 64 69 73 63 6f 6e 6e | 65 63 74 65 64 2e 20 32 | disconn|ected. 2|
|000063b0| 3a 20 69 64 6c 69 6e 67 | 20 66 6f 72 20 73 74 6f |: idling| for sto|
|000063c0| 70 2e 20 2a 2f 0a 58 20 | 20 20 20 20 20 20 20 20 |p. */.X | |
|000063d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000063e0| 20 20 20 20 20 2f 2a 20 | 33 3a 20 69 64 6c 69 6e | /* |3: idlin|
|000063f0| 67 20 66 6f 72 20 73 74 | 6f 70 20 62 75 74 20 63 |g for st|op but c|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.