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, with very long lines (511), with overstriking
| default
| |
100%
| TrID
| E-Mail message (Var. 2)
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/rfc822
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 3a 20 62 72 | 6e 73 74 6e 64 40 6b 72 |From: br|nstnd@kr|
|00000010| 61 6d 64 65 6e 2e 61 63 | 66 2e 6e 79 75 2e 65 64 |amden.ac|f.nyu.ed|
|00000020| 75 20 28 44 61 6e 20 42 | 65 72 6e 73 74 65 69 6e |u (Dan B|ernstein|
|00000030| 29 0a 4e 65 77 73 67 72 | 6f 75 70 73 3a 20 61 6c |).Newsgr|oups: al|
|00000040| 74 2e 73 6f 75 72 63 65 | 73 0a 53 75 62 6a 65 63 |t.source|s.Subjec|
|00000050| 74 3a 20 70 74 79 20 33 | 2e 30 20 2d 20 74 68 65 |t: pty 3|.0 - the|
|00000060| 20 75 6c 74 69 6d 61 74 | 65 20 70 73 65 75 64 6f | ultimat|e pseudo|
|00000070| 2d 74 65 72 6d 69 6e 61 | 6c 20 69 6e 74 65 72 66 |-termina|l interf|
|00000080| 61 63 65 0a 4d 65 73 73 | 61 67 65 2d 49 44 3a 20 |ace.Mess|age-ID: |
|00000090| 3c 34 31 32 38 3a 4a 75 | 6c 32 35 31 39 3a 33 38 |<4128:Ju|l2519:38|
|000000a0| 3a 35 30 39 30 40 6b 72 | 61 6d 64 65 6e 2e 61 63 |:5090@kr|amden.ac|
|000000b0| 66 2e 6e 79 75 2e 65 64 | 75 3e 0a 44 61 74 65 3a |f.nyu.ed|u>.Date:|
|000000c0| 20 32 35 20 4a 75 6c 20 | 39 30 20 31 39 3a 33 38 | 25 Jul |90 19:38|
|000000d0| 3a 35 30 20 47 4d 54 0a | 0a 41 20 66 65 77 20 70 |:50 GMT.|.A few p|
|000000e0| 65 6f 70 6c 65 20 68 61 | 76 65 20 72 65 70 6f 72 |eople ha|ve repor|
|000000f0| 74 65 64 20 74 72 6f 75 | 62 6c 65 20 66 74 70 69 |ted trou|ble ftpi|
|00000100| 6e 67 20 70 74 79 20 33 | 2e 30 2c 20 52 69 63 68 |ng pty 3|.0, Rich|
|00000110| 20 61 70 70 65 61 72 73 | 20 74 6f 20 62 65 0a 6f | appears| to be.o|
|00000120| 6e 20 76 61 63 61 74 69 | 6f 6e 2c 20 61 6e 64 20 |n vacati|on, and |
|00000130| 49 27 6d 20 67 65 74 74 | 69 6e 67 20 77 6f 72 6e |I'm gett|ing worn|
|00000140| 20 6f 75 74 20 73 65 6e | 64 69 6e 67 20 63 6f 70 | out sen|ding cop|
|00000150| 69 65 73 20 74 68 72 6f | 75 67 68 20 74 68 65 20 |ies thro|ugh the |
|00000160| 6d 61 69 6c 2e 0a 53 6f | 20 68 65 72 65 20 27 74 |mail..So| here 't|
|00000170| 69 73 2e 20 54 68 69 73 | 20 69 73 20 4e 4f 54 20 |is. This| is NOT |
|00000180| 74 68 65 20 6f 66 66 69 | 63 69 61 6c 20 63 6f 6d |the offi|cial com|
|00000190| 70 2e 73 6f 75 72 63 65 | 73 2e 75 6e 69 78 20 76 |p.source|s.unix v|
|000001a0| 65 72 73 69 6f 6e 2e 0a | 0a 4d 61 6a 6f 72 20 70 |ersion..|.Major p|
|000001b0| 74 79 20 66 65 61 74 75 | 72 65 73 20 6e 6f 74 20 |ty featu|res not |
|000001c0| 69 6e 20 6d 74 74 79 20 | 28 73 6f 72 72 79 2c 20 |in mtty |(sorry, |
|000001d0| 4d 61 61 72 74 65 6e 29 | 3a 0a 20 20 2d 20 64 69 |Maarten)|:. - di|
|000001e0| 73 63 6f 6e 6e 65 63 74 | 61 62 6c 65 20 73 65 73 |sconnect|able ses|
|000001f0| 73 69 6f 6e 73 3a 20 66 | 61 73 74 65 72 2c 20 65 |sions: f|aster, e|
|00000200| 61 73 69 65 72 2c 20 6d | 6f 72 65 20 66 6c 65 78 |asier, m|ore flex|
|00000210| 69 62 6c 65 20 74 68 61 | 6e 20 60 60 73 63 72 65 |ible tha|n ``scre|
|00000220| 65 6e 27 27 0a 20 20 2d | 20 65 66 66 69 63 69 65 |en''. -| efficie|
|00000230| 6e 63 79 3a 20 64 6f 65 | 73 6e 27 74 20 64 61 77 |ncy: doe|sn't daw|
|00000240| 64 6c 65 2c 20 6a 75 73 | 74 20 61 73 20 66 61 73 |dle, jus|t as fas|
|00000250| 74 20 65 76 65 6e 20 61 | 66 74 65 72 20 61 20 72 |t even a|fter a r|
|00000260| 65 63 6f 6e 6e 65 63 74 | 0a 20 20 2d 20 74 65 6c |econnect|. - tel|
|00000270| 6e 65 74 64 20 70 61 74 | 63 68 65 73 3a 20 61 73 |netd pat|ches: as|
|00000280| 20 66 61 73 74 20 61 73 | 20 77 2f 6f 20 70 74 79 | fast as| w/o pty|
|00000290| 2c 20 62 75 74 20 73 75 | 64 64 65 6e 6c 79 20 75 |, but su|ddenly u|
|000002a0| 73 65 72 73 20 63 61 6e | 20 72 65 63 6f 6e 6e 65 |sers can| reconne|
|000002b0| 63 74 21 0a 20 20 2d 20 | 73 65 63 75 72 69 74 79 |ct!. - |security|
|000002c0| 3a 20 74 74 79 20 67 72 | 6f 75 70 2c 20 75 74 6d |: tty gr|oup, utm|
|000002d0| 70 2c 20 64 65 74 65 63 | 74 73 20 70 72 6f 63 65 |p, detec|ts proce|
|000002e0| 73 73 65 73 20 6c 69 6e | 67 65 72 69 6e 67 20 6f |sses lin|gering o|
|000002f0| 6e 20 61 20 74 74 79 2c | 20 6d 6f 72 65 0a 20 20 |n a tty,| more. |
|00000300| 2d 20 70 6f 72 74 61 62 | 69 6c 69 74 79 3a 20 61 |- portab|ility: a|
|00000310| 6c 72 65 61 64 79 20 72 | 65 70 6f 72 74 65 64 20 |lready r|eported |
|00000320| 74 6f 20 77 6f 72 6b 20 | 6f 6e 20 53 75 6e 2c 20 |to work |on Sun, |
|00000330| 55 6c 74 72 69 78 2c 20 | 43 6f 6e 76 65 78 2c 20 |Ultrix, |Convex, |
|00000340| 6f 74 68 65 72 73 0a 20 | 20 2d 20 74 77 65 6e 74 |others. | - twent|
|00000350| 79 2d 6f 6e 65 20 75 74 | 69 6c 69 74 69 65 73 2c |y-one ut|ilities,|
|00000360| 20 69 6e 63 6c 75 64 69 | 6e 67 20 61 20 60 60 73 | includi|ng a ``s|
|00000370| 63 72 69 70 74 27 27 20 | 74 68 61 74 20 75 6e 64 |cript'' |that und|
|00000380| 65 72 73 74 61 6e 64 73 | 20 75 74 6d 70 0a 20 20 |erstands| utmp. |
|00000390| 2d 20 6f 76 65 72 20 66 | 69 66 74 79 20 6f 70 74 |- over f|ifty opt|
|000003a0| 69 6f 6e 73 20 66 6f 72 | 20 70 72 65 63 69 73 65 |ions for| precise|
|000003b0| 20 63 6f 6e 74 72 6f 6c | 2d 2d 2d 6e 6f 74 68 69 | control|---nothi|
|000003c0| 6e 67 20 69 73 20 66 6f | 72 63 65 64 20 75 70 6f |ng is fo|rced upo|
|000003d0| 6e 20 79 6f 75 0a 20 20 | 2d 20 61 20 72 65 61 73 |n you. |- a reas|
|000003e0| 6f 6e 61 62 6c 79 20 73 | 6d 61 72 74 20 69 6e 73 |onably s|mart ins|
|000003f0| 74 61 6c 6c 20 73 63 72 | 69 70 74 0a 0a 4f 6e 65 |tall scr|ipt..One|
|00000400| 20 75 73 65 72 20 72 65 | 70 6f 72 74 65 64 20 75 | user re|ported u|
|00000410| 6e 70 61 63 6b 69 6e 67 | 2c 20 63 6f 6e 66 69 67 |npacking|, config|
|00000420| 75 72 69 6e 67 2c 20 61 | 6e 64 20 69 6e 73 74 61 |uring, a|nd insta|
|00000430| 6c 6c 69 6e 67 20 70 74 | 79 20 6f 6e 20 61 20 53 |lling pt|y on a S|
|00000440| 75 6e 20 34 0a 69 6e 20 | 74 65 6e 20 6d 69 6e 75 |un 4.in |ten minu|
|00000450| 74 65 73 2c 20 74 68 6f | 75 67 68 20 49 20 74 68 |tes, tho|ugh I th|
|00000460| 69 6e 6b 20 74 68 61 74 | 27 73 20 61 20 62 69 74 |ink that|'s a bit|
|00000470| 20 6f 70 74 69 6d 69 73 | 74 69 63 20 66 6f 72 20 | optimis|tic for |
|00000480| 6d 6f 73 74 20 73 79 73 | 74 65 6d 73 2e 0a 50 6c |most sys|tems..Pl|
|00000490| 61 6e 20 6f 6e 20 74 77 | 65 6e 74 79 20 6d 69 6e |an on tw|enty min|
|000004a0| 75 74 65 73 20 74 6f 20 | 67 65 74 20 61 20 77 6f |utes to |get a wo|
|000004b0| 72 6b 69 6e 67 20 70 72 | 6f 67 72 61 6d 2c 20 74 |rking pr|ogram, t|
|000004c0| 65 6e 20 6d 69 6e 75 74 | 65 73 20 6d 6f 72 65 20 |en minut|es more |
|000004d0| 69 66 20 79 6f 75 0a 68 | 61 76 65 20 70 72 69 76 |if you.h|ave priv|
|000004e0| 69 6c 65 67 65 73 20 61 | 6e 64 20 77 61 6e 74 20 |ileges a|nd want |
|000004f0| 74 6f 20 74 61 6b 65 20 | 61 64 76 61 6e 74 61 67 |to take |advantag|
|00000500| 65 20 6f 66 20 70 74 79 | 27 73 20 73 65 63 75 72 |e of pty|'s secur|
|00000510| 69 74 79 20 66 65 61 74 | 75 72 65 73 2e 0a 28 53 |ity feat|ures..(S|
|00000520| 65 6e 64 20 63 6f 6d 6d | 65 6e 74 73 20 6f 6e 20 |end comm|ents on |
|00000530| 74 68 69 73 20 74 69 6d | 65 20 65 73 74 69 6d 61 |this tim|e estima|
|00000540| 74 65 20 74 6f 20 74 68 | 65 20 50 61 70 65 72 77 |te to th|e Paperw|
|00000550| 6f 72 6b 20 52 65 64 75 | 63 74 69 6f 6e 20 44 69 |ork Redu|ction Di|
|00000560| 76 69 73 69 6f 6e 0a 6f | 66 20 74 68 65 20 4f 4d |vision.o|f the OM|
|00000570| 42 2e 2e 2e 20 73 65 72 | 69 6f 75 73 6c 79 2c 20 |B... ser|iously, |
|00000580| 6c 65 74 20 6d 65 20 6b | 6e 6f 77 20 68 6f 77 20 |let me k|now how |
|00000590| 77 65 6c 6c 20 69 6e 73 | 74 61 6c 6c 61 74 69 6f |well ins|tallatio|
|000005a0| 6e 20 67 6f 65 73 20 61 | 6e 64 0a 77 68 65 74 68 |n goes a|nd.wheth|
|000005b0| 65 72 20 79 6f 75 20 66 | 69 6e 64 20 70 74 79 20 |er you f|ind pty |
|000005c0| 75 73 65 66 75 6c 2e 29 | 0a 0a 2d 2d 2d 44 61 6e |useful.)|..---Dan|
|000005d0| 0a 0a 23 21 20 2f 62 69 | 6e 2f 73 68 0a 23 20 54 |..#! /bi|n/sh.# T|
|000005e0| 68 69 73 20 69 73 20 61 | 20 73 68 65 6c 6c 20 61 |his is a| shell a|
|000005f0| 72 63 68 69 76 65 2e 20 | 20 52 65 6d 6f 76 65 20 |rchive. | Remove |
|00000600| 61 6e 79 74 68 69 6e 67 | 20 62 65 66 6f 72 65 20 |anything| before |
|00000610| 74 68 69 73 20 6c 69 6e | 65 2c 20 74 68 65 6e 20 |this lin|e, then |
|00000620| 75 6e 70 61 63 6b 0a 23 | 20 69 74 20 62 79 20 73 |unpack.#| it by s|
|00000630| 61 76 69 6e 67 20 69 74 | 20 69 6e 74 6f 20 61 20 |aving it| into a |
|00000640| 66 69 6c 65 20 61 6e 64 | 20 74 79 70 69 6e 67 20 |file and| typing |
|00000650| 22 73 68 20 66 69 6c 65 | 22 2e 20 20 54 6f 20 6f |"sh file|". To o|
|00000660| 76 65 72 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |verwrite| existin|
|00000670| 67 0a 23 20 66 69 6c 65 | 73 2c 20 74 79 70 65 20 |g.# file|s, type |
|00000680| 22 73 68 20 66 69 6c 65 | 20 2d 63 22 2e 20 20 59 |"sh file| -c". Y|
|00000690| 6f 75 20 63 61 6e 20 61 | 6c 73 6f 20 66 65 65 64 |ou can a|lso feed|
|000006a0| 20 74 68 69 73 20 61 73 | 20 73 74 61 6e 64 61 72 | this as| standar|
|000006b0| 64 20 69 6e 70 75 74 20 | 76 69 61 0a 23 20 75 6e |d input |via.# un|
|000006c0| 73 68 61 72 2c 20 6f 72 | 20 62 79 20 74 79 70 69 |shar, or| by typi|
|000006d0| 6e 67 20 22 73 68 20 3c | 66 69 6c 65 22 2c 20 65 |ng "sh <|file", e|
|000006e0| 2e 67 2e 2e 20 20 49 66 | 20 74 68 69 73 20 61 72 |.g.. If| this ar|
|000006f0| 63 68 69 76 65 20 69 73 | 20 63 6f 6d 70 6c 65 74 |chive is| complet|
|00000700| 65 2c 20 79 6f 75 0a 23 | 20 77 69 6c 6c 20 73 65 |e, you.#| will se|
|00000710| 65 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |e the fo|llowing |
|00000720| 6d 65 73 73 61 67 65 20 | 61 74 20 74 68 65 20 65 |message |at the e|
|00000730| 6e 64 3a 0a 23 09 09 22 | 45 6e 64 20 6f 66 20 73 |nd:.#.."|End of s|
|00000740| 68 65 6c 6c 20 61 72 63 | 68 69 76 65 2e 22 0a 23 |hell arc|hive.".#|
|00000750| 20 43 6f 6e 74 65 6e 74 | 73 3a 20 20 43 48 41 4e | Content|s: CHAN|
|00000760| 47 45 53 20 52 45 41 44 | 4d 45 20 49 4e 53 54 41 |GES READ|ME INSTA|
|00000770| 4c 4c 20 54 45 53 54 53 | 20 4d 61 6b 65 66 69 6c |LL TESTS| Makefil|
|00000780| 65 20 70 74 79 2e 31 20 | 63 6f 6e 66 69 67 2e 68 |e pty.1 |config.h|
|00000790| 20 70 74 79 2e 68 0a 23 | 20 20 20 73 69 67 6c 65 | pty.h.#| sigle|
|000007a0| 72 2e 68 20 6d 61 73 74 | 65 72 2e 68 20 73 6c 61 |r.h mast|er.h sla|
|000007b0| 76 65 2e 68 20 65 72 72 | 2e 68 20 74 74 79 2e 68 |ve.h err|.h tty.h|
|000007c0| 20 67 65 74 6f 70 74 2e | 68 20 74 65 78 74 73 2e | getopt.|h texts.|
|000007d0| 68 20 73 69 67 2e 68 0a | 23 20 20 20 6c 6f 67 73 |h sig.h.|# logs|
|000007e0| 2e 68 20 66 69 6c 65 2e | 68 20 66 69 6c 65 2e 68 |.h file.|h file.h|
|000007f0| 2e 6f 6c 64 20 66 69 6c | 65 2e 68 2e 6e 65 77 20 |.old fil|e.h.new |
|00000800| 73 6f 63 6b 2e 68 20 6d | 69 73 63 2e 68 20 70 74 |sock.h m|isc.h pt|
|00000810| 79 2e 63 20 73 69 67 6c | 65 72 2e 63 0a 23 20 20 |y.c sigl|er.c.# |
|00000820| 20 6d 61 73 74 65 72 2e | 63 20 73 6c 61 76 65 2e | master.|c slave.|
|00000830| 63 20 65 72 72 2e 63 20 | 74 74 79 2e 63 20 74 65 |c err.c |tty.c te|
|00000840| 78 74 73 2e 63 20 73 69 | 67 2e 63 20 67 6c 6f 62 |xts.c si|g.c glob|
|00000850| 61 6c 73 2e 63 20 6c 6f | 67 73 2e 63 20 73 6f 63 |als.c lo|gs.c soc|
|00000860| 6b 2e 63 0a 23 20 20 20 | 6d 69 73 63 2e 63 20 70 |k.c.# |misc.c p|
|00000870| 61 74 63 68 20 70 61 74 | 63 68 2f 52 45 41 44 4d |atch pat|ch/READM|
|00000880| 45 20 70 61 74 63 68 2f | 54 45 4c 4e 45 54 2e 46 |E patch/|TELNET.F|
|00000890| 54 50 20 70 61 74 63 68 | 2f 4d 61 6b 65 66 69 6c |TP patch|/Makefil|
|000008a0| 65 0a 23 20 20 20 70 61 | 74 63 68 2f 74 65 6c 6e |e.# pa|tch/teln|
|000008b0| 65 74 64 2e 70 61 74 63 | 68 20 70 61 74 63 68 2f |etd.patc|h patch/|
|000008c0| 69 67 6e 74 74 2e 63 20 | 75 74 69 6c 20 75 74 69 |igntt.c |util uti|
|000008d0| 6c 2f 4d 61 6b 65 66 69 | 6c 65 20 75 74 69 6c 2f |l/Makefi|le util/|
|000008e0| 62 69 66 66 2e 31 0a 23 | 20 20 20 75 74 69 6c 2f |biff.1.#| util/|
|000008f0| 62 69 66 66 2e 63 20 75 | 74 69 6c 2f 63 6f 6e 64 |biff.c u|til/cond|
|00000900| 6f 6d 20 75 74 69 6c 2f | 63 6f 6e 64 6f 6d 2e 31 |om util/|condom.1|
|00000910| 20 75 74 69 6c 2f 64 69 | 73 63 6f 6e 6e 65 63 74 | util/di|sconnect|
|00000920| 2e 31 0a 23 20 20 20 75 | 74 69 6c 2f 64 69 73 63 |.1.# u|til/disc|
|00000930| 6f 6e 6e 65 63 74 2e 63 | 20 75 74 69 6c 2f 65 78 |onnect.c| util/ex|
|00000940| 63 6c 6f 66 66 2e 31 20 | 75 74 69 6c 2f 65 78 63 |cloff.1 |util/exc|
|00000950| 6c 6f 66 66 2e 63 20 75 | 74 69 6c 2f 65 78 63 6c |loff.c u|til/excl|
|00000960| 6f 6e 2e 31 0a 23 20 20 | 20 75 74 69 6c 2f 65 78 |on.1.# | util/ex|
|00000970| 63 6c 6f 6e 2e 63 20 75 | 74 69 6c 2f 6c 6f 63 6b |clon.c u|til/lock|
|00000980| 2e 31 20 75 74 69 6c 2f | 6c 6f 63 6b 2e 63 20 75 |.1 util/|lock.c u|
|00000990| 74 69 6c 2f 6d 65 73 67 | 2e 31 20 75 74 69 6c 2f |til/mesg|.1 util/|
|000009a0| 6d 65 73 67 2e 63 0a 23 | 20 20 20 75 74 69 6c 2f |mesg.c.#| util/|
|000009b0| 72 65 63 6f 6e 6e 65 63 | 74 2e 31 20 75 74 69 6c |reconnec|t.1 util|
|000009c0| 2f 72 65 63 6f 6e 6e 65 | 63 74 2e 63 20 75 74 69 |/reconne|ct.c uti|
|000009d0| 6c 2f 73 63 72 69 70 74 | 20 75 74 69 6c 2f 73 63 |l/script| util/sc|
|000009e0| 72 69 70 74 2e 31 0a 23 | 20 20 20 75 74 69 6c 2f |ript.1.#| util/|
|000009f0| 73 63 72 69 70 74 2e 74 | 69 64 79 20 75 74 69 6c |script.t|idy util|
|00000a00| 2f 73 63 72 69 70 74 2e | 74 69 64 79 2e 31 20 75 |/script.|tidy.1 u|
|00000a10| 74 69 6c 2f 73 65 73 73 | 20 75 74 69 6c 2f 73 65 |til/sess| util/se|
|00000a20| 73 73 2e 31 0a 23 20 20 | 20 75 74 69 6c 2f 73 65 |ss.1.# | util/se|
|00000a30| 73 73 6b 69 6c 6c 2e 31 | 20 75 74 69 6c 2f 73 65 |sskill.1| util/se|
|00000a40| 73 73 6b 69 6c 6c 2e 63 | 20 75 74 69 6c 2f 73 65 |sskill.c| util/se|
|00000a50| 73 73 6c 69 73 74 2e 31 | 20 75 74 69 6c 2f 73 65 |sslist.1| util/se|
|00000a60| 73 73 6c 69 73 74 2e 63 | 0a 23 20 20 20 75 74 69 |sslist.c|.# uti|
|00000a70| 6c 2f 73 65 73 73 6e 61 | 6d 65 2e 31 20 75 74 69 |l/sessna|me.1 uti|
|00000a80| 6c 2f 73 65 73 73 6e 61 | 6d 65 2e 63 20 75 74 69 |l/sessna|me.c uti|
|00000a90| 6c 2f 73 65 73 73 75 73 | 65 72 2e 31 20 75 74 69 |l/sessus|er.1 uti|
|00000aa0| 6c 2f 73 65 73 73 75 73 | 65 72 2e 63 0a 23 20 20 |l/sessus|er.c.# |
|00000ab0| 20 75 74 69 6c 2f 73 65 | 73 73 75 74 69 6c 2e 63 | util/se|ssutil.c|
|00000ac0| 20 75 74 69 6c 2f 73 65 | 73 73 75 74 69 6c 2e 68 | util/se|ssutil.h|
|00000ad0| 20 75 74 69 6c 2f 74 69 | 6f 63 73 74 69 2e 31 20 | util/ti|ocsti.1 |
|00000ae0| 75 74 69 6c 2f 74 69 6f | 63 73 74 69 2e 63 0a 23 |util/tio|csti.c.#|
|00000af0| 20 20 20 75 74 69 6c 2f | 74 74 79 2e 31 20 75 74 | util/|tty.1 ut|
|00000b00| 69 6c 2f 74 74 79 2e 63 | 20 75 74 69 6c 2f 75 2e |il/tty.c| util/u.|
|00000b10| 31 20 75 74 69 6c 2f 75 | 2e 63 20 75 74 69 6c 2f |1 util/u|.c util/|
|00000b20| 77 61 6c 6c 2e 31 20 75 | 74 69 6c 2f 77 61 6c 6c |wall.1 u|til/wall|
|00000b30| 2e 63 0a 23 20 20 20 75 | 74 69 6c 2f 77 68 6f 2e |.c.# u|til/who.|
|00000b40| 31 20 75 74 69 6c 2f 77 | 68 6f 2e 63 20 75 74 69 |1 util/w|ho.c uti|
|00000b50| 6c 2f 77 72 69 74 65 2e | 31 20 75 74 69 6c 2f 77 |l/write.|1 util/w|
|00000b60| 72 69 74 65 2e 63 20 75 | 74 69 6c 2f 78 73 65 73 |rite.c u|til/xses|
|00000b70| 73 75 74 69 6c 2e 63 0a | 23 20 57 72 61 70 70 65 |sutil.c.|# Wrappe|
|00000b80| 64 20 62 79 20 62 72 6e | 73 74 6e 64 40 6b 72 61 |d by brn|stnd@kra|
|00000b90| 6d 64 65 6e 20 6f 6e 20 | 4d 6f 6e 20 4a 75 6e 20 |mden on |Mon Jun |
|00000ba0| 31 31 20 31 38 3a 30 37 | 3a 35 30 20 31 39 39 30 |11 18:07|:50 1990|
|00000bb0| 0a 50 41 54 48 3d 2f 62 | 69 6e 3a 2f 75 73 72 2f |.PATH=/b|in:/usr/|
|00000bc0| 62 69 6e 3a 2f 75 73 72 | 2f 75 63 62 20 3b 20 65 |bin:/usr|/ucb ; e|
|00000bd0| 78 70 6f 72 74 20 50 41 | 54 48 0a 69 66 20 74 65 |xport PA|TH.if te|
|00000be0| 73 74 20 2d 66 20 27 43 | 48 41 4e 47 45 53 27 20 |st -f 'C|HANGES' |
|00000bf0| 2d 61 20 22 24 7b 31 7d | 22 20 21 3d 20 22 2d 63 |-a "${1}|" != "-c|
|00000c00| 22 20 3b 20 74 68 65 6e | 20 0a 20 20 65 63 68 6f |" ; then| . echo|
|00000c10| 20 73 68 61 72 3a 20 57 | 69 6c 6c 20 6e 6f 74 20 | shar: W|ill not |
|00000c20| 63 6c 6f 62 62 65 72 20 | 65 78 69 73 74 69 6e 67 |clobber |existing|
|00000c30| 20 66 69 6c 65 20 5c 22 | 27 43 48 41 4e 47 45 53 | file \"|'CHANGES|
|00000c40| 27 5c 22 0a 65 6c 73 65 | 0a 65 63 68 6f 20 73 68 |'\".else|.echo sh|
|00000c50| 61 72 3a 20 45 78 74 72 | 61 63 74 69 6e 67 20 5c |ar: Extr|acting \|
|00000c60| 22 27 43 48 41 4e 47 45 | 53 27 5c 22 20 5c 28 37 |"'CHANGE|S'\" \(7|
|00000c70| 33 33 20 63 68 61 72 61 | 63 74 65 72 73 5c 29 0a |33 chara|cters\).|
|00000c80| 73 65 64 20 22 73 2f 5e | 58 2f 2f 22 20 3e 27 43 |sed "s/^|X//" >'C|
|00000c90| 48 41 4e 47 45 53 27 20 | 3c 3c 27 45 4e 44 5f 4f |HANGES' |<<'END_O|
|00000ca0| 46 5f 46 49 4c 45 27 0a | 58 36 2f 31 31 2f 39 30 |F_FILE'.|X6/11/90|
|00000cb0| 3a 20 50 61 63 6b 61 67 | 65 64 20 66 6f 72 20 63 |: Packag|ed for c|
|00000cc0| 6f 6d 70 2e 73 6f 75 72 | 63 65 73 2e 75 6e 69 78 |omp.sour|ces.unix|
|00000cd0| 2e 0a 58 36 2f 31 2f 39 | 30 3a 20 70 74 79 20 33 |..X6/1/9|0: pty 3|
|00000ce0| 2e 30 2e 0a 58 0a 58 35 | 2f 32 34 2f 39 30 3a 20 |.0..X.X5|/24/90: |
|00000cf0| 77 68 6f 2e 0a 58 35 2f | 32 33 2f 39 30 3a 20 6c |who..X5/|23/90: l|
|00000d00| 6f 63 6b 2c 20 65 78 63 | 6c 6f 6e 2c 20 65 78 63 |ock, exc|lon, exc|
|00000d10| 6c 6f 66 66 2c 20 74 69 | 6f 63 73 74 69 2c 20 73 |loff, ti|ocsti, s|
|00000d20| 63 72 69 70 74 2c 20 73 | 65 73 73 2c 20 73 63 72 |cript, s|ess, scr|
|00000d30| 69 70 74 2e 74 69 64 79 | 2e 0a 58 35 2f 31 39 2f |ipt.tidy|..X5/19/|
|00000d40| 39 30 3a 20 41 6c 6c 20 | 77 6f 72 6b 69 6e 67 2e |90: All |working.|
|00000d50| 20 4f 6e 20 74 6f 20 74 | 68 65 20 75 74 69 6c 69 | On to t|he utili|
|00000d60| 74 69 65 73 2e 2e 2e 0a | 58 35 2f 31 32 2f 39 30 |ties....|X5/12/90|
|00000d70| 3a 20 57 68 61 74 20 77 | 6f 75 6c 64 20 69 74 20 |: What w|ould it |
|00000d80| 74 61 6b 65 20 74 6f 20 | 75 73 65 20 76 66 6f 72 |take to |use vfor|
|00000d90| 6b 28 29 20 73 61 66 65 | 6c 79 3f 0a 58 35 2f 31 |k() safe|ly?.X5/1|
|00000da0| 32 2f 39 30 3a 20 2d 78 | 65 20 64 65 73 74 72 6f |2/90: -x|e destro|
|00000db0| 79 73 20 63 73 68 2c 20 | 6e 6f 74 20 6a 75 73 74 |ys csh, |not just|
|00000dc0| 20 6d 6f 72 65 2e 20 41 | 6d 75 73 69 6e 67 2e 20 | more. A|musing. |
|00000dd0| 2d 78 45 20 64 65 66 61 | 75 6c 74 2c 20 49 20 67 |-xE defa|ult, I g|
|00000de0| 75 65 73 73 2e 0a 58 35 | 2f 31 32 2f 39 30 3a 20 |uess..X5|/12/90: |
|00000df0| 53 65 70 61 72 61 74 65 | 64 20 6f 75 74 20 74 65 |Separate|d out te|
|00000e00| 78 74 73 2e 63 2c 20 67 | 6c 6f 62 61 6c 73 2e 63 |xts.c, g|lobals.c|
|00000e10| 2c 20 73 69 67 2e 63 2e | 0a 58 35 2f 31 32 2f 39 |, sig.c.|.X5/12/9|
|00000e20| 30 3a 20 53 65 70 61 72 | 61 74 65 64 20 6f 75 74 |0: Separ|ated out|
|00000e30| 20 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 20 69 | configu|ration i|
|00000e40| 6e 74 6f 20 63 6f 6e 66 | 69 67 2e 68 20 28 61 73 |nto conf|ig.h (as|
|00000e50| 20 77 65 6c 6c 20 61 73 | 20 4d 61 6b 65 66 69 6c | well as| Makefil|
|00000e60| 65 29 2e 0a 58 35 2f 31 | 31 2f 39 30 3a 20 50 61 |e)..X5/1|1/90: Pa|
|00000e70| 73 73 65 73 20 6c 69 6e | 74 20 2d 68 61 78 63 2c |sses lin|t -haxc,|
|00000e80| 20 65 78 63 65 70 74 20 | 62 7a 65 72 6f 20 61 6e | except |bzero an|
|00000e90| 64 20 73 6f 6d 65 20 63 | 6f 72 72 65 63 74 20 63 |d some c|orrect c|
|00000ea0| 68 61 72 20 2a 20 63 61 | 73 74 73 2e 20 47 72 72 |har * ca|sts. Grr|
|00000eb0| 72 72 2e 0a 58 35 2f 31 | 31 2f 39 30 3a 20 52 65 |rr..X5/1|1/90: Re|
|00000ec0| 6d 6f 76 65 64 20 6c 61 | 73 74 20 74 72 61 63 65 |moved la|st trace|
|00000ed0| 73 20 6f 66 20 73 74 72 | 75 63 74 75 72 65 20 63 |s of str|ucture c|
|00000ee0| 6f 70 79 69 6e 67 2f 63 | 6f 6d 70 61 72 69 6e 67 |opying/c|omparing|
|00000ef0| 2e 20 53 69 67 68 2e 0a | 58 35 2f 31 30 2f 39 30 |. Sigh..|X5/10/90|
|00000f00| 3a 20 4d 6f 73 74 6c 79 | 20 64 6f 6e 65 2e 20 53 |: Mostly| done. S|
|00000f10| 74 69 6c 6c 20 6e 65 65 | 64 73 20 75 74 6d 70 2c |till nee|ds utmp,|
|00000f20| 20 6f 74 68 65 72 20 73 | 65 63 75 72 69 74 79 2c | other s|ecurity,|
|00000f30| 20 63 74 72 6c 72 20 70 | 61 73 73 69 6e 67 2e 0a | ctrlr p|assing..|
|00000f40| 58 35 2f 36 2f 39 30 3a | 20 50 72 6f 67 72 65 73 |X5/6/90:| Progres|
|00000f50| 73 2e 20 43 68 75 67 20 | 63 68 75 67 20 63 68 75 |s. Chug |chug chu|
|00000f60| 67 2e 0a 58 35 2f 31 2f | 39 30 3a 20 42 65 67 69 |g..X5/1/|90: Begi|
|00000f70| 6e 20 63 6f 6d 70 6c 65 | 74 65 20 72 65 77 72 69 |n comple|te rewri|
|00000f80| 74 65 20 66 6f 72 20 76 | 65 72 73 69 6f 6e 20 33 |te for v|ersion 3|
|00000f90| 2e 30 2e 0a 45 4e 44 5f | 4f 46 5f 46 49 4c 45 0a |.0..END_|OF_FILE.|
|00000fa0| 69 66 20 74 65 73 74 20 | 37 33 33 20 2d 6e 65 20 |if test |733 -ne |
|00000fb0| 60 77 63 20 2d 63 20 3c | 27 43 48 41 4e 47 45 53 |`wc -c <|'CHANGES|
|00000fc0| 27 60 3b 20 74 68 65 6e | 0a 20 20 20 20 65 63 68 |'`; then|. ech|
|00000fd0| 6f 20 73 68 61 72 3a 20 | 5c 22 27 43 48 41 4e 47 |o shar: |\"'CHANG|
|00000fe0| 45 53 27 5c 22 20 75 6e | 70 61 63 6b 65 64 20 77 |ES'\" un|packed w|
|00000ff0| 69 74 68 20 77 72 6f 6e | 67 20 73 69 7a 65 21 0a |ith wron|g size!.|
|00001000| 66 69 0a 23 20 65 6e 64 | 20 6f 66 20 27 43 48 41 |fi.# end| of 'CHA|
|00001010| 4e 47 45 53 27 0a 66 69 | 0a 69 66 20 74 65 73 74 |NGES'.fi|.if test|
|00001020| 20 2d 66 20 27 52 45 41 | 44 4d 45 27 20 2d 61 20 | -f 'REA|DME' -a |
|00001030| 22 24 7b 31 7d 22 20 21 | 3d 20 22 2d 63 22 20 3b |"${1}" !|= "-c" ;|
|00001040| 20 74 68 65 6e 20 0a 20 | 20 65 63 68 6f 20 73 68 | then . | echo sh|
|00001050| 61 72 3a 20 57 69 6c 6c | 20 6e 6f 74 20 63 6c 6f |ar: Will| not clo|
|00001060| 62 62 65 72 20 65 78 69 | 73 74 69 6e 67 20 66 69 |bber exi|sting fi|
|00001070| 6c 65 20 5c 22 27 52 45 | 41 44 4d 45 27 5c 22 0a |le \"'RE|ADME'\".|
|00001080| 65 6c 73 65 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |else.ech|o shar: |
|00001090| 45 78 74 72 61 63 74 69 | 6e 67 20 5c 22 27 52 45 |Extracti|ng \"'RE|
|000010a0| 41 44 4d 45 27 5c 22 20 | 5c 28 31 39 38 39 20 63 |ADME'\" |\(1989 c|
|000010b0| 68 61 72 61 63 74 65 72 | 73 5c 29 0a 73 65 64 20 |haracter|s\).sed |
|000010c0| 22 73 2f 5e 58 2f 2f 22 | 20 3e 27 52 45 41 44 4d |"s/^X//"| >'READM|
|000010d0| 45 27 20 3c 3c 27 45 4e | 44 5f 4f 46 5f 46 49 4c |E' <<'EN|D_OF_FIL|
|000010e0| 45 27 0a 58 70 74 79 20 | 2d 20 72 75 6e 20 61 20 |E'.Xpty |- run a |
|000010f0| 70 72 6f 67 72 61 6d 20 | 75 6e 64 65 72 20 61 20 |program |under a |
|00001100| 70 74 79 20 73 65 73 73 | 69 6f 6e 0a 58 0a 58 70 |pty sess|ion.X.Xp|
|00001110| 74 79 20 69 73 20 6d 65 | 61 6e 74 20 61 73 20 74 |ty is me|ant as t|
|00001120| 68 65 20 73 6f 6c 65 20 | 69 6e 74 65 72 66 61 63 |he sole |interfac|
|00001130| 65 20 62 65 74 77 65 65 | 6e 20 70 73 65 75 64 6f |e betwee|n pseudo|
|00001140| 2d 74 65 72 6d 69 6e 61 | 6c 73 20 61 6e 64 20 74 |-termina|ls and t|
|00001150| 68 65 20 72 65 73 74 0a | 58 6f 66 20 74 68 65 20 |he rest.|Xof the |
|00001160| 73 79 73 74 65 6d 2e 20 | 53 6f 6d 65 20 66 65 61 |system. |Some fea|
|00001170| 74 75 72 65 73 3a 20 69 | 6d 70 72 6f 76 65 64 20 |tures: i|mproved |
|00001180| 73 65 63 75 72 69 74 79 | 3b 20 6f 76 65 72 20 66 |security|; over f|
|00001190| 69 66 74 79 20 6f 70 74 | 69 6f 6e 73 20 66 6f 72 |ifty opt|ions for|
|000011a0| 0a 58 70 72 65 63 69 73 | 65 20 63 6f 6e 74 72 6f |.Xprecis|e contro|
|000011b0| 6c 3b 20 73 65 73 73 69 | 6f 6e 20 64 69 73 63 6f |l; sessi|on disco|
|000011c0| 6e 6e 65 63 74 69 6e 67 | 20 61 6e 64 20 72 65 63 |nnecting| and rec|
|000011d0| 6f 6e 6e 65 63 74 69 6e | 67 3b 20 66 75 6c 6c 20 |onnectin|g; full |
|000011e0| 65 66 66 69 63 69 65 6e | 63 79 0a 58 61 66 74 65 |efficien|cy.Xafte|
|000011f0| 72 20 61 20 72 65 63 6f | 6e 6e 65 63 74 3b 20 61 |r a reco|nnect; a|
|00001200| 20 67 72 61 64 75 61 6c | 20 75 70 67 72 61 64 65 | gradual| upgrade|
|00001210| 20 70 61 74 68 20 73 6f | 20 74 68 61 74 20 61 6c | path so| that al|
|00001220| 6c 20 79 6f 75 72 20 6f | 6c 64 20 75 74 69 6c 69 |l your o|ld utili|
|00001230| 74 69 65 73 0a 58 77 69 | 6c 6c 20 77 6f 72 6b 20 |ties.Xwi|ll work |
|00001240| 77 69 74 68 6f 75 74 20 | 63 68 61 6e 67 65 3b 20 |without |change; |
|00001250| 73 75 70 70 6f 72 74 20 | 66 6f 72 20 61 70 70 6c |support |for appl|
|00001260| 69 63 61 74 69 6f 6e 73 | 20 74 68 61 74 20 6e 65 |ications| that ne|
|00001270| 65 64 20 66 75 6c 6c 20 | 70 74 79 0a 58 63 6f 6e |ed full |pty.Xcon|
|00001280| 74 72 6f 6c 3b 20 61 6e | 64 20 61 20 72 65 61 73 |trol; an|d a reas|
|00001290| 6f 6e 61 62 6c 79 20 73 | 6d 61 72 74 20 69 6e 73 |onably s|mart ins|
|000012a0| 74 61 6c 6c 20 73 63 72 | 69 70 74 2e 20 41 6c 73 |tall scr|ipt. Als|
|000012b0| 6f 20 69 6e 20 74 68 69 | 73 20 70 61 63 6b 61 67 |o in thi|s packag|
|000012c0| 65 20 61 72 65 0a 58 74 | 77 65 6e 74 79 2d 6f 6e |e are.Xt|wenty-on|
|000012d0| 65 20 75 74 69 6c 69 74 | 69 65 73 2c 20 69 6e 63 |e utilit|ies, inc|
|000012e0| 6c 75 64 69 6e 67 20 61 | 20 60 60 73 63 72 69 70 |luding a| ``scrip|
|000012f0| 74 27 27 20 74 68 61 74 | 20 61 63 74 75 61 6c 6c |t'' that| actuall|
|00001300| 79 20 77 6f 72 6b 73 2e | 0a 58 0a 58 70 74 79 20 |y works.|.X.Xpty |
|00001310| 68 61 73 20 62 65 65 6e | 20 74 68 6f 72 6f 75 67 |has been| thoroug|
|00001320| 68 6c 79 20 74 65 73 74 | 65 64 20 6f 6e 20 73 65 |hly test|ed on se|
|00001330| 76 65 72 61 6c 20 42 53 | 44 20 34 2e 33 2d 62 61 |veral BS|D 4.3-ba|
|00001340| 73 65 64 20 6d 61 63 68 | 69 6e 65 73 20 61 6e 64 |sed mach|ines and|
|00001350| 0a 58 74 65 73 74 65 64 | 20 6f 6e 20 73 65 76 65 |.Xtested| on seve|
|00001360| 72 61 6c 20 42 53 44 20 | 34 2e 32 2d 62 61 73 65 |ral BSD |4.2-base|
|00001370| 64 20 6d 61 63 68 69 6e | 65 73 2e 20 49 74 20 73 |d machin|es. It s|
|00001380| 68 6f 75 6c 64 20 62 65 | 20 65 61 73 79 20 74 6f |hould be| easy to|
|00001390| 20 70 6f 72 74 20 74 6f | 0a 58 61 6e 79 20 73 79 | port to|.Xany sy|
|000013a0| 73 74 65 6d 20 73 75 70 | 70 6f 72 74 69 6e 67 20 |stem sup|porting |
|000013b0| 70 73 65 75 64 6f 2d 74 | 65 72 6d 69 6e 61 6c 73 |pseudo-t|erminals|
|000013c0| 20 61 6e 64 20 55 4e 49 | 58 2d 64 6f 6d 61 69 6e | and UNI|X-domain|
|000013d0| 20 73 6f 63 6b 65 74 73 | 2e 20 49 66 20 79 6f 75 | sockets|. If you|
|000013e0| 0a 58 6b 6e 6f 77 20 61 | 6e 79 20 61 70 70 6c 69 |.Xknow a|ny appli|
|000013f0| 63 61 74 69 6f 6e 20 6f | 66 20 70 74 79 73 20 74 |cation o|f ptys t|
|00001400| 68 61 74 20 74 68 69 73 | 20 70 72 6f 67 72 61 6d |hat this| program|
|00001410| 20 63 61 6e 27 74 20 68 | 61 6e 64 6c 65 2c 20 6f | can't h|andle, o|
|00001420| 72 20 69 66 20 79 6f 75 | 0a 58 68 61 76 65 20 61 |r if you|.Xhave a|
|00001430| 20 64 69 66 66 65 72 65 | 6e 74 20 6d 61 63 68 69 | differe|nt machi|
|00001440| 6e 65 20 74 68 61 74 20 | 77 6f 75 6c 64 20 62 65 |ne that |would be|
|00001450| 6e 65 66 69 74 20 66 72 | 6f 6d 20 74 68 65 20 6d |nefit fr|om the m|
|00001460| 6f 64 75 6c 61 72 69 74 | 79 20 61 6e 64 0a 58 70 |odularit|y and.Xp|
|00001470| 6f 77 65 72 20 6f 66 20 | 61 20 70 74 79 20 70 6f |ower of |a pty po|
|00001480| 72 74 2c 20 70 6c 65 61 | 73 65 20 6c 65 74 20 74 |rt, plea|se let t|
|00001490| 68 65 20 61 75 74 68 6f | 72 20 6b 6e 6f 77 2e 0a |he autho|r know..|
|000014a0| 58 0a 58 70 74 79 20 76 | 65 72 73 69 6f 6e 20 33 |X.Xpty v|ersion 3|
|000014b0| 2e 30 2c 20 4a 75 6e 65 | 20 31 2c 20 31 39 39 30 |.0, June| 1, 1990|
|000014c0| 2e 0a 58 43 6f 70 79 72 | 69 67 68 74 20 28 63 29 |..XCopyr|ight (c)|
|000014d0| 20 31 39 39 30 2c 20 44 | 61 6e 69 65 6c 20 4a 2e | 1990, D|aniel J.|
|000014e0| 20 42 65 72 6e 73 74 65 | 69 6e 2e 0a 58 41 6c 6c | Bernste|in..XAll|
|000014f0| 20 72 69 67 68 74 73 20 | 72 65 73 65 72 76 65 64 | rights |reserved|
|00001500| 2e 0a 58 0a 58 54 68 69 | 73 20 64 69 73 74 72 69 |..X.XThi|s distri|
|00001510| 62 75 74 69 6f 6e 20 70 | 61 63 6b 61 67 65 64 20 |bution p|ackaged |
|00001520| 4a 75 6e 65 20 31 31 2c | 20 31 39 39 30 2e 0a 58 |June 11,| 1990..X|
|00001530| 0a 58 47 65 6e 65 72 61 | 6c 20 6c 61 79 6f 75 74 |.XGenera|l layout|
|00001540| 3a 0a 58 43 48 41 4e 47 | 45 53 20 20 20 20 20 20 |:.XCHANG|ES |
|00001550| 20 20 20 44 65 73 63 72 | 69 70 74 69 6f 6e 20 6f | Descr|iption o|
|00001560| 66 20 63 68 61 6e 67 65 | 73 20 73 69 6e 63 65 20 |f change|s since |
|00001570| 66 69 72 73 74 20 64 69 | 73 74 72 69 62 75 74 65 |first di|stribute|
|00001580| 64 20 76 65 72 73 69 6f | 6e 0a 58 43 4f 50 59 52 |d versio|n.XCOPYR|
|00001590| 49 47 48 54 20 20 20 20 | 20 20 20 41 20 63 6f 6d |IGHT | A com|
|000015a0| 70 72 65 68 65 6e 73 69 | 62 6c 65 20 63 6f 70 79 |prehensi|ble copy|
|000015b0| 72 69 67 68 74 20 6e 6f | 74 69 63 65 0a 58 49 4e |right no|tice.XIN|
|000015c0| 53 54 41 4c 4c 20 20 20 | 20 20 20 20 20 20 41 20 |STALL | A |
|000015d0| 73 63 72 69 70 74 20 74 | 6f 20 67 75 69 64 65 20 |script t|o guide |
|000015e0| 79 6f 75 20 74 68 72 6f | 75 67 68 20 63 6f 6d 70 |you thro|ugh comp|
|000015f0| 69 6c 61 74 69 6f 6e 20 | 61 6e 64 20 69 6e 73 74 |ilation |and inst|
|00001600| 61 6c 6c 61 74 69 6f 6e | 0a 58 4d 41 4e 49 46 45 |allation|.XMANIFE|
|00001610| 53 54 20 20 20 20 20 20 | 20 20 53 68 69 70 70 69 |ST | Shippi|
|00001620| 6e 67 20 6c 69 73 74 0a | 58 52 45 41 44 4d 45 20 |ng list.|XREADME |
|00001630| 20 20 20 20 20 20 20 20 | 20 54 68 69 73 20 64 6f | | This do|
|00001640| 63 75 6d 65 6e 74 0a 58 | 54 45 53 54 53 20 20 20 |cument.X|TESTS |
|00001650| 20 20 20 20 20 20 20 20 | 41 20 73 63 72 69 70 74 | |A script|
|00001660| 20 74 6f 20 67 75 69 64 | 65 20 79 6f 75 20 74 68 | to guid|e you th|
|00001670| 72 6f 75 67 68 20 73 6f | 6d 65 20 74 65 73 74 73 |rough so|me tests|
|00001680| 0a 58 4d 61 6b 65 66 69 | 6c 65 20 20 20 20 20 20 |.XMakefi|le |
|00001690| 20 20 49 6e 73 74 61 6c | 6c 61 74 69 6f 6e 20 63 | Instal|lation c|
|000016a0| 6f 6d 6d 61 6e 64 73 0a | 58 2a 2e 63 20 20 20 20 |ommands.|X*.c |
|000016b0| 20 20 20 20 20 20 20 20 | 20 50 72 6f 67 72 61 6d | | Program|
|000016c0| 73 0a 58 2a 2e 68 20 20 | 20 20 20 20 20 20 20 20 |s.X*.h | |
|000016d0| 20 20 20 48 65 61 64 65 | 72 20 66 69 6c 65 73 0a | Heade|r files.|
|000016e0| 58 70 74 79 2e 6d 61 6e | 20 20 20 20 20 20 20 20 |Xpty.man| |
|000016f0| 20 44 6f 63 75 6d 65 6e | 74 61 74 69 6f 6e 0a 58 | Documen|tation.X|
|00001700| 70 61 74 63 68 2f 2a 20 | 20 20 20 20 20 20 20 20 |patch/* | |
|00001710| 50 61 74 63 68 65 73 20 | 74 6f 20 6f 74 68 65 72 |Patches |to other|
|00001720| 20 70 72 6f 67 72 61 6d | 73 20 74 6f 20 62 65 74 | program|s to bet|
|00001730| 74 65 72 20 75 73 65 20 | 70 74 79 0a 58 75 74 69 |ter use |pty.Xuti|
|00001740| 6c 2f 2a 20 20 20 20 20 | 20 20 20 20 20 55 74 69 |l/* | Uti|
|00001750| 6c 69 74 69 65 73 0a 58 | 0a 58 42 65 66 6f 72 65 |lities.X|.XBefore|
|00001760| 20 79 6f 75 20 64 6f 20 | 61 6e 79 74 68 69 6e 67 | you do |anything|
|00001770| 20 65 6c 73 65 2c 20 72 | 75 6e 20 74 68 65 20 49 | else, r|un the I|
|00001780| 4e 53 54 41 4c 4c 20 73 | 63 72 69 70 74 2e 20 49 |NSTALL s|cript. I|
|00001790| 74 27 6c 6c 20 67 75 69 | 64 65 20 79 6f 75 0a 58 |t'll gui|de you.X|
|000017a0| 74 68 72 6f 75 67 68 20 | 63 6f 6d 70 69 6c 69 6e |through |compilin|
|000017b0| 67 20 61 6e 64 20 69 6e | 73 74 61 6c 6c 69 6e 67 |g and in|stalling|
|000017c0| 20 70 74 79 20 61 6e 64 | 20 74 68 65 20 75 74 69 | pty and| the uti|
|000017d0| 6c 69 74 69 65 73 2e 20 | 54 68 65 6e 20 72 75 6e |lities. |Then run|
|000017e0| 20 54 45 53 54 53 0a 58 | 74 6f 20 65 78 65 72 63 | TESTS.X|to exerc|
|000017f0| 69 73 65 20 61 20 66 65 | 77 20 6f 66 20 70 74 79 |ise a fe|w of pty|
|00001800| 27 73 20 66 65 61 74 75 | 72 65 73 20 6f 6e 20 79 |'s featu|res on y|
|00001810| 6f 75 72 20 73 79 73 74 | 65 6d 2e 20 70 61 74 63 |our syst|em. patc|
|00001820| 68 2f 20 69 73 20 73 65 | 70 61 72 61 74 65 3b 0a |h/ is se|parate;.|
|00001830| 58 72 65 61 64 20 70 61 | 74 63 68 2f 52 45 41 44 |Xread pa|tch/READ|
|00001840| 4d 45 20 61 74 20 79 6f | 75 72 20 6c 65 69 73 75 |ME at yo|ur leisu|
|00001850| 72 65 2e 0a 58 0a 58 52 | 65 61 64 20 43 48 41 4e |re..X.XR|ead CHAN|
|00001860| 47 45 53 20 66 6f 72 20 | 61 20 6c 69 73 74 20 6f |GES for |a list o|
|00001870| 66 20 63 68 61 6e 67 65 | 73 2e 20 70 74 79 20 2d |f change|s. pty -|
|00001880| 43 20 61 6e 64 20 70 74 | 79 20 2d 57 20 67 69 76 |C and pt|y -W giv|
|00001890| 65 20 63 6f 70 79 72 69 | 67 68 74 20 61 6e 64 0a |e copyri|ght and.|
|000018a0| 58 77 61 72 72 61 6e 74 | 79 20 69 6e 66 6f 72 6d |Xwarrant|y inform|
|000018b0| 61 74 69 6f 6e 3b 20 70 | 74 79 20 2d 48 20 70 72 |ation; p|ty -H pr|
|000018c0| 69 6e 74 73 20 61 20 68 | 65 6c 70 20 73 63 72 65 |ints a h|elp scre|
|000018d0| 65 6e 2e 0a 45 4e 44 5f | 4f 46 5f 46 49 4c 45 0a |en..END_|OF_FILE.|
|000018e0| 69 66 20 74 65 73 74 20 | 31 39 38 39 20 2d 6e 65 |if test |1989 -ne|
|000018f0| 20 60 77 63 20 2d 63 20 | 3c 27 52 45 41 44 4d 45 | `wc -c |<'README|
|00001900| 27 60 3b 20 74 68 65 6e | 0a 20 20 20 20 65 63 68 |'`; then|. ech|
|00001910| 6f 20 73 68 61 72 3a 20 | 5c 22 27 52 45 41 44 4d |o shar: |\"'READM|
|00001920| 45 27 5c 22 20 75 6e 70 | 61 63 6b 65 64 20 77 69 |E'\" unp|acked wi|
|00001930| 74 68 20 77 72 6f 6e 67 | 20 73 69 7a 65 21 0a 66 |th wrong| size!.f|
|00001940| 69 0a 23 20 65 6e 64 20 | 6f 66 20 27 52 45 41 44 |i.# end |of 'READ|
|00001950| 4d 45 27 0a 66 69 0a 69 | 66 20 74 65 73 74 20 2d |ME'.fi.i|f test -|
|00001960| 66 20 27 49 4e 53 54 41 | 4c 4c 27 20 2d 61 20 22 |f 'INSTA|LL' -a "|
|00001970| 24 7b 31 7d 22 20 21 3d | 20 22 2d 63 22 20 3b 20 |${1}" !=| "-c" ; |
|00001980| 74 68 65 6e 20 0a 20 20 | 65 63 68 6f 20 73 68 61 |then . |echo sha|
|00001990| 72 3a 20 57 69 6c 6c 20 | 6e 6f 74 20 63 6c 6f 62 |r: Will |not clob|
|000019a0| 62 65 72 20 65 78 69 73 | 74 69 6e 67 20 66 69 6c |ber exis|ting fil|
|000019b0| 65 20 5c 22 27 49 4e 53 | 54 41 4c 4c 27 5c 22 0a |e \"'INS|TALL'\".|
|000019c0| 65 6c 73 65 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |else.ech|o shar: |
|000019d0| 45 78 74 72 61 63 74 69 | 6e 67 20 5c 22 27 49 4e |Extracti|ng \"'IN|
|000019e0| 53 54 41 4c 4c 27 5c 22 | 20 5c 28 32 34 38 30 38 |STALL'\"| \(24808|
|000019f0| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 73 65 | charact|ers\).se|
|00001a00| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 49 4e 53 |d "s/^X/|/" >'INS|
|00001a10| 54 41 4c 4c 27 20 3c 3c | 27 45 4e 44 5f 4f 46 5f |TALL' <<|'END_OF_|
|00001a20| 46 49 4c 45 27 0a 58 23 | 21 2f 62 69 6e 2f 73 68 |FILE'.X#|!/bin/sh|
|00001a30| 0a 58 23 20 54 68 69 73 | 20 69 73 20 61 20 73 68 |.X# This| is a sh|
|00001a40| 65 6c 6c 20 73 63 72 69 | 70 74 2e 20 46 65 65 64 |ell scri|pt. Feed|
|00001a50| 20 69 74 20 74 6f 20 73 | 68 2e 0a 58 65 63 68 6f | it to s|h..Xecho|
|00001a60| 20 27 0a 58 48 69 2c 20 | 61 6e 64 20 77 65 6c 63 | '.XHi, |and welc|
|00001a70| 6f 6d 65 20 74 6f 20 74 | 68 65 20 70 74 79 20 69 |ome to t|he pty i|
|00001a80| 6e 73 74 61 6c 6c 20 73 | 63 72 69 70 74 2e 0a 58 |nstall s|cript..X|
|00001a90| 70 74 79 20 69 73 20 61 | 20 70 72 6f 67 72 61 6d |pty is a| program|
|00001aa0| 20 66 6f 72 20 6d 61 6e | 61 67 69 6e 67 20 70 73 | for man|aging ps|
|00001ab0| 65 75 64 6f 2d 74 65 72 | 6d 69 6e 61 6c 73 2e 0a |eudo-ter|minals..|
|00001ac0| 58 0a 58 49 27 5c 27 27 | 6d 20 6e 6f 74 20 61 63 |X.XI'\''|m not ac|
|00001ad0| 74 75 61 6c 6c 79 20 67 | 6f 69 6e 67 20 74 6f 20 |tually g|oing to |
|00001ae0| 69 6e 73 74 61 6c 6c 20 | 61 6e 79 74 68 69 6e 67 |install |anything|
|00001af0| 2e 0a 58 49 27 5c 27 27 | 6c 6c 20 6a 75 73 74 20 |..XI'\''|ll just |
|00001b00| 67 75 69 64 65 20 79 6f | 75 20 74 68 72 6f 75 67 |guide yo|u throug|
|00001b10| 68 20 77 68 61 74 20 68 | 61 73 20 74 6f 20 62 65 |h what h|as to be|
|00001b20| 20 64 6f 6e 65 2c 0a 58 | 66 72 6f 6d 20 63 6f 6d | done,.X|from com|
|00001b30| 70 69 6c 69 6e 67 20 74 | 68 72 6f 75 67 68 20 69 |piling t|hrough i|
|00001b40| 6e 73 74 61 6c 6c 61 74 | 69 6f 6e 2e 0a 58 0a 58 |nstallat|ion..X.X|
|00001b50| 4f 6e 65 20 61 64 76 61 | 6e 74 61 67 65 20 6f 66 |One adva|ntage of|
|00001b60| 20 74 68 69 73 20 68 61 | 6e 64 73 2d 6f 66 66 20 | this ha|nds-off |
|00001b70| 70 68 69 6c 6f 73 6f 70 | 68 79 20 69 73 20 74 68 |philosop|hy is th|
|00001b80| 61 74 0a 58 79 6f 75 20 | 63 61 6e 20 6b 69 6c 6c |at.Xyou |can kill|
|00001b90| 20 61 6e 64 20 72 65 73 | 74 61 72 74 20 74 68 69 | and res|tart thi|
|00001ba0| 73 20 73 63 72 69 70 74 | 20 61 74 20 61 6e 79 20 |s script| at any |
|00001bb0| 74 69 6d 65 2e 0a 58 0a | 58 49 6e 20 74 68 65 20 |time..X.|XIn the |
|00001bc0| 66 69 72 73 74 20 70 61 | 72 74 20 6f 66 20 74 68 |first pa|rt of th|
|00001bd0| 69 73 20 73 63 72 69 70 | 74 2c 20 49 27 5c 27 27 |is scrip|t, I'\''|
|00001be0| 6c 6c 20 6c 65 61 64 20 | 79 6f 75 20 74 68 72 6f |ll lead |you thro|
|00001bf0| 75 67 68 20 63 6f 6e 66 | 69 67 75 72 61 74 69 6f |ugh conf|iguratio|
|00001c00| 6e 2e 0a 58 46 6f 72 20 | 74 68 65 20 6d 6f 6d 65 |n..XFor |the mome|
|00001c10| 6e 74 2c 20 64 6f 6e 27 | 5c 27 27 74 20 61 63 74 |nt, don'|\''t act|
|00001c20| 75 61 6c 6c 79 20 63 68 | 61 6e 67 65 20 61 6e 79 |ually ch|ange any|
|00001c30| 74 68 69 6e 67 20 69 6e | 20 79 6f 75 72 20 73 79 |thing in| your sy|
|00001c40| 73 74 65 6d 2e 20 4a 75 | 73 74 0a 58 61 6c 74 65 |stem. Ju|st.Xalte|
|00001c50| 72 6e 61 74 65 20 62 65 | 74 77 65 65 6e 20 72 65 |rnate be|tween re|
|00001c60| 61 64 69 6e 67 20 74 68 | 69 73 20 73 63 72 69 70 |ading th|is scrip|
|00001c70| 74 20 61 6e 64 20 66 6f | 6f 6c 69 6e 67 20 61 72 |t and fo|oling ar|
|00001c80| 6f 75 6e 64 20 77 69 74 | 68 20 74 68 65 0a 58 4d |ound wit|h the.XM|
|00001c90| 61 6b 65 66 69 6c 65 2c | 20 61 6e 64 20 49 27 5c |akefile,| and I'\|
|00001ca0| 27 27 6c 6c 20 72 65 6d | 69 6e 64 20 79 6f 75 20 |''ll rem|ind you |
|00001cb0| 6c 61 74 65 72 2c 20 61 | 66 74 65 72 20 63 6f 6d |later, a|fter com|
|00001cc0| 70 69 6c 61 74 69 6f 6e | 2c 20 6f 66 20 77 68 61 |pilation|, of wha|
|00001cd0| 74 20 68 61 73 0a 58 74 | 6f 20 62 65 20 63 68 61 |t has.Xt|o be cha|
|00001ce0| 6e 67 65 64 20 65 6c 73 | 65 77 68 65 72 65 2e 0a |nged els|ewhere..|
|00001cf0| 58 0a 58 49 20 6e 65 65 | 64 20 74 68 65 20 66 6f |X.XI nee|d the fo|
|00001d00| 6c 6c 6f 77 69 6e 67 20 | 70 72 6f 67 72 61 6d 73 |llowing |programs|
|00001d10| 3a 20 65 63 68 6f 2c 20 | 74 72 20 5b 2d 64 5d 2c |: echo, |tr [-d],|
|00001d20| 20 6d 61 6e 2c 20 73 65 | 64 20 5b 2d 6e 5d 2c 20 | man, se|d [-n], |
|00001d30| 67 72 65 70 2c 20 74 65 | 73 74 2e 0a 58 27 0a 58 |grep, te|st..X'.X|
|00001d40| 0a 58 65 63 68 6f 20 27 | 2d 2d 2d 2d 2d 20 50 72 |.Xecho '|----- Pr|
|00001d50| 65 73 73 20 72 65 74 75 | 72 6e 20 74 6f 20 63 6f |ess retu|rn to co|
|00001d60| 6e 74 69 6e 75 65 2e 20 | 27 20 7c 20 74 72 20 2d |ntinue. |' | tr -|
|00001d70| 64 20 27 5c 30 31 32 27 | 3b 20 72 65 61 64 20 63 |d '\012'|; read c|
|00001d80| 6f 6e 74 6c 69 6e 65 0a | 58 0a 58 65 63 68 6f 20 |ontline.|X.Xecho |
|00001d90| 27 0a 58 54 68 65 20 66 | 69 72 73 74 20 76 65 72 |'.XThe f|irst ver|
|00001da0| 73 69 6f 6e 73 20 6f 66 | 20 70 74 79 20 77 65 72 |sions of| pty wer|
|00001db0| 65 20 64 65 73 69 67 6e | 65 64 20 6f 6e 20 61 20 |e design|ed on a |
|00001dc0| 42 53 44 20 34 2e 32 2d | 62 61 73 65 64 20 73 79 |BSD 4.2-|based sy|
|00001dd0| 73 74 65 6d 2e 0a 58 44 | 75 72 69 6e 67 20 4d 61 |stem..XD|uring Ma|
|00001de0| 79 20 31 39 39 30 20 70 | 74 79 20 33 2e 30 20 77 |y 1990 p|ty 3.0 w|
|00001df0| 61 73 20 77 72 69 74 74 | 65 6e 20 63 6f 6d 70 6c |as writt|en compl|
|00001e00| 65 74 65 6c 79 20 66 72 | 6f 6d 20 73 63 72 61 74 |etely fr|om scrat|
|00001e10| 63 68 2c 0a 58 6f 6e 20 | 61 20 42 53 44 20 34 2e |ch,.Xon |a BSD 4.|
|00001e20| 33 2d 62 61 73 65 64 20 | 73 79 73 74 65 6d 2e 20 |3-based |system. |
|00001e30| 49 74 20 68 61 73 20 62 | 65 65 6e 20 74 68 6f 72 |It has b|een thor|
|00001e40| 6f 75 67 68 6c 79 20 74 | 65 73 74 65 64 20 6f 6e |oughly t|ested on|
|00001e50| 0a 58 73 65 76 65 72 61 | 6c 20 42 53 44 20 34 2e |.Xsevera|l BSD 4.|
|00001e60| 33 2d 62 61 73 65 64 20 | 73 79 73 74 65 6d 73 2c |3-based |systems,|
|00001e70| 20 74 65 73 74 65 64 20 | 77 69 74 68 20 61 20 66 | tested |with a f|
|00001e80| 65 77 20 4d 61 6b 65 66 | 69 6c 65 20 63 68 61 6e |ew Makef|ile chan|
|00001e90| 67 65 73 0a 58 6f 6e 20 | 73 65 76 65 72 61 6c 20 |ges.Xon |several |
|00001ea0| 42 53 44 20 34 2e 32 2d | 62 61 73 65 64 20 73 79 |BSD 4.2-|based sy|
|00001eb0| 73 74 65 6d 73 2c 20 61 | 6e 64 20 72 75 6e 20 6f |stems, a|nd run o|
|00001ec0| 6e 20 61 74 20 6c 65 61 | 73 74 20 6f 6e 65 20 6d |n at lea|st one m|
|00001ed0| 75 74 61 6e 74 2e 0a 58 | 0a 58 49 66 20 79 6f 75 |utant..X|.XIf you|
|00001ee0| 20 6d 61 6b 65 20 69 74 | 20 74 68 72 6f 75 67 68 | make it| through|
|00001ef0| 20 69 6e 73 74 61 6c 6c | 61 74 69 6f 6e 20 61 6e | install|ation an|
|00001f00| 64 20 74 65 73 74 69 6e | 67 20 61 6e 64 20 67 65 |d testin|g and ge|
|00001f10| 74 20 70 74 79 20 72 75 | 6e 6e 69 6e 67 2c 0a 58 |t pty ru|nning,.X|
|00001f20| 70 6c 65 61 73 65 20 73 | 65 6e 64 20 61 20 6e 6f |please s|end a no|
|00001f30| 74 65 20 74 6f 20 74 68 | 65 20 61 75 74 68 6f 72 |te to th|e author|
|00001f40| 2c 20 44 61 6e 20 42 65 | 72 6e 73 74 65 69 6e 2c |, Dan Be|rnstein,|
|00001f50| 20 6f 6e 20 74 68 65 20 | 49 6e 74 65 72 6e 65 74 | on the |Internet|
|00001f60| 0a 58 61 74 20 62 72 6e | 73 74 6e 64 40 6b 72 61 |.Xat brn|stnd@kra|
|00001f70| 6d 64 65 6e 2e 61 63 66 | 2e 6e 79 75 2e 65 64 75 |mden.acf|.nyu.edu|
|00001f80| 2e 20 4c 65 74 20 68 69 | 6d 20 6b 6e 6f 77 20 79 |. Let hi|m know y|
|00001f90| 6f 75 72 20 63 6f 6d 70 | 75 74 65 72 20 6d 6f 64 |our comp|uter mod|
|00001fa0| 65 6c 2c 20 4f 53 0a 58 | 76 65 72 73 69 6f 6e 2c |el, OS.X|version,|
|00001fb0| 20 61 6e 64 20 77 68 61 | 74 20 63 68 61 6e 67 65 | and wha|t change|
|00001fc0| 73 20 79 6f 75 20 68 61 | 64 20 74 6f 20 6d 61 6b |s you ha|d to mak|
|00001fd0| 65 2e 20 49 66 20 79 6f | 75 20 68 61 76 65 20 61 |e. If yo|u have a|
|00001fe0| 6e 79 20 74 72 6f 75 62 | 6c 65 2c 0a 58 70 6c 65 |ny troub|le,.Xple|
|00001ff0| 61 73 65 20 61 6c 73 6f | 20 67 65 74 20 69 6e 20 |ase also| get in |
|00002000| 74 6f 75 63 68 20 77 69 | 74 68 20 74 68 65 20 61 |touch wi|th the a|
|00002010| 75 74 68 6f 72 2e 20 49 | 66 20 79 6f 75 20 68 61 |uthor. I|f you ha|
|00002020| 76 65 20 61 20 64 69 66 | 66 65 72 65 6e 74 20 6b |ve a dif|ferent k|
|00002030| 69 6e 64 0a 58 6f 66 20 | 73 79 73 74 65 6d 20 77 |ind.Xof |system w|
|00002040| 69 74 68 20 70 73 65 75 | 64 6f 2d 74 65 72 6d 69 |ith pseu|do-termi|
|00002050| 6e 61 6c 20 73 75 70 70 | 6f 72 74 20 74 68 61 74 |nal supp|ort that|
|00002060| 20 63 6f 75 6c 64 20 75 | 73 65 20 61 20 70 74 79 | could u|se a pty|
|00002070| 20 70 6f 72 74 2c 20 74 | 68 65 0a 58 61 75 74 68 | port, t|he.Xauth|
|00002080| 6f 72 20 77 6f 75 6c 64 | 20 6c 6f 76 65 20 74 6f |or would| love to|
|00002090| 20 68 65 61 72 20 61 62 | 6f 75 74 20 69 74 2e 0a | hear ab|out it..|
|000020a0| 58 0a 58 4f 6e 65 20 6e | 6f 74 65 3a 20 4c 69 6b |X.XOne n|ote: Lik|
|000020b0| 65 20 61 6c 6c 20 73 6f | 66 74 77 61 72 65 2c 20 |e all so|ftware, |
|000020c0| 70 74 79 20 63 6f 6d 65 | 73 20 77 69 74 68 6f 75 |pty come|s withou|
|000020d0| 74 20 77 61 72 72 61 6e | 74 79 2c 20 74 6f 20 74 |t warran|ty, to t|
|000020e0| 68 65 20 65 78 74 65 6e | 74 0a 58 70 65 72 6d 69 |he exten|t.Xpermi|
|000020f0| 74 74 65 64 20 62 79 20 | 61 70 70 6c 69 63 61 62 |tted by |applicab|
|00002100| 6c 65 20 6c 61 77 2e 20 | 55 73 65 20 69 74 20 61 |le law. |Use it a|
|00002110| 74 20 79 6f 75 72 20 6f | 77 6e 20 72 69 73 6b 2e |t your o|wn risk.|
|00002120| 0a 58 27 0a 58 0a 58 65 | 63 68 6f 20 27 2d 2d 2d |.X'.X.Xe|cho '---|
|00002130| 2d 2d 20 50 72 65 73 73 | 20 72 65 74 75 72 6e 20 |-- Press| return |
|00002140| 74 6f 20 63 6f 6e 74 69 | 6e 75 65 2e 20 27 20 7c |to conti|nue. ' ||
|00002150| 20 74 72 20 2d 64 20 27 | 5c 30 31 32 27 3b 20 72 | tr -d '|\012'; r|
|00002160| 65 61 64 20 63 6f 6e 74 | 6c 69 6e 65 0a 58 0a 58 |ead cont|line.X.X|
|00002170| 65 63 68 6f 20 27 0a 58 | 49 20 61 73 73 75 6d 65 |echo '.X|I assume|
|00002180| 20 74 68 61 74 20 79 6f | 75 20 64 6f 6e 27 5c 27 | that yo|u don'\'|
|00002190| 27 74 20 77 61 6e 74 20 | 74 6f 20 6d 61 6b 65 20 |'t want |to make |
|000021a0| 61 6e 79 20 6d 61 6a 6f | 72 20 63 68 61 6e 67 65 |any majo|r change|
|000021b0| 73 0a 58 74 6f 20 79 6f | 75 72 20 63 6f 6d 70 75 |s.Xto yo|ur compu|
|000021c0| 74 65 72 20 6a 75 73 74 | 20 74 6f 20 74 61 6b 65 |ter just| to take|
|000021d0| 20 61 64 76 61 6e 74 61 | 67 65 20 6f 66 20 70 74 | advanta|ge of pt|
|000021e0| 79 27 5c 27 27 73 20 63 | 61 70 61 62 69 6c 69 74 |y'\''s c|apabilit|
|000021f0| 69 65 73 2e 0a 58 59 6f | 75 20 6d 69 67 68 74 20 |ies..XYo|u might |
|00002200| 6e 6f 74 20 65 76 65 6e | 20 68 61 76 65 20 61 20 |not even| have a |
|00002210| 70 72 69 76 69 6c 65 67 | 65 64 20 61 63 63 6f 75 |privileg|ed accou|
|00002220| 6e 74 2c 20 66 6f 72 20 | 61 6c 6c 20 49 20 6b 6e |nt, for |all I kn|
|00002230| 6f 77 2e 0a 58 0a 58 54 | 68 65 20 66 69 72 73 74 |ow..X.XT|he first|
|00002240| 20 6d 61 6a 6f 72 20 64 | 65 63 69 73 69 6f 6e 20 | major d|ecision |
|00002250| 79 6f 75 20 68 61 76 65 | 20 74 6f 20 6d 61 6b 65 |you have| to make|
|00002260| 20 69 73 20 77 68 61 74 | 20 70 72 69 76 69 6c 65 | is what| privile|
|00002270| 67 65 73 20 74 6f 20 67 | 69 76 65 20 70 74 79 2e |ges to g|ive pty.|
|00002280| 0a 58 4f 62 76 69 6f 75 | 73 6c 79 20 69 66 20 79 |.XObviou|sly if y|
|00002290| 6f 75 20 64 6f 6e 27 5c | 27 27 74 20 68 61 76 65 |ou don'\|''t have|
|000022a0| 20 70 72 69 76 69 6c 65 | 67 65 73 20 74 68 65 6e | privile|ges then|
|000022b0| 20 70 74 79 20 77 6f 6e | 27 5c 27 27 74 20 65 69 | pty won|'\''t ei|
|000022c0| 74 68 65 72 3b 0a 58 74 | 68 69 73 20 69 73 20 43 |ther;.Xt|his is C|
|000022d0| 61 73 65 20 55 4e 2e 0a | 58 27 0a 58 0a 58 65 63 |ase UN..|X'.X.Xec|
|000022e0| 68 6f 20 27 2d 2d 2d 2d | 2d 20 50 72 65 73 73 20 |ho '----|- Press |
|000022f0| 72 65 74 75 72 6e 20 74 | 6f 20 63 6f 6e 74 69 6e |return t|o contin|
|00002300| 75 65 2e 20 27 20 7c 20 | 74 72 20 2d 64 20 27 5c |ue. ' | |tr -d '\|
|00002310| 30 31 32 27 3b 20 72 65 | 61 64 20 63 6f 6e 74 6c |012'; re|ad contl|
|00002320| 69 6e 65 0a 58 0a 58 65 | 63 68 6f 20 27 0a 58 54 |ine.X.Xe|cho '.XT|
|00002330| 68 65 72 65 20 61 72 65 | 20 73 65 76 65 72 61 6c |here are| several|
|00002340| 20 67 6f 6f 64 20 72 65 | 61 73 6f 6e 73 20 66 6f | good re|asons fo|
|00002350| 72 20 67 69 76 69 6e 67 | 20 70 72 6f 67 72 61 6d |r giving| program|
|00002360| 73 20 70 72 69 76 69 6c | 65 67 65 73 2e 0a 58 4d |s privil|eges..XM|
|00002370| 6f 73 74 20 69 6d 70 6f | 72 74 61 6e 74 6c 79 2c |ost impo|rtantly,|
|00002380| 20 70 72 69 76 69 6c 65 | 67 65 64 20 70 72 6f 67 | privile|ged prog|
|00002390| 72 61 6d 73 20 63 61 6e | 20 70 72 65 63 69 73 65 |rams can| precise|
|000023a0| 6c 79 20 63 6f 6e 74 72 | 6f 6c 20 61 63 63 65 73 |ly contr|ol acces|
|000023b0| 73 0a 58 74 6f 20 61 20 | 73 68 61 72 65 64 20 72 |s.Xto a |shared r|
|000023c0| 65 73 6f 75 72 63 65 2e | 20 70 74 79 20 73 75 70 |esource.| pty sup|
|000023d0| 70 6f 72 74 73 20 61 6e | 20 69 6e 74 65 72 61 63 |ports an| interac|
|000023e0| 74 69 76 65 20 75 73 65 | 72 20 6c 69 73 74 20 69 |tive use|r list i|
|000023f0| 6e 0a 58 2f 65 74 63 2f | 75 74 6d 70 2c 20 61 20 |n.X/etc/|utmp, a |
|00002400| 6c 6f 67 69 6e 2d 6c 6f | 67 6f 75 74 20 72 65 63 |login-lo|gout rec|
|00002410| 6f 72 64 20 69 6e 20 2f | 75 73 72 2f 61 64 6d 2f |ord in /|usr/adm/|
|00002420| 77 74 6d 70 2c 20 61 6e | 64 20 63 6f 6e 74 72 6f |wtmp, an|d contro|
|00002430| 6c 6c 65 64 0a 58 61 63 | 63 65 73 73 20 74 6f 20 |lled.Xac|cess to |
|00002440| 74 68 65 20 70 73 65 75 | 64 6f 2d 74 65 72 6d 69 |the pseu|do-termi|
|00002450| 6e 61 6c 20 66 69 6c 65 | 73 20 74 68 65 6d 73 65 |nal file|s themse|
|00002460| 6c 76 65 73 2c 20 69 6e | 63 6c 75 64 69 6e 67 20 |lves, in|cluding |
|00002470| 73 65 63 75 72 69 74 79 | 20 61 6e 64 0a 58 6d 6f |security| and.Xmo|
|00002480| 64 65 20 63 68 61 6e 67 | 69 6e 67 2e 20 4e 6f 6e |de chang|ing. Non|
|00002490| 65 20 6f 66 20 74 68 65 | 73 65 20 61 72 65 20 70 |e of the|se are p|
|000024a0| 6f 73 73 69 62 6c 65 20 | 69 66 20 70 74 79 20 69 |ossible |if pty i|
|000024b0| 73 6e 27 5c 27 27 74 20 | 73 65 74 75 69 64 2e 0a |sn'\''t |setuid..|
|000024c0| 58 27 0a 58 0a 58 65 63 | 68 6f 20 27 2d 2d 2d 2d |X'.X.Xec|ho '----|
|000024d0| 2d 20 50 72 65 73 73 20 | 72 65 74 75 72 6e 20 74 |- Press |return t|
|000024e0| 6f 20 63 6f 6e 74 69 6e | 75 65 2e 20 27 20 7c 20 |o contin|ue. ' | |
|000024f0| 74 72 20 2d 64 20 27 5c | 30 31 32 27 3b 20 72 65 |tr -d '\|012'; re|
|00002500| 61 64 20 63 6f 6e 74 6c | 69 6e 65 0a 58 0a 58 65 |ad contl|ine.X.Xe|
|00002510| 63 68 6f 20 27 0a 58 49 | 66 20 79 6f 75 20 64 6f |cho '.XI|f you do|
|00002520| 20 77 61 6e 74 20 70 74 | 79 20 74 6f 20 68 61 76 | want pt|y to hav|
|00002530| 65 20 70 72 69 76 69 6c | 65 67 65 73 2c 20 79 6f |e privil|eges, yo|
|00002540| 75 20 68 61 76 65 20 74 | 6f 20 64 65 63 69 64 65 |u have t|o decide|
|00002550| 20 62 65 74 77 65 65 6e | 0a 58 73 65 74 74 69 6e | between|.Xsettin|
|00002560| 67 20 75 70 20 70 74 79 | 20 61 73 20 72 6f 6f 74 |g up pty| as root|
|00002570| 20 28 43 61 73 65 20 52 | 4f 4f 54 29 20 6f 72 20 | (Case R|OOT) or |
|00002580| 61 73 20 73 6f 6d 65 20 | 6f 74 68 65 72 20 75 73 |as some |other us|
|00002590| 65 72 2c 20 73 61 79 20 | 60 60 70 74 79 27 5c 27 |er, say |``pty'\'|
|000025a0| 5c 27 27 0a 58 28 43 61 | 73 65 20 50 54 59 29 2e |\''.X(Ca|se PTY).|
|000025b0| 20 53 74 61 79 69 6e 67 | 20 61 77 61 79 20 66 72 | Staying| away fr|
|000025c0| 6f 6d 20 72 6f 6f 74 20 | 68 61 73 20 74 68 65 20 |om root |has the |
|000025d0| 61 64 76 61 6e 74 61 67 | 65 20 74 68 61 74 20 70 |advantag|e that p|
|000025e0| 72 6f 62 6c 65 6d 73 0a | 58 63 61 6e 27 5c 27 27 |roblems.|Xcan'\''|
|000025f0| 74 20 70 6f 73 73 69 62 | 6c 79 20 64 65 73 74 72 |t possib|ly destr|
|00002600| 6f 79 20 61 6c 6c 20 73 | 65 63 75 72 69 74 79 20 |oy all s|ecurity |
|00002610| 69 6e 20 6f 6e 65 20 62 | 6c 6f 77 2e 20 48 6f 77 |in one b|low. How|
|00002620| 65 76 65 72 2c 20 72 6f | 6f 74 20 68 61 73 0a 58 |ever, ro|ot has.X|
|00002630| 73 65 76 65 72 61 6c 20 | 61 64 76 61 6e 74 61 67 |several |advantag|
|00002640| 65 73 2c 20 6d 61 69 6e | 6c 79 20 62 65 63 61 75 |es, main|ly becau|
|00002650| 73 65 20 6f 66 20 42 53 | 44 20 6c 69 6d 69 74 61 |se of BS|D limita|
|00002660| 74 69 6f 6e 73 3a 20 31 | 2e 20 41 20 70 72 6f 63 |tions: 1|. A proc|
|00002670| 65 73 73 0a 58 63 61 6e | 27 5c 27 27 74 20 63 68 |ess.Xcan|'\''t ch|
|00002680| 61 6e 67 65 20 6f 77 6e | 65 72 73 68 69 70 20 6f |ange own|ership o|
|00002690| 66 20 61 20 66 69 6c 65 | 20 62 65 74 77 65 65 6e |f a file| between|
|000026a0| 20 69 74 73 20 65 75 69 | 64 20 61 6e 64 20 75 69 | its eui|d and ui|
|000026b0| 64 2e 20 4f 6e 6c 79 20 | 72 6f 6f 74 0a 58 63 61 |d. Only |root.Xca|
|000026c0| 6e 20 63 68 61 6e 67 65 | 20 6f 77 6e 65 72 73 68 |n change| ownersh|
|000026d0| 69 70 2e 20 49 74 20 73 | 68 6f 75 6c 64 6e 27 5c |ip. It s|houldn'\|
|000026e0| 27 27 74 20 62 65 20 6e | 65 63 65 73 73 61 72 79 |''t be n|ecessary|
|000026f0| 20 74 6f 20 63 68 61 6e | 67 65 20 6f 77 6e 65 72 | to chan|ge owner|
|00002700| 73 68 69 70 0a 58 6f 66 | 20 70 74 79 73 20 61 6e |ship.Xof| ptys an|
|00002710| 79 77 61 79 2c 20 62 75 | 74 20 74 68 61 74 27 5c |yway, bu|t that'\|
|00002720| 27 27 73 20 77 68 61 74 | 20 6d 61 6e 79 20 70 72 |''s what| many pr|
|00002730| 6f 67 72 61 6d 73 20 61 | 73 73 75 6d 65 2e 20 32 |ograms a|ssume. 2|
|00002740| 2e 20 4d 41 58 55 50 52 | 43 20 69 6e 0a 58 3c 73 |. MAXUPR|C in.X<s|
|00002750| 79 73 2f 70 61 72 61 6d | 2e 68 3e 20 6c 69 6d 69 |ys/param|.h> limi|
|00002760| 74 73 20 74 68 65 20 6e | 75 6d 62 65 72 20 6f 66 |ts the n|umber of|
|00002770| 20 70 72 6f 63 65 73 73 | 65 73 20 75 6e 64 65 72 | process|es under|
|00002780| 20 61 20 67 69 76 65 6e | 20 2a 65 66 66 65 63 74 | a given| *effect|
|00002790| 69 76 65 2a 0a 58 75 69 | 64 2e 20 54 68 69 73 20 |ive*.Xui|d. This |
|000027a0| 61 62 73 6f 6c 75 74 65 | 6c 79 20 69 64 69 6f 74 |absolute|ly idiot|
|000027b0| 69 63 20 62 65 68 61 76 | 69 6f 72 20 69 73 20 61 |ic behav|ior is a|
|000027c0| 20 73 65 72 69 6f 75 73 | 20 70 72 6f 62 6c 65 6d | serious| problem|
|000027d0| 20 66 6f 72 20 70 72 6f | 67 72 61 6d 73 0a 58 73 | for pro|grams.Xs|
|000027e0| 65 74 75 69 64 20 74 6f | 20 61 6e 79 74 68 69 6e |etuid to| anythin|
|000027f0| 67 20 6f 74 68 65 72 20 | 74 68 61 6e 20 72 6f 6f |g other |than roo|
|00002800| 74 2e 20 70 74 79 20 74 | 72 69 65 73 20 74 6f 20 |t. pty t|ries to |
|00002810| 77 6f 72 6b 20 61 72 6f | 75 6e 64 20 74 68 69 73 |work aro|und this|
|00002820| 0a 58 70 72 6f 62 6c 65 | 6d 2c 20 62 75 74 20 74 |.Xproble|m, but t|
|00002830| 68 65 72 65 20 61 72 65 | 20 6e 6f 20 74 72 75 65 |here are| no true|
|00002840| 20 73 6f 6c 75 74 69 6f | 6e 73 2e 20 33 2e 20 44 | solutio|ns. 3. D|
|00002850| 65 73 70 69 74 65 20 74 | 68 65 20 64 6f 63 75 6d |espite t|he docum|
|00002860| 65 6e 74 61 74 69 6f 6e | 0a 58 69 6e 20 6b 69 6c |entation|.Xin kil|
|00002870| 6c 28 32 29 2c 20 6d 61 | 6e 79 20 6d 61 63 68 69 |l(2), ma|ny machi|
|00002880| 6e 65 73 20 64 6f 6e 27 | 5c 27 27 74 20 61 6c 6c |nes don'|\''t all|
|00002890| 6f 77 20 6e 6f 6e 2d 72 | 6f 6f 74 20 70 72 6f 63 |ow non-r|oot proc|
|000028a0| 65 73 73 65 73 20 74 6f | 20 73 65 6e 64 0a 58 43 |esses to| send.XC|
|000028b0| 4f 4e 54 20 74 6f 20 63 | 68 69 6c 64 72 65 6e 20 |ONT to c|hildren |
|000028c0| 77 69 74 68 20 61 20 64 | 69 66 66 65 72 65 6e 74 |with a d|ifferent|
|000028d0| 20 75 69 64 2e 20 55 6e | 6c 69 6b 65 20 61 6c 6d | uid. Un|like alm|
|000028e0| 6f 73 74 20 61 6c 6c 20 | 6f 74 68 65 72 20 70 72 |ost all |other pr|
|000028f0| 6f 67 72 61 6d 73 2c 0a | 58 70 74 79 20 73 65 6e |ograms,.|Xpty sen|
|00002900| 73 69 62 6c 79 20 68 61 | 6e 64 6c 65 73 20 69 74 |sibly ha|ndles it|
|00002910| 73 20 63 68 69 6c 64 20 | 73 74 6f 70 70 69 6e 67 |s child |stopping|
|00002920| 20 61 6e 64 20 72 65 73 | 74 61 72 74 69 6e 67 3b | and res|tarting;|
|00002930| 20 62 75 74 20 74 68 69 | 73 20 77 6f 6e 27 5c 27 | but thi|s won'\'|
|00002940| 27 74 0a 58 77 6f 72 6b | 20 6f 6e 20 74 68 6f 73 |'t.Xwork| on thos|
|00002950| 65 20 6d 61 63 68 69 6e | 65 73 20 69 66 20 70 74 |e machin|es if pt|
|00002960| 79 20 69 73 6e 27 5c 27 | 27 74 20 72 6f 6f 74 2e |y isn'\'|'t root.|
|00002970| 0a 58 0a 58 59 6f 75 20 | 73 68 6f 75 6c 64 20 64 |.X.XYou |should d|
|00002980| 65 63 69 64 65 20 6e 6f | 77 20 62 65 74 77 65 65 |ecide no|w betwee|
|00002990| 6e 20 43 61 73 65 20 52 | 4f 4f 54 20 61 6e 64 20 |n Case R|OOT and |
|000029a0| 43 61 73 65 20 50 54 59 | 2e 0a 58 27 0a 58 0a 58 |Case PTY|..X'.X.X|
|000029b0| 65 63 68 6f 20 27 2d 2d | 2d 2d 2d 20 50 72 65 73 |echo '--|--- Pres|
|000029c0| 73 20 72 65 74 75 72 6e | 20 74 6f 20 63 6f 6e 74 |s return| to cont|
|000029d0| 69 6e 75 65 2e 20 27 20 | 7c 20 74 72 20 2d 64 20 |inue. ' || tr -d |
|000029e0| 27 5c 30 31 32 27 3b 20 | 72 65 61 64 20 63 6f 6e |'\012'; |read con|
|000029f0| 74 6c 69 6e 65 0a 58 0a | 58 65 63 68 6f 20 27 0a |tline.X.|Xecho '.|
|00002a00| 58 57 68 65 74 68 65 72 | 20 79 6f 75 27 5c 27 27 |XWhether| you'\''|
|00002a10| 76 65 20 64 65 63 69 64 | 65 64 20 6f 6e 20 52 4f |ve decid|ed on RO|
|00002a20| 4f 54 2c 20 50 54 59 2c | 20 6f 72 20 55 4e 2c 0a |OT, PTY,| or UN,.|
|00002a30| 58 6e 6f 77 20 69 73 20 | 74 68 65 20 74 69 6d 65 |Xnow is |the time|
|00002a40| 20 74 6f 20 63 68 65 63 | 6b 20 74 68 65 20 73 65 | to chec|k the se|
|00002a50| 63 75 72 69 74 79 20 6f | 66 20 74 68 65 20 65 6e |curity o|f the en|
|00002a60| 74 69 72 65 20 70 74 79 | 20 70 61 63 6b 61 67 65 |tire pty| package|
|00002a70| 2e 0a 58 49 74 27 5c 27 | 27 64 20 62 65 20 64 69 |..XIt'\'|'d be di|
|00002a80| 66 66 69 63 75 6c 74 20 | 66 6f 72 20 61 6e 79 74 |fficult |for anyt|
|00002a90| 68 69 6e 67 20 74 6f 20 | 73 6c 69 70 20 74 68 72 |hing to |slip thr|
|00002aa0| 6f 75 67 68 20 74 68 65 | 20 63 68 65 63 6b 73 20 |ough the| checks |
|00002ab0| 62 79 20 74 68 65 0a 58 | 61 75 74 68 6f 72 2c 20 |by the.X|author, |
|00002ac0| 74 65 73 74 65 72 73 2c | 20 61 6e 64 20 73 6f 75 |testers,| and sou|
|00002ad0| 72 63 65 20 67 72 6f 75 | 70 20 6d 6f 64 65 72 61 |rce grou|p modera|
|00002ae0| 74 6f 72 2c 20 62 75 74 | 20 79 6f 75 20 73 68 6f |tor, but| you sho|
|00002af0| 75 6c 64 20 74 61 6b 65 | 0a 58 61 74 20 6c 65 61 |uld take|.Xat lea|
|00002b00| 73 74 20 61 20 6d 6f 6d | 65 6e 74 20 74 6f 20 6c |st a mom|ent to l|
|00002b10| 6f 6f 6b 20 66 6f 72 20 | 79 6f 75 72 20 70 65 74 |ook for |your pet|
|00002b20| 20 73 65 63 75 72 69 74 | 79 20 70 65 65 76 65 73 | securit|y peeves|
|00002b30| 2e 0a 58 0a 58 41 20 63 | 6f 75 70 6c 65 20 6f 66 |..X.XA c|ouple of|
|00002b40| 20 73 65 63 75 72 69 74 | 79 20 6e 6f 74 65 73 3a | securit|y notes:|
|00002b50| 20 54 68 65 20 6f 6e 6c | 79 20 6f 70 65 6e 28 2c | The onl|y open(,|
|00002b60| 4f 5f 43 52 45 41 54 29 | 20 69 6e 20 70 74 79 20 |O_CREAT)| in pty |
|00002b70| 69 73 20 69 6e 0a 58 6d | 61 73 74 65 72 2e 63 2c |is in.Xm|aster.c,|
|00002b80| 20 61 74 20 74 68 65 20 | 74 6f 70 20 6f 66 20 6d | at the |top of m|
|00002b90| 61 73 74 65 72 28 29 2c | 20 6f 66 20 61 20 66 69 |aster(),| of a fi|
|00002ba0| 6c 65 20 77 69 74 68 20 | 61 20 76 65 72 79 20 72 |le with |a very r|
|00002bb0| 65 73 74 72 69 63 74 65 | 64 0a 58 66 6f 72 6d 20 |estricte|d.Xform |
|00002bc0| 63 6f 6e 73 74 72 75 63 | 74 65 64 20 66 72 6f 6d |construc|ted from|
|00002bd0| 20 74 68 65 20 66 69 6c | 65 6e 61 6d 65 20 6f 66 | the fil|ename of|
|00002be0| 20 61 20 2f 64 65 76 2f | 74 74 79 78 78 2e 20 54 | a /dev/|ttyxx. T|
|00002bf0| 68 65 72 65 20 61 72 65 | 20 6e 6f 0a 58 63 72 65 |here are| no.Xcre|
|00002c00| 61 74 28 29 73 2e 20 54 | 68 65 20 6f 6e 6c 79 20 |at()s. T|he only |
|00002c10| 62 69 6e 64 28 29 20 69 | 73 20 69 6e 20 73 6f 63 |bind() i|s in soc|
|00002c20| 6b 2e 63 27 5c 27 27 73 | 20 70 74 79 5f 72 65 61 |k.c'\''s| pty_rea|
|00002c30| 64 73 6f 63 6b 28 29 2c | 20 77 68 69 63 68 20 69 |dsock(),| which i|
|00002c40| 73 0a 58 63 61 6c 6c 65 | 64 20 6f 6e 6c 79 20 66 |s.Xcalle|d only f|
|00002c50| 72 6f 6d 20 6d 61 73 74 | 65 72 2e 63 27 5c 27 27 |rom mast|er.c'\''|
|00002c60| 73 20 6d 61 73 74 65 72 | 28 29 20 74 6f 20 63 72 |s master|() to cr|
|00002c70| 65 61 74 65 20 61 20 73 | 6f 63 6b 65 74 20 77 69 |eate a s|ocket wi|
|00002c80| 74 68 20 61 0a 58 73 69 | 6d 69 6c 61 72 6c 79 20 |th a.Xsi|milarly |
|00002c90| 72 65 73 74 72 69 63 74 | 65 64 20 6e 61 6d 65 2e |restrict|ed name.|
|00002ca0| 20 28 66 6e 73 74 79 20 | 69 73 20 63 68 61 6e 67 | (fnsty |is chang|
|00002cb0| 65 64 20 69 6e 20 73 69 | 67 6c 65 72 20 62 75 74 |ed in si|gler but|
|00002cc0| 20 6e 6f 74 20 69 6e 0a | 58 6d 61 73 74 65 72 2e | not in.|Xmaster.|
|00002cd0| 29 20 54 68 65 20 6f 6e | 6c 79 20 65 78 65 63 28 |) The on|ly exec(|
|00002ce0| 29 20 69 73 20 69 6e 20 | 73 6c 61 76 65 2e 63 2c |) is in |slave.c,|
|00002cf0| 20 61 66 74 65 72 20 61 | 20 66 6f 72 63 65 64 20 | after a| forced |
|00002d00| 73 65 74 72 65 75 69 64 | 28 29 0a 58 74 6f 20 61 |setreuid|().Xto a|
|00002d10| 20 75 69 64 20 74 68 61 | 74 20 69 73 20 6f 6e 6c | uid tha|t is onl|
|00002d20| 79 20 73 65 74 20 74 6f | 20 67 65 74 75 69 64 28 |y set to| getuid(|
|00002d30| 29 2e 20 75 6e 6c 69 6e | 6b 28 29 2c 20 6d 6b 64 |). unlin|k(), mkd|
|00002d40| 69 72 28 29 2c 20 61 6e | 64 20 72 65 6e 61 6d 65 |ir(), an|d rename|
|00002d50| 28 29 0a 58 61 72 65 20 | 6f 6e 6c 79 20 75 73 65 |().Xare |only use|
|00002d60| 64 20 77 69 74 68 20 72 | 65 73 74 72 69 63 74 65 |d with r|estricte|
|00002d70| 64 20 70 61 74 68 6e 61 | 6d 65 73 2e 0a 58 27 0a |d pathna|mes..X'.|
|00002d80| 58 0a 58 65 63 68 6f 20 | 27 2d 2d 2d 2d 2d 20 50 |X.Xecho |'----- P|
|00002d90| 72 65 73 73 20 72 65 74 | 75 72 6e 20 74 6f 20 63 |ress ret|urn to c|
|00002da0| 6f 6e 74 69 6e 75 65 2e | 20 27 20 7c 20 74 72 20 |ontinue.| ' | tr |
|00002db0| 2d 64 20 27 5c 30 31 32 | 27 3b 20 72 65 61 64 20 |-d '\012|'; read |
|00002dc0| 63 6f 6e 74 6c 69 6e 65 | 0a 58 0a 58 65 63 68 6f |contline|.X.Xecho|
|00002dd0| 20 27 0a 58 49 6e 20 43 | 61 73 65 20 50 54 59 2c | '.XIn C|ase PTY,|
|00002de0| 20 79 6f 75 20 68 61 76 | 65 20 74 6f 20 73 65 74 | you hav|e to set|
|00002df0| 20 75 70 20 61 20 6e 65 | 77 20 75 69 64 2c 20 73 | up a ne|w uid, s|
|00002e00| 61 79 20 60 60 70 74 79 | 27 5c 27 5c 27 27 20 28 |ay ``pty|'\'\'' (|
|00002e10| 6f 72 20 77 68 61 74 65 | 76 65 72 0a 58 75 73 65 |or whate|ver.Xuse|
|00002e20| 72 6e 61 6d 65 20 79 6f | 75 20 77 61 6e 74 29 2e |rname yo|u want).|
|00002e30| 20 70 74 79 20 73 68 6f | 75 6c 64 20 6e 6f 74 20 | pty sho|uld not |
|00002e40| 61 6c 6c 6f 77 20 6c 6f | 67 69 6e 73 2e 20 49 74 |allow lo|gins. It|
|00002e50| 73 20 70 61 73 73 77 6f | 72 64 20 73 68 6f 75 6c |s passwo|rd shoul|
|00002e60| 64 0a 58 62 65 20 61 6e | 20 61 73 74 65 72 69 73 |d.Xbe an| asteris|
|00002e70| 6b 3b 20 69 74 73 20 68 | 6f 6d 65 20 64 69 72 65 |k; its h|ome dire|
|00002e80| 63 74 6f 72 79 20 73 68 | 6f 75 6c 64 20 62 65 20 |ctory sh|ould be |
|00002e90| 2f 6e 6f 6e 65 78 69 73 | 74 65 6e 74 3b 20 69 74 |/nonexis|tent; it|
|00002ea0| 73 20 73 68 65 6c 6c 0a | 58 73 68 6f 75 6c 64 20 |s shell.|Xshould |
|00002eb0| 62 65 20 2f 62 69 6e 2f | 74 72 75 65 2e 20 49 6e |be /bin/|true. In|
|00002ec0| 20 6f 74 68 65 72 20 77 | 6f 72 64 73 2c 20 74 68 | other w|ords, th|
|00002ed0| 65 20 6f 6e 6c 79 20 61 | 63 63 65 73 73 20 74 6f |e only a|ccess to|
|00002ee0| 20 75 73 65 72 20 70 74 | 79 0a 58 73 68 6f 75 6c | user pt|y.Xshoul|
|00002ef0| 64 20 62 65 20 74 68 72 | 6f 75 67 68 20 74 68 65 |d be thr|ough the|
|00002f00| 73 65 20 73 65 74 75 69 | 64 20 70 72 6f 67 72 61 |se setui|d progra|
|00002f10| 6d 73 2e 0a 58 0a 58 49 | 6e 20 61 6e 79 20 70 72 |ms..X.XI|n any pr|
|00002f20| 69 76 69 6c 65 67 65 64 | 20 63 61 73 65 20 79 6f |ivileged| case yo|
|00002f30| 75 20 73 68 6f 75 6c 64 | 20 68 61 76 65 20 67 72 |u should| have gr|
|00002f40| 6f 75 70 20 74 74 79 2c | 0a 58 77 68 69 63 68 20 |oup tty,|.Xwhich |
|00002f50| 6d 6f 73 74 20 42 53 44 | 20 34 2e 33 20 73 79 73 |most BSD| 4.3 sys|
|00002f60| 74 65 6d 73 20 68 61 76 | 65 20 61 73 20 67 69 64 |tems hav|e as gid|
|00002f70| 20 34 2e 20 0a 58 27 0a | 58 0a 58 65 63 68 6f 20 | 4. .X'.|X.Xecho |
|00002f80| 27 52 75 6e 6e 69 6e 67 | 20 27 5c 0a 58 27 24 20 |'Running| '\.X'$ |
|00002f90| 74 74 79 67 72 6f 75 70 | 3d 22 60 73 65 64 20 2d |ttygroup|="`sed -|
|00002fa0| 6e 20 27 5c 27 27 73 2f | 5e 74 74 79 3a 5b 5e 3a |n '\''s/|^tty:[^:|
|00002fb0| 5d 2a 3a 5c 28 2e 2a 5c | 29 3a 2e 2a 2f 5c 31 2f |]*:\(.*\|):.*/\1/|
|00002fc0| 70 27 5c 27 27 20 3c 20 | 2f 65 74 63 2f 67 72 6f |p'\'' < |/etc/gro|
|00002fd0| 75 70 60 22 20 2e 2e 2e | 27 0a 58 74 74 79 67 72 |up`" ...|'.Xttygr|
|00002fe0| 6f 75 70 3d 22 60 73 65 | 64 20 2d 6e 20 27 73 2f |oup="`se|d -n 's/|
|00002ff0| 5e 74 74 79 3a 5b 5e 3a | 5d 2a 3a 5c 28 2e 2a 5c |^tty:[^:|]*:\(.*\|
|00003000| 29 3a 2e 2a 2f 5c 31 2f | 70 27 20 3c 20 2f 65 74 |):.*/\1/|p' < /et|
|00003010| 63 2f 67 72 6f 75 70 60 | 22 0a 58 0a 58 63 61 73 |c/group`|".X.Xcas|
|00003020| 65 20 22 24 74 74 79 67 | 72 6f 75 70 22 20 69 6e |e "$ttyg|roup" in|
|00003030| 0a 58 34 29 20 65 63 68 | 6f 20 27 0a 58 49 20 73 |.X4) ech|o '.XI s|
|00003040| 65 65 20 74 68 61 74 20 | 79 6f 75 20 68 61 76 65 |ee that |you have|
|00003050| 20 61 20 74 74 79 20 67 | 72 6f 75 70 2c 20 34 20 | a tty g|roup, 4 |
|00003060| 61 73 20 75 73 75 61 6c | 2e 20 47 6f 6f 64 2e 0a |as usual|. Good..|
|00003070| 58 27 20 3b 3b 0a 58 27 | 27 29 20 65 63 68 6f 20 |X' ;;.X'|') echo |
|00003080| 27 0a 58 59 6f 75 20 64 | 6f 6e 27 5c 27 27 74 20 |'.XYou d|on'\''t |
|00003090| 68 61 76 65 20 61 20 74 | 74 79 20 67 72 6f 75 70 |have a t|ty group|
|000030a0| 2e 20 55 6e 6c 65 73 73 | 20 79 6f 75 20 68 61 76 |. Unless| you hav|
|000030b0| 65 20 61 20 73 75 69 74 | 61 62 6c 65 20 67 72 6f |e a suit|able gro|
|000030c0| 75 70 20 75 6e 64 65 72 | 20 61 0a 58 64 69 66 66 |up under| a.Xdiff|
|000030d0| 65 72 65 6e 74 20 6e 61 | 6d 65 2c 20 79 6f 75 20 |erent na|me, you |
|000030e0| 73 68 6f 75 6c 64 20 61 | 64 64 20 74 68 65 20 6c |should a|dd the l|
|000030f0| 69 6e 65 0a 58 74 74 79 | 3a 2a 3a 34 3a 72 6f 6f |ine.Xtty|:*:4:roo|
|00003100| 74 0a 58 74 6f 20 2f 65 | 74 63 2f 67 72 6f 75 70 |t.Xto /e|tc/group|
|00003110| 2e 0a 58 27 20 3b 3b 0a | 58 2a 29 20 65 63 68 6f |..X' ;;.|X*) echo|
|00003120| 20 27 0a 58 49 20 73 65 | 65 20 74 68 61 74 20 79 | '.XI se|e that y|
|00003130| 6f 75 20 68 61 76 65 20 | 61 20 74 74 79 20 67 72 |ou have |a tty gr|
|00003140| 6f 75 70 2c 20 67 69 64 | 20 27 22 24 74 74 79 67 |oup, gid| '"$ttyg|
|00003150| 72 6f 75 70 22 27 20 72 | 61 74 68 65 72 20 74 68 |roup"' r|ather th|
|00003160| 61 6e 20 34 2e 20 4f 6b | 61 79 2e 0a 58 27 20 3b |an 4. Ok|ay..X' ;|
|00003170| 3b 0a 58 65 73 61 63 0a | 58 0a 58 65 63 68 6f 20 |;.Xesac.|X.Xecho |
|00003180| 27 2d 2d 2d 2d 2d 20 50 | 72 65 73 73 20 72 65 74 |'----- P|ress ret|
|00003190| 75 72 6e 20 74 6f 20 63 | 6f 6e 74 69 6e 75 65 2e |urn to c|ontinue.|
|000031a0| 20 27 20 7c 20 74 72 20 | 2d 64 20 27 5c 30 31 32 | ' | tr |-d '\012|
|000031b0| 27 3b 20 72 65 61 64 20 | 63 6f 6e 74 6c 69 6e 65 |'; read |contline|
|000031c0| 0a 58 0a 58 65 63 68 6f | 20 27 0a 58 4e 65 78 74 |.X.Xecho| '.XNext|
|000031d0| 2c 20 77 65 27 5c 27 27 | 72 65 20 67 6f 69 6e 67 |, we'\''|re going|
|000031e0| 20 74 6f 20 64 72 75 64 | 67 65 20 74 68 72 6f 75 | to drud|ge throu|
|000031f0| 67 68 20 74 68 65 20 63 | 6f 6e 66 69 67 2e 68 20 |gh the c|onfig.h |
|00003200| 66 69 6c 65 2e 0a 58 0a | 58 49 6e 20 43 61 73 65 |file..X.|XIn Case|
|00003210| 73 20 52 4f 4f 54 20 6f | 72 20 50 54 59 2c 20 79 |s ROOT o|r PTY, y|
|00003220| 6f 75 20 68 61 76 65 20 | 74 6f 20 73 65 74 20 75 |ou have |to set u|
|00003230| 70 20 61 20 73 79 73 74 | 65 6d 2d 77 69 64 65 20 |p a syst|em-wide |
|00003240| 64 69 72 65 63 74 6f 72 | 79 0a 58 66 6f 72 20 73 |director|y.Xfor s|
|00003250| 74 6f 72 69 6e 67 20 69 | 6e 66 6f 72 6d 61 74 69 |toring i|nformati|
|00003260| 6f 6e 20 61 62 6f 75 74 | 20 70 74 79 20 73 65 73 |on about| pty ses|
|00003270| 73 69 6f 6e 73 2e 20 28 | 41 20 73 65 73 73 69 6f |sions. (|A sessio|
|00003280| 6e 20 69 73 20 61 20 70 | 72 6f 67 72 61 6d 0a 58 |n is a p|rogram.X|
|00003290| 73 74 75 63 6b 20 75 6e | 64 65 72 20 61 20 70 74 |stuck un|der a pt|
|000032a0| 79 20 74 68 61 74 20 79 | 6f 75 20 63 61 6e 20 64 |y that y|ou can d|
|000032b0| 69 73 63 6f 6e 6e 65 63 | 74 20 61 6e 64 20 72 65 |isconnec|t and re|
|000032c0| 63 6f 6e 6e 65 63 74 2e | 29 20 55 73 65 72 73 20 |connect.|) Users |
|000032d0| 63 61 6e 0a 58 67 65 74 | 20 61 72 6f 75 6e 64 20 |can.Xget| around |
|000032e0| 74 68 69 73 20 64 69 72 | 65 63 74 6f 72 79 2c 20 |this dir|ectory, |
|000032f0| 73 74 6f 72 69 6e 67 20 | 74 68 65 20 69 6e 66 6f |storing |the info|
|00003300| 72 6d 61 74 69 6f 6e 20 | 69 6e 20 7e 2f 2e 70 74 |rmation |in ~/.pt|
|00003310| 79 20 61 6e 64 0a 58 72 | 65 76 6f 6b 69 6e 67 20 |y and.Xr|evoking |
|00003320| 61 6e 79 20 70 72 69 76 | 69 6c 65 67 65 73 2c 20 |any priv|ileges, |
|00003330| 77 69 74 68 20 70 74 79 | 20 2d 78 53 3b 20 79 6f |with pty| -xS; yo|
|00003340| 75 20 63 61 6e 20 65 76 | 65 6e 20 6d 61 6b 65 20 |u can ev|en make |
|00003350| 74 68 69 73 20 64 65 66 | 61 75 6c 74 0a 58 62 79 |this def|ault.Xby|
|00003360| 20 73 65 74 74 69 6e 67 | 20 66 6c 61 67 78 73 65 | setting| flagxse|
|00003370| 74 75 69 64 20 3d 20 30 | 20 69 6e 20 67 6c 6f 62 |tuid = 0| in glob|
|00003380| 61 6c 73 2e 63 2e 20 48 | 6f 77 65 76 65 72 2c 20 |als.c. H|owever, |
|00003390| 61 20 73 69 6e 67 6c 65 | 20 73 79 73 74 65 6d 2d |a single| system-|
|000033a0| 77 69 64 65 0a 58 64 69 | 72 65 63 74 6f 72 79 20 |wide.Xdi|rectory |
|000033b0| 69 73 20 73 61 66 65 72 | 2e 0a 58 0a 58 41 6e 79 |is safer|..X.XAny|
|000033c0| 77 61 79 2c 20 74 68 61 | 74 20 64 69 72 65 63 74 |way, tha|t direct|
|000033d0| 6f 72 79 2c 20 50 54 59 | 44 49 52 2c 20 73 68 6f |ory, PTY|DIR, sho|
|000033e0| 75 6c 64 20 62 65 20 6d | 6f 64 65 20 30 37 30 30 |uld be m|ode 0700|
|000033f0| 2c 20 6f 77 6e 65 72 20 | 72 6f 6f 74 20 69 6e 20 |, owner |root in |
|00003400| 63 61 73 65 0a 58 52 4f | 4f 54 20 6f 72 20 70 74 |case.XRO|OT or pt|
|00003410| 79 20 69 6e 20 63 61 73 | 65 20 50 54 59 2c 20 67 |y in cas|e PTY, g|
|00003420| 72 6f 75 70 20 69 72 72 | 65 6c 65 76 61 6e 74 2e |roup irr|elevant.|
|00003430| 20 50 54 59 44 49 52 20 | 69 73 20 64 65 66 69 6e | PTYDIR |is defin|
|00003440| 65 64 20 69 6e 20 63 6f | 6e 66 69 67 2e 68 0a 58 |ed in co|nfig.h.X|
|00003450| 61 73 20 2f 75 73 72 2f | 65 74 63 2f 70 74 79 20 |as /usr/|etc/pty |
|00003460| 62 79 20 64 65 66 61 75 | 6c 74 3b 20 69 66 20 79 |by defau|lt; if y|
|00003470| 6f 75 20 63 68 6f 6f 73 | 65 20 61 20 64 69 66 66 |ou choos|e a diff|
|00003480| 65 72 65 6e 74 20 64 69 | 72 65 63 74 6f 72 79 2c |erent di|rectory,|
|00003490| 20 61 64 64 0a 58 2d 44 | 50 54 59 44 49 52 3d 5c | add.X-D|PTYDIR=\|
|000034a0| 22 2f 77 68 61 74 2f 65 | 76 65 72 2f 64 69 72 2f |"/what/e|ver/dir/|
|000034b0| 65 63 74 2f 6f 72 79 5c | 22 20 74 6f 20 43 43 4f |ect/ory\|" to CCO|
|000034c0| 50 54 53 20 69 6e 20 74 | 68 65 20 4d 61 6b 65 66 |PTS in t|he Makef|
|000034d0| 69 6c 65 2e 0a 58 0a 58 | 49 6e 20 43 61 73 65 20 |ile..X.X|In Case |
|000034e0| 55 4e 2c 20 79 6f 75 20 | 6d 61 79 20 77 61 6e 74 |UN, you |may want|
|000034f0| 20 74 6f 20 73 65 74 20 | 75 70 20 61 20 64 69 72 | to set |up a dir|
|00003500| 65 63 74 6f 72 79 20 7e | 2f 50 54 59 20 69 6e 73 |ectory ~|/PTY ins|
|00003510| 69 64 65 20 79 6f 75 72 | 20 68 6f 6d 65 0a 58 64 |ide your| home.Xd|
|00003520| 69 72 65 63 74 6f 72 79 | 2c 20 61 6e 64 20 73 65 |irectory|, and se|
|00003530| 74 20 50 54 59 44 49 52 | 20 74 6f 20 74 68 61 74 |t PTYDIR| to that|
|00003540| 3b 20 79 6f 75 20 6d 61 | 79 20 77 61 6e 74 20 74 |; you ma|y want t|
|00003550| 6f 20 73 65 74 20 66 6c | 61 67 78 73 65 74 75 69 |o set fl|agxsetui|
|00003560| 64 20 3d 20 30 0a 58 69 | 6e 20 67 6c 6f 62 61 6c |d = 0.Xi|n global|
|00003570| 73 2e 63 3b 20 6f 72 20 | 79 6f 75 20 6d 61 79 20 |s.c; or |you may |
|00003580| 77 61 6e 74 20 74 6f 20 | 6a 75 73 74 20 74 79 70 |want to |just typ|
|00003590| 65 20 2d 78 53 20 74 6f | 20 70 74 79 20 61 6c 6c |e -xS to| pty all|
|000035a0| 20 74 68 65 20 74 69 6d | 65 2e 20 49 0a 58 72 65 | the tim|e. I.Xre|
|000035b0| 63 6f 6d 6d 65 6e 64 20 | 74 68 65 20 66 69 72 73 |commend |the firs|
|000035c0| 74 20 73 74 72 61 74 65 | 67 79 2e 0a 58 27 0a 58 |t strate|gy..X'.X|
|000035d0| 0a 58 65 63 68 6f 20 27 | 2d 2d 2d 2d 2d 20 50 72 |.Xecho '|----- Pr|
|000035e0| 65 73 73 20 72 65 74 75 | 72 6e 20 74 6f 20 63 6f |ess retu|rn to co|
|000035f0| 6e 74 69 6e 75 65 2e 20 | 27 20 7c 20 74 72 20 2d |ntinue. |' | tr -|
|00003600| 64 20 27 5c 30 31 32 27 | 3b 20 72 65 61 64 20 63 |d '\012'|; read c|
|00003610| 6f 6e 74 6c 69 6e 65 0a | 58 0a 58 65 63 68 6f 20 |ontline.|X.Xecho |
|00003620| 27 0a 58 4e 65 78 74 20 | 63 6f 6d 65 20 70 73 65 |'.XNext |come pse|
|00003630| 75 64 6f 2d 74 65 72 6d | 69 6e 61 6c 20 70 61 74 |udo-term|inal pat|
|00003640| 68 6e 61 6d 65 73 2e 20 | 49 20 61 73 73 75 6d 65 |hnames. |I assume|
|00003650| 20 74 68 61 74 20 79 6f | 75 72 20 70 74 79 73 20 | that yo|ur ptys |
|00003660| 61 72 65 0a 58 6c 61 62 | 65 6c 6c 65 64 20 61 73 |are.Xlab|elled as|
|00003670| 20 2f 64 65 76 2f 70 74 | 79 78 78 20 61 6e 64 20 | /dev/pt|yxx and |
|00003680| 2f 64 65 76 2f 74 74 79 | 78 78 2c 20 77 68 65 72 |/dev/tty|xx, wher|
|00003690| 65 20 78 78 20 69 73 20 | 61 6e 79 20 74 77 6f 2d |e xx is |any two-|
|000036a0| 6c 65 74 74 65 72 0a 58 | 65 78 74 65 6e 73 69 6f |letter.X|extensio|
|000036b0| 6e 2e 20 70 74 79 20 63 | 61 6e 20 73 75 70 70 6f |n. pty c|an suppo|
|000036c0| 72 74 20 61 6e 79 20 69 | 6e 69 74 69 61 6c 20 73 |rt any i|nitial s|
|000036d0| 74 72 69 6e 67 73 20 69 | 6e 73 74 65 61 64 20 6f |trings i|nstead o|
|000036e0| 66 20 74 68 65 73 65 2c | 0a 58 62 75 74 20 73 6f |f these,|.Xbut so|
|000036f0| 6d 65 20 6f 66 20 74 68 | 65 20 75 74 69 6c 69 74 |me of th|e utilit|
|00003700| 69 65 73 20 68 61 76 65 | 20 2f 64 65 76 2f 74 74 |ies have| /dev/tt|
|00003710| 79 20 68 61 72 64 63 6f | 64 65 64 2c 20 61 6e 64 |y hardco|ded, and|
|00003720| 20 6c 6f 74 73 20 6f 66 | 20 6f 74 68 65 72 0a 58 | lots of| other.X|
|00003730| 70 72 6f 67 72 61 6d 73 | 20 72 75 6e 6e 69 6e 67 |programs| running|
|00003740| 20 61 72 6f 75 6e 64 20 | 61 73 73 75 6d 65 20 74 | around |assume t|
|00003750| 68 6f 73 65 20 6e 61 6d | 65 73 2e 20 49 66 20 79 |hose nam|es. If y|
|00003760| 6f 75 27 5c 27 27 72 65 | 20 64 65 73 70 65 72 61 |ou'\''re| despera|
|00003770| 74 65 2c 0a 58 64 65 66 | 69 6e 65 20 44 45 56 4d |te,.Xdef|ine DEVM|
|00003780| 54 59 20 61 6e 64 20 44 | 45 56 53 54 59 20 69 6e |TY and D|EVSTY in|
|00003790| 20 74 68 65 20 4d 61 6b | 65 66 69 6c 65 2c 20 61 | the Mak|efile, a|
|000037a0| 6e 64 20 66 69 67 75 72 | 65 20 6f 75 74 20 77 68 |nd figur|e out wh|
|000037b0| 61 74 20 68 61 73 20 74 | 6f 0a 58 62 65 20 63 68 |at has t|o.Xbe ch|
|000037c0| 61 6e 67 65 64 20 69 6e | 20 75 74 69 6c 2f 2a 2e |anged in| util/*.|
|000037d0| 20 28 53 6f 72 72 79 2e | 29 0a 58 27 0a 58 0a 58 | (Sorry.|).X'.X.X|
|000037e0| 65 63 68 6f 20 27 2d 2d | 2d 2d 2d 20 50 72 65 73 |echo '--|--- Pres|
|000037f0| 73 20 72 65 74 75 72 6e | 20 74 6f 20 63 6f 6e 74 |s return| to cont|
|00003800| 69 6e 75 65 2e 20 27 20 | 7c 20 74 72 20 2d 64 20 |inue. ' || tr -d |
|00003810| 27 5c 30 31 32 27 3b 20 | 72 65 61 64 20 63 6f 6e |'\012'; |read con|
|00003820| 74 6c 69 6e 65 0a 58 0a | 58 65 63 68 6f 20 27 0a |tline.X.|Xecho '.|
|00003830| 58 54 68 65 20 65 78 74 | 65 6e 73 69 6f 6e 20 69 |XThe ext|ension i|
|00003840| 73 20 74 72 61 64 69 74 | 69 6f 6e 61 6c 6c 79 20 |s tradit|ionally |
|00003850| 5b 70 2d 7a 61 2d 6f 5d | 5b 30 2d 39 61 2d 66 5d |[p-za-o]|[0-9a-f]|
|00003860| 2e 20 54 68 65 20 66 69 | 72 73 74 20 6c 65 74 74 |. The fi|rst lett|
|00003870| 65 72 20 6f 66 20 74 68 | 65 0a 58 73 65 63 6f 6e |er of th|e.Xsecon|
|00003880| 64 20 73 74 72 69 6e 67 | 20 69 73 20 73 70 65 63 |d string| is spec|
|00003890| 69 61 6c 3a 20 69 66 20 | 2f 64 65 76 2f 74 74 79 |ial: if |/dev/tty|
|000038a0| 71 30 20 64 6f 65 73 6e | 27 5c 27 27 74 20 65 78 |q0 doesn|'\''t ex|
|000038b0| 69 73 74 2c 20 66 6f 72 | 20 65 78 61 6d 70 6c 65 |ist, for| example|
|000038c0| 2c 20 74 68 65 6e 0a 58 | 6e 6f 6e 65 20 6f 66 20 |, then.X|none of |
|000038d0| 2f 64 65 76 2f 74 74 79 | 71 5b 30 2d 39 61 2d 66 |/dev/tty|q[0-9a-f|
|000038e0| 5d 20 77 69 6c 6c 20 62 | 65 20 75 73 65 64 2e 20 |] will b|e used. |
|000038f0| 28 54 68 61 74 27 5c 27 | 27 73 20 63 61 6c 6c 65 |(That'\'|'s calle|
|00003900| 64 20 61 20 70 74 79 20 | 62 61 6e 6b 2e 29 0a 58 |d a pty |bank.).X|
|00003910| 0a 58 59 6f 75 20 63 61 | 6e 20 63 68 61 6e 67 65 |.XYou ca|n change|
|00003920| 20 74 68 6f 73 65 20 73 | 74 72 69 6e 67 73 20 62 | those s|trings b|
|00003930| 79 20 64 65 66 69 6e 69 | 6e 67 2c 20 65 2e 67 2e |y defini|ng, e.g.|
|00003940| 2c 20 50 54 59 31 3d 5c | 22 41 42 43 44 45 46 47 |, PTY1=\|"ABCDEFG|
|00003950| 5c 22 20 6f 72 0a 58 50 | 54 59 32 3d 5c 22 30 32 |\" or.XP|TY2=\"02|
|00003960| 34 36 38 61 62 66 71 5c | 22 20 69 6e 20 74 68 65 |468abfq\|" in the|
|00003970| 20 4d 61 6b 65 66 69 6c | 65 2e 20 59 6f 75 20 68 | Makefil|e. You h|
|00003980| 61 76 65 20 61 74 20 6c | 65 61 73 74 20 66 6f 75 |ave at l|east fou|
|00003990| 72 20 63 68 6f 69 63 65 | 73 20 68 65 72 65 3a 0a |r choice|s here:.|
|000039a0| 58 31 2e 20 47 69 76 65 | 20 70 74 79 20 69 74 73 |X1. Give| pty its|
|000039b0| 20 6f 77 6e 2c 20 6e 65 | 77 2c 20 62 61 6e 6b 73 | own, ne|w, banks|
|000039c0| 20 6f 66 20 6e 65 77 20 | 70 73 65 75 64 6f 2d 74 | of new |pseudo-t|
|000039d0| 65 72 6d 69 6e 61 6c 73 | 20 77 69 74 68 20 77 65 |erminals| with we|
|000039e0| 69 72 64 20 62 61 6e 6b | 0a 58 6e 61 6d 65 73 20 |ird bank|.Xnames |
|000039f0| 6e 6f 74 20 69 6e 63 6c | 75 64 69 6e 67 20 61 20 |not incl|uding a |
|00003a00| 74 68 72 6f 75 67 68 20 | 7a 2c 20 61 6e 64 20 64 |through |z, and d|
|00003a10| 65 66 69 6e 65 20 50 54 | 59 31 20 61 70 70 72 6f |efine PT|Y1 appro|
|00003a20| 70 72 69 61 74 65 6c 79 | 2e 20 70 74 79 20 77 69 |priately|. pty wi|
|00003a30| 6c 6c 0a 58 6f 6e 6c 79 | 20 75 73 65 20 74 68 6f |ll.Xonly| use tho|
|00003a40| 73 65 20 6e 65 77 20 70 | 74 79 73 2c 20 61 6e 64 |se new p|tys, and|
|00003a50| 20 6f 6c 64 65 72 20 70 | 72 6f 67 72 61 6d 73 20 | older p|rograms |
|00003a60| 77 69 6c 6c 20 6a 75 73 | 74 20 75 73 65 20 74 68 |will jus|t use th|
|00003a70| 65 20 6f 6c 64 20 70 74 | 79 73 2e 0a 58 54 68 69 |e old pt|ys..XThi|
|00003a80| 73 20 6d 61 79 20 72 65 | 71 75 69 72 65 20 72 65 |s may re|quire re|
|00003a90| 63 6f 6e 66 69 67 75 72 | 69 6e 67 20 79 6f 75 72 |configur|ing your|
|00003aa0| 20 73 79 73 74 65 6d 20 | 66 6f 72 20 74 68 65 20 | system |for the |
|00003ab0| 6c 61 72 67 65 72 20 6e | 75 6d 62 65 72 20 6f 66 |larger n|umber of|
|00003ac0| 0a 58 74 65 72 6d 69 6e | 61 6c 73 2e 20 32 2e 20 |.Xtermin|als. 2. |
|00003ad0| 47 69 76 65 20 70 74 79 | 20 73 6f 6d 65 20 6e 65 |Give pty| some ne|
|00003ae0| 77 20 62 61 6e 6b 73 2c | 20 61 6e 64 20 74 61 6b |w banks,| and tak|
|00003af0| 65 20 6f 75 74 20 73 6f | 6d 65 20 6f 6c 64 20 6f |e out so|me old o|
|00003b00| 6e 65 73 20 74 6f 0a 58 | 6d 61 6b 65 20 75 70 20 |nes to.X|make up |
|00003b10| 66 6f 72 20 69 74 2e 20 | 33 2e 20 47 69 76 65 20 |for it. |3. Give |
|00003b20| 70 74 79 20 61 20 63 68 | 75 6e 6b 20 6f 66 20 74 |pty a ch|unk of t|
|00003b30| 68 65 20 6f 6c 64 20 62 | 61 6e 6b 73 2e 20 34 2e |he old b|anks. 4.|
|00003b40| 20 47 69 76 65 20 70 74 | 79 20 61 6c 6c 0a 58 74 | Give pt|y all.Xt|
|00003b50| 68 65 20 6f 6c 64 20 62 | 61 6e 6b 73 2e 0a 58 0a |he old b|anks..X.|
|00003b60| 58 4e 6f 74 65 20 74 68 | 61 74 20 70 74 79 20 73 |XNote th|at pty s|
|00003b70| 65 61 72 63 68 65 73 20 | 72 61 6e 64 6f 6d 6c 79 |earches |randomly|
|00003b80| 20 74 68 72 6f 75 67 68 | 20 50 54 59 31 20 61 6e | through| PTY1 an|
|00003b90| 64 20 50 54 59 32 20 62 | 79 20 64 65 66 61 75 6c |d PTY2 b|y defaul|
|00003ba0| 74 3b 20 66 6f 72 0a 58 | 65 66 66 69 63 69 65 6e |t; for.X|efficien|
|00003bb0| 63 79 2c 20 50 54 59 31 | 20 72 65 61 6c 6c 79 20 |cy, PTY1| really |
|00003bc0| 73 68 6f 75 6c 64 20 72 | 65 66 6c 65 63 74 20 65 |should r|eflect e|
|00003bd0| 78 61 63 74 6c 79 20 74 | 68 65 20 70 74 79 20 62 |xactly t|he pty b|
|00003be0| 61 6e 6b 73 20 79 6f 75 | 20 68 61 76 65 2e 0a 58 |anks you| have..X|
|00003bf0| 27 0a 58 0a 58 65 63 68 | 6f 20 27 2d 2d 2d 2d 2d |'.X.Xech|o '-----|
|00003c00| 20 50 72 65 73 73 20 72 | 65 74 75 72 6e 20 74 6f | Press r|eturn to|
|00003c10| 20 63 6f 6e 74 69 6e 75 | 65 2e 20 27 20 7c 20 74 | continu|e. ' | t|
|00003c20| 72 20 2d 64 20 27 5c 30 | 31 32 27 3b 20 72 65 61 |r -d '\0|12'; rea|
|00003c30| 64 20 63 6f 6e 74 6c 69 | 6e 65 0a 58 0a 58 65 63 |d contli|ne.X.Xec|
|00003c40| 68 6f 20 27 0a 58 53 6f | 20 6e 6f 77 20 79 6f 75 |ho '.XSo| now you|
|00003c50| 27 5c 27 27 76 65 20 64 | 65 63 69 64 65 64 20 6f |'\''ve d|ecided o|
|00003c60| 6e 20 6e 65 77 20 70 74 | 79 73 2c 20 6f 72 20 73 |n new pt|ys, or s|
|00003c70| 65 74 20 61 73 69 64 65 | 20 73 6f 6d 65 20 6f 72 |et aside| some or|
|00003c80| 20 61 6c 6c 20 6f 66 20 | 79 6f 75 72 0a 58 6f 6c | all of |your.Xol|
|00003c90| 64 20 70 74 79 73 2c 20 | 61 6e 64 20 63 68 61 6e |d ptys, |and chan|
|00003ca0| 67 65 64 20 50 54 59 31 | 20 61 6e 64 20 50 54 59 |ged PTY1| and PTY|
|00003cb0| 32 20 61 70 70 72 6f 70 | 72 69 61 74 65 6c 79 2e |2 approp|riately.|
|00003cc0| 20 42 65 63 61 75 73 65 | 20 42 53 44 20 67 69 76 | Because| BSD giv|
|00003cd0| 65 73 20 61 0a 58 70 72 | 6f 63 65 73 73 20 76 65 |es a.Xpr|ocess ve|
|00003ce0| 72 79 20 6c 69 74 74 6c | 65 20 63 6f 6e 74 72 6f |ry littl|e contro|
|00003cf0| 6c 20 6f 76 65 72 20 69 | 74 73 20 63 6f 6e 74 72 |l over i|ts contr|
|00003d00| 6f 6c 6c 69 6e 67 20 74 | 65 72 6d 69 6e 61 6c 2c |olling t|erminal,|
|00003d10| 20 70 74 79 20 68 61 73 | 20 74 6f 0a 58 70 61 73 | pty has| to.Xpas|
|00003d20| 73 20 61 20 74 65 72 6d | 69 6e 61 6c 20 6e 61 6d |s a term|inal nam|
|00003d30| 65 20 65 78 70 6c 69 63 | 69 74 6c 79 20 77 68 65 |e explic|itly whe|
|00003d40| 6e 20 69 74 20 72 65 63 | 6f 6e 6e 65 63 74 73 2e |n it rec|onnects.|
|00003d50| 20 49 66 20 61 6e 79 20 | 6f 66 20 79 6f 75 72 20 | If any |of your |
|00003d60| 74 74 79 0a 58 28 6e 6f | 74 20 6a 75 73 74 20 70 |tty.X(no|t just p|
|00003d70| 73 65 75 64 6f 2d 74 74 | 79 21 29 20 66 69 6c 65 |seudo-tt|y!) file|
|00003d80| 6e 61 6d 65 73 20 61 72 | 65 20 6c 6f 6e 67 65 72 |names ar|e longer|
|00003d90| 20 74 68 61 6e 20 33 30 | 20 63 68 61 72 61 63 74 | than 30| charact|
|00003da0| 65 72 73 2c 20 79 6f 75 | 20 68 61 76 65 0a 58 74 |ers, you| have.Xt|
|00003db0| 6f 20 73 65 74 20 2d 44 | 54 54 59 4e 41 4d 45 4c |o set -D|TTYNAMEL|
|00003dc0| 45 4e 3d 36 30 20 6f 72 | 20 77 68 61 74 65 76 65 |EN=60 or| whateve|
|00003dd0| 72 20 69 6e 20 74 68 65 | 20 4d 61 6b 65 66 69 6c |r in the| Makefil|
|00003de0| 65 2e 0a 58 27 0a 58 0a | 58 65 63 68 6f 20 27 2d |e..X'.X.|Xecho '-|
|00003df0| 2d 2d 2d 2d 20 50 72 65 | 73 73 20 72 65 74 75 72 |---- Pre|ss retur|
|00003e00| 6e 20 74 6f 20 63 6f 6e | 74 69 6e 75 65 2e 20 27 |n to con|tinue. '|
|00003e10| 20 7c 20 74 72 20 2d 64 | 20 27 5c 30 31 32 27 3b | | tr -d| '\012';|
|00003e20| 20 72 65 61 64 20 63 6f | 6e 74 6c 69 6e 65 0a 58 | read co|ntline.X|
|00003e30| 0a 58 65 63 68 6f 20 27 | 0a 58 2f 65 74 63 2f 75 |.Xecho '|.X/etc/u|
|00003e40| 74 6d 70 20 68 61 73 20 | 74 72 61 64 69 74 69 6f |tmp has |traditio|
|00003e50| 6e 61 6c 6c 79 20 6c 69 | 73 74 65 64 20 61 6c 6c |nally li|sted all|
|00003e60| 20 75 73 65 72 73 20 6c | 6f 67 67 65 64 20 6f 6e | users l|ogged on|
|00003e70| 2e 0a 58 54 68 69 73 20 | 6e 65 62 75 6c 6f 75 73 |..XThis |nebulous|
|00003e80| 20 63 6f 6e 63 65 70 74 | 20 68 61 73 20 65 76 6f | concept| has evo|
|00003e90| 6c 76 65 64 20 74 68 72 | 6f 75 67 68 20 74 68 65 |lved thr|ough the|
|00003ea0| 20 79 65 61 72 73 3b 20 | 67 69 76 65 6e 20 74 68 | years; |given th|
|00003eb0| 65 20 77 61 79 0a 58 74 | 68 61 74 20 6d 6f 73 74 |e way.Xt|hat most|
|00003ec0| 20 70 72 6f 67 72 61 6d | 73 20 75 73 65 20 75 74 | program|s use ut|
|00003ed0| 6d 70 2c 20 75 74 6d 70 | 20 69 73 20 70 72 6f 62 |mp, utmp| is prob|
|00003ee0| 61 62 6c 79 20 62 65 74 | 74 65 72 20 64 65 66 69 |ably bet|ter defi|
|00003ef0| 6e 65 64 20 61 73 20 61 | 0a 58 6c 69 73 74 20 6f |ned as a|.Xlist o|
|00003f00| 66 20 61 6c 6c 20 69 6e | 74 65 72 61 63 74 69 76 |f all in|teractiv|
|00003f10| 65 20 73 65 73 73 69 6f | 6e 73 2e 20 41 6e 79 77 |e sessio|ns. Anyw|
|00003f20| 61 79 2c 20 70 74 79 20 | 73 75 70 70 6f 72 74 73 |ay, pty |supports|
|00003f30| 20 74 68 69 73 20 66 69 | 6c 65 2c 0a 58 61 6e 64 | this fi|le,.Xand|
|00003f40| 20 77 69 6c 6c 20 6d 61 | 6b 65 20 61 6e 20 65 6e | will ma|ke an en|
|00003f50| 74 72 79 20 69 6e 20 69 | 74 20 77 68 65 6e 20 67 |try in i|t when g|
|00003f60| 69 76 65 6e 20 2d 78 75 | 2e 20 49 66 20 79 6f 75 |iven -xu|. If you|
|00003f70| 20 68 61 76 65 20 61 20 | 64 69 66 66 65 72 65 6e | have a |differen|
|00003f80| 74 0a 58 66 69 6c 65 2c | 20 61 64 64 20 2d 44 50 |t.Xfile,| add -DP|
|00003f90| 54 59 55 54 4d 50 5f 46 | 49 4c 45 3d 5c 22 2f 66 |TYUTMP_F|ILE=\"/f|
|00003fa0| 6f 6f 2f 62 61 72 2f 75 | 74 6d 70 5c 22 20 74 6f |oo/bar/u|tmp\" to|
|00003fb0| 20 44 45 46 49 4e 45 53 | 20 69 6e 20 74 68 65 20 | DEFINES| in the |
|00003fc0| 4d 61 6b 65 66 69 6c 65 | 2e 0a 58 0a 58 4e 6f 74 |Makefile|..X.XNot|
|00003fd0| 65 20 74 68 61 74 20 2f | 65 74 63 2f 75 74 6d 70 |e that /|etc/utmp|
|00003fe0| 20 69 73 20 75 6e 70 72 | 6f 74 65 63 74 65 64 20 | is unpr|otected |
|00003ff0| 28 6d 6f 64 65 20 36 36 | 36 29 20 6f 6e 20 53 75 |(mode 66|6) on Su|
|00004000| 6e 73 2e 20 54 68 69 73 | 20 77 61 73 20 53 75 6e |ns. This| was Sun|
|00004010| 27 5c 27 27 73 0a 58 61 | 74 74 65 6d 70 74 20 74 |'\''s.Xa|ttempt t|
|00004020| 6f 20 6c 65 74 20 75 6e | 70 72 69 76 69 6c 65 67 |o let un|privileg|
|00004030| 65 64 20 70 72 6f 67 72 | 61 6d 73 20 6d 61 6e 61 |ed progr|ams mana|
|00004040| 67 65 20 74 68 65 20 66 | 69 6c 65 2e 20 55 6e 66 |ge the f|ile. Unf|
|00004050| 6f 72 75 6e 61 74 65 6c | 79 2c 20 74 68 69 73 0a |orunatel|y, this.|
|00004060| 58 65 72 72 6f 72 20 69 | 6e 20 6a 75 64 67 6d 65 |Xerror i|n judgme|
|00004070| 6e 74 20 6f 70 65 6e 73 | 20 75 70 20 61 20 68 75 |nt opens| up a hu|
|00004080| 67 65 20 73 65 63 75 72 | 69 74 79 20 68 6f 6c 65 |ge secur|ity hole|
|00004090| 2c 20 77 68 69 63 68 20 | 65 76 65 6e 20 6f 6e 0a |, which |even on.|
|000040a0| 58 73 69 6e 67 6c 65 2d | 75 73 65 72 20 6d 61 63 |Xsingle-|user mac|
|000040b0| 68 69 6e 65 73 20 69 73 | 20 61 6e 20 69 6e 76 69 |hines is| an invi|
|000040c0| 74 61 74 69 6f 6e 20 74 | 6f 20 6d 61 6b 65 20 6d |tation t|o make m|
|000040d0| 69 73 74 61 6b 65 73 2e | 20 49 20 61 64 76 69 73 |istakes.| I advis|
|000040e0| 65 20 79 6f 75 20 74 6f | 0a 58 6d 61 6b 65 20 2f |e you to|.Xmake /|
|000040f0| 65 74 63 2f 75 74 6d 70 | 20 6f 77 6e 65 64 20 62 |etc/utmp| owned b|
|00004100| 79 20 72 6f 6f 74 20 69 | 6e 20 43 61 73 65 20 52 |y root i|n Case R|
|00004110| 4f 4f 54 20 6f 72 20 70 | 74 79 20 69 6e 20 43 61 |OOT or p|ty in Ca|
|00004120| 73 65 20 50 54 59 2c 20 | 6d 6f 64 65 20 36 34 34 |se PTY, |mode 644|
|00004130| 2e 0a 58 54 68 65 72 65 | 20 61 72 65 6e 27 5c 27 |..XThere| aren'\'|
|00004140| 27 74 20 6d 61 6e 79 20 | 75 6e 70 72 69 76 69 6c |'t many |unprivil|
|00004150| 65 67 65 64 20 70 72 6f | 67 72 61 6d 73 20 74 68 |eged pro|grams th|
|00004160| 61 74 20 64 6f 6e 27 5c | 27 27 74 20 75 6e 64 65 |at don'\|''t unde|
|00004170| 72 73 74 61 6e 64 20 74 | 68 65 0a 58 70 74 79 20 |rstand t|he.Xpty |
|00004180| 69 6e 74 65 72 66 61 63 | 65 3b 20 70 65 6f 70 6c |interfac|e; peopl|
|00004190| 65 20 6f 6e 20 6e 6f 6e | 2d 53 75 6e 73 20 68 61 |e on non|-Suns ha|
|000041a0| 76 65 20 73 75 72 76 69 | 76 65 64 20 73 6f 20 66 |ve survi|ved so f|
|000041b0| 61 72 2c 20 61 6e 64 20 | 74 68 65 72 65 27 5c 27 |ar, and |there'\'|
|000041c0| 27 73 0a 58 6e 6f 20 72 | 65 61 73 6f 6e 20 66 6f |'s.Xno r|eason fo|
|000041d0| 72 20 79 6f 75 20 74 6f | 20 6b 65 65 70 20 73 75 |r you to| keep su|
|000041e0| 62 73 63 72 69 62 69 6e | 67 20 74 6f 20 61 6e 20 |bscribin|g to an |
|000041f0| 69 6e 73 65 63 75 72 65 | 20 6d 6f 64 65 6c 20 6f |insecure| model o|
|00004200| 66 20 72 65 73 6f 75 72 | 63 65 0a 58 73 68 61 72 |f resour|ce.Xshar|
|00004210| 69 6e 67 2e 0a 58 27 0a | 58 0a 58 65 63 68 6f 20 |ing..X'.|X.Xecho |
|00004220| 27 2d 2d 2d 2d 2d 20 50 | 72 65 73 73 20 72 65 74 |'----- P|ress ret|
|00004230| 75 72 6e 20 74 6f 20 63 | 6f 6e 74 69 6e 75 65 2e |urn to c|ontinue.|
|00004240| 20 27 20 7c 20 74 72 20 | 2d 64 20 27 5c 30 31 32 | ' | tr |-d '\012|
|00004250| 27 3b 20 72 65 61 64 20 | 63 6f 6e 74 6c 69 6e 65 |'; read |contline|
|00004260| 0a 58 0a 58 65 63 68 6f | 20 27 0a 58 41 6c 74 68 |.X.Xecho| '.XAlth|
|00004270| 6f 75 67 68 20 70 74 79 | 20 77 69 6c 6c 20 70 75 |ough pty| will pu|
|00004280| 74 20 61 6e 20 65 6e 74 | 72 79 20 69 6e 74 6f 20 |t an ent|ry into |
|00004290| 75 74 6d 70 2c 20 69 74 | 20 64 6f 65 73 6e 27 5c |utmp, it| doesn'\|
|000042a0| 27 27 74 20 72 65 61 6c | 6c 79 20 73 75 70 70 6f |''t real|ly suppo|
|000042b0| 72 74 0a 58 74 68 65 20 | 72 65 6d 6f 74 65 2d 68 |rt.Xthe |remote-h|
|000042c0| 6f 73 74 20 66 69 65 6c | 64 2e 20 54 68 65 72 65 |ost fiel|d. There|
|000042d0| 20 69 73 20 6e 6f 20 6c | 6f 67 69 63 61 6c 20 61 | is no l|ogical a|
|000042e0| 73 73 6f 63 69 61 74 69 | 6f 6e 20 62 65 74 77 65 |ssociati|on betwe|
|000042f0| 65 6e 20 73 65 73 73 69 | 6f 6e 73 0a 58 61 6e 64 |en sessi|ons.Xand|
|00004300| 20 63 6f 6e 6e 65 63 74 | 69 6f 6e 73 3b 20 77 68 | connect|ions; wh|
|00004310| 79 20 73 68 6f 75 6c 64 | 20 61 20 6c 6f 67 69 6e |y should| a login|
|00004320| 20 72 65 71 75 69 72 65 | 20 61 20 70 74 79 2c 20 | require| a pty, |
|00004330| 61 6e 64 20 77 68 79 20 | 73 68 6f 75 6c 64 20 61 |and why |should a|
|00004340| 0a 58 73 65 73 73 69 6f | 6e 20 6f 6e 6c 79 20 73 |.Xsessio|n only s|
|00004350| 74 69 63 6b 20 61 72 6f | 75 6e 64 20 66 6f 72 20 |tick aro|und for |
|00004360| 6f 6e 65 20 63 6f 6e 6e | 65 63 74 69 6f 6e 3f 20 |one conn|ection? |
|00004370| 53 6f 20 70 74 79 20 6a | 75 73 74 20 70 75 74 73 |So pty j|ust puts|
|00004380| 20 22 70 74 79 22 20 69 | 6e 0a 58 74 68 65 20 68 | "pty" i|n.Xthe h|
|00004390| 6f 73 74 20 66 69 65 6c | 64 2e 20 59 6f 75 20 63 |ost fiel|d. You c|
|000043a0| 61 6e 20 63 68 61 6e 67 | 65 20 74 68 69 73 20 77 |an chang|e this w|
|000043b0| 69 74 68 20 2d 44 50 54 | 59 55 54 4d 50 5f 48 4f |ith -DPT|YUTMP_HO|
|000043c0| 53 54 3d 5c 22 66 6f 6f | 5c 22 3b 20 79 6f 75 20 |ST=\"foo|\"; you |
|000043d0| 6d 61 79 0a 58 65 76 65 | 6e 20 77 61 6e 74 20 74 |may.Xeve|n want t|
|000043e0| 6f 20 6d 61 6b 65 20 50 | 54 59 5f 55 54 4d 50 48 |o make P|TY_UTMPH|
|000043f0| 4f 53 54 20 63 61 6c 6c | 20 61 20 66 75 6e 63 74 |OST call| a funct|
|00004400| 69 6f 6e 20 74 68 61 74 | 20 79 6f 75 20 64 65 66 |ion that| you def|
|00004410| 69 6e 65 2e 0a 58 0a 58 | 28 53 69 6d 69 6c 61 72 |ine..X.X|(Similar|
|00004420| 20 63 6f 6d 6d 65 6e 74 | 73 20 61 70 70 6c 79 20 | comment|s apply |
|00004430| 74 6f 20 50 54 59 57 54 | 4d 50 5f 48 4f 53 54 2e |to PTYWT|MP_HOST.|
|00004440| 20 54 68 65 72 65 20 61 | 72 65 20 61 6c 73 6f 20 | There a|re also |
|00004450| 50 54 59 55 54 4d 50 5f | 53 57 48 4f 53 54 0a 58 |PTYUTMP_|SWHOST.X|
|00004460| 61 6e 64 20 50 54 59 57 | 54 4d 50 5f 53 57 48 4f |and PTYW|TMP_SWHO|
|00004470| 53 54 2c 20 64 65 66 61 | 75 6c 74 73 20 50 54 59 |ST, defa|ults PTY|
|00004480| 55 54 4d 50 5f 48 4f 53 | 54 20 61 6e 64 20 22 70 |UTMP_HOS|T and "p|
|00004490| 74 79 2d 73 65 73 73 75 | 73 65 72 22 0a 58 72 65 |ty-sessu|ser".Xre|
|000044a0| 73 70 65 63 74 69 76 65 | 6c 79 3b 20 73 65 65 20 |spective|ly; see |
|000044b0| 75 74 69 6c 2f 73 65 73 | 73 75 73 65 72 2e 31 20 |util/ses|suser.1 |
|000044c0| 66 6f 72 20 6d 6f 72 65 | 20 69 6e 66 6f 72 6d 61 |for more| informa|
|000044d0| 74 69 6f 6e 2e 29 0a 58 | 27 0a 58 0a 58 65 63 68 |tion.).X|'.X.Xech|
|000044e0| 6f 20 27 2d 2d 2d 2d 2d | 20 50 72 65 73 73 20 72 |o '-----| Press r|
|000044f0| 65 74 75 72 6e 20 74 6f | 20 63 6f 6e 74 69 6e 75 |eturn to| continu|
|00004500| 65 2e 20 27 20 7c 20 74 | 72 20 2d 64 20 27 5c 30 |e. ' | t|r -d '\0|
|00004510| 31 32 27 3b 20 72 65 61 | 64 20 63 6f 6e 74 6c 69 |12'; rea|d contli|
|00004520| 6e 65 0a 58 0a 58 65 63 | 68 6f 20 27 0a 58 2f 75 |ne.X.Xec|ho '.X/u|
|00004530| 73 72 2f 61 64 6d 2f 77 | 74 6d 70 20 68 61 73 20 |sr/adm/w|tmp has |
|00004540| 74 72 61 64 69 74 69 6f | 6e 61 6c 6c 79 20 72 65 |traditio|nally re|
|00004550| 63 6f 72 64 65 64 20 61 | 6c 6c 20 6c 6f 67 69 6e |corded a|ll login|
|00004560| 73 2c 20 6c 6f 67 6f 75 | 74 73 2c 20 72 65 62 6f |s, logou|ts, rebo|
|00004570| 6f 74 73 2c 0a 58 66 74 | 70 20 73 65 73 73 69 6f |ots,.Xft|p sessio|
|00004580| 6e 73 2c 20 61 6e 64 20 | 76 61 72 69 6f 75 73 20 |ns, and |various |
|00004590| 6f 74 68 65 72 20 69 6e | 74 65 72 65 73 74 69 6e |other in|terestin|
|000045a0| 67 20 65 76 65 6e 74 73 | 2e 20 28 54 68 65 20 65 |g events|. (The e|
|000045b0| 6e 74 72 79 20 66 6f 72 | 20 61 0a 58 6c 69 6e 65 |ntry for| a.Xline|
|000045c0| 20 69 6e 20 75 74 6d 70 | 20 69 73 20 74 68 65 20 | in utmp| is the |
|000045d0| 6c 61 73 74 20 65 6e 74 | 72 79 20 66 6f 72 20 74 |last ent|ry for t|
|000045e0| 68 61 74 20 6c 69 6e 65 | 20 69 6e 20 77 74 6d 70 |hat line| in wtmp|
|000045f0| 2e 29 20 70 74 79 20 73 | 75 70 70 6f 72 74 73 20 |.) pty s|upports |
|00004600| 77 74 6d 70 0a 58 66 75 | 6c 6c 79 2c 20 69 6e 20 |wtmp.Xfu|lly, in |
|00004610| 74 68 65 20 73 61 6d 65 | 20 77 61 79 20 61 73 20 |the same| way as |
|00004620| 75 74 6d 70 2e 20 59 6f | 75 20 73 68 6f 75 6c 64 |utmp. Yo|u should|
|00004630| 20 6d 61 6b 65 20 77 74 | 6d 70 20 6d 6f 64 65 20 | make wt|mp mode |
|00004640| 36 34 34 2c 20 6f 77 6e | 65 72 0a 58 72 6f 6f 74 |644, own|er.Xroot|
|00004650| 20 6f 72 20 70 74 79 20 | 61 73 20 61 70 70 72 6f | or pty |as appro|
|00004660| 70 72 69 61 74 65 2e 20 | 43 68 61 6e 67 65 20 50 |priate. |Change P|
|00004670| 54 59 57 54 4d 50 5f 46 | 49 4c 45 20 69 66 20 2f |TYWTMP_F|ILE if /|
|00004680| 75 73 72 2f 61 64 6d 2f | 77 74 6d 70 20 69 73 0a |usr/adm/|wtmp is.|
|00004690| 58 73 6f 6d 65 77 68 65 | 72 65 20 65 6c 73 65 2e |Xsomewhe|re else.|
|000046a0| 0a 58 27 0a 58 0a 58 65 | 63 68 6f 20 27 2d 2d 2d |.X'.X.Xe|cho '---|
|000046b0| 2d 2d 20 50 72 65 73 73 | 20 72 65 74 75 72 6e 20 |-- Press| return |
|000046c0| 74 6f 20 63 6f 6e 74 69 | 6e 75 65 2e 20 27 20 7c |to conti|nue. ' ||
|000046d0| 20 74 72 20 2d 64 20 27 | 5c 30 31 32 27 3b 20 72 | tr -d '|\012'; r|
|000046e0| 65 61 64 20 63 6f 6e 74 | 6c 69 6e 65 0a 58 0a 58 |ead cont|line.X.X|
|000046f0| 65 63 68 6f 20 27 0a 58 | 59 6f 75 20 63 61 6e 20 |echo '.X|You can |
|00004700| 74 75 72 6e 20 6f 66 66 | 20 75 74 6d 70 20 73 75 |turn off| utmp su|
|00004710| 70 70 6f 72 74 20 62 79 | 20 75 6e 63 6f 6d 6d 65 |pport by| uncomme|
|00004720| 6e 74 69 6e 67 20 74 68 | 65 20 4e 4f 5f 55 54 4d |nting th|e NO_UTM|
|00004730| 50 20 6c 69 6e 65 20 69 | 6e 0a 58 63 6f 6e 66 69 |P line i|n.Xconfi|
|00004740| 67 2e 68 2e 20 28 4a 75 | 73 74 20 64 65 6c 65 74 |g.h. (Ju|st delet|
|00004750| 65 20 74 68 65 20 69 6e | 69 74 69 61 6c 20 2f 2a |e the in|itial /*|
|00004760| 2e 29 20 59 6f 75 20 63 | 61 6e 20 61 6c 73 6f 20 |.) You c|an also |
|00004770| 74 75 72 6e 20 6f 66 66 | 20 73 75 70 70 6f 72 74 |turn off| support|
|00004780| 0a 58 66 6f 72 20 77 74 | 6d 70 2c 20 64 69 73 63 |.Xfor wt|mp, disc|
|00004790| 6f 6e 6e 65 63 74 61 62 | 6c 65 20 73 65 73 73 69 |onnectab|le sessi|
|000047a0| 6f 6e 73 2c 20 6f 72 20 | 63 68 61 6e 67 69 6e 67 |ons, or |changing|
|000047b0| 20 70 73 65 75 64 6f 2d | 74 65 72 6d 69 6e 61 6c | pseudo-|terminal|
|000047c0| 20 66 69 6c 65 0a 58 6f | 77 6e 65 72 73 68 69 70 | file.Xo|wnership|
|000047d0| 3b 20 6a 75 73 74 20 75 | 6e 63 6f 6d 6d 65 6e 74 |; just u|ncomment|
|000047e0| 20 74 68 65 20 61 70 70 | 72 6f 70 72 69 61 74 65 | the app|ropriate|
|000047f0| 20 6c 69 6e 65 2e 20 59 | 6f 75 20 63 61 6e 20 66 | line. Y|ou can f|
|00004800| 6f 72 63 65 20 75 73 65 | 20 6f 66 0a 58 65 61 63 |orce use| of.Xeac|
|00004810| 68 20 6f 66 20 74 68 65 | 73 65 20 66 65 61 74 75 |h of the|se featu|
|00004820| 72 65 73 20 62 79 20 64 | 65 66 69 6e 69 6e 67 20 |res by d|efining |
|00004830| 4d 55 53 54 5f 55 54 4d | 50 2c 20 65 74 63 2e 2c |MUST_UTM|P, etc.,|
|00004840| 20 69 6e 20 74 68 65 20 | 73 61 6d 65 20 77 61 79 | in the |same way|
|00004850| 2e 0a 58 0a 58 4e 6f 74 | 65 20 74 68 61 74 20 74 |..X.XNot|e that t|
|00004860| 68 65 20 75 73 75 61 6c | 20 6c 6f 67 69 6e 20 70 |he usual| login p|
|00004870| 72 6f 67 72 61 6d 73 20 | 64 6f 20 74 68 65 69 72 |rograms |do their|
|00004880| 20 6f 77 6e 20 77 74 6d | 70 20 6d 61 6e 61 67 65 | own wtm|p manage|
|00004890| 6d 65 6e 74 2c 20 61 6e | 64 0a 58 6d 61 6e 79 20 |ment, an|d.Xmany |
|000048a0| 61 63 63 6f 75 6e 74 69 | 6e 67 20 70 72 6f 67 72 |accounti|ng progr|
|000048b0| 61 6d 73 20 69 6e 63 6f | 72 72 65 63 74 6c 79 20 |ams inco|rrectly |
|000048c0| 65 71 75 61 74 65 20 73 | 65 73 73 69 6f 6e 20 74 |equate s|ession t|
|000048d0| 69 6d 65 20 77 69 74 68 | 20 63 6f 6e 6e 65 63 74 |ime with| connect|
|000048e0| 0a 58 74 69 6d 65 2c 20 | 73 6f 20 75 73 65 72 73 |.Xtime, |so users|
|000048f0| 20 77 69 6c 6c 20 72 61 | 72 65 6c 79 20 77 61 6e | will ra|rely wan|
|00004900| 74 20 77 74 6d 70 2e 20 | 41 73 20 6d 6f 72 65 20 |t wtmp. |As more |
|00004910| 70 72 6f 67 72 61 6d 73 | 20 61 70 70 65 61 72 20 |programs| appear |
|00004920| 75 73 69 6e 67 20 74 68 | 65 0a 58 70 74 79 20 69 |using th|e.Xpty i|
|00004930| 6e 74 65 72 66 61 63 65 | 2c 20 61 6e 64 20 61 73 |nterface|, and as|
|00004940| 20 6c 6f 67 69 6e 20 70 | 72 6f 67 72 61 6d 73 20 | login p|rograms |
|00004950| 73 74 61 72 74 20 75 73 | 69 6e 67 20 61 20 6d 6f |start us|ing a mo|
|00004960| 72 65 20 6c 6f 67 69 63 | 61 6c 20 73 79 73 74 65 |re logic|al syste|
|00004970| 6d 0a 58 66 6f 72 20 61 | 63 63 6f 75 6e 74 69 6e |m.Xfor a|ccountin|
|00004980| 67 2c 20 4d 55 53 54 5f | 57 54 4d 50 20 6d 61 79 |g, MUST_|WTMP may|
|00004990| 20 62 65 63 6f 6d 65 20 | 61 6e 20 61 70 70 72 6f | become |an appro|
|000049a0| 70 72 69 61 74 65 20 77 | 61 79 20 74 6f 20 6d 6f |priate w|ay to mo|
|000049b0| 6e 69 74 6f 72 0a 58 70 | 73 65 75 64 6f 2d 74 65 |nitor.Xp|seudo-te|
|000049c0| 72 6d 69 6e 61 6c 20 75 | 73 61 67 65 2e 20 46 6f |rminal u|sage. Fo|
|000049d0| 72 20 74 68 65 20 6d 6f | 6d 65 6e 74 2c 20 49 20 |r the mo|ment, I |
|000049e0| 64 6f 20 6e 6f 74 20 61 | 64 76 69 73 65 20 73 65 |do not a|dvise se|
|000049f0| 74 74 69 6e 67 20 61 6e | 79 20 4e 4f 0a 58 6f 72 |tting an|y NO.Xor|
|00004a00| 20 4d 55 53 54 2e 0a 58 | 27 0a 58 0a 58 65 63 68 | MUST..X|'.X.Xech|
|00004a10| 6f 20 27 2d 2d 2d 2d 2d | 20 50 72 65 73 73 20 72 |o '-----| Press r|
|00004a20| 65 74 75 72 6e 20 74 6f | 20 63 6f 6e 74 69 6e 75 |eturn to| continu|
|00004a30| 65 2e 20 27 20 7c 20 74 | 72 20 2d 64 20 27 5c 30 |e. ' | t|r -d '\0|
|00004a40| 31 32 27 3b 20 72 65 61 | 64 20 63 6f 6e 74 6c 69 |12'; rea|d contli|
|00004a50| 6e 65 0a 58 0a 58 65 63 | 68 6f 20 27 0a 58 70 74 |ne.X.Xec|ho '.Xpt|
|00004a60| 79 20 73 75 62 73 63 72 | 69 62 65 73 20 28 6e 6f |y subscr|ibes (no|
|00004a70| 74 20 76 65 72 79 20 77 | 69 6c 6c 69 6e 67 6c 79 |t very w|illingly|
|00004a80| 29 20 74 6f 20 74 68 65 | 20 42 53 44 20 34 2e 33 |) to the| BSD 4.3|
|00004a90| 20 6d 6f 64 65 6c 20 6f | 66 20 70 74 79 0a 58 70 | model o|f pty.Xp|
|00004aa0| 72 6f 74 65 63 74 69 6f | 6e 2c 20 77 69 74 68 20 |rotectio|n, with |
|00004ab0| 61 20 66 65 77 20 74 77 | 69 73 74 73 2e 20 41 6c |a few tw|ists. Al|
|00004ac0| 6c 20 70 74 79 73 20 61 | 72 65 20 75 6e 64 65 72 |l ptys a|re under|
|00004ad0| 20 67 72 6f 75 70 20 74 | 74 79 2c 20 61 74 20 61 | group t|ty, at a|
|00004ae0| 6c 6c 0a 58 74 69 6d 65 | 73 3b 20 69 66 20 79 6f |ll.Xtime|s; if yo|
|00004af0| 75 20 64 6f 6e 27 5c 27 | 27 74 20 68 61 76 65 20 |u don'\'|'t have |
|00004b00| 61 20 74 74 79 20 67 72 | 6f 75 70 2c 20 61 6c 6c |a tty gr|oup, all|
|00004b10| 20 70 74 79 73 20 73 68 | 6f 75 6c 64 20 62 65 20 | ptys sh|ould be |
|00004b20| 75 6e 64 65 72 20 73 6f | 6d 65 0a 58 6f 74 68 65 |under so|me.Xothe|
|00004b30| 72 20 70 72 6f 74 65 63 | 74 65 64 20 67 72 6f 75 |r protec|ted grou|
|00004b40| 70 20 61 74 20 61 6c 6c | 20 74 69 6d 65 73 2e 20 |p at all| times. |
|00004b50| 41 6e 79 77 61 79 2c 20 | 70 74 79 20 77 69 6c 6c |Anyway, |pty will|
|00004b60| 20 63 68 61 6e 67 65 20 | 74 68 65 20 67 72 6f 75 | change |the grou|
|00004b70| 70 20 6f 66 0a 58 65 61 | 63 68 20 70 73 65 75 64 |p of.Xea|ch pseud|
|00004b80| 6f 2d 74 65 72 6d 69 6e | 61 6c 20 66 69 6c 65 20 |o-termin|al file |
|00004b90| 74 6f 20 50 54 59 47 52 | 4f 55 50 2c 20 64 65 66 |to PTYGR|OUP, def|
|00004ba0| 61 75 6c 74 20 34 2c 20 | 75 6e 64 65 72 20 2d 78 |ault 4, |under -x|
|00004bb0| 63 2e 0a 58 27 0a 58 0a | 58 63 61 73 65 20 22 24 |c..X'.X.|Xcase "$|
|00004bc0| 74 74 79 67 72 6f 75 70 | 22 20 69 6e 0a 58 34 29 |ttygroup|" in.X4)|
|00004bd0| 20 65 63 68 6f 20 27 0a | 58 53 69 6e 63 65 20 79 | echo '.|XSince y|
|00004be0| 6f 75 20 61 6c 72 65 61 | 64 79 20 68 61 76 65 20 |ou alrea|dy have |
|00004bf0| 61 20 74 74 79 20 67 72 | 6f 75 70 2c 20 67 69 64 |a tty gr|oup, gid|
|00004c00| 20 34 2c 20 79 6f 75 27 | 5c 27 27 72 65 20 66 69 | 4, you'|\''re fi|
|00004c10| 6e 65 2e 0a 58 27 20 3b | 3b 0a 58 27 27 29 20 65 |ne..X' ;|;.X'') e|
|00004c20| 63 68 6f 20 27 0a 58 59 | 6f 75 20 64 6f 6e 27 5c |cho '.XY|ou don'\|
|00004c30| 27 27 74 20 68 61 76 65 | 20 61 20 74 74 79 20 67 |''t have| a tty g|
|00004c40| 72 6f 75 70 2e 20 59 6f | 75 20 73 68 6f 75 6c 64 |roup. Yo|u should|
|00004c50| 20 70 69 63 6b 20 61 20 | 67 69 64 20 61 6e 64 20 | pick a |gid and |
|00004c60| 64 65 66 69 6e 65 0a 58 | 2d 44 50 54 59 47 52 4f |define.X|-DPTYGRO|
|00004c70| 55 50 3d 77 68 61 74 65 | 76 65 72 20 69 6e 20 74 |UP=whate|ver in t|
|00004c80| 68 65 20 4d 61 6b 65 66 | 69 6c 65 2e 0a 58 27 20 |he Makef|ile..X' |
|00004c90| 3b 3b 0a 58 2a 29 20 65 | 63 68 6f 20 27 0a 58 59 |;;.X*) e|cho '.XY|
|00004ca0| 6f 75 20 68 61 76 65 20 | 61 20 74 74 79 20 67 72 |ou have |a tty gr|
|00004cb0| 6f 75 70 2c 20 62 75 74 | 20 69 74 27 5c 27 27 73 |oup, but| it'\''s|
|00004cc0| 20 6e 6f 74 20 67 69 64 | 20 34 2e 20 59 6f 75 20 | not gid| 4. You |
|00004cd0| 73 68 6f 75 6c 64 20 64 | 65 66 69 6e 65 0a 58 2d |should d|efine.X-|
|00004ce0| 44 50 54 59 47 52 4f 55 | 50 3d 27 22 24 74 74 79 |DPTYGROU|P='"$tty|
|00004cf0| 67 72 6f 75 70 22 27 20 | 69 6e 20 74 68 65 20 4d |group"' |in the M|
|00004d00| 61 6b 65 66 69 6c 65 2e | 0a 58 27 20 3b 3b 0a 58 |akefile.|.X' ;;.X|
|00004d10| 65 73 61 63 0a 58 0a 58 | 65 63 68 6f 20 27 0a 58 |esac.X.X|echo '.X|
|00004d20| 28 55 6e 64 65 72 20 43 | 61 73 65 20 55 4e 2c 20 |(Under C|ase UN, |
|00004d30| 64 6f 6e 27 5c 27 27 74 | 20 77 6f 72 72 79 20 61 |don'\''t| worry a|
|00004d40| 62 6f 75 74 20 61 6c 6c | 20 74 68 69 73 20 67 72 |bout all| this gr|
|00004d50| 6f 75 70 20 73 74 75 66 | 66 2e 20 4a 75 73 74 20 |oup stuf|f. Just |
|00004d60| 6c 65 61 76 65 0a 58 50 | 54 59 47 52 4f 55 50 20 |leave.XP|TYGROUP |
|00004d70| 61 6c 6f 6e 65 2e 29 0a | 58 27 0a 58 0a 58 65 63 |alone.).|X'.X.Xec|
|00004d80| 68 6f 20 27 2d 2d 2d 2d | 2d 20 50 72 65 73 73 20 |ho '----|- Press |
|00004d90| 72 65 74 75 72 6e 20 74 | 6f 20 63 6f 6e 74 69 6e |return t|o contin|
|00004da0| 75 65 2e 20 27 20 7c 20 | 74 72 20 2d 64 20 27 5c |ue. ' | |tr -d '\|
|00004db0| 30 31 32 27 3b 20 72 65 | 61 64 20 63 6f 6e 74 6c |012'; re|ad contl|
|00004dc0| 69 6e 65 0a 58 0a 58 65 | 63 68 6f 20 27 0a 58 55 |ine.X.Xe|cho '.XU|
|00004dd0| 6e 64 65 72 20 2d 78 63 | 2c 20 70 74 79 20 63 68 |nder -xc|, pty ch|
|00004de0| 61 6e 67 65 73 20 74 68 | 65 20 70 73 65 75 64 6f |anges th|e pseudo|
|00004df0| 2d 74 65 72 6d 69 6e 61 | 6c 20 6f 77 6e 65 72 20 |-termina|l owner |
|00004e00| 74 6f 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 72 |to the c|urrent r|
|00004e10| 65 61 6c 0a 58 75 69 64 | 2e 20 54 68 65 20 66 61 |eal.Xuid|. The fa|
|00004e20| 63 74 20 74 68 61 74 20 | 74 65 72 6d 69 6e 61 6c |ct that |terminal|
|00004e30| 73 20 6e 65 65 64 20 74 | 6f 20 62 65 20 69 6e 20 |s need t|o be in |
|00004e40| 74 68 65 20 66 69 6c 65 | 20 68 69 65 72 61 72 63 |the file| hierarc|
|00004e50| 68 79 20 72 65 66 6c 65 | 63 74 73 20 61 0a 58 73 |hy refle|cts a.Xs|
|00004e60| 65 72 69 6f 75 73 20 66 | 61 69 6c 75 72 65 20 69 |erious f|ailure i|
|00004e70| 6e 20 74 68 65 20 42 53 | 44 20 74 65 72 6d 69 6e |n the BS|D termin|
|00004e80| 61 6c 20 6d 6f 64 65 6c | 3b 20 62 75 74 20 61 6e |al model|; but an|
|00004e90| 79 77 61 79 2c 20 6d 61 | 6e 79 20 70 72 6f 67 72 |yway, ma|ny progr|
|00004ea0| 61 6d 73 0a 58 65 78 70 | 65 63 74 20 74 6f 20 62 |ams.Xexp|ect to b|
|00004eb0| 65 20 61 62 6c 65 20 74 | 6f 20 66 6f 6f 6c 20 61 |e able t|o fool a|
|00004ec0| 72 6f 75 6e 64 20 77 69 | 74 68 20 2f 64 65 76 2f |round wi|th /dev/|
|00004ed0| 74 74 79 2e 20 41 66 74 | 65 72 20 70 74 79 20 69 |tty. Aft|er pty i|
|00004ee0| 73 20 64 6f 6e 65 20 77 | 69 74 68 0a 58 74 68 65 |s done w|ith.Xthe|
|00004ef0| 20 74 65 72 6d 69 6e 61 | 6c 2c 20 69 74 20 73 65 | termina|l, it se|
|00004f00| 74 73 20 74 68 65 20 6f | 77 6e 65 72 20 62 61 63 |ts the o|wner bac|
|00004f10| 6b 20 74 6f 20 69 74 73 | 20 65 66 66 65 63 74 69 |k to its| effecti|
|00004f20| 76 65 20 75 69 64 2e 20 | 59 6f 75 20 63 61 6e 0a |ve uid. |You can.|
|00004f30| 58 6d 6f 64 69 66 79 20 | 74 68 69 73 20 62 65 68 |Xmodify |this beh|
|00004f40| 61 76 69 6f 72 20 62 79 | 20 63 68 61 6e 67 69 6e |avior by| changin|
|00004f50| 67 20 50 54 59 4f 57 4e | 45 52 20 66 72 6f 6d 20 |g PTYOWN|ER from |
|00004f60| 65 75 69 64 20 74 6f 20 | 73 6f 6d 65 74 68 69 6e |euid to |somethin|
|00004f70| 67 20 65 6c 73 65 2e 0a | 58 0a 58 55 6e 64 65 72 |g else..|X.XUnder|
|00004f80| 20 43 61 73 65 20 55 4e | 2c 20 50 54 59 4f 57 4e | Case UN|, PTYOWN|
|00004f90| 45 52 20 69 73 20 69 72 | 72 65 6c 65 76 61 6e 74 |ER is ir|relevant|
|00004fa0| 2e 0a 58 27 0a 58 0a 58 | 65 63 68 6f 20 27 2d 2d |..X'.X.X|echo '--|
|00004fb0| 2d 2d 2d 20 50 72 65 73 | 73 20 72 65 74 75 72 6e |--- Pres|s return|
|00004fc0| 20 74 6f 20 63 6f 6e 74 | 69 6e 75 65 2e 20 27 20 | to cont|inue. ' |
|00004fd0| 7c 20 74 72 20 2d 64 20 | 27 5c 30 31 32 27 3b 20 || tr -d |'\012'; |
|00004fe0| 72 65 61 64 20 63 6f 6e | 74 6c 69 6e 65 0a 58 0a |read con|tline.X.|
|00004ff0| 58 65 63 68 6f 20 27 0a | 58 57 68 69 6c 65 20 61 |Xecho '.|XWhile a|
|00005000| 20 74 74 79 20 69 73 20 | 75 6e 75 73 65 64 2c 20 | tty is |unused, |
|00005010| 42 53 44 20 73 79 73 74 | 65 6d 73 20 74 72 61 64 |BSD syst|ems trad|
|00005020| 69 74 69 6f 6e 61 6c 6c | 79 20 6c 65 61 76 65 20 |itionall|y leave |
|00005030| 69 74 20 75 6e 70 72 6f | 74 65 63 74 65 64 2e 0a |it unpro|tected..|
|00005040| 58 55 6e 66 6f 72 74 75 | 6e 61 74 65 6c 79 2c 20 |XUnfortu|nately, |
|00005050| 74 68 69 73 20 6c 65 61 | 76 65 73 20 73 6f 6d 65 |this lea|ves some|
|00005060| 20 68 75 67 65 20 73 65 | 63 75 72 69 74 79 20 68 | huge se|curity h|
|00005070| 6f 6c 65 73 2e 20 48 65 | 72 65 27 5c 27 27 73 20 |oles. He|re'\''s |
|00005080| 6f 6e 65 20 6f 66 0a 58 | 74 68 65 20 62 69 67 67 |one of.X|the bigg|
|00005090| 65 73 74 20 61 64 76 61 | 6e 74 61 67 65 73 20 6f |est adva|ntages o|
|000050a0| 66 20 61 20 70 72 69 76 | 69 6c 65 67 65 64 20 70 |f a priv|ileged p|
|000050b0| 74 79 20 6d 61 6e 61 67 | 65 72 3a 20 75 6e 75 73 |ty manag|er: unus|
|000050c0| 65 64 20 74 74 79 73 20 | 64 6f 6e 27 5c 27 27 74 |ed ttys |don'\''t|
|000050d0| 0a 58 68 61 76 65 20 74 | 6f 20 62 65 20 6c 65 66 |.Xhave t|o be lef|
|000050e0| 74 20 6f 70 65 6e 20 66 | 6f 72 20 61 6e 79 20 72 |t open f|or any r|
|000050f0| 61 6e 64 6f 6d 20 70 72 | 6f 67 72 61 6d 20 74 6f |andom pr|ogram to|
|00005100| 20 75 73 65 2e 20 41 66 | 74 65 72 20 69 74 27 5c | use. Af|ter it'\|
|00005110| 27 27 73 20 64 6f 6e 65 | 0a 58 77 69 74 68 20 61 |''s done|.Xwith a|
|00005120| 20 70 73 65 75 64 6f 2d | 74 65 72 6d 69 6e 61 6c | pseudo-|terminal|
|00005130| 2c 20 70 74 79 20 63 68 | 61 6e 67 65 73 20 69 74 |, pty ch|anges it|
|00005140| 20 74 6f 20 6d 6f 64 65 | 20 55 4e 55 53 45 44 50 | to mode| UNUSEDP|
|00005150| 54 59 4d 4f 44 45 2c 20 | 64 65 66 61 75 6c 74 0a |TYMODE, |default.|
|00005160| 58 30 36 30 30 2e 20 28 | 54 68 69 73 20 69 73 20 |X0600. (|This is |
|00005170| 61 6e 6f 74 68 65 72 20 | 63 61 73 65 20 6f 66 20 |another |case of |
|00005180| 61 20 70 6f 6f 72 20 6d | 6f 64 65 6c 20 66 6f 72 |a poor m|odel for|
|00005190| 20 6b 6c 75 64 67 69 6e | 67 20 70 74 79 20 73 75 | kludgin|g pty su|
|000051a0| 70 70 6f 72 74 0a 58 69 | 6e 74 6f 20 75 6e 70 72 |pport.Xi|nto unpr|
|000051b0| 69 76 69 6c 65 67 65 64 | 20 70 72 6f 67 72 61 6d |ivileged| program|
|000051c0| 73 2e 20 49 66 20 79 6f | 75 20 68 61 76 65 6e 27 |s. If yo|u haven'|
|000051d0| 5c 27 27 74 20 73 65 74 | 20 75 70 20 73 65 70 61 |\''t set| up sepa|
|000051e0| 72 61 74 65 20 70 74 79 | 20 62 61 6e 6b 73 0a 58 |rate pty| banks.X|
|000051f0| 66 6f 72 20 70 74 79 2c | 20 61 6e 64 20 79 6f 75 |for pty,| and you|
|00005200| 20 72 65 61 6c 6c 79 20 | 77 61 6e 74 20 74 6f 20 | really |want to |
|00005210| 61 6c 6c 6f 77 20 75 6e | 70 72 69 76 69 6c 65 67 |allow un|privileg|
|00005220| 65 64 20 61 63 63 65 73 | 73 20 74 6f 20 75 6e 75 |ed acces|s to unu|
|00005230| 73 65 64 0a 58 70 74 79 | 73 2c 20 74 72 79 20 6d |sed.Xpty|s, try m|
|00005240| 6f 64 65 20 30 36 36 30 | 20 61 6e 64 20 6d 61 6b |ode 0660| and mak|
|00005250| 65 20 74 68 6f 73 65 20 | 6f 74 68 65 72 20 70 72 |e those |other pr|
|00005260| 6f 67 72 61 6d 73 20 73 | 65 74 67 69 64 20 74 6f |ograms s|etgid to|
|00005270| 20 74 74 79 2e 29 0a 58 | 0a 58 41 20 74 74 79 20 | tty.).X|.XA tty |
|00005280| 74 68 61 74 20 73 6f 6d | 65 6f 6e 65 27 5c 27 27 |that som|eone'\''|
|00005290| 73 20 75 73 69 6e 67 20 | 63 61 6e 20 62 65 20 69 |s using |can be i|
|000052a0| 6e 20 6d 61 6e 79 20 64 | 69 66 66 65 72 65 6e 74 |n many d|ifferent|
|000052b0| 20 6d 6f 64 65 73 2e 20 | 54 79 70 69 63 61 6c 6c | modes. |Typicall|
|000052c0| 79 0a 58 55 53 45 44 50 | 54 59 4d 4f 44 45 20 73 |y.XUSEDP|TYMODE s|
|000052d0| 68 6f 75 6c 64 20 62 65 | 20 30 36 30 30 2c 20 77 |hould be| 0600, w|
|000052e0| 68 69 63 68 20 6d 65 61 | 6e 73 20 75 73 65 72 2d |hich mea|ns user-|
|000052f0| 6f 6e 6c 79 20 61 63 63 | 65 73 73 2c 20 6d 65 73 |only acc|ess, mes|
|00005300| 73 61 67 65 73 20 6f 66 | 66 2c 0a 58 62 69 66 66 |sages of|f,.Xbiff|
|00005310| 20 6f 66 66 2e 20 49 66 | 20 79 6f 75 20 72 65 61 | off. If| you rea|
|00005320| 6c 6c 79 2c 20 72 65 61 | 6c 6c 79 2c 20 72 65 61 |lly, rea|lly, rea|
|00005330| 6c 6c 79 20 77 61 6e 74 | 20 74 6f 20 6d 61 6b 65 |lly want| to make|
|00005340| 20 74 68 65 20 6d 69 73 | 74 61 6b 65 20 6f 66 0a | the mis|take of.|
|00005350| 58 68 61 76 69 6e 67 20 | 6d 65 73 73 61 67 65 73 |Xhaving |messages|
|00005360| 20 6f 72 20 62 69 66 66 | 20 6f 6e 20 62 79 20 64 | or biff| on by d|
|00005370| 65 66 61 75 6c 74 2c 20 | 74 72 79 20 30 36 32 30 |efault, |try 0620|
|00005380| 2c 20 30 37 30 30 2c 20 | 6f 72 20 30 37 32 30 2e |, 0700, |or 0720.|
|00005390| 20 4e 6f 74 65 0a 58 74 | 68 61 74 20 74 68 65 20 | Note.Xt|hat the |
|000053a0| 77 6f 72 6c 64 20 70 72 | 6f 74 65 63 74 69 6f 6e |world pr|otection|
|000053b0| 20 73 68 6f 75 6c 64 20 | 61 6c 77 61 79 73 20 62 | should |always b|
|000053c0| 65 20 30 3a 20 74 68 65 | 20 70 6f 69 6e 74 20 6f |e 0: the| point o|
|000053d0| 66 20 74 68 65 20 74 74 | 79 20 67 72 6f 75 70 0a |f the tt|y group.|
|000053e0| 58 69 73 20 74 68 61 74 | 20 6f 6e 6c 79 20 73 65 |Xis that| only se|
|000053f0| 74 67 69 64 2d 74 74 79 | 20 70 72 6f 67 72 61 6d |tgid-tty| program|
|00005400| 73 20 63 61 6e 20 61 63 | 63 65 73 73 20 74 74 79 |s can ac|cess tty|
|00005410| 73 2e 0a 58 0a 58 41 73 | 20 75 73 75 61 6c 2c 20 |s..X.XAs| usual, |
|00005420| 79 6f 75 20 63 61 6e 27 | 5c 27 27 74 20 64 6f 20 |you can'|\''t do |
|00005430| 61 6e 79 74 68 69 6e 67 | 20 61 62 6f 75 74 20 74 |anything| about t|
|00005440| 68 65 73 65 20 69 6e 20 | 43 61 73 65 20 55 4e 2e |hese in |Case UN.|
|00005450| 0a 58 27 0a 58 0a 58 65 | 63 68 6f 20 27 2d 2d 2d |.X'.X.Xe|cho '---|
|00005460| 2d 2d 20 50 72 65 73 73 | 20 72 65 74 75 72 6e 20 |-- Press| return |
|00005470| 74 6f 20 63 6f 6e 74 69 | 6e 75 65 2e 20 27 20 7c |to conti|nue. ' ||
|00005480| 20 74 72 20 2d 64 20 27 | 5c 30 31 32 27 3b 20 72 | tr -d '|\012'; r|
|00005490| 65 61 64 20 63 6f 6e 74 | 6c 69 6e 65 0a 58 0a 58 |ead cont|line.X.X|
|000054a0| 65 63 68 6f 20 27 0a 58 | 4e 6f 77 20 77 65 27 5c |echo '.X|Now we'\|
|000054b0| 27 27 72 65 20 70 61 73 | 74 20 67 65 6e 65 72 69 |''re pas|t generi|
|000054c0| 63 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |c config|uration |
|000054d0| 61 6e 64 20 64 6f 77 6e | 20 74 6f 20 79 6f 75 72 |and down| to your|
|000054e0| 20 73 79 73 74 65 6d 27 | 5c 27 27 73 0a 58 6e 69 | system'|\''s.Xni|
|000054f0| 74 74 79 2d 67 72 69 74 | 74 79 2e 0a 58 0a 58 46 |tty-grit|ty..X.XF|
|00005500| 6f 72 20 70 75 72 69 74 | 79 2c 20 70 74 79 20 68 |or purit|y, pty h|
|00005510| 61 73 20 53 49 47 52 45 | 54 5f 54 59 50 45 2c 20 |as SIGRE|T_TYPE, |
|00005520| 64 65 66 61 75 6c 74 20 | 69 6e 74 2c 20 61 73 20 |default |int, as |
|00005530| 74 68 65 20 74 79 70 65 | 20 72 65 74 75 72 6e 65 |the type| returne|
|00005540| 64 20 62 79 20 61 0a 58 | 73 69 67 6e 61 6c 20 68 |d by a.X|signal h|
|00005550| 61 6e 64 6c 65 72 2e 20 | 4f 6e 20 53 75 6e 73 20 |andler. |On Suns |
|00005560| 61 6e 64 20 41 4e 53 49 | 2d 63 6f 6d 70 6c 69 61 |and ANSI|-complia|
|00005570| 6e 74 20 6d 61 63 68 69 | 6e 65 73 2c 20 79 6f 75 |nt machi|nes, you|
|00005580| 20 73 68 6f 75 6c 64 20 | 64 65 66 69 6e 65 0a 58 | should |define.X|
|00005590| 53 49 47 52 45 54 5f 54 | 59 50 45 3d 76 6f 69 64 |SIGRET_T|YPE=void|
|000055a0| 2e 20 54 68 65 6e 20 79 | 6f 75 20 63 61 6e 20 61 |. Then y|ou can a|
|000055b0| 64 6d 69 72 65 20 74 68 | 65 20 6c 69 6e 74 20 2d |dmire th|e lint -|
|000055c0| 68 61 78 63 20 2a 2e 63 | 20 6f 75 74 70 75 74 2e |haxc *.c| output.|
|000055d0| 0a 58 27 0a 58 0a 58 65 | 63 68 6f 20 27 2d 2d 2d |.X'.X.Xe|cho '---|
|000055e0| 2d 2d 20 50 72 65 73 73 | 20 72 65 74 75 72 6e 20 |-- Press| return |
|000055f0| 74 6f 20 63 6f 6e 74 69 | 6e 75 65 2e 20 27 20 7c |to conti|nue. ' ||
|00005600| 20 74 72 20 2d 64 20 27 | 5c 30 31 32 27 3b 20 72 | tr -d '|\012'; r|
|00005610| 65 61 64 20 63 6f 6e 74 | 6c 69 6e 65 0a 58 0a 58 |ead cont|line.X.X|
|00005620| 65 63 68 6f 20 27 0a 58 | 4f 55 54 42 55 46 53 49 |echo '.X|OUTBUFSI|
|00005630| 5a 45 2c 20 64 65 66 61 | 75 6c 74 20 31 36 33 38 |ZE, defa|ult 1638|
|00005640| 34 2c 20 69 73 20 74 68 | 65 20 73 69 7a 65 20 6f |4, is th|e size o|
|00005650| 66 20 74 68 65 20 62 75 | 66 66 65 72 20 70 74 79 |f the bu|ffer pty|
|00005660| 20 6b 65 65 70 73 20 62 | 65 74 77 65 65 6e 0a 58 | keeps b|etween.X|
|00005670| 74 68 65 20 69 6e 63 6f | 6d 69 6e 67 20 64 61 74 |the inco|ming dat|
|00005680| 61 20 61 6e 64 20 74 68 | 65 20 70 73 65 75 64 6f |a and th|e pseudo|
|00005690| 2d 74 74 79 2c 20 61 6e | 64 20 62 65 74 77 65 65 |-tty, an|d betwee|
|000056a0| 6e 20 74 68 65 20 70 73 | 65 75 64 6f 2d 74 74 79 |n the ps|eudo-tty|
|000056b0| 20 61 6e 64 20 74 68 65 | 0a 58 6f 75 74 67 6f 69 | and the|.Xoutgoi|
|000056c0| 6e 67 20 64 61 74 61 2e | 20 49 66 20 79 6f 75 20 |ng data.| If you |
|000056d0| 77 61 6e 74 20 74 6f 20 | 73 70 61 72 65 20 6c 65 |want to |spare le|
|000056e0| 73 73 20 74 68 61 6e 20 | 33 32 4b 20 70 65 72 20 |ss than |32K per |
|000056f0| 70 74 79 20 6a 75 73 74 | 20 66 6f 72 0a 58 62 75 |pty just| for.Xbu|
|00005700| 66 66 65 72 20 73 70 61 | 63 65 2c 20 66 65 65 6c |ffer spa|ce, feel|
|00005710| 20 66 72 65 65 20 74 6f | 20 63 68 61 6e 67 65 20 | free to| change |
|00005720| 74 68 69 73 2e 0a 58 27 | 0a 58 0a 58 65 63 68 6f |this..X'|.X.Xecho|
|00005730| 20 27 2d 2d 2d 2d 2d 20 | 50 72 65 73 73 20 72 65 | '----- |Press re|
|00005740| 74 75 72 6e 20 74 6f 20 | 63 6f 6e 74 69 6e 75 65 |turn to |continue|
|00005750| 2e 20 27 20 7c 20 74 72 | 20 2d 64 20 27 5c 30 31 |. ' | tr| -d '\01|
|00005760| 32 27 3b 20 72 65 61 64 | 20 63 6f 6e 74 6c 69 6e |2'; read| contlin|
|00005770| 65 0a 58 0a 58 65 63 68 | 6f 20 27 0a 58 47 45 4e |e.X.Xech|o '.XGEN|
|00005780| 45 52 49 43 20 69 73 20 | 61 6e 6f 74 68 65 72 20 |ERIC is |another |
|00005790| 63 6f 6e 63 65 73 73 69 | 6f 6e 20 74 6f 20 41 4e |concessi|on to AN|
|000057a0| 53 49 20 74 61 73 74 65 | 2e 20 47 45 4e 45 52 49 |SI taste|. GENERI|
|000057b0| 43 20 2a 20 73 68 6f 75 | 6c 64 20 62 65 20 61 0a |C * shou|ld be a.|
|000057c0| 58 70 6f 69 6e 74 65 72 | 20 74 79 70 65 20 74 68 |Xpointer| type th|
|000057d0| 61 74 20 61 6e 79 20 6f | 74 68 65 72 20 70 6f 69 |at any o|ther poi|
|000057e0| 6e 74 65 72 20 63 61 6e | 20 62 65 20 73 61 66 65 |nter can| be safe|
|000057f0| 6c 79 20 63 6f 6e 76 65 | 72 74 65 64 20 74 6f 20 |ly conve|rted to |
|00005800| 61 6e 64 20 62 61 63 6b | 3b 0a 58 47 45 4e 45 52 |and back|;.XGENER|
|00005810| 49 43 20 69 73 20 63 68 | 61 72 20 62 79 20 64 65 |IC is ch|ar by de|
|00005820| 66 61 75 6c 74 2c 20 62 | 75 74 20 6f 6e 20 6e 65 |fault, b|ut on ne|
|00005830| 77 65 72 20 6d 61 63 68 | 69 6e 65 73 20 63 61 6e |wer mach|ines can|
|00005840| 20 62 65 20 73 65 74 20 | 74 6f 20 76 6f 69 64 2e | be set |to void.|
|00005850| 0a 58 41 73 20 69 74 27 | 5c 27 27 6c 6c 20 62 65 |.XAs it'|\''ll be|
|00005860| 20 61 74 20 6c 65 61 73 | 74 20 66 69 76 65 20 79 | at leas|t five y|
|00005870| 65 61 72 73 20 62 65 66 | 6f 72 65 20 41 4e 53 49 |ears bef|ore ANSI|
|00005880| 20 6d 61 6e 61 67 65 73 | 20 74 6f 20 6f 75 74 6c | manages| to outl|
|00005890| 61 77 20 63 68 61 72 20 | 2a 2c 0a 58 61 6e 64 20 |aw char |*,.Xand |
|000058a0| 61 73 20 76 6f 69 64 20 | 2a 20 69 73 20 6f 66 74 |as void |* is oft|
|000058b0| 65 6e 20 69 6e 76 61 6c | 69 64 2c 20 49 20 61 64 |en inval|id, I ad|
|000058c0| 76 69 73 65 20 79 6f 75 | 20 74 6f 20 6c 65 61 76 |vise you| to leav|
|000058d0| 65 20 47 45 4e 45 52 49 | 43 20 61 6c 6f 6e 65 2e |e GENERI|C alone.|
|000058e0| 0a 58 27 0a 58 0a 58 65 | 63 68 6f 20 27 2d 2d 2d |.X'.X.Xe|cho '---|
|000058f0| 2d 2d 20 50 72 65 73 73 | 20 72 65 74 75 72 6e 20 |-- Press| return |
|00005900| 74 6f 20 63 6f 6e 74 69 | 6e 75 65 2e 20 27 20 7c |to conti|nue. ' ||
|00005910| 20 74 72 20 2d 64 20 27 | 5c 30 31 32 27 3b 20 72 | tr -d '|\012'; r|
|00005920| 65 61 64 20 63 6f 6e 74 | 6c 69 6e 65 0a 58 0a 58 |ead cont|line.X.X|
|00005930| 65 63 68 6f 20 27 0a 58 | 70 74 79 20 61 74 74 65 |echo '.X|pty atte|
|00005940| 6d 70 74 73 20 74 6f 20 | 66 6f 72 77 61 72 64 20 |mpts to |forward |
|00005950| 77 69 6e 64 6f 77 2d 73 | 69 7a 65 20 63 68 61 6e |window-s|ize chan|
|00005960| 67 65 73 20 74 72 61 6e | 73 70 61 72 65 6e 74 6c |ges tran|sparentl|
|00005970| 79 2e 20 49 74 20 61 6c | 73 6f 0a 58 73 75 70 70 |y. It al|so.Xsupp|
|00005980| 6f 72 74 73 20 74 68 65 | 20 61 75 78 69 6c 69 61 |orts the| auxilia|
|00005990| 72 79 20 63 68 61 72 61 | 63 74 65 72 73 20 73 74 |ry chara|cters st|
|000059a0| 72 75 63 74 75 72 65 2c | 20 77 68 69 63 68 20 6c |ructure,| which l|
|000059b0| 65 74 73 20 79 6f 75 20 | 74 79 70 65 20 61 0a 58 |ets you |type a.X|
|000059c0| 73 69 6e 67 6c 65 20 63 | 68 61 72 61 63 74 65 72 |single c|haracter|
|000059d0| 20 74 6f 20 67 65 74 20 | 73 79 73 74 65 6d 20 61 | to get |system a|
|000059e0| 6e 64 20 74 74 79 20 73 | 74 61 74 75 73 2e 0a 58 |nd tty s|tatus..X|
|000059f0| 27 0a 58 0a 58 65 63 68 | 6f 20 27 52 75 6e 6e 69 |'.X.Xech|o 'Runni|
|00005a00| 6e 67 20 24 20 6d 61 6e | 20 34 20 74 74 79 20 7c |ng $ man| 4 tty ||
|00005a10| 20 73 65 64 20 27 5c 27 | 27 73 2f 5f 08 2f 2f 67 | sed '\'|'s/_.//g|
|00005a20| 27 5c 27 27 20 7c 20 67 | 72 65 70 20 2d 73 20 77 |'\'' | g|rep -s w|
|00005a30| 69 6e 73 69 7a 65 27 0a | 58 69 66 20 6d 61 6e 20 |insize'.|Xif man |
|00005a40| 34 20 74 74 79 20 7c 20 | 73 65 64 20 27 73 2f 5f |4 tty | |sed 's/_|
|00005a50| 08 2f 2f 67 27 20 7c 20 | 67 72 65 70 20 2d 73 20 |.//g' | |grep -s |
|00005a60| 77 69 6e 73 69 7a 65 0a | 58 74 68 65 6e 20 68 61 |winsize.|Xthen ha|
|00005a70| 76 65 77 69 6e 3d 79 3b | 20 65 63 68 6f 20 27 0a |vewin=y;| echo '.|
|00005a80| 58 49 20 73 65 65 20 79 | 6f 75 20 68 61 76 65 20 |XI see y|ou have |
|00005a90| 77 69 6e 64 6f 77 20 73 | 69 7a 65 73 2e 0a 58 27 |window s|izes..X'|
|00005aa0| 0a 58 65 6c 73 65 20 68 | 61 76 65 77 69 6e 3d 6e |.Xelse h|avewin=n|
|00005ab0| 3b 20 65 63 68 6f 20 27 | 0a 58 49 20 73 65 65 20 |; echo '|.XI see |
|00005ac0| 79 6f 75 20 64 6f 6e 27 | 5c 27 27 74 20 68 61 76 |you don'|\''t hav|
|00005ad0| 65 20 77 69 6e 64 6f 77 | 20 73 69 7a 65 73 2e 0a |e window| sizes..|
|00005ae0| 58 59 6f 75 27 5c 27 27 | 6c 6c 20 68 61 76 65 20 |XYou'\''|ll have |
|00005af0| 74 6f 20 63 6f 6d 6d 65 | 6e 74 20 6f 75 74 20 23 |to comme|nt out #|
|00005b00| 64 65 66 69 6e 65 20 54 | 54 59 5f 57 49 4e 53 49 |define T|TY_WINSI|
|00005b10| 5a 45 20 69 6e 20 63 6f | 6e 66 69 67 2e 68 2e 0a |ZE in co|nfig.h..|
|00005b20| 58 28 54 68 69 73 20 6d | 61 79 20 62 65 20 69 6e |X(This m|ay be in|
|00005b30| 61 63 63 75 72 61 74 65 | 20 6f 6e 20 53 75 6e 73 |accurate| on Suns|
|00005b40| 3b 20 74 72 79 20 67 72 | 65 70 20 77 69 6e 73 69 |; try gr|ep winsi|
|00005b50| 7a 65 20 2f 75 73 72 2f | 69 6e 63 6c 75 64 65 2f |ze /usr/|include/|
|00005b60| 73 79 73 2f 74 74 2a 2e | 68 2e 29 0a 58 27 20 0a |sys/tt*.|h.).X' .|
|00005b70| 58 20 20 20 20 20 63 61 | 73 65 20 22 24 74 74 79 |X ca|se "$tty|
|00005b80| 67 72 6f 75 70 22 20 69 | 6e 0a 58 20 20 20 20 20 |group" i|n.X |
|00005b90| 34 29 20 3b 3b 0a 58 20 | 20 20 20 20 27 27 29 20 |4) ;;.X | '') |
|00005ba0| 65 63 68 6f 20 27 28 4c | 65 74 20 6d 65 20 67 75 |echo '(L|et me gu|
|00005bb0| 65 73 73 3a 20 54 68 69 | 73 20 69 73 6e 27 5c 27 |ess: Thi|s isn'\'|
|00005bc0| 27 74 20 61 20 42 53 44 | 20 34 2e 33 20 73 79 73 |'t a BSD| 4.3 sys|
|00005bd0| 74 65 6d 2e 29 27 20 3b | 3b 0a 58 20 20 20 20 20 |tem.)' ;|;.X |
|00005be0| 2a 29 20 3b 3b 0a 58 20 | 20 20 20 20 65 73 61 63 |*) ;;.X | esac|
|00005bf0| 0a 58 66 69 0a 58 0a 58 | 65 63 68 6f 20 27 52 75 |.Xfi.X.X|echo 'Ru|
|00005c00| 6e 6e 69 6e 67 20 24 20 | 6d 61 6e 20 34 20 74 74 |nning $ |man 4 tt|
|00005c10| 79 20 7c 20 73 65 64 20 | 27 5c 27 27 73 2f 5f 08 |y | sed |'\''s/_.|
|00005c20| 2f 2f 67 27 5c 27 27 20 | 7c 20 67 72 65 70 20 2d |//g'\'' || grep -|
|00005c30| 73 20 61 75 78 63 68 61 | 72 73 27 0a 58 69 66 20 |s auxcha|rs'.Xif |
|00005c40| 6d 61 6e 20 34 20 74 74 | 79 20 7c 20 73 65 64 20 |man 4 tt|y | sed |
|00005c50| 27 73 2f 5f 08 2f 2f 67 | 27 20 7c 20 67 72 65 70 |'s/_.//g|' | grep|
|00005c60| 20 2d 73 20 61 75 78 63 | 68 61 72 73 0a 58 74 68 | -s auxc|hars.Xth|
|00005c70| 65 6e 20 68 61 76 65 61 | 75 78 3d 79 3b 20 65 63 |en havea|ux=y; ec|
|00005c80| 68 6f 20 27 0a 58 49 20 | 73 65 65 20 79 6f 75 20 |ho '.XI |see you |
|00005c90| 68 61 76 65 20 61 75 78 | 69 6c 69 61 72 79 20 63 |have aux|iliary c|
|00005ca0| 68 61 72 61 63 74 65 72 | 73 2e 0a 58 59 6f 75 20 |haracter|s..XYou |
|00005cb0| 73 68 6f 75 6c 64 20 75 | 6e 63 6f 6d 6d 65 6e 74 |should u|ncomment|
|00005cc0| 20 23 64 65 66 69 6e 65 | 20 54 54 59 5f 41 55 58 | #define| TTY_AUX|
|00005cd0| 43 48 41 52 53 20 69 6e | 20 63 6f 6e 66 69 67 2e |CHARS in| config.|
|00005ce0| 68 2e 0a 58 27 0a 58 65 | 6c 73 65 20 68 61 76 65 |h..X'.Xe|lse have|
|00005cf0| 61 75 78 3d 6e 3b 20 65 | 63 68 6f 20 27 0a 58 49 |aux=n; e|cho '.XI|
|00005d00| 20 73 65 65 20 79 6f 75 | 20 64 6f 6e 27 5c 27 27 | see you| don'\''|
|00005d10| 74 20 68 61 76 65 20 61 | 75 78 69 6c 69 61 72 79 |t have a|uxiliary|
|00005d20| 20 63 68 61 72 61 63 74 | 65 72 73 2e 0a 58 27 0a | charact|ers..X'.|
|00005d30| 58 66 69 0a 58 0a 58 65 | 63 68 6f 20 27 2d 2d 2d |Xfi.X.Xe|cho '---|
|00005d40| 2d 2d 20 50 72 65 73 73 | 20 72 65 74 75 72 6e 20 |-- Press| return |
|00005d50| 74 6f 20 63 6f 6e 74 69 | 6e 75 65 2e 20 27 20 7c |to conti|nue. ' ||
|00005d60| 20 74 72 20 2d 64 20 27 | 5c 30 31 32 27 3b 20 72 | tr -d '|\012'; r|
|00005d70| 65 61 64 20 63 6f 6e 74 | 6c 69 6e 65 0a 58 0a 58 |ead cont|line.X.X|
|00005d80| 65 63 68 6f 20 27 0a 58 | 70 74 79 20 61 6c 73 6f |echo '.X|pty also|
|00005d90| 20 70 75 74 73 20 73 69 | 67 69 6e 74 65 72 72 75 | puts si|ginterru|
|00005da0| 70 74 28 29 20 61 6e 64 | 20 75 73 6c 65 65 70 28 |pt() and| usleep(|
|00005db0| 29 20 74 6f 20 67 6f 6f | 64 20 75 73 65 20 69 6e |) to goo|d use in|
|00005dc0| 20 77 6f 72 6b 69 6e 67 | 0a 58 61 72 6f 75 6e 64 | working|.Xaround|
|00005dd0| 20 42 53 44 20 6c 69 6d | 69 74 61 74 69 6f 6e 73 | BSD lim|itations|
|00005de0| 2e 20 57 69 74 68 6f 75 | 74 20 73 69 67 69 6e 74 |. Withou|t sigint|
|00005df0| 65 72 72 75 70 74 28 29 | 2c 20 74 68 65 72 65 20 |errupt()|, there |
|00005e00| 69 73 20 61 62 73 6f 6c | 75 74 65 6c 79 0a 58 6e |is absol|utely.Xn|
|00005e10| 6f 20 77 61 79 20 74 6f | 20 67 65 74 20 70 65 72 |o way to| get per|
|00005e20| 2d 70 72 6f 63 65 73 73 | 20 6e 6f 6e 2d 62 6c 6f |-process| non-blo|
|00005e30| 63 6b 69 6e 67 20 49 2f | 4f 2c 20 73 6f 20 70 74 |cking I/|O, so pt|
|00005e40| 79 20 6d 61 79 20 62 6c | 6f 63 6b 20 77 68 65 6e |y may bl|ock when|
|00005e50| 20 69 74 0a 58 64 6f 65 | 73 6e 27 5c 27 27 74 20 | it.Xdoe|sn'\''t |
|00005e60| 68 61 76 65 20 74 6f 20 | 28 6e 61 6d 65 6c 79 2c |have to |(namely,|
|00005e70| 20 77 68 65 6e 20 69 74 | 20 68 61 73 20 4e 20 62 | when it| has N b|
|00005e80| 79 74 65 73 20 74 6f 20 | 77 72 69 74 65 20 74 6f |ytes to |write to|
|00005e90| 20 74 68 65 20 6f 75 74 | 70 75 74 2c 0a 58 74 68 | the out|put,.Xth|
|00005ea0| 65 20 6f 75 74 70 75 74 | 20 69 73 20 61 20 70 69 |e output| is a pi|
|00005eb0| 70 65 20 77 69 74 68 20 | 4d 20 62 79 74 65 73 20 |pe with |M bytes |
|00005ec0| 6f 66 20 73 70 61 63 65 | 2c 20 61 6e 64 20 4e 20 |of space|, and N |
|00005ed0| 3e 20 4d 20 3e 20 30 29 | 2e 20 49 66 20 79 6f 75 |> M > 0)|. If you|
|00005ee0| 0a 58 64 65 66 69 6e 65 | 20 53 49 47 49 4e 54 45 |.Xdefine| SIGINTE|
|00005ef0| 52 52 55 50 54 20 28 61 | 73 20 64 65 66 61 75 6c |RRUPT (a|s defaul|
|00005f00| 74 29 2c 20 70 74 79 20 | 77 69 6c 6c 20 74 61 6b |t), pty |will tak|
|00005f10| 65 20 73 6f 6d 65 20 65 | 78 74 72 61 20 65 66 66 |e some e|xtra eff|
|00005f20| 6f 72 74 20 74 6f 0a 58 | 6e 65 76 65 72 2c 20 65 |ort to.X|never, e|
|00005f30| 76 65 72 2c 20 65 76 65 | 72 20 62 6c 6f 63 6b 20 |ver, eve|r block |
|00005f40| 77 68 65 6e 20 69 74 20 | 64 6f 65 73 6e 27 5c 27 |when it |doesn'\'|
|00005f50| 27 74 20 68 61 76 65 20 | 74 6f 2e 0a 58 0a 58 41 |'t have |to..X.XA|
|00005f60| 74 20 6f 6e 65 20 70 6f | 69 6e 74 2c 20 70 74 79 |t one po|int, pty|
|00005f70| 20 70 61 75 73 65 73 20 | 74 6f 20 6b 6c 75 64 67 | pauses |to kludg|
|00005f80| 65 20 61 72 6f 75 6e 64 | 20 61 20 63 6f 6d 6d 6f |e around| a commo|
|00005f90| 6e 20 62 75 67 20 69 6e | 20 55 4e 49 58 2d 64 6f |n bug in| UNIX-do|
|00005fa0| 6d 61 69 6e 0a 58 73 6f | 63 6b 65 74 73 2e 20 57 |main.Xso|ckets. W|
|00005fb0| 69 74 68 20 75 73 6c 65 | 65 70 28 29 20 69 74 20 |ith usle|ep() it |
|00005fc0| 77 69 6c 6c 20 70 61 75 | 73 65 20 6d 75 63 68 20 |will pau|se much |
|00005fd0| 6d 6f 72 65 20 62 72 69 | 65 66 6c 79 2e 20 54 68 |more bri|efly. Th|
|00005fe0| 69 73 20 6d 61 6b 65 73 | 0a 58 72 65 63 6f 6e 6e |is makes|.Xreconn|
|00005ff0| 65 63 74 73 20 6d 75 63 | 68 20 66 61 73 74 65 72 |ects muc|h faster|
|00006000| 2e 0a 58 27 0a 58 0a 58 | 65 63 68 6f 20 27 52 75 |..X'.X.X|echo 'Ru|
|00006010| 6e 6e 69 6e 67 20 74 65 | 72 72 75 70 74 28 29 2e |nning te|rrupt().|
|00006020| 20 47 6f 6f 64 2e 0a 58 | 27 0a 58 20 20 20 20 20 | Good..X|'.X |
|00006030| 63 61 73 65 20 22 24 74 | 74 79 67 72 6f 75 70 24 |case "$t|tygroup$|
|00006040| 68 61 76 65 77 69 6e 73 | 69 7a 65 22 20 69 6e 0a |havewins|ize" in.|
|00006050| 58 20 20 20 20 20 34 79 | 29 20 65 63 68 6f 20 27 |X 4y|) echo '|
|00006060| 49 27 5c 27 27 6c 6c 20 | 62 65 74 20 79 6f 75 27 |I'\''ll |bet you'|
|00006070| 5c 27 27 72 65 20 61 20 | 42 53 44 20 34 2e 33 20 |\''re a |BSD 4.3 |
|00006080| 73 79 73 74 65 6d 2e 27 | 20 3b 3b 0a 58 20 20 20 |system.'| ;;.X |
|00006090| 20 20 2a 29 20 65 63 68 | 6f 20 27 57 65 69 72 64 | *) ech|o 'Weird|
|000060a0| 2c 20 61 72 65 20 79 6f | 75 20 42 53 44 20 34 2e |, are yo|u BSD 4.|
|000060b0| 33 3f 27 20 3b 3b 0a 58 | 20 20 20 20 20 65 73 61 |3?' ;;.X| esa|
|000060c0| 63 0a 58 65 6c 73 65 20 | 68 61 76 65 73 69 67 69 |c.Xelse |havesigi|
|000060d0| 6e 74 72 3d 6e 3b 20 65 | 63 68 6f 20 27 0a 58 49 |ntr=n; e|cho '.XI|
|000060e0| 20 73 65 65 20 79 6f 75 | 20 64 6f 6e 27 5c 27 27 | see you| don'\''|
|000060f0| 74 20 68 61 76 65 20 73 | 69 67 69 6e 74 65 72 72 |t have s|iginterr|
|00006100| 75 70 74 28 29 2e 20 59 | 6f 75 20 68 61 76 65 20 |upt(). Y|ou have |
|00006110| 74 6f 20 63 6f 6d 6d 65 | 6e 74 20 6f 75 74 0a 58 |to comme|nt out.X|
|00006120| 23 64 65 66 69 6e 65 20 | 53 49 47 49 4e 54 45 52 |#define |SIGINTER|
|00006130| 52 55 50 54 20 69 6e 20 | 63 6f 6e 66 69 67 2e 68 |RUPT in |config.h|
|00006140| 2e 0a 58 27 0a 58 66 69 | 0a 58 0a 58 65 63 68 6f |..X'.Xfi|.X.Xecho|
|00006150| 20 27 52 75 6e 6e 69 6e | 67 20 24 20 6d 61 6e 20 | 'Runnin|g $ man |
|00006160| 75 73 6c 65 65 70 20 7c | 20 73 65 64 20 27 5c 27 |usleep || sed '\'|
|00006170| 27 73 2f 5f 08 2f 2f 67 | 27 5c 27 27 20 7c 20 67 |'s/_.//g|'\'' | g|
|00006180| 72 65 70 20 2d 73 20 75 | 73 6c 65 65 70 27 0a 58 |rep -s u|sleep'.X|
|00006190| 69 66 20 6d 61 6e 20 75 | 73 6c 65 65 70 20 7c 20 |if man u|sleep | |
|000061a0| 73 65 64 20 27 73 2f 5f | 08 2f 2f 67 27 20 7c 20 |sed 's/_|.//g' | |
|000061b0| 67 72 65 70 20 2d 73 20 | 75 73 6c 65 65 70 0a 58 |grep -s |usleep.X|
|000061c0| 74 68 65 6e 20 68 61 76 | 65 75 73 6c 65 65 70 3d |then hav|eusleep=|
|000061d0| 79 3b 20 65 63 68 6f 20 | 27 0a 58 49 20 73 65 65 |y; echo |'.XI see|
|000061e0| 20 79 6f 75 20 68 61 76 | 65 20 75 73 6c 65 65 70 | you hav|e usleep|
|000061f0| 28 29 2e 20 47 6f 6f 64 | 2e 0a 58 27 0a 58 65 6c |(). Good|..X'.Xel|
|00006200| 73 65 20 68 61 76 65 75 | 73 6c 65 65 70 3d 6e 3b |se haveu|sleep=n;|
|00006210| 20 65 63 68 6f 20 27 0a | 58 49 20 73 65 65 20 79 | echo '.|XI see y|
|00006220| 6f 75 20 64 6f 6e 27 5c | 27 27 74 20 68 61 76 65 |ou don'\|''t have|
|00006230| 20 75 73 6c 65 65 70 28 | 29 2e 20 59 6f 75 20 68 | usleep(|). You h|
|00006240| 61 76 65 20 74 6f 20 63 | 6f 6d 6d 65 6e 74 20 6f |ave to c|omment o|
|00006250| 75 74 0a 58 23 64 65 66 | 69 6e 65 20 55 53 4c 45 |ut.X#def|ine USLE|
|00006260| 45 50 20 69 6e 20 63 6f | 6e 66 69 67 2e 68 2e 0a |EP in co|nfig.h..|
|00006270| 58 27 0a 58 66 69 0a 58 | 0a 58 65 63 68 6f 20 27 |X'.Xfi.X|.Xecho '|
|00006280| 2d 2d 2d 2d 2d 20 50 72 | 65 73 73 20 72 65 74 75 |----- Pr|ess retu|
|00006290| 72 6e 20 74 6f 20 63 6f | 6e 74 69 6e 75 65 2e 20 |rn to co|ntinue. |
|000062a0| 27 20 7c 20 74 72 20 2d | 64 20 27 5c 30 31 32 27 |' | tr -|d '\012'|
|000062b0| 3b 20 72 65 61 64 20 63 | 6f 6e 74 6c 69 6e 65 0a |; read c|ontline.|
|000062c0| 58 0a 58 65 63 68 6f 20 | 27 0a 58 46 69 6e 61 6c |X.Xecho |'.XFinal|
|000062d0| 6c 79 20 28 61 6c 6d 6f | 73 74 20 64 6f 6e 65 20 |ly (almo|st done |
|000062e0| 77 69 74 68 20 63 6f 6e | 66 69 67 75 72 61 74 69 |with con|figurati|
|000062f0| 6f 6e 21 29 2c 20 77 65 | 20 68 61 76 65 20 74 6f |on!), we| have to|
|00006300| 20 6d 61 6b 65 20 73 75 | 72 65 20 74 68 61 74 20 | make su|re that |
|00006310| 79 6f 75 0a 58 68 61 76 | 65 20 55 4e 49 58 2d 64 |you.Xhav|e UNIX-d|
|00006320| 6f 6d 61 69 6e 20 73 6f | 63 6b 65 74 73 2c 20 61 |omain so|ckets, a|
|00006330| 6e 64 20 63 68 65 63 6b | 20 77 68 65 74 68 65 72 |nd check| whether|
|00006340| 20 79 6f 75 20 68 61 76 | 65 20 66 69 6c 65 20 64 | you hav|e file d|
|00006350| 65 73 63 72 69 70 74 6f | 72 0a 58 70 61 73 73 69 |escripto|r.Xpassi|
|00006360| 6e 67 2e 0a 58 27 0a 58 | 0a 58 65 63 68 6f 20 27 |ng..X'.X|.Xecho '|
|00006370| 52 75 6e 6e 69 6e 67 20 | 24 20 74 65 73 74 20 2d |Running |$ test -|
|00006380| 72 20 2f 75 73 72 2f 69 | 6e 63 6c 75 64 65 2f 73 |r /usr/i|nclude/s|
|00006390| 79 73 2f 75 6e 2e 68 27 | 0a 58 69 66 20 74 65 73 |ys/un.h'|.Xif tes|
|000063a0| 74 20 2d 72 20 2f 75 73 | 72 2f 69 6e 63 6c 75 64 |t -r /us|r/includ|
|000063b0| 65 2f 73 79 73 2f 75 6e | 2e 68 0a 58 74 68 65 6e |e/sys/un|.h.Xthen|
|000063c0| 20 68 61 76 65 75 6e 73 | 6f 63 6b 73 3d 79 3b 20 | haveuns|ocks=y; |
|000063d0| 65 63 68 6f 20 27 0a 58 | 49 20 73 65 65 20 79 6f |echo '.X|I see yo|
|000063e0| 75 20 68 61 76 65 20 55 | 4e 49 58 2d 64 6f 6d 61 |u have U|NIX-doma|
|000063f0| 69 6e 20 73 6f 63 6b 65 | 74 73 2e 20 47 6f 6f 64 |in socke|ts. Good|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.