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, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| dexmagic
| PrintFox/Pagefox WEAK
| 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/news
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 6a 2e | 63 63 2e 70 75 72 64 75 |Path: j.|cc.purdu|
|00000010| 65 2e 65 64 75 21 6d 65 | 6e 74 6f 72 2e 63 63 2e |e.edu!me|ntor.cc.|
|00000020| 70 75 72 64 75 65 2e 65 | 64 75 21 6e 6f 6f 73 65 |purdue.e|du!noose|
|00000030| 2e 65 63 6e 2e 70 75 72 | 64 75 65 2e 65 64 75 21 |.ecn.pur|due.edu!|
|00000040| 73 61 6d 73 75 6e 67 21 | 75 75 6e 65 74 21 70 61 |samsung!|uunet!pa|
|00000050| 70 61 79 61 2e 62 62 6e | 2e 63 6f 6d 21 72 73 61 |paya.bbn|.com!rsa|
|00000060| 6c 7a 0a 46 72 6f 6d 3a | 20 72 73 61 6c 7a 40 62 |lz.From:| rsalz@b|
|00000070| 62 6e 2e 63 6f 6d 20 28 | 52 69 63 68 20 53 61 6c |bn.com (|Rich Sal|
|00000080| 7a 29 0a 4e 65 77 73 67 | 72 6f 75 70 73 3a 20 63 |z).Newsg|roups: c|
|00000090| 6f 6d 70 2e 73 6f 75 72 | 63 65 73 2e 75 6e 69 78 |omp.sour|ces.unix|
|000000a0| 0a 53 75 62 6a 65 63 74 | 3a 20 76 32 33 69 30 33 |.Subject|: v23i03|
|000000b0| 32 3a 20 20 52 75 6e 20 | 61 20 70 72 6f 67 72 61 |2: Run |a progra|
|000000c0| 6d 20 75 6e 64 65 72 20 | 61 20 70 74 79 20 73 65 |m under |a pty se|
|000000d0| 73 73 69 6f 6e 2c 20 50 | 61 72 74 30 32 2f 30 36 |ssion, P|art02/06|
|000000e0| 0a 4d 65 73 73 61 67 65 | 2d 49 44 3a 20 3c 32 38 |.Message|-ID: <28|
|000000f0| 38 32 40 6c 69 74 63 68 | 69 2e 62 62 6e 2e 63 6f |82@litch|i.bbn.co|
|00000100| 6d 3e 0a 44 61 74 65 3a | 20 31 30 20 4f 63 74 20 |m>.Date:| 10 Oct |
|00000110| 39 30 20 31 34 3a 31 36 | 3a 32 38 20 47 4d 54 0a |90 14:16|:28 GMT.|
|00000120| 4f 72 67 61 6e 69 7a 61 | 74 69 6f 6e 3a 20 42 42 |Organiza|tion: BB|
|00000130| 4e 20 53 79 73 74 65 6d | 73 20 61 6e 64 20 54 65 |N System|s and Te|
|00000140| 63 68 6e 6f 6c 6f 67 69 | 65 73 2c 20 43 61 6d 62 |chnologi|es, Camb|
|00000150| 72 69 64 67 65 20 4d 41 | 0a 4c 69 6e 65 73 3a 20 |ridge MA|.Lines: |
|00000160| 31 36 38 39 0a 41 70 70 | 72 6f 76 65 64 3a 20 72 |1689.App|roved: r|
|00000170| 73 61 6c 7a 40 75 75 6e | 65 74 2e 55 55 2e 4e 45 |salz@uun|et.UU.NE|
|00000180| 54 0a 58 2d 43 68 65 63 | 6b 73 75 6d 2d 53 6e 65 |T.X-Chec|ksum-Sne|
|00000190| 66 72 75 3a 20 36 66 65 | 31 61 30 38 34 20 36 34 |fru: 6fe|1a084 64|
|000001a0| 64 38 33 63 31 34 20 61 | 63 33 39 63 33 37 65 20 |d83c14 a|c39c37e |
|000001b0| 62 66 35 32 64 39 66 33 | 0a 0a 53 75 62 6d 69 74 |bf52d9f3|..Submit|
|000001c0| 74 65 64 2d 62 79 3a 20 | 44 61 6e 20 42 65 72 6e |ted-by: |Dan Bern|
|000001d0| 73 74 65 69 6e 20 3c 62 | 72 6e 73 74 6e 64 40 6b |stein <b|rnstnd@k|
|000001e0| 72 61 6d 64 65 6e 2e 61 | 63 66 2e 6e 79 75 2e 65 |ramden.a|cf.nyu.e|
|000001f0| 64 75 3e 0a 50 6f 73 74 | 69 6e 67 2d 6e 75 6d 62 |du>.Post|ing-numb|
|00000200| 65 72 3a 20 56 6f 6c 75 | 6d 65 20 32 33 2c 20 49 |er: Volu|me 23, I|
|00000210| 73 73 75 65 20 33 32 0a | 41 72 63 68 69 76 65 2d |ssue 32.|Archive-|
|00000220| 6e 61 6d 65 3a 20 70 74 | 79 2f 70 61 72 74 30 32 |name: pt|y/part02|
|00000230| 0a 0a 23 21 20 2f 62 69 | 6e 2f 73 68 0a 23 20 54 |..#! /bi|n/sh.# T|
|00000240| 68 69 73 20 69 73 20 61 | 20 73 68 65 6c 6c 20 61 |his is a| shell a|
|00000250| 72 63 68 69 76 65 2e 20 | 20 52 65 6d 6f 76 65 20 |rchive. | Remove |
|00000260| 61 6e 79 74 68 69 6e 67 | 20 62 65 66 6f 72 65 20 |anything| before |
|00000270| 74 68 69 73 20 6c 69 6e | 65 2c 20 74 68 65 6e 20 |this lin|e, then |
|00000280| 66 65 65 64 20 69 74 0a | 23 20 69 6e 74 6f 20 61 |feed it.|# into a|
|00000290| 20 73 68 65 6c 6c 20 76 | 69 61 20 22 73 68 20 66 | shell v|ia "sh f|
|000002a0| 69 6c 65 22 20 6f 72 20 | 73 69 6d 69 6c 61 72 2e |ile" or |similar.|
|000002b0| 20 20 54 6f 20 6f 76 65 | 72 77 72 69 74 65 20 65 | To ove|rwrite e|
|000002c0| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 73 2c 0a 23 |xisting |files,.#|
|000002d0| 20 74 79 70 65 20 22 73 | 68 20 66 69 6c 65 20 2d | type "s|h file -|
|000002e0| 63 22 2e 0a 23 20 54 68 | 65 20 74 6f 6f 6c 20 74 |c"..# Th|e tool t|
|000002f0| 68 61 74 20 67 65 6e 65 | 72 61 74 65 64 20 74 68 |hat gene|rated th|
|00000300| 69 73 20 61 70 70 65 61 | 72 65 64 20 69 6e 20 74 |is appea|red in t|
|00000310| 68 65 20 63 6f 6d 70 2e | 73 6f 75 72 63 65 73 2e |he comp.|sources.|
|00000320| 75 6e 69 78 20 6e 65 77 | 73 67 72 6f 75 70 3b 0a |unix new|sgroup;.|
|00000330| 23 20 73 65 6e 64 20 6d | 61 69 6c 20 74 6f 20 63 |# send m|ail to c|
|00000340| 6f 6d 70 2d 73 6f 75 72 | 63 65 73 2d 75 6e 69 78 |omp-sour|ces-unix|
|00000350| 40 75 75 6e 65 74 2e 75 | 75 2e 6e 65 74 20 69 66 |@uunet.u|u.net if|
|00000360| 20 79 6f 75 20 77 61 6e | 74 20 74 68 61 74 20 74 | you wan|t that t|
|00000370| 6f 6f 6c 2e 0a 23 20 43 | 6f 6e 74 65 6e 74 73 3a |ool..# C|ontents:|
|00000380| 20 20 49 4e 53 54 41 4c | 4c 52 45 41 44 41 42 4c | INSTAL|LREADABL|
|00000390| 45 20 6d 61 73 74 65 72 | 2e 63 20 70 74 79 2e 63 |E master|.c pty.c|
|000003a0| 0a 23 20 57 72 61 70 70 | 65 64 20 62 79 20 72 73 |.# Wrapp|ed by rs|
|000003b0| 61 6c 7a 40 6c 69 74 63 | 68 69 2e 62 62 6e 2e 63 |alz@litc|hi.bbn.c|
|000003c0| 6f 6d 20 6f 6e 20 57 65 | 64 20 4f 63 74 20 31 30 |om on We|d Oct 10|
|000003d0| 20 31 30 3a 31 31 3a 33 | 37 20 31 39 39 30 0a 50 | 10:11:3|7 1990.P|
|000003e0| 41 54 48 3d 2f 62 69 6e | 3a 2f 75 73 72 2f 62 69 |ATH=/bin|:/usr/bi|
|000003f0| 6e 3a 2f 75 73 72 2f 75 | 63 62 20 3b 20 65 78 70 |n:/usr/u|cb ; exp|
|00000400| 6f 72 74 20 50 41 54 48 | 0a 65 63 68 6f 20 49 66 |ort PATH|.echo If|
|00000410| 20 74 68 69 73 20 61 72 | 63 68 69 76 65 20 69 73 | this ar|chive is|
|00000420| 20 63 6f 6d 70 6c 65 74 | 65 2c 20 79 6f 75 20 77 | complet|e, you w|
|00000430| 69 6c 6c 20 73 65 65 20 | 74 68 65 20 66 6f 6c 6c |ill see |the foll|
|00000440| 6f 77 69 6e 67 20 6d 65 | 73 73 61 67 65 3a 0a 65 |owing me|ssage:.e|
|00000450| 63 68 6f 20 27 20 20 20 | 20 20 20 20 20 20 20 22 |cho ' | "|
|00000460| 73 68 61 72 3a 20 45 6e | 64 20 6f 66 20 61 72 63 |shar: En|d of arc|
|00000470| 68 69 76 65 20 32 20 28 | 6f 66 20 36 29 2e 22 27 |hive 2 (|of 6)."'|
|00000480| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 49 4e 53 |.if test| -f 'INS|
|00000490| 54 41 4c 4c 52 45 41 44 | 41 42 4c 45 27 20 2d 61 |TALLREAD|ABLE' -a|
|000004a0| 20 22 24 7b 31 7d 22 20 | 21 3d 20 22 2d 63 22 20 | "${1}" |!= "-c" |
|000004b0| 3b 20 74 68 65 6e 20 0a | 20 20 65 63 68 6f 20 73 |; then .| echo s|
|000004c0| 68 61 72 3a 20 57 69 6c | 6c 20 6e 6f 74 20 63 6c |har: Wil|l not cl|
|000004d0| 6f 62 62 65 72 20 65 78 | 69 73 74 69 6e 67 20 66 |obber ex|isting f|
|000004e0| 69 6c 65 20 5c 22 27 49 | 4e 53 54 41 4c 4c 52 45 |ile \"'I|NSTALLRE|
|000004f0| 41 44 41 42 4c 45 27 5c | 22 0a 65 6c 73 65 0a 20 |ADABLE'\|".else. |
|00000500| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 45 78 74 72 | echo sh|ar: Extr|
|00000510| 61 63 74 69 6e 67 20 5c | 22 27 49 4e 53 54 41 4c |acting \|"'INSTAL|
|00000520| 4c 52 45 41 44 41 42 4c | 45 27 5c 22 20 5c 28 32 |LREADABL|E'\" \(2|
|00000530| 32 36 32 31 20 63 68 61 | 72 61 63 74 65 72 73 5c |2621 cha|racters\|
|00000540| 29 0a 20 20 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |). sed |"s/^X//"|
|00000550| 20 3e 27 49 4e 53 54 41 | 4c 4c 52 45 41 44 41 42 | >'INSTA|LLREADAB|
|00000560| 4c 45 27 20 3c 3c 27 45 | 4e 44 5f 4f 46 5f 46 49 |LE' <<'E|ND_OF_FI|
|00000570| 4c 45 27 0a 58 54 68 69 | 73 20 69 73 20 61 20 74 |LE'.XThi|s is a t|
|00000580| 79 70 65 73 63 72 69 70 | 74 20 6f 66 20 49 4e 53 |ypescrip|t of INS|
|00000590| 54 41 4c 4c 20 6f 6e 20 | 61 20 53 75 6e 20 34 20 |TALL on |a Sun 4 |
|000005a0| 72 75 6e 6e 69 6e 67 20 | 53 75 6e 4f 53 20 34 2e |running |SunOS 4.|
|000005b0| 30 2e 33 2e 0a 58 49 27 | 76 65 20 69 6e 73 65 72 |0.3..XI'|ve inser|
|000005c0| 74 65 64 20 73 6f 6d 65 | 20 66 75 72 74 68 65 72 |ted some| further|
|000005d0| 20 63 6f 6d 6d 65 6e 74 | 73 20 61 74 20 73 70 6f | comment|s at spo|
|000005e0| 74 73 20 77 68 65 72 65 | 20 49 4e 53 54 41 4c 4c |ts where| INSTALL|
|000005f0| 20 6d 69 67 68 74 20 67 | 69 76 65 0a 58 64 69 66 | might g|ive.Xdif|
|00000600| 66 65 72 65 6e 74 20 72 | 65 73 75 6c 74 73 20 6f |ferent r|esults o|
|00000610| 6e 20 64 69 66 66 65 72 | 65 6e 74 20 6d 61 63 68 |n differ|ent mach|
|00000620| 69 6e 65 73 2e 0a 58 0a | 58 0a 58 0a 58 48 69 2c |ines..X.|X.X.XHi,|
|00000630| 20 61 6e 64 20 77 65 6c | 63 6f 6d 65 20 74 6f 20 | and wel|come to |
|00000640| 74 68 65 20 70 74 79 20 | 69 6e 73 74 61 6c 6c 20 |the pty |install |
|00000650| 73 63 72 69 70 74 2e 0a | 58 70 74 79 20 69 73 20 |script..|Xpty is |
|00000660| 61 20 70 72 6f 67 72 61 | 6d 20 66 6f 72 20 6d 61 |a progra|m for ma|
|00000670| 6e 61 67 69 6e 67 20 70 | 73 65 75 64 6f 2d 74 65 |naging p|seudo-te|
|00000680| 72 6d 69 6e 61 6c 73 2e | 0a 58 0a 58 49 27 6d 20 |rminals.|.X.XI'm |
|00000690| 6e 6f 74 20 61 63 74 75 | 61 6c 6c 79 20 67 6f 69 |not actu|ally goi|
|000006a0| 6e 67 20 74 6f 20 69 6e | 73 74 61 6c 6c 20 61 6e |ng to in|stall an|
|000006b0| 79 74 68 69 6e 67 2e 0a | 58 49 27 6c 6c 20 6a 75 |ything..|XI'll ju|
|000006c0| 73 74 20 67 75 69 64 65 | 20 79 6f 75 20 74 68 72 |st guide| you thr|
|000006d0| 6f 75 67 68 20 77 68 61 | 74 20 68 61 73 20 74 6f |ough wha|t has to|
|000006e0| 20 62 65 20 64 6f 6e 65 | 2c 0a 58 66 72 6f 6d 20 | be done|,.Xfrom |
|000006f0| 63 6f 6d 70 69 6c 69 6e | 67 20 74 68 72 6f 75 67 |compilin|g throug|
|00000700| 68 20 69 6e 73 74 61 6c | 6c 61 74 69 6f 6e 2e 0a |h instal|lation..|
|00000710| 58 0a 58 4f 6e 65 20 61 | 64 76 61 6e 74 61 67 65 |X.XOne a|dvantage|
|00000720| 20 6f 66 20 74 68 69 73 | 20 68 61 6e 64 73 2d 6f | of this| hands-o|
|00000730| 66 66 20 70 68 69 6c 6f | 73 6f 70 68 79 20 69 73 |ff philo|sophy is|
|00000740| 20 74 68 61 74 0a 58 79 | 6f 75 20 63 61 6e 20 6b | that.Xy|ou can k|
|00000750| 69 6c 6c 20 61 6e 64 20 | 72 65 73 74 61 72 74 20 |ill and |restart |
|00000760| 74 68 69 73 20 73 63 72 | 69 70 74 20 61 74 20 61 |this scr|ipt at a|
|00000770| 6e 79 20 74 69 6d 65 2e | 0a 58 59 6f 75 20 6d 61 |ny time.|.XYou ma|
|00000780| 79 20 70 72 65 66 65 72 | 20 74 6f 20 72 65 61 64 |y prefer| to read|
|00000790| 20 74 68 72 6f 75 67 68 | 20 49 4e 53 54 41 4c 4c | through| INSTALL|
|000007a0| 52 45 41 44 41 42 4c 45 | 2c 0a 58 77 68 69 63 68 |READABLE|,.Xwhich|
|000007b0| 20 68 61 73 20 74 68 65 | 20 73 61 6d 65 20 69 6e | has the| same in|
|000007c0| 66 6f 72 6d 61 74 69 6f | 6e 2e 0a 58 0a 58 49 6e |formatio|n..X.XIn|
|000007d0| 20 74 68 65 20 66 69 72 | 73 74 20 70 61 72 74 20 | the fir|st part |
|000007e0| 6f 66 20 74 68 69 73 20 | 73 63 72 69 70 74 2c 20 |of this |script, |
|000007f0| 49 27 6c 6c 20 6c 65 61 | 64 20 79 6f 75 20 74 68 |I'll lea|d you th|
|00000800| 72 6f 75 67 68 20 63 6f | 6e 66 69 67 75 72 61 74 |rough co|nfigurat|
|00000810| 69 6f 6e 2e 0a 58 46 6f | 72 20 74 68 65 20 6d 6f |ion..XFo|r the mo|
|00000820| 6d 65 6e 74 2c 20 64 6f | 6e 27 74 20 61 63 74 75 |ment, do|n't actu|
|00000830| 61 6c 6c 79 20 63 68 61 | 6e 67 65 20 61 6e 79 74 |ally cha|nge anyt|
|00000840| 68 69 6e 67 20 69 6e 20 | 79 6f 75 72 20 73 79 73 |hing in |your sys|
|00000850| 74 65 6d 2e 20 4a 75 73 | 74 0a 58 61 6c 74 65 72 |tem. Jus|t.Xalter|
|00000860| 6e 61 74 65 20 62 65 74 | 77 65 65 6e 20 72 65 61 |nate bet|ween rea|
|00000870| 64 69 6e 67 20 74 68 69 | 73 20 73 63 72 69 70 74 |ding thi|s script|
|00000880| 20 61 6e 64 20 66 6f 6f | 6c 69 6e 67 20 61 72 6f | and foo|ling aro|
|00000890| 75 6e 64 20 77 69 74 68 | 20 74 68 65 0a 58 4d 61 |und with| the.XMa|
|000008a0| 6b 65 66 69 6c 65 2c 20 | 61 6e 64 20 49 27 6c 6c |kefile, |and I'll|
|000008b0| 20 72 65 6d 69 6e 64 20 | 79 6f 75 20 6c 61 74 65 | remind |you late|
|000008c0| 72 2c 20 61 66 74 65 72 | 20 63 6f 6d 70 69 6c 61 |r, after| compila|
|000008d0| 74 69 6f 6e 2c 20 6f 66 | 20 77 68 61 74 20 68 61 |tion, of| what ha|
|000008e0| 73 0a 58 74 6f 20 62 65 | 20 63 68 61 6e 67 65 64 |s.Xto be| changed|
|000008f0| 20 65 6c 73 65 77 68 65 | 72 65 2e 0a 58 0a 58 49 | elsewhe|re..X.XI|
|00000900| 20 6e 65 65 64 20 74 68 | 65 20 66 6f 6c 6c 6f 77 | need th|e follow|
|00000910| 69 6e 67 20 70 72 6f 67 | 72 61 6d 73 3a 20 65 63 |ing prog|rams: ec|
|00000920| 68 6f 2c 20 74 72 20 5b | 2d 64 5d 2c 20 6d 61 6e |ho, tr [|-d], man|
|00000930| 2c 20 73 65 64 20 5b 2d | 6e 5d 2c 20 67 72 65 70 |, sed [-|n], grep|
|00000940| 2c 20 74 65 73 74 2e 0a | 58 0a 58 2d 2d 2d 2d 2d |, test..|X.X-----|
|00000950| 20 50 72 65 73 73 20 72 | 65 74 75 72 6e 20 74 6f | Press r|eturn to|
|00000960| 20 63 6f 6e 74 69 6e 75 | 65 2e 20 0a 58 0a 58 54 | continu|e. .X.XT|
|00000970| 68 65 20 66 69 72 73 74 | 20 76 65 72 73 69 6f 6e |he first| version|
|00000980| 73 20 6f 66 20 70 74 79 | 20 77 65 72 65 20 64 65 |s of pty| were de|
|00000990| 73 69 67 6e 65 64 20 6f | 6e 20 61 20 42 53 44 20 |signed o|n a BSD |
|000009a0| 34 2e 32 2d 62 61 73 65 | 64 20 73 79 73 74 65 6d |4.2-base|d system|
|000009b0| 2e 0a 58 44 75 72 69 6e | 67 20 4d 61 79 20 31 39 |..XDurin|g May 19|
|000009c0| 39 30 20 70 74 79 20 33 | 2e 30 20 77 61 73 20 77 |90 pty 3|.0 was w|
|000009d0| 72 69 74 74 65 6e 20 63 | 6f 6d 70 6c 65 74 65 6c |ritten c|ompletel|
|000009e0| 79 20 66 72 6f 6d 20 73 | 63 72 61 74 63 68 2c 0a |y from s|cratch,.|
|000009f0| 58 6f 6e 20 61 20 42 53 | 44 20 34 2e 33 2d 62 61 |Xon a BS|D 4.3-ba|
|00000a00| 73 65 64 20 73 79 73 74 | 65 6d 2e 20 49 74 20 68 |sed syst|em. It h|
|00000a10| 61 73 20 62 65 65 6e 20 | 74 68 6f 72 6f 75 67 68 |as been |thorough|
|00000a20| 6c 79 20 74 65 73 74 65 | 64 20 6f 6e 0a 58 73 65 |ly teste|d on.Xse|
|00000a30| 76 65 72 61 6c 20 42 53 | 44 20 34 2e 33 2d 62 61 |veral BS|D 4.3-ba|
|00000a40| 73 65 64 20 73 79 73 74 | 65 6d 73 2c 20 74 65 73 |sed syst|ems, tes|
|00000a50| 74 65 64 20 77 69 74 68 | 20 61 20 66 65 77 20 4d |ted with| a few M|
|00000a60| 61 6b 65 66 69 6c 65 20 | 63 68 61 6e 67 65 73 0a |akefile |changes.|
|00000a70| 58 6f 6e 20 73 65 76 65 | 72 61 6c 20 42 53 44 20 |Xon seve|ral BSD |
|00000a80| 34 2e 32 2d 62 61 73 65 | 64 20 73 79 73 74 65 6d |4.2-base|d system|
|00000a90| 73 2c 20 61 6e 64 20 72 | 75 6e 20 6f 6e 20 61 74 |s, and r|un on at|
|00000aa0| 20 6c 65 61 73 74 20 6f | 6e 65 20 6d 75 74 61 6e | least o|ne mutan|
|00000ab0| 74 2e 0a 58 0a 58 49 66 | 20 79 6f 75 20 6d 61 6b |t..X.XIf| you mak|
|00000ac0| 65 20 69 74 20 74 68 72 | 6f 75 67 68 20 69 6e 73 |e it thr|ough ins|
|00000ad0| 74 61 6c 6c 61 74 69 6f | 6e 20 61 6e 64 20 74 65 |tallatio|n and te|
|00000ae0| 73 74 69 6e 67 20 61 6e | 64 20 67 65 74 20 70 74 |sting an|d get pt|
|00000af0| 79 20 72 75 6e 6e 69 6e | 67 2c 0a 58 70 6c 65 61 |y runnin|g,.Xplea|
|00000b00| 73 65 20 73 65 6e 64 20 | 61 20 6e 6f 74 65 20 74 |se send |a note t|
|00000b10| 6f 20 74 68 65 20 61 75 | 74 68 6f 72 2c 20 44 61 |o the au|thor, Da|
|00000b20| 6e 20 42 65 72 6e 73 74 | 65 69 6e 2c 20 6f 6e 20 |n Bernst|ein, on |
|00000b30| 74 68 65 20 49 6e 74 65 | 72 6e 65 74 0a 58 61 74 |the Inte|rnet.Xat|
|00000b40| 20 62 72 6e 73 74 6e 64 | 40 6e 79 75 2e 65 64 75 | brnstnd|@nyu.edu|
|00000b50| 2e 20 4c 65 74 20 68 69 | 6d 20 6b 6e 6f 77 20 79 |. Let hi|m know y|
|00000b60| 6f 75 72 20 63 6f 6d 70 | 75 74 65 72 20 6d 6f 64 |our comp|uter mod|
|00000b70| 65 6c 2c 20 4f 53 20 76 | 65 72 73 69 6f 6e 2c 20 |el, OS v|ersion, |
|00000b80| 61 6e 64 0a 58 77 68 61 | 74 20 63 68 61 6e 67 65 |and.Xwha|t change|
|00000b90| 73 20 79 6f 75 20 68 61 | 64 20 74 6f 20 6d 61 6b |s you ha|d to mak|
|00000ba0| 65 2e 20 49 66 20 79 6f | 75 20 68 61 76 65 20 61 |e. If yo|u have a|
|00000bb0| 6e 79 20 74 72 6f 75 62 | 6c 65 2c 20 70 6c 65 61 |ny troub|le, plea|
|00000bc0| 73 65 20 61 6c 73 6f 20 | 67 65 74 0a 58 69 6e 20 |se also |get.Xin |
|00000bd0| 74 6f 75 63 68 20 77 69 | 74 68 20 74 68 65 20 61 |touch wi|th the a|
|00000be0| 75 74 68 6f 72 2e 20 49 | 66 20 79 6f 75 20 68 61 |uthor. I|f you ha|
|00000bf0| 76 65 20 61 20 64 69 66 | 66 65 72 65 6e 74 20 6b |ve a dif|ferent k|
|00000c00| 69 6e 64 20 6f 66 20 73 | 79 73 74 65 6d 20 77 69 |ind of s|ystem wi|
|00000c10| 74 68 0a 58 70 73 65 75 | 64 6f 2d 74 65 72 6d 69 |th.Xpseu|do-termi|
|00000c20| 6e 61 6c 20 73 75 70 70 | 6f 72 74 20 74 68 61 74 |nal supp|ort that|
|00000c30| 20 63 6f 75 6c 64 20 75 | 73 65 20 61 20 70 74 79 | could u|se a pty|
|00000c40| 20 70 6f 72 74 2c 20 74 | 68 65 20 61 75 74 68 6f | port, t|he autho|
|00000c50| 72 20 77 6f 75 6c 64 0a | 58 6c 6f 76 65 20 74 6f |r would.|Xlove to|
|00000c60| 20 68 65 61 72 20 61 62 | 6f 75 74 20 69 74 2e 0a | hear ab|out it..|
|00000c70| 58 0a 58 4f 6e 65 20 6e | 6f 74 65 3a 20 4c 69 6b |X.XOne n|ote: Lik|
|00000c80| 65 20 61 6c 6c 20 73 6f | 66 74 77 61 72 65 2c 20 |e all so|ftware, |
|00000c90| 70 74 79 20 63 6f 6d 65 | 73 20 77 69 74 68 6f 75 |pty come|s withou|
|00000ca0| 74 20 77 61 72 72 61 6e | 74 79 2c 20 74 6f 20 74 |t warran|ty, to t|
|00000cb0| 68 65 20 65 78 74 65 6e | 74 0a 58 70 65 72 6d 69 |he exten|t.Xpermi|
|00000cc0| 74 74 65 64 20 62 79 20 | 61 70 70 6c 69 63 61 62 |tted by |applicab|
|00000cd0| 6c 65 20 6c 61 77 2e 20 | 55 73 65 20 69 74 20 61 |le law. |Use it a|
|00000ce0| 74 20 79 6f 75 72 20 6f | 77 6e 20 72 69 73 6b 2e |t your o|wn risk.|
|00000cf0| 0a 58 0a 58 2d 2d 2d 2d | 2d 20 50 72 65 73 73 20 |.X.X----|- Press |
|00000d00| 72 65 74 75 72 6e 20 74 | 6f 20 63 6f 6e 74 69 6e |return t|o contin|
|00000d10| 75 65 2e 20 0a 58 0a 58 | 49 20 61 73 73 75 6d 65 |ue. .X.X|I assume|
|00000d20| 20 74 68 61 74 20 79 6f | 75 20 64 6f 6e 27 74 20 | that yo|u don't |
|00000d30| 77 61 6e 74 20 74 6f 20 | 6d 61 6b 65 20 61 6e 79 |want to |make any|
|00000d40| 20 6d 61 6a 6f 72 20 63 | 68 61 6e 67 65 73 0a 58 | major c|hanges.X|
|00000d50| 74 6f 20 79 6f 75 72 20 | 63 6f 6d 70 75 74 65 72 |to your |computer|
|00000d60| 20 6a 75 73 74 20 74 6f | 20 74 61 6b 65 20 61 64 | just to| take ad|
|00000d70| 76 61 6e 74 61 67 65 20 | 6f 66 20 70 74 79 27 73 |vantage |of pty's|
|00000d80| 20 63 61 70 61 62 69 6c | 69 74 69 65 73 2e 0a 58 | capabil|ities..X|
|00000d90| 59 6f 75 20 6d 69 67 68 | 74 20 6e 6f 74 20 65 76 |You migh|t not ev|
|00000da0| 65 6e 20 68 61 76 65 20 | 61 20 70 72 69 76 69 6c |en have |a privil|
|00000db0| 65 67 65 64 20 61 63 63 | 6f 75 6e 74 2c 20 66 6f |eged acc|ount, fo|
|00000dc0| 72 20 61 6c 6c 20 49 20 | 6b 6e 6f 77 2e 0a 58 0a |r all I |know..X.|
|00000dd0| 58 54 68 65 20 66 69 72 | 73 74 20 6d 61 6a 6f 72 |XThe fir|st major|
|00000de0| 20 64 65 63 69 73 69 6f | 6e 20 79 6f 75 20 68 61 | decisio|n you ha|
|00000df0| 76 65 20 74 6f 20 6d 61 | 6b 65 20 69 73 20 77 68 |ve to ma|ke is wh|
|00000e00| 61 74 20 70 72 69 76 69 | 6c 65 67 65 73 20 74 6f |at privi|leges to|
|00000e10| 20 67 69 76 65 20 70 74 | 79 2e 0a 58 4f 62 76 69 | give pt|y..XObvi|
|00000e20| 6f 75 73 6c 79 20 69 66 | 20 79 6f 75 20 64 6f 6e |ously if| you don|
|00000e30| 27 74 20 68 61 76 65 20 | 70 72 69 76 69 6c 65 67 |'t have |privileg|
|00000e40| 65 73 20 74 68 65 6e 20 | 70 74 79 20 77 6f 6e 27 |es then |pty won'|
|00000e50| 74 20 65 69 74 68 65 72 | 3b 0a 58 74 68 69 73 20 |t either|;.Xthis |
|00000e60| 69 73 20 43 61 73 65 20 | 55 4e 2e 0a 58 0a 58 2d |is Case |UN..X.X-|
|00000e70| 2d 2d 2d 2d 20 50 72 65 | 73 73 20 72 65 74 75 72 |---- Pre|ss retur|
|00000e80| 6e 20 74 6f 20 63 6f 6e | 74 69 6e 75 65 2e 20 0a |n to con|tinue. .|
|00000e90| 58 0a 58 54 68 65 72 65 | 20 61 72 65 20 73 65 76 |X.XThere| are sev|
|00000ea0| 65 72 61 6c 20 67 6f 6f | 64 20 72 65 61 73 6f 6e |eral goo|d reason|
|00000eb0| 73 20 66 6f 72 20 67 69 | 76 69 6e 67 20 70 72 6f |s for gi|ving pro|
|00000ec0| 67 72 61 6d 73 20 70 72 | 69 76 69 6c 65 67 65 73 |grams pr|ivileges|
|00000ed0| 2e 0a 58 4d 6f 73 74 20 | 69 6d 70 6f 72 74 61 6e |..XMost |importan|
|00000ee0| 74 6c 79 2c 20 70 72 69 | 76 69 6c 65 67 65 64 20 |tly, pri|vileged |
|00000ef0| 70 72 6f 67 72 61 6d 73 | 20 63 61 6e 20 70 72 65 |programs| can pre|
|00000f00| 63 69 73 65 6c 79 20 63 | 6f 6e 74 72 6f 6c 20 61 |cisely c|ontrol a|
|00000f10| 63 63 65 73 73 0a 58 74 | 6f 20 61 20 73 68 61 72 |ccess.Xt|o a shar|
|00000f20| 65 64 20 72 65 73 6f 75 | 72 63 65 2e 20 70 74 79 |ed resou|rce. pty|
|00000f30| 20 73 75 70 70 6f 72 74 | 73 20 61 6e 20 69 6e 74 | support|s an int|
|00000f40| 65 72 61 63 74 69 76 65 | 20 75 73 65 72 20 6c 69 |eractive| user li|
|00000f50| 73 74 20 69 6e 0a 58 2f | 65 74 63 2f 75 74 6d 70 |st in.X/|etc/utmp|
|00000f60| 2c 20 61 20 6c 6f 67 69 | 6e 2d 6c 6f 67 6f 75 74 |, a logi|n-logout|
|00000f70| 20 72 65 63 6f 72 64 20 | 69 6e 20 2f 75 73 72 2f | record |in /usr/|
|00000f80| 61 64 6d 2f 77 74 6d 70 | 2c 20 61 6e 64 20 63 6f |adm/wtmp|, and co|
|00000f90| 6e 74 72 6f 6c 6c 65 64 | 0a 58 61 63 63 65 73 73 |ntrolled|.Xaccess|
|00000fa0| 20 74 6f 20 74 68 65 20 | 70 73 65 75 64 6f 2d 74 | to the |pseudo-t|
|00000fb0| 65 72 6d 69 6e 61 6c 20 | 66 69 6c 65 73 20 74 68 |erminal |files th|
|00000fc0| 65 6d 73 65 6c 76 65 73 | 2c 20 69 6e 63 6c 75 64 |emselves|, includ|
|00000fd0| 69 6e 67 20 73 65 63 75 | 72 69 74 79 20 61 6e 64 |ing secu|rity and|
|00000fe0| 0a 58 6d 6f 64 65 20 63 | 68 61 6e 67 69 6e 67 2e |.Xmode c|hanging.|
|00000ff0| 20 4e 6f 6e 65 20 6f 66 | 20 74 68 65 73 65 20 61 | None of| these a|
|00001000| 72 65 20 70 6f 73 73 69 | 62 6c 65 20 69 66 20 70 |re possi|ble if p|
|00001010| 74 79 20 69 73 6e 27 74 | 20 73 65 74 75 69 64 2e |ty isn't| setuid.|
|00001020| 0a 58 0a 58 49 66 20 79 | 6f 75 72 20 73 79 73 74 |.X.XIf y|our syst|
|00001030| 65 6d 20 68 61 73 20 61 | 20 6c 6f 74 20 6d 6f 72 |em has a| lot mor|
|00001040| 65 20 74 74 79 20 73 65 | 63 75 72 69 74 79 20 74 |e tty se|curity t|
|00001050| 68 61 6e 20 75 73 75 61 | 6c 2c 20 79 6f 75 20 70 |han usua|l, you p|
|00001060| 72 6f 62 61 62 6c 79 0a | 58 77 6f 6e 27 74 20 62 |robably.|Xwon't b|
|00001070| 65 20 61 62 6c 65 20 74 | 6f 20 72 75 6e 20 70 74 |e able t|o run pt|
|00001080| 79 20 77 69 74 68 6f 75 | 74 20 70 72 69 76 69 6c |y withou|t privil|
|00001090| 65 67 65 73 2e 20 28 48 | 6f 77 65 76 65 72 2c 20 |eges. (H|owever, |
|000010a0| 69 66 20 79 6f 75 72 20 | 73 79 73 74 65 6d 0a 58 |if your |system.X|
|000010b0| 68 61 73 20 61 20 6c 6f | 74 20 6d 6f 72 65 20 74 |has a lo|t more t|
|000010c0| 74 79 20 73 65 63 75 72 | 69 74 79 20 74 68 61 6e |ty secur|ity than|
|000010d0| 20 75 73 75 61 6c 2c 20 | 69 74 27 73 20 61 6c 6d | usual, |it's alm|
|000010e0| 6f 73 74 20 63 65 72 74 | 61 69 6e 6c 79 20 72 75 |ost cert|ainly ru|
|000010f0| 6e 6e 69 6e 67 0a 58 70 | 74 79 20 61 6e 79 77 61 |nning.Xp|ty anywa|
|00001100| 79 2e 29 0a 58 0a 58 2d | 2d 2d 2d 2d 20 50 72 65 |y.).X.X-|---- Pre|
|00001110| 73 73 20 72 65 74 75 72 | 6e 20 74 6f 20 63 6f 6e |ss retur|n to con|
|00001120| 74 69 6e 75 65 2e 20 0a | 58 0a 58 49 66 20 79 6f |tinue. .|X.XIf yo|
|00001130| 75 20 64 6f 20 77 61 6e | 74 20 70 74 79 20 74 6f |u do wan|t pty to|
|00001140| 20 68 61 76 65 20 70 72 | 69 76 69 6c 65 67 65 73 | have pr|ivileges|
|00001150| 2c 20 79 6f 75 20 68 61 | 76 65 20 74 6f 20 64 65 |, you ha|ve to de|
|00001160| 63 69 64 65 20 62 65 74 | 77 65 65 6e 0a 58 73 65 |cide bet|ween.Xse|
|00001170| 74 74 69 6e 67 20 75 70 | 20 70 74 79 20 61 73 20 |tting up| pty as |
|00001180| 72 6f 6f 74 20 28 43 61 | 73 65 20 52 4f 4f 54 29 |root (Ca|se ROOT)|
|00001190| 20 6f 72 20 61 73 20 73 | 6f 6d 65 20 6f 74 68 65 | or as s|ome othe|
|000011a0| 72 20 75 73 65 72 2c 20 | 73 61 79 20 60 60 70 74 |r user, |say ``pt|
|000011b0| 79 27 27 0a 58 28 43 61 | 73 65 20 50 54 59 29 2e |y''.X(Ca|se PTY).|
|000011c0| 20 53 74 61 79 69 6e 67 | 20 61 77 61 79 20 66 72 | Staying| away fr|
|000011d0| 6f 6d 20 72 6f 6f 74 20 | 68 61 73 20 74 68 65 20 |om root |has the |
|000011e0| 61 64 76 61 6e 74 61 67 | 65 20 74 68 61 74 20 70 |advantag|e that p|
|000011f0| 72 6f 62 6c 65 6d 73 0a | 58 63 61 6e 27 74 20 70 |roblems.|Xcan't p|
|00001200| 6f 73 73 69 62 6c 79 20 | 64 65 73 74 72 6f 79 20 |ossibly |destroy |
|00001210| 61 6c 6c 20 73 65 63 75 | 72 69 74 79 20 69 6e 20 |all secu|rity in |
|00001220| 6f 6e 65 20 62 6c 6f 77 | 2e 20 48 6f 77 65 76 65 |one blow|. Howeve|
|00001230| 72 2c 20 72 6f 6f 74 20 | 68 61 73 0a 58 73 65 76 |r, root |has.Xsev|
|00001240| 65 72 61 6c 20 61 64 76 | 61 6e 74 61 67 65 73 2c |eral adv|antages,|
|00001250| 20 6d 61 69 6e 6c 79 20 | 62 65 63 61 75 73 65 20 | mainly |because |
|00001260| 6f 66 20 42 53 44 20 6c | 69 6d 69 74 61 74 69 6f |of BSD l|imitatio|
|00001270| 6e 73 3a 20 31 2e 20 41 | 20 70 72 6f 63 65 73 73 |ns: 1. A| process|
|00001280| 0a 58 63 61 6e 27 74 20 | 63 68 61 6e 67 65 20 6f |.Xcan't |change o|
|00001290| 77 6e 65 72 73 68 69 70 | 20 6f 66 20 61 20 66 69 |wnership| of a fi|
|000012a0| 6c 65 20 62 65 74 77 65 | 65 6e 20 69 74 73 20 65 |le betwe|en its e|
|000012b0| 75 69 64 20 61 6e 64 20 | 75 69 64 2e 20 4f 6e 6c |uid and |uid. Onl|
|000012c0| 79 20 72 6f 6f 74 0a 58 | 63 61 6e 20 63 68 61 6e |y root.X|can chan|
|000012d0| 67 65 20 6f 77 6e 65 72 | 73 68 69 70 2e 20 49 74 |ge owner|ship. It|
|000012e0| 20 73 68 6f 75 6c 64 6e | 27 74 20 62 65 20 6e 65 | shouldn|'t be ne|
|000012f0| 63 65 73 73 61 72 79 20 | 74 6f 20 63 68 61 6e 67 |cessary |to chang|
|00001300| 65 20 6f 77 6e 65 72 73 | 68 69 70 0a 58 6f 66 20 |e owners|hip.Xof |
|00001310| 70 74 79 73 20 61 6e 79 | 77 61 79 2c 20 62 75 74 |ptys any|way, but|
|00001320| 20 74 68 61 74 27 73 20 | 77 68 61 74 20 6d 61 6e | that's |what man|
|00001330| 79 20 70 72 6f 67 72 61 | 6d 73 20 61 73 73 75 6d |y progra|ms assum|
|00001340| 65 2e 20 32 2e 20 4d 41 | 58 55 50 52 43 20 69 6e |e. 2. MA|XUPRC in|
|00001350| 0a 58 3c 73 79 73 2f 70 | 61 72 61 6d 2e 68 3e 20 |.X<sys/p|aram.h> |
|00001360| 6c 69 6d 69 74 73 20 74 | 68 65 20 6e 75 6d 62 65 |limits t|he numbe|
|00001370| 72 20 6f 66 20 70 72 6f | 63 65 73 73 65 73 20 75 |r of pro|cesses u|
|00001380| 6e 64 65 72 20 61 20 67 | 69 76 65 6e 20 2a 65 66 |nder a g|iven *ef|
|00001390| 66 65 63 74 69 76 65 2a | 0a 58 75 69 64 2e 20 54 |fective*|.Xuid. T|
|000013a0| 68 69 73 20 61 62 73 6f | 6c 75 74 65 6c 79 20 69 |his abso|lutely i|
|000013b0| 64 69 6f 74 69 63 20 62 | 65 68 61 76 69 6f 72 20 |diotic b|ehavior |
|000013c0| 69 73 20 61 20 73 65 72 | 69 6f 75 73 20 70 72 6f |is a ser|ious pro|
|000013d0| 62 6c 65 6d 20 66 6f 72 | 20 70 72 6f 67 72 61 6d |blem for| program|
|000013e0| 73 0a 58 73 65 74 75 69 | 64 20 74 6f 20 61 6e 79 |s.Xsetui|d to any|
|000013f0| 74 68 69 6e 67 20 6f 74 | 68 65 72 20 74 68 61 6e |thing ot|her than|
|00001400| 20 72 6f 6f 74 2e 20 70 | 74 79 20 74 72 69 65 73 | root. p|ty tries|
|00001410| 20 74 6f 20 77 6f 72 6b | 20 61 72 6f 75 6e 64 20 | to work| around |
|00001420| 74 68 69 73 0a 58 70 72 | 6f 62 6c 65 6d 2c 20 62 |this.Xpr|oblem, b|
|00001430| 75 74 20 74 68 65 72 65 | 20 61 72 65 20 6e 6f 20 |ut there| are no |
|00001440| 74 72 75 65 20 73 6f 6c | 75 74 69 6f 6e 73 2e 20 |true sol|utions. |
|00001450| 33 2e 20 44 65 73 70 69 | 74 65 20 74 68 65 20 64 |3. Despi|te the d|
|00001460| 6f 63 75 6d 65 6e 74 61 | 74 69 6f 6e 0a 58 69 6e |ocumenta|tion.Xin|
|00001470| 20 6b 69 6c 6c 28 32 29 | 2c 20 6d 61 6e 79 20 6d | kill(2)|, many m|
|00001480| 61 63 68 69 6e 65 73 20 | 64 6f 6e 27 74 20 61 6c |achines |don't al|
|00001490| 6c 6f 77 20 6e 6f 6e 2d | 72 6f 6f 74 20 70 72 6f |low non-|root pro|
|000014a0| 63 65 73 73 65 73 20 74 | 6f 20 73 65 6e 64 0a 58 |cesses t|o send.X|
|000014b0| 43 4f 4e 54 20 74 6f 20 | 63 68 69 6c 64 72 65 6e |CONT to |children|
|000014c0| 20 77 69 74 68 20 61 20 | 64 69 66 66 65 72 65 6e | with a |differen|
|000014d0| 74 20 75 69 64 2e 20 55 | 6e 6c 69 6b 65 20 61 6c |t uid. U|nlike al|
|000014e0| 6d 6f 73 74 20 61 6c 6c | 20 6f 74 68 65 72 20 70 |most all| other p|
|000014f0| 72 6f 67 72 61 6d 73 2c | 0a 58 70 74 79 20 73 65 |rograms,|.Xpty se|
|00001500| 6e 73 69 62 6c 79 20 68 | 61 6e 64 6c 65 73 20 69 |nsibly h|andles i|
|00001510| 74 73 20 63 68 69 6c 64 | 20 73 74 6f 70 70 69 6e |ts child| stoppin|
|00001520| 67 20 61 6e 64 20 72 65 | 73 74 61 72 74 69 6e 67 |g and re|starting|
|00001530| 3b 20 62 75 74 20 74 68 | 69 73 20 77 6f 6e 27 74 |; but th|is won't|
|00001540| 0a 58 77 6f 72 6b 20 6f | 6e 20 74 68 6f 73 65 20 |.Xwork o|n those |
|00001550| 6d 61 63 68 69 6e 65 73 | 20 69 66 20 70 74 79 20 |machines| if pty |
|00001560| 69 73 6e 27 74 20 72 6f | 6f 74 2e 0a 58 0a 58 59 |isn't ro|ot..X.XY|
|00001570| 6f 75 20 73 68 6f 75 6c | 64 20 64 65 63 69 64 65 |ou shoul|d decide|
|00001580| 20 6e 6f 77 20 62 65 74 | 77 65 65 6e 20 43 61 73 | now bet|ween Cas|
|00001590| 65 20 52 4f 4f 54 20 61 | 6e 64 20 43 61 73 65 20 |e ROOT a|nd Case |
|000015a0| 50 54 59 2e 0a 58 0a 58 | 2d 2d 2d 2d 2d 20 50 72 |PTY..X.X|----- Pr|
|000015b0| 65 73 73 20 72 65 74 75 | 72 6e 20 74 6f 20 63 6f |ess retu|rn to co|
|000015c0| 6e 74 69 6e 75 65 2e 20 | 0a 58 0a 58 57 68 65 74 |ntinue. |.X.XWhet|
|000015d0| 68 65 72 20 79 6f 75 27 | 76 65 20 64 65 63 69 64 |her you'|ve decid|
|000015e0| 65 64 20 6f 6e 20 52 4f | 4f 54 2c 20 50 54 59 2c |ed on RO|OT, PTY,|
|000015f0| 20 6f 72 20 55 4e 2c 0a | 58 6e 6f 77 20 69 73 20 | or UN,.|Xnow is |
|00001600| 74 68 65 20 74 69 6d 65 | 20 74 6f 20 63 68 65 63 |the time| to chec|
|00001610| 6b 20 74 68 65 20 73 65 | 63 75 72 69 74 79 20 6f |k the se|curity o|
|00001620| 66 20 74 68 65 20 65 6e | 74 69 72 65 20 70 74 79 |f the en|tire pty|
|00001630| 20 70 61 63 6b 61 67 65 | 2e 0a 58 49 74 27 64 20 | package|..XIt'd |
|00001640| 62 65 20 64 69 66 66 69 | 63 75 6c 74 20 66 6f 72 |be diffi|cult for|
|00001650| 20 61 6e 79 74 68 69 6e | 67 20 74 6f 20 73 6c 69 | anythin|g to sli|
|00001660| 70 20 74 68 72 6f 75 67 | 68 20 74 68 65 20 63 68 |p throug|h the ch|
|00001670| 65 63 6b 73 20 62 79 20 | 74 68 65 0a 58 61 75 74 |ecks by |the.Xaut|
|00001680| 68 6f 72 2c 20 74 65 73 | 74 65 72 73 2c 20 61 6e |hor, tes|ters, an|
|00001690| 64 20 73 6f 75 72 63 65 | 20 67 72 6f 75 70 20 6d |d source| group m|
|000016a0| 6f 64 65 72 61 74 6f 72 | 2c 20 62 75 74 20 79 6f |oderator|, but yo|
|000016b0| 75 20 73 68 6f 75 6c 64 | 20 74 61 6b 65 0a 58 61 |u should| take.Xa|
|000016c0| 74 20 6c 65 61 73 74 20 | 61 20 6d 6f 6d 65 6e 74 |t least |a moment|
|000016d0| 20 74 6f 20 6c 6f 6f 6b | 20 66 6f 72 20 79 6f 75 | to look| for you|
|000016e0| 72 20 70 65 74 20 73 65 | 63 75 72 69 74 79 20 70 |r pet se|curity p|
|000016f0| 65 65 76 65 73 2e 0a 58 | 0a 58 41 20 63 6f 75 70 |eeves..X|.XA coup|
|00001700| 6c 65 20 6f 66 20 73 65 | 63 75 72 69 74 79 20 6e |le of se|curity n|
|00001710| 6f 74 65 73 3a 20 54 68 | 65 20 6f 6e 6c 79 20 6f |otes: Th|e only o|
|00001720| 70 65 6e 28 2c 4f 5f 43 | 52 45 41 54 29 20 69 6e |pen(,O_C|REAT) in|
|00001730| 20 70 74 79 20 69 73 20 | 69 6e 0a 58 6d 61 73 74 | pty is |in.Xmast|
|00001740| 65 72 2e 63 2c 20 61 74 | 20 74 68 65 20 74 6f 70 |er.c, at| the top|
|00001750| 20 6f 66 20 6d 61 73 74 | 65 72 28 29 2c 20 6f 66 | of mast|er(), of|
|00001760| 20 61 20 66 69 6c 65 20 | 77 69 74 68 20 61 20 76 | a file |with a v|
|00001770| 65 72 79 20 72 65 73 74 | 72 69 63 74 65 64 0a 58 |ery rest|ricted.X|
|00001780| 66 6f 72 6d 20 63 6f 6e | 73 74 72 75 63 74 65 64 |form con|structed|
|00001790| 20 66 72 6f 6d 20 74 68 | 65 20 66 69 6c 65 6e 61 | from th|e filena|
|000017a0| 6d 65 20 6f 66 20 61 20 | 2f 64 65 76 2f 74 74 79 |me of a |/dev/tty|
|000017b0| 78 78 2e 20 54 68 65 72 | 65 20 61 72 65 20 6e 6f |xx. Ther|e are no|
|000017c0| 0a 58 63 72 65 61 74 28 | 29 73 2e 20 54 68 65 20 |.Xcreat(|)s. The |
|000017d0| 6f 6e 6c 79 20 62 69 6e | 64 28 29 20 69 73 20 69 |only bin|d() is i|
|000017e0| 6e 20 73 6f 63 6b 2e 63 | 27 73 20 70 74 79 5f 72 |n sock.c|'s pty_r|
|000017f0| 65 61 64 73 6f 63 6b 28 | 29 2c 20 77 68 69 63 68 |eadsock(|), which|
|00001800| 20 69 73 0a 58 63 61 6c | 6c 65 64 20 6f 6e 6c 79 | is.Xcal|led only|
|00001810| 20 66 72 6f 6d 20 6d 61 | 73 74 65 72 2e 63 27 73 | from ma|ster.c's|
|00001820| 20 6d 61 73 74 65 72 28 | 29 20 74 6f 20 63 72 65 | master(|) to cre|
|00001830| 61 74 65 20 61 20 73 6f | 63 6b 65 74 20 77 69 74 |ate a so|cket wit|
|00001840| 68 20 61 0a 58 73 69 6d | 69 6c 61 72 6c 79 20 72 |h a.Xsim|ilarly r|
|00001850| 65 73 74 72 69 63 74 65 | 64 20 6e 61 6d 65 2e 20 |estricte|d name. |
|00001860| 28 66 6e 73 74 79 20 69 | 73 20 63 68 61 6e 67 65 |(fnsty i|s change|
|00001870| 64 20 69 6e 20 73 69 67 | 6c 65 72 20 62 75 74 20 |d in sig|ler but |
|00001880| 6e 6f 74 20 69 6e 0a 58 | 6d 61 73 74 65 72 2e 29 |not in.X|master.)|
|00001890| 20 54 68 65 20 6f 6e 6c | 79 20 65 78 65 63 28 29 | The onl|y exec()|
|000018a0| 20 69 73 20 69 6e 20 73 | 6c 61 76 65 2e 63 2c 20 | is in s|lave.c, |
|000018b0| 61 66 74 65 72 20 61 20 | 66 6f 72 63 65 64 20 73 |after a |forced s|
|000018c0| 65 74 72 65 75 69 64 28 | 29 0a 58 74 6f 20 61 20 |etreuid(|).Xto a |
|000018d0| 75 69 64 20 74 68 61 74 | 20 69 73 20 6f 6e 6c 79 |uid that| is only|
|000018e0| 20 73 65 74 20 74 6f 20 | 67 65 74 75 69 64 28 29 | set to |getuid()|
|000018f0| 2e 20 75 6e 6c 69 6e 6b | 28 29 2c 20 6d 6b 64 69 |. unlink|(), mkdi|
|00001900| 72 28 29 2c 20 61 6e 64 | 20 72 65 6e 61 6d 65 28 |r(), and| rename(|
|00001910| 29 0a 58 61 72 65 20 6f | 6e 6c 79 20 75 73 65 64 |).Xare o|nly used|
|00001920| 20 77 69 74 68 20 72 65 | 73 74 72 69 63 74 65 64 | with re|stricted|
|00001930| 20 70 61 74 68 6e 61 6d | 65 73 2e 0a 58 0a 58 2d | pathnam|es..X.X-|
|00001940| 2d 2d 2d 2d 20 50 72 65 | 73 73 20 72 65 74 75 72 |---- Pre|ss retur|
|00001950| 6e 20 74 6f 20 63 6f 6e | 74 69 6e 75 65 2e 20 0a |n to con|tinue. .|
|00001960| 58 0a 58 49 6e 20 43 61 | 73 65 20 50 54 59 2c 20 |X.XIn Ca|se PTY, |
|00001970| 79 6f 75 20 68 61 76 65 | 20 74 6f 20 73 65 74 20 |you have| to set |
|00001980| 75 70 20 61 20 6e 65 77 | 20 75 69 64 2c 20 73 61 |up a new| uid, sa|
|00001990| 79 20 60 60 70 74 79 27 | 27 20 28 6f 72 20 77 68 |y ``pty'|' (or wh|
|000019a0| 61 74 65 76 65 72 0a 58 | 75 73 65 72 6e 61 6d 65 |atever.X|username|
|000019b0| 20 79 6f 75 20 77 61 6e | 74 29 2e 20 70 74 79 20 | you wan|t). pty |
|000019c0| 73 68 6f 75 6c 64 20 6e | 6f 74 20 61 6c 6c 6f 77 |should n|ot allow|
|000019d0| 20 6c 6f 67 69 6e 73 2e | 20 49 74 73 20 70 61 73 | logins.| Its pas|
|000019e0| 73 77 6f 72 64 20 73 68 | 6f 75 6c 64 0a 58 62 65 |sword sh|ould.Xbe|
|000019f0| 20 61 6e 20 61 73 74 65 | 72 69 73 6b 3b 20 69 74 | an aste|risk; it|
|00001a00| 73 20 68 6f 6d 65 20 64 | 69 72 65 63 74 6f 72 79 |s home d|irectory|
|00001a10| 20 73 68 6f 75 6c 64 20 | 62 65 20 2f 6e 6f 6e 65 | should |be /none|
|00001a20| 78 69 73 74 65 6e 74 3b | 20 69 74 73 20 73 68 65 |xistent;| its she|
|00001a30| 6c 6c 0a 58 73 68 6f 75 | 6c 64 20 62 65 20 2f 62 |ll.Xshou|ld be /b|
|00001a40| 69 6e 2f 74 72 75 65 2e | 20 49 6e 20 6f 74 68 65 |in/true.| In othe|
|00001a50| 72 20 77 6f 72 64 73 2c | 20 74 68 65 20 6f 6e 6c |r words,| the onl|
|00001a60| 79 20 61 63 63 65 73 73 | 20 74 6f 20 75 73 65 72 |y access| to user|
|00001a70| 20 70 74 79 0a 58 73 68 | 6f 75 6c 64 20 62 65 20 | pty.Xsh|ould be |
|00001a80| 74 68 72 6f 75 67 68 20 | 74 68 65 73 65 20 73 65 |through |these se|
|00001a90| 74 75 69 64 20 70 72 6f | 67 72 61 6d 73 2e 0a 58 |tuid pro|grams..X|
|00001aa0| 0a 58 49 6e 20 61 6e 79 | 20 70 72 69 76 69 6c 65 |.XIn any| privile|
|00001ab0| 67 65 64 20 63 61 73 65 | 20 79 6f 75 20 73 68 6f |ged case| you sho|
|00001ac0| 75 6c 64 20 68 61 76 65 | 20 67 72 6f 75 70 20 74 |uld have| group t|
|00001ad0| 74 79 2c 0a 58 77 68 69 | 63 68 20 6d 6f 73 74 20 |ty,.Xwhi|ch most |
|00001ae0| 42 53 44 20 34 2e 33 20 | 73 79 73 74 65 6d 73 20 |BSD 4.3 |systems |
|00001af0| 68 61 76 65 20 61 73 20 | 67 69 64 20 34 2e 20 0a |have as |gid 4. .|
|00001b00| 58 0a 58 52 75 6e 6e 69 | 6e 67 20 24 20 74 74 79 |X.XRunni|ng $ tty|
|00001b10| 67 72 6f 75 70 3d 22 60 | 73 65 64 20 2d 6e 20 27 |group="`|sed -n '|
|00001b20| 73 2f 5e 74 74 79 3a 5b | 5e 3a 5d 2a 3a 5c 28 2e |s/^tty:[|^:]*:\(.|
|00001b30| 2a 5c 29 3a 2e 2a 2f 5c | 31 2f 70 27 20 3c 20 2f |*\):.*/\|1/p' < /|
|00001b40| 65 74 63 2f 67 72 6f 75 | 70 60 22 20 2e 2e 2e 0a |etc/grou|p`" ....|
|00001b50| 58 0a 58 49 20 73 65 65 | 20 74 68 61 74 20 79 6f |X.XI see| that yo|
|00001b60| 75 20 68 61 76 65 20 61 | 20 74 74 79 20 67 72 6f |u have a| tty gro|
|00001b70| 75 70 2c 20 34 20 61 73 | 20 75 73 75 61 6c 2e 20 |up, 4 as| usual. |
|00001b80| 47 6f 6f 64 2e 0a 58 0a | 58 5b 4e 6f 74 65 3a 20 |Good..X.|X[Note: |
|00001b90| 55 6e 64 65 72 20 53 75 | 6e 4f 53 20 34 2e 30 2e |Under Su|nOS 4.0.|
|00001ba0| 33 2c 20 74 74 79 67 72 | 6f 75 70 20 63 6f 6d 65 |3, ttygr|oup come|
|00001bb0| 73 20 6f 75 74 20 74 6f | 20 34 2e 20 4f 6e 20 73 |s out to| 4. On s|
|00001bc0| 79 73 74 65 6d 73 20 77 | 68 65 72 65 20 69 74 0a |ystems w|here it.|
|00001bd0| 58 63 6f 6d 65 73 20 6f | 75 74 20 74 6f 20 6e 6f |Xcomes o|ut to no|
|00001be0| 74 68 69 6e 67 20 61 74 | 20 61 6c 6c 2c 20 79 6f |thing at| all, yo|
|00001bf0| 75 20 68 61 76 65 20 74 | 6f 20 61 64 64 20 74 68 |u have t|o add th|
|00001c00| 65 20 6c 69 6e 65 20 74 | 74 79 3a 34 3a 2a 3a 72 |e line t|ty:4:*:r|
|00001c10| 6f 6f 74 20 74 6f 0a 58 | 2f 65 74 63 2f 67 72 6f |oot to.X|/etc/gro|
|00001c20| 75 70 2e 20 4f 6e 20 73 | 79 73 74 65 6d 73 20 77 |up. On s|ystems w|
|00001c30| 68 65 72 65 20 74 68 65 | 20 74 74 79 20 67 72 6f |here the| tty gro|
|00001c40| 75 70 20 69 73 20 73 6f | 6d 65 74 68 69 6e 67 20 |up is so|mething |
|00001c50| 6f 74 68 65 72 20 74 68 | 61 6e 20 34 2c 0a 58 6a |other th|an 4,.Xj|
|00001c60| 75 73 74 20 72 65 6d 65 | 6d 62 65 72 20 69 74 2e |ust reme|mber it.|
|00001c70| 5d 0a 58 0a 58 2d 2d 2d | 2d 2d 20 50 72 65 73 73 |].X.X---|-- Press|
|00001c80| 20 72 65 74 75 72 6e 20 | 74 6f 20 63 6f 6e 74 69 | return |to conti|
|00001c90| 6e 75 65 2e 20 0a 58 0a | 58 4e 65 78 74 2c 20 77 |nue. .X.|XNext, w|
|00001ca0| 65 27 72 65 20 67 6f 69 | 6e 67 20 74 6f 20 64 72 |e're goi|ng to dr|
|00001cb0| 75 64 67 65 20 74 68 72 | 6f 75 67 68 20 74 68 65 |udge thr|ough the|
|00001cc0| 20 63 6f 6e 66 69 67 2e | 68 20 66 69 6c 65 2e 0a | config.|h file..|
|00001cd0| 58 0a 58 49 6e 20 43 61 | 73 65 73 20 52 4f 4f 54 |X.XIn Ca|ses ROOT|
|00001ce0| 20 6f 72 20 50 54 59 2c | 20 79 6f 75 20 68 61 76 | or PTY,| you hav|
|00001cf0| 65 20 74 6f 20 73 65 74 | 20 75 70 20 61 20 73 79 |e to set| up a sy|
|00001d00| 73 74 65 6d 2d 77 69 64 | 65 20 64 69 72 65 63 74 |stem-wid|e direct|
|00001d10| 6f 72 79 0a 58 66 6f 72 | 20 73 74 6f 72 69 6e 67 |ory.Xfor| storing|
|00001d20| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 61 62 6f | informa|tion abo|
|00001d30| 75 74 20 70 74 79 20 73 | 65 73 73 69 6f 6e 73 2e |ut pty s|essions.|
|00001d40| 20 28 41 20 73 65 73 73 | 69 6f 6e 20 69 73 20 61 | (A sess|ion is a|
|00001d50| 20 70 72 6f 67 72 61 6d | 0a 58 73 74 75 63 6b 20 | program|.Xstuck |
|00001d60| 75 6e 64 65 72 20 61 20 | 70 74 79 20 74 68 61 74 |under a |pty that|
|00001d70| 20 79 6f 75 20 63 61 6e | 20 64 69 73 63 6f 6e 6e | you can| disconn|
|00001d80| 65 63 74 20 61 6e 64 20 | 72 65 63 6f 6e 6e 65 63 |ect and |reconnec|
|00001d90| 74 2e 29 20 55 73 65 72 | 73 20 63 61 6e 0a 58 67 |t.) User|s can.Xg|
|00001da0| 65 74 20 61 72 6f 75 6e | 64 20 74 68 69 73 20 64 |et aroun|d this d|
|00001db0| 69 72 65 63 74 6f 72 79 | 2c 20 73 74 6f 72 69 6e |irectory|, storin|
|00001dc0| 67 20 74 68 65 20 69 6e | 66 6f 72 6d 61 74 69 6f |g the in|formatio|
|00001dd0| 6e 20 69 6e 20 7e 2f 2e | 70 74 79 20 61 6e 64 0a |n in ~/.|pty and.|
|00001de0| 58 72 65 76 6f 6b 69 6e | 67 20 61 6e 79 20 70 72 |Xrevokin|g any pr|
|00001df0| 69 76 69 6c 65 67 65 73 | 2c 20 77 69 74 68 20 70 |ivileges|, with p|
|00001e00| 74 79 20 2d 78 53 3b 20 | 79 6f 75 20 63 61 6e 20 |ty -xS; |you can |
|00001e10| 65 76 65 6e 20 6d 61 6b | 65 20 74 68 69 73 20 64 |even mak|e this d|
|00001e20| 65 66 61 75 6c 74 0a 58 | 62 79 20 73 65 74 74 69 |efault.X|by setti|
|00001e30| 6e 67 20 66 6c 61 67 78 | 73 65 74 75 69 64 20 3d |ng flagx|setuid =|
|00001e40| 20 30 20 69 6e 20 67 6c | 6f 62 61 6c 73 2e 63 2e | 0 in gl|obals.c.|
|00001e50| 20 48 6f 77 65 76 65 72 | 2c 20 61 20 73 69 6e 67 | However|, a sing|
|00001e60| 6c 65 20 73 79 73 74 65 | 6d 2d 77 69 64 65 0a 58 |le syste|m-wide.X|
|00001e70| 64 69 72 65 63 74 6f 72 | 79 20 69 73 20 73 61 66 |director|y is saf|
|00001e80| 65 72 2e 0a 58 0a 58 41 | 6e 79 77 61 79 2c 20 74 |er..X.XA|nyway, t|
|00001e90| 68 61 74 20 64 69 72 65 | 63 74 6f 72 79 2c 20 50 |hat dire|ctory, P|
|00001ea0| 54 59 44 49 52 2c 20 73 | 68 6f 75 6c 64 20 62 65 |TYDIR, s|hould be|
|00001eb0| 20 6d 6f 64 65 20 30 37 | 30 30 2c 20 6f 77 6e 65 | mode 07|00, owne|
|00001ec0| 72 20 72 6f 6f 74 20 69 | 6e 20 63 61 73 65 0a 58 |r root i|n case.X|
|00001ed0| 52 4f 4f 54 20 6f 72 20 | 70 74 79 20 69 6e 20 63 |ROOT or |pty in c|
|00001ee0| 61 73 65 20 50 54 59 2c | 20 67 72 6f 75 70 20 69 |ase PTY,| group i|
|00001ef0| 72 72 65 6c 65 76 61 6e | 74 2e 20 50 54 59 44 49 |rrelevan|t. PTYDI|
|00001f00| 52 20 69 73 20 64 65 66 | 69 6e 65 64 20 69 6e 20 |R is def|ined in |
|00001f10| 63 6f 6e 66 69 67 2e 68 | 0a 58 61 73 20 2f 75 73 |config.h|.Xas /us|
|00001f20| 72 2f 65 74 63 2f 70 74 | 79 20 62 79 20 64 65 66 |r/etc/pt|y by def|
|00001f30| 61 75 6c 74 3b 20 69 66 | 20 79 6f 75 20 63 68 6f |ault; if| you cho|
|00001f40| 6f 73 65 20 61 20 64 69 | 66 66 65 72 65 6e 74 20 |ose a di|fferent |
|00001f50| 64 69 72 65 63 74 6f 72 | 79 2c 20 61 64 64 0a 58 |director|y, add.X|
|00001f60| 2d 44 50 54 59 44 49 52 | 3d 5c 22 2f 77 68 61 74 |-DPTYDIR|=\"/what|
|00001f70| 2f 65 76 65 72 2f 64 69 | 72 2f 65 63 74 2f 6f 72 |/ever/di|r/ect/or|
|00001f80| 79 5c 22 20 74 6f 20 43 | 43 4f 50 54 53 20 69 6e |y\" to C|COPTS in|
|00001f90| 20 74 68 65 20 4d 61 6b | 65 66 69 6c 65 2e 0a 58 | the Mak|efile..X|
|00001fa0| 0a 58 49 6e 20 43 61 73 | 65 20 55 4e 2c 20 79 6f |.XIn Cas|e UN, yo|
|00001fb0| 75 20 6d 61 79 20 77 61 | 6e 74 20 74 6f 20 73 65 |u may wa|nt to se|
|00001fc0| 74 20 75 70 20 61 20 64 | 69 72 65 63 74 6f 72 79 |t up a d|irectory|
|00001fd0| 20 7e 2f 50 54 59 20 69 | 6e 73 69 64 65 20 79 6f | ~/PTY i|nside yo|
|00001fe0| 75 72 20 68 6f 6d 65 0a | 58 64 69 72 65 63 74 6f |ur home.|Xdirecto|
|00001ff0| 72 79 2c 20 61 6e 64 20 | 73 65 74 20 50 54 59 44 |ry, and |set PTYD|
|00002000| 49 52 20 74 6f 20 74 68 | 61 74 3b 20 79 6f 75 20 |IR to th|at; you |
|00002010| 6d 61 79 20 77 61 6e 74 | 20 74 6f 20 73 65 74 20 |may want| to set |
|00002020| 66 6c 61 67 78 73 65 74 | 75 69 64 20 3d 20 30 0a |flagxset|uid = 0.|
|00002030| 58 69 6e 20 67 6c 6f 62 | 61 6c 73 2e 63 3b 20 6f |Xin glob|als.c; o|
|00002040| 72 20 79 6f 75 20 6d 61 | 79 20 77 61 6e 74 20 74 |r you ma|y want t|
|00002050| 6f 20 6a 75 73 74 20 74 | 79 70 65 20 2d 78 53 20 |o just t|ype -xS |
|00002060| 74 6f 20 70 74 79 20 61 | 6c 6c 20 74 68 65 20 74 |to pty a|ll the t|
|00002070| 69 6d 65 2e 20 49 0a 58 | 72 65 63 6f 6d 6d 65 6e |ime. I.X|recommen|
|00002080| 64 20 74 68 65 20 66 69 | 72 73 74 20 73 74 72 61 |d the fi|rst stra|
|00002090| 74 65 67 79 2e 0a 58 0a | 58 2d 2d 2d 2d 2d 20 50 |tegy..X.|X----- P|
|000020a0| 72 65 73 73 20 72 65 74 | 75 72 6e 20 74 6f 20 63 |ress ret|urn to c|
|000020b0| 6f 6e 74 69 6e 75 65 2e | 20 0a 58 0a 58 4e 65 78 |ontinue.| .X.XNex|
|000020c0| 74 20 63 6f 6d 65 20 70 | 73 65 75 64 6f 2d 74 65 |t come p|seudo-te|
|000020d0| 72 6d 69 6e 61 6c 20 70 | 61 74 68 6e 61 6d 65 73 |rminal p|athnames|
|000020e0| 2e 20 49 20 61 73 73 75 | 6d 65 20 74 68 61 74 20 |. I assu|me that |
|000020f0| 79 6f 75 72 20 70 74 79 | 73 20 61 72 65 0a 58 6c |your pty|s are.Xl|
|00002100| 61 62 65 6c 6c 65 64 20 | 61 73 20 2f 64 65 76 2f |abelled |as /dev/|
|00002110| 70 74 79 78 78 20 61 6e | 64 20 2f 64 65 76 2f 74 |ptyxx an|d /dev/t|
|00002120| 74 79 78 78 2c 20 77 68 | 65 72 65 20 78 78 20 69 |tyxx, wh|ere xx i|
|00002130| 73 20 61 6e 79 20 74 77 | 6f 2d 6c 65 74 74 65 72 |s any tw|o-letter|
|00002140| 0a 58 65 78 74 65 6e 73 | 69 6f 6e 2e 20 70 74 79 |.Xextens|ion. pty|
|00002150| 20 63 61 6e 20 73 75 70 | 70 6f 72 74 20 61 6e 79 | can sup|port any|
|00002160| 20 69 6e 69 74 69 61 6c | 20 73 74 72 69 6e 67 73 | initial| strings|
|00002170| 20 69 6e 73 74 65 61 64 | 20 6f 66 20 74 68 65 73 | instead| of thes|
|00002180| 65 2c 0a 58 62 75 74 20 | 73 6f 6d 65 20 6f 66 20 |e,.Xbut |some of |
|00002190| 74 68 65 20 75 74 69 6c | 69 74 69 65 73 20 68 61 |the util|ities ha|
|000021a0| 76 65 20 2f 64 65 76 2f | 74 74 79 20 68 61 72 64 |ve /dev/|tty hard|
|000021b0| 63 6f 64 65 64 2c 20 61 | 6e 64 20 6c 6f 74 73 20 |coded, a|nd lots |
|000021c0| 6f 66 20 6f 74 68 65 72 | 0a 58 70 72 6f 67 72 61 |of other|.Xprogra|
|000021d0| 6d 73 20 72 75 6e 6e 69 | 6e 67 20 61 72 6f 75 6e |ms runni|ng aroun|
|000021e0| 64 20 61 73 73 75 6d 65 | 20 74 68 6f 73 65 20 6e |d assume| those n|
|000021f0| 61 6d 65 73 2e 20 49 66 | 20 79 6f 75 27 72 65 20 |ames. If| you're |
|00002200| 64 65 73 70 65 72 61 74 | 65 2c 0a 58 64 65 66 69 |desperat|e,.Xdefi|
|00002210| 6e 65 20 44 45 56 4d 54 | 59 20 61 6e 64 20 44 45 |ne DEVMT|Y and DE|
|00002220| 56 53 54 59 20 69 6e 20 | 74 68 65 20 4d 61 6b 65 |VSTY in |the Make|
|00002230| 66 69 6c 65 2c 20 61 6e | 64 20 66 69 67 75 72 65 |file, an|d figure|
|00002240| 20 6f 75 74 20 77 68 61 | 74 20 68 61 73 20 74 6f | out wha|t has to|
|00002250| 0a 58 62 65 20 63 68 61 | 6e 67 65 64 20 69 6e 20 |.Xbe cha|nged in |
|00002260| 75 74 69 6c 2f 2a 2e 20 | 28 53 6f 72 72 79 2e 29 |util/*. |(Sorry.)|
|00002270| 0a 58 0a 58 2d 2d 2d 2d | 2d 20 50 72 65 73 73 20 |.X.X----|- Press |
|00002280| 72 65 74 75 72 6e 20 74 | 6f 20 63 6f 6e 74 69 6e |return t|o contin|
|00002290| 75 65 2e 20 0a 58 0a 58 | 54 68 65 20 65 78 74 65 |ue. .X.X|The exte|
|000022a0| 6e 73 69 6f 6e 20 69 73 | 20 74 72 61 64 69 74 69 |nsion is| traditi|
|000022b0| 6f 6e 61 6c 6c 79 20 5b | 70 2d 7a 61 2d 6f 5d 5b |onally [|p-za-o][|
|000022c0| 30 2d 39 61 2d 66 5d 2e | 20 54 68 65 20 66 69 72 |0-9a-f].| The fir|
|000022d0| 73 74 20 6c 65 74 74 65 | 72 20 6f 66 20 74 68 65 |st lette|r of the|
|000022e0| 0a 58 73 65 63 6f 6e 64 | 20 73 74 72 69 6e 67 20 |.Xsecond| string |
|000022f0| 69 73 20 73 70 65 63 69 | 61 6c 3a 20 69 66 20 2f |is speci|al: if /|
|00002300| 64 65 76 2f 74 74 79 71 | 30 20 64 6f 65 73 6e 27 |dev/ttyq|0 doesn'|
|00002310| 74 20 65 78 69 73 74 2c | 20 66 6f 72 20 65 78 61 |t exist,| for exa|
|00002320| 6d 70 6c 65 2c 20 74 68 | 65 6e 0a 58 6e 6f 6e 65 |mple, th|en.Xnone|
|00002330| 20 6f 66 20 2f 64 65 76 | 2f 74 74 79 71 5b 30 2d | of /dev|/ttyq[0-|
|00002340| 39 61 2d 66 5d 20 77 69 | 6c 6c 20 62 65 20 75 73 |9a-f] wi|ll be us|
|00002350| 65 64 2e 20 28 54 68 61 | 74 27 73 20 63 61 6c 6c |ed. (Tha|t's call|
|00002360| 65 64 20 61 20 70 74 79 | 20 62 61 6e 6b 2e 29 0a |ed a pty| bank.).|
|00002370| 58 0a 58 59 6f 75 20 63 | 61 6e 20 63 68 61 6e 67 |X.XYou c|an chang|
|00002380| 65 20 74 68 6f 73 65 20 | 73 74 72 69 6e 67 73 20 |e those |strings |
|00002390| 62 79 20 64 65 66 69 6e | 69 6e 67 2c 20 65 2e 67 |by defin|ing, e.g|
|000023a0| 2e 2c 20 50 54 59 31 3d | 5c 22 41 42 43 44 45 46 |., PTY1=|\"ABCDEF|
|000023b0| 47 5c 22 20 6f 72 0a 58 | 50 54 59 32 3d 5c 22 30 |G\" or.X|PTY2=\"0|
|000023c0| 32 34 36 38 61 62 66 71 | 5c 22 20 69 6e 20 74 68 |2468abfq|\" in th|
|000023d0| 65 20 4d 61 6b 65 66 69 | 6c 65 2e 20 59 6f 75 20 |e Makefi|le. You |
|000023e0| 68 61 76 65 20 61 74 20 | 6c 65 61 73 74 20 66 6f |have at |least fo|
|000023f0| 75 72 20 63 68 6f 69 63 | 65 73 20 68 65 72 65 3a |ur choic|es here:|
|00002400| 0a 58 31 2e 20 47 69 76 | 65 20 70 74 79 20 69 74 |.X1. Giv|e pty it|
|00002410| 73 20 6f 77 6e 2c 20 6e | 65 77 2c 20 62 61 6e 6b |s own, n|ew, bank|
|00002420| 73 20 6f 66 20 6e 65 77 | 20 70 73 65 75 64 6f 2d |s of new| pseudo-|
|00002430| 74 65 72 6d 69 6e 61 6c | 73 20 77 69 74 68 20 77 |terminal|s with w|
|00002440| 65 69 72 64 20 62 61 6e | 6b 0a 58 6e 61 6d 65 73 |eird ban|k.Xnames|
|00002450| 20 6e 6f 74 20 69 6e 63 | 6c 75 64 69 6e 67 20 61 | not inc|luding a|
|00002460| 20 74 68 72 6f 75 67 68 | 20 7a 2c 20 61 6e 64 20 | through| z, and |
|00002470| 64 65 66 69 6e 65 20 50 | 54 59 31 20 61 70 70 72 |define P|TY1 appr|
|00002480| 6f 70 72 69 61 74 65 6c | 79 2e 20 70 74 79 20 77 |opriatel|y. pty w|
|00002490| 69 6c 6c 0a 58 6f 6e 6c | 79 20 75 73 65 20 74 68 |ill.Xonl|y use th|
|000024a0| 6f 73 65 20 6e 65 77 20 | 70 74 79 73 2c 20 61 6e |ose new |ptys, an|
|000024b0| 64 20 6f 6c 64 65 72 20 | 70 72 6f 67 72 61 6d 73 |d older |programs|
|000024c0| 20 77 69 6c 6c 20 6a 75 | 73 74 20 75 73 65 20 74 | will ju|st use t|
|000024d0| 68 65 20 6f 6c 64 20 70 | 74 79 73 2e 0a 58 54 68 |he old p|tys..XTh|
|000024e0| 69 73 20 6d 61 79 20 72 | 65 71 75 69 72 65 20 72 |is may r|equire r|
|000024f0| 65 63 6f 6e 66 69 67 75 | 72 69 6e 67 20 79 6f 75 |econfigu|ring you|
|00002500| 72 20 73 79 73 74 65 6d | 20 66 6f 72 20 74 68 65 |r system| for the|
|00002510| 20 6c 61 72 67 65 72 20 | 6e 75 6d 62 65 72 20 6f | larger |number o|
|00002520| 66 0a 58 74 65 72 6d 69 | 6e 61 6c 73 2e 20 32 2e |f.Xtermi|nals. 2.|
|00002530| 20 47 69 76 65 20 70 74 | 79 20 73 6f 6d 65 20 6e | Give pt|y some n|
|00002540| 65 77 20 62 61 6e 6b 73 | 2c 20 61 6e 64 20 74 61 |ew banks|, and ta|
|00002550| 6b 65 20 6f 75 74 20 73 | 6f 6d 65 20 6f 6c 64 20 |ke out s|ome old |
|00002560| 6f 6e 65 73 20 74 6f 0a | 58 6d 61 6b 65 20 75 70 |ones to.|Xmake up|
|00002570| 20 66 6f 72 20 69 74 2e | 20 33 2e 20 47 69 76 65 | for it.| 3. Give|
|00002580| 20 70 74 79 20 61 20 63 | 68 75 6e 6b 20 6f 66 20 | pty a c|hunk of |
|00002590| 74 68 65 20 6f 6c 64 20 | 62 61 6e 6b 73 2e 20 34 |the old |banks. 4|
|000025a0| 2e 20 47 69 76 65 20 70 | 74 79 20 61 6c 6c 0a 58 |. Give p|ty all.X|
|000025b0| 74 68 65 20 6f 6c 64 20 | 62 61 6e 6b 73 2e 0a 58 |the old |banks..X|
|000025c0| 0a 58 4e 6f 74 65 20 74 | 68 61 74 20 70 74 79 20 |.XNote t|hat pty |
|000025d0| 73 65 61 72 63 68 65 73 | 20 72 61 6e 64 6f 6d 6c |searches| randoml|
|000025e0| 79 20 74 68 72 6f 75 67 | 68 20 50 54 59 31 20 61 |y throug|h PTY1 a|
|000025f0| 6e 64 20 50 54 59 32 20 | 62 79 20 64 65 66 61 75 |nd PTY2 |by defau|
|00002600| 6c 74 3b 20 66 6f 72 0a | 58 65 66 66 69 63 69 65 |lt; for.|Xefficie|
|00002610| 6e 63 79 2c 20 50 54 59 | 31 20 72 65 61 6c 6c 79 |ncy, PTY|1 really|
|00002620| 20 73 68 6f 75 6c 64 20 | 72 65 66 6c 65 63 74 20 | should |reflect |
|00002630| 65 78 61 63 74 6c 79 20 | 74 68 65 20 70 74 79 20 |exactly |the pty |
|00002640| 62 61 6e 6b 73 20 79 6f | 75 20 68 61 76 65 2e 0a |banks yo|u have..|
|00002650| 58 0a 58 2d 2d 2d 2d 2d | 20 50 72 65 73 73 20 72 |X.X-----| Press r|
|00002660| 65 74 75 72 6e 20 74 6f | 20 63 6f 6e 74 69 6e 75 |eturn to| continu|
|00002670| 65 2e 20 0a 58 0a 58 53 | 6f 20 6e 6f 77 20 79 6f |e. .X.XS|o now yo|
|00002680| 75 27 76 65 20 64 65 63 | 69 64 65 64 20 6f 6e 20 |u've dec|ided on |
|00002690| 6e 65 77 20 70 74 79 73 | 2c 20 6f 72 20 73 65 74 |new ptys|, or set|
|000026a0| 20 61 73 69 64 65 20 73 | 6f 6d 65 20 6f 72 20 61 | aside s|ome or a|
|000026b0| 6c 6c 20 6f 66 20 79 6f | 75 72 0a 58 6f 6c 64 20 |ll of yo|ur.Xold |
|000026c0| 70 74 79 73 2c 20 61 6e | 64 20 63 68 61 6e 67 65 |ptys, an|d change|
|000026d0| 64 20 50 54 59 31 20 61 | 6e 64 20 50 54 59 32 20 |d PTY1 a|nd PTY2 |
|000026e0| 61 70 70 72 6f 70 72 69 | 61 74 65 6c 79 2e 20 42 |appropri|ately. B|
|000026f0| 65 63 61 75 73 65 20 42 | 53 44 20 67 69 76 65 73 |ecause B|SD gives|
|00002700| 20 61 0a 58 70 72 6f 63 | 65 73 73 20 76 65 72 79 | a.Xproc|ess very|
|00002710| 20 6c 69 74 74 6c 65 20 | 63 6f 6e 74 72 6f 6c 20 | little |control |
|00002720| 6f 76 65 72 20 69 74 73 | 20 63 6f 6e 74 72 6f 6c |over its| control|
|00002730| 6c 69 6e 67 20 74 65 72 | 6d 69 6e 61 6c 2c 20 70 |ling ter|minal, p|
|00002740| 74 79 20 68 61 73 20 74 | 6f 0a 58 70 61 73 73 20 |ty has t|o.Xpass |
|00002750| 61 20 74 65 72 6d 69 6e | 61 6c 20 6e 61 6d 65 20 |a termin|al name |
|00002760| 65 78 70 6c 69 63 69 74 | 6c 79 20 77 68 65 6e 20 |explicit|ly when |
|00002770| 69 74 20 72 65 63 6f 6e | 6e 65 63 74 73 2e 20 49 |it recon|nects. I|
|00002780| 66 20 61 6e 79 20 6f 66 | 20 79 6f 75 72 20 74 74 |f any of| your tt|
|00002790| 79 0a 58 28 6e 6f 74 20 | 6a 75 73 74 20 70 73 65 |y.X(not |just pse|
|000027a0| 75 64 6f 2d 74 74 79 21 | 29 20 66 69 6c 65 6e 61 |udo-tty!|) filena|
|000027b0| 6d 65 73 20 61 72 65 20 | 6c 6f 6e 67 65 72 20 74 |mes are |longer t|
|000027c0| 68 61 6e 20 33 30 20 63 | 68 61 72 61 63 74 65 72 |han 30 c|haracter|
|000027d0| 73 2c 20 79 6f 75 20 68 | 61 76 65 0a 58 74 6f 20 |s, you h|ave.Xto |
|000027e0| 73 65 74 20 2d 44 54 54 | 59 4e 41 4d 45 4c 45 4e |set -DTT|YNAMELEN|
|000027f0| 3d 36 30 20 28 6f 72 20 | 77 68 61 74 65 76 65 72 |=60 (or |whatever|
|00002800| 29 20 69 6e 20 74 68 65 | 20 4d 61 6b 65 66 69 6c |) in the| Makefil|
|00002810| 65 2e 0a 58 0a 58 2d 2d | 2d 2d 2d 20 50 72 65 73 |e..X.X--|--- Pres|
|00002820| 73 20 72 65 74 75 72 6e | 20 74 6f 20 63 6f 6e 74 |s return| to cont|
|00002830| 69 6e 75 65 2e 20 0a 58 | 0a 58 2f 65 74 63 2f 75 |inue. .X|.X/etc/u|
|00002840| 74 6d 70 20 68 61 73 20 | 74 72 61 64 69 74 69 6f |tmp has |traditio|
|00002850| 6e 61 6c 6c 79 20 6c 69 | 73 74 65 64 20 61 6c 6c |nally li|sted all|
|00002860| 20 75 73 65 72 73 20 6c | 6f 67 67 65 64 20 6f 6e | users l|ogged on|
|00002870| 2e 0a 58 54 68 69 73 20 | 6e 65 62 75 6c 6f 75 73 |..XThis |nebulous|
|00002880| 20 63 6f 6e 63 65 70 74 | 20 68 61 73 20 65 76 6f | concept| has evo|
|00002890| 6c 76 65 64 20 74 68 72 | 6f 75 67 68 20 74 68 65 |lved thr|ough the|
|000028a0| 20 79 65 61 72 73 3b 20 | 67 69 76 65 6e 20 74 68 | years; |given th|
|000028b0| 65 20 77 61 79 0a 58 74 | 68 61 74 20 6d 6f 73 74 |e way.Xt|hat most|
|000028c0| 20 70 72 6f 67 72 61 6d | 73 20 75 73 65 20 75 74 | program|s use ut|
|000028d0| 6d 70 2c 20 75 74 6d 70 | 20 69 73 20 70 72 6f 62 |mp, utmp| is prob|
|000028e0| 61 62 6c 79 20 62 65 74 | 74 65 72 20 64 65 66 69 |ably bet|ter defi|
|000028f0| 6e 65 64 20 61 73 20 61 | 0a 58 6c 69 73 74 20 6f |ned as a|.Xlist o|
|00002900| 66 20 61 6c 6c 20 69 6e | 74 65 72 61 63 74 69 76 |f all in|teractiv|
|00002910| 65 20 73 65 73 73 69 6f | 6e 73 2e 20 41 6e 79 77 |e sessio|ns. Anyw|
|00002920| 61 79 2c 20 70 74 79 20 | 73 75 70 70 6f 72 74 73 |ay, pty |supports|
|00002930| 20 74 68 69 73 20 66 69 | 6c 65 2c 0a 58 61 6e 64 | this fi|le,.Xand|
|00002940| 20 77 69 6c 6c 20 6d 61 | 6b 65 20 61 6e 20 65 6e | will ma|ke an en|
|00002950| 74 72 79 20 69 6e 20 69 | 74 20 77 68 65 6e 20 67 |try in i|t when g|
|00002960| 69 76 65 6e 20 2d 78 75 | 2e 20 49 66 20 79 6f 75 |iven -xu|. If you|
|00002970| 20 68 61 76 65 20 61 20 | 64 69 66 66 65 72 65 6e | have a |differen|
|00002980| 74 0a 58 66 69 6c 65 2c | 20 61 64 64 20 2d 44 50 |t.Xfile,| add -DP|
|00002990| 54 59 55 54 4d 50 5f 46 | 49 4c 45 3d 5c 22 2f 66 |TYUTMP_F|ILE=\"/f|
|000029a0| 6f 6f 2f 62 61 72 2f 75 | 74 6d 70 5c 22 20 74 6f |oo/bar/u|tmp\" to|
|000029b0| 20 44 45 46 49 4e 45 53 | 20 69 6e 20 74 68 65 20 | DEFINES| in the |
|000029c0| 4d 61 6b 65 66 69 6c 65 | 2e 0a 58 0a 58 4e 6f 74 |Makefile|..X.XNot|
|000029d0| 65 20 74 68 61 74 20 2f | 65 74 63 2f 75 74 6d 70 |e that /|etc/utmp|
|000029e0| 20 69 73 20 75 6e 70 72 | 6f 74 65 63 74 65 64 20 | is unpr|otected |
|000029f0| 28 6d 6f 64 65 20 36 36 | 36 29 20 6f 6e 20 53 75 |(mode 66|6) on Su|
|00002a00| 6e 73 2e 20 54 68 69 73 | 20 77 61 73 20 53 75 6e |ns. This| was Sun|
|00002a10| 27 73 0a 58 61 74 74 65 | 6d 70 74 20 74 6f 20 6c |'s.Xatte|mpt to l|
|00002a20| 65 74 20 75 6e 70 72 69 | 76 69 6c 65 67 65 64 20 |et unpri|vileged |
|00002a30| 70 72 6f 67 72 61 6d 73 | 20 6d 61 6e 61 67 65 20 |programs| manage |
|00002a40| 74 68 65 20 66 69 6c 65 | 2e 20 55 6e 66 6f 72 75 |the file|. Unforu|
|00002a50| 6e 61 74 65 6c 79 2c 20 | 74 68 69 73 0a 58 65 72 |nately, |this.Xer|
|00002a60| 72 6f 72 20 69 6e 20 6a | 75 64 67 6d 65 6e 74 20 |ror in j|udgment |
|00002a70| 6f 70 65 6e 73 20 75 70 | 20 61 20 68 75 67 65 20 |opens up| a huge |
|00002a80| 73 65 63 75 72 69 74 79 | 20 68 6f 6c 65 2c 20 77 |security| hole, w|
|00002a90| 68 69 63 68 20 65 76 65 | 6e 20 6f 6e 0a 58 73 69 |hich eve|n on.Xsi|
|00002aa0| 6e 67 6c 65 2d 75 73 65 | 72 20 6d 61 63 68 69 6e |ngle-use|r machin|
|00002ab0| 65 73 20 69 73 20 61 6e | 20 69 6e 76 69 74 61 74 |es is an| invitat|
|00002ac0| 69 6f 6e 20 74 6f 20 6d | 61 6b 65 20 6d 69 73 74 |ion to m|ake mist|
|00002ad0| 61 6b 65 73 2e 20 49 20 | 61 64 76 69 73 65 20 79 |akes. I |advise y|
|00002ae0| 6f 75 20 74 6f 0a 58 6d | 61 6b 65 20 2f 65 74 63 |ou to.Xm|ake /etc|
|00002af0| 2f 75 74 6d 70 20 6f 77 | 6e 65 64 20 62 79 20 72 |/utmp ow|ned by r|
|00002b00| 6f 6f 74 20 69 6e 20 43 | 61 73 65 20 52 4f 4f 54 |oot in C|ase ROOT|
|00002b10| 20 6f 72 20 70 74 79 20 | 69 6e 20 43 61 73 65 20 | or pty |in Case |
|00002b20| 50 54 59 2c 20 6d 6f 64 | 65 20 36 34 34 2e 0a 58 |PTY, mod|e 644..X|
|00002b30| 54 68 65 72 65 20 61 72 | 65 6e 27 74 20 6d 61 6e |There ar|en't man|
|00002b40| 79 20 75 6e 70 72 69 76 | 69 6c 65 67 65 64 20 70 |y unpriv|ileged p|
|00002b50| 72 6f 67 72 61 6d 73 20 | 74 68 61 74 20 64 6f 6e |rograms |that don|
|00002b60| 27 74 20 75 6e 64 65 72 | 73 74 61 6e 64 20 74 68 |'t under|stand th|
|00002b70| 65 0a 58 70 74 79 20 69 | 6e 74 65 72 66 61 63 65 |e.Xpty i|nterface|
|00002b80| 3b 20 70 65 6f 70 6c 65 | 20 6f 6e 20 6e 6f 6e 2d |; people| on non-|
|00002b90| 53 75 6e 73 20 68 61 76 | 65 20 73 75 72 76 69 76 |Suns hav|e surviv|
|00002ba0| 65 64 20 73 6f 20 66 61 | 72 2c 20 61 6e 64 20 74 |ed so fa|r, and t|
|00002bb0| 68 65 72 65 27 73 0a 58 | 6e 6f 20 72 65 61 73 6f |here's.X|no reaso|
|00002bc0| 6e 20 66 6f 72 20 79 6f | 75 20 74 6f 20 6b 65 65 |n for yo|u to kee|
|00002bd0| 70 20 73 75 62 73 63 72 | 69 62 69 6e 67 20 74 6f |p subscr|ibing to|
|00002be0| 20 61 6e 20 69 6e 73 65 | 63 75 72 65 20 6d 6f 64 | an inse|cure mod|
|00002bf0| 65 6c 20 6f 66 20 72 65 | 73 6f 75 72 63 65 0a 58 |el of re|source.X|
|00002c00| 73 68 61 72 69 6e 67 2e | 0a 58 0a 58 2d 2d 2d 2d |sharing.|.X.X----|
|00002c10| 2d 20 50 72 65 73 73 20 | 72 65 74 75 72 6e 20 74 |- Press |return t|
|00002c20| 6f 20 63 6f 6e 74 69 6e | 75 65 2e 20 0a 58 0a 58 |o contin|ue. .X.X|
|00002c30| 41 6c 74 68 6f 75 67 68 | 20 70 74 79 20 77 69 6c |Although| pty wil|
|00002c40| 6c 20 70 75 74 20 61 6e | 20 65 6e 74 72 79 20 69 |l put an| entry i|
|00002c50| 6e 74 6f 20 75 74 6d 70 | 2c 20 69 74 20 64 6f 65 |nto utmp|, it doe|
|00002c60| 73 6e 27 74 20 72 65 61 | 6c 6c 79 20 73 75 70 70 |sn't rea|lly supp|
|00002c70| 6f 72 74 0a 58 74 68 65 | 20 72 65 6d 6f 74 65 2d |ort.Xthe| remote-|
|00002c80| 68 6f 73 74 20 66 69 65 | 6c 64 2e 20 54 68 65 72 |host fie|ld. Ther|
|00002c90| 65 20 69 73 20 6e 6f 20 | 6c 6f 67 69 63 61 6c 20 |e is no |logical |
|00002ca0| 61 73 73 6f 63 69 61 74 | 69 6f 6e 20 62 65 74 77 |associat|ion betw|
|00002cb0| 65 65 6e 20 73 65 73 73 | 69 6f 6e 73 0a 58 61 6e |een sess|ions.Xan|
|00002cc0| 64 20 63 6f 6e 6e 65 63 | 74 69 6f 6e 73 3b 20 77 |d connec|tions; w|
|00002cd0| 68 79 20 73 68 6f 75 6c | 64 20 61 20 6c 6f 67 69 |hy shoul|d a logi|
|00002ce0| 6e 20 72 65 71 75 69 72 | 65 20 61 20 70 74 79 2c |n requir|e a pty,|
|00002cf0| 20 61 6e 64 20 77 68 79 | 20 73 68 6f 75 6c 64 20 | and why| should |
|00002d00| 61 0a 58 73 65 73 73 69 | 6f 6e 20 6f 6e 6c 79 20 |a.Xsessi|on only |
|00002d10| 73 74 69 63 6b 20 61 72 | 6f 75 6e 64 20 66 6f 72 |stick ar|ound for|
|00002d20| 20 6f 6e 65 20 63 6f 6e | 6e 65 63 74 69 6f 6e 3f | one con|nection?|
|00002d30| 20 53 6f 20 70 74 79 20 | 6a 75 73 74 20 70 75 74 | So pty |just put|
|00002d40| 73 20 22 70 74 79 22 20 | 69 6e 0a 58 74 68 65 20 |s "pty" |in.Xthe |
|00002d50| 68 6f 73 74 20 66 69 65 | 6c 64 2e 20 59 6f 75 20 |host fie|ld. You |
|00002d60| 63 61 6e 20 63 68 61 6e | 67 65 20 74 68 69 73 20 |can chan|ge this |
|00002d70| 77 69 74 68 20 2d 44 50 | 54 59 55 54 4d 50 5f 48 |with -DP|TYUTMP_H|
|00002d80| 4f 53 54 3d 5c 22 66 6f | 6f 5c 22 3b 20 79 6f 75 |OST=\"fo|o\"; you|
|00002d90| 20 6d 61 79 0a 58 65 76 | 65 6e 20 77 61 6e 74 20 | may.Xev|en want |
|00002da0| 74 6f 20 6d 61 6b 65 20 | 50 54 59 5f 55 54 4d 50 |to make |PTY_UTMP|
|00002db0| 48 4f 53 54 20 63 61 6c | 6c 20 61 20 66 75 6e 63 |HOST cal|l a func|
|00002dc0| 74 69 6f 6e 20 74 68 61 | 74 20 79 6f 75 20 64 65 |tion tha|t you de|
|00002dd0| 66 69 6e 65 2e 0a 58 0a | 58 28 53 69 6d 69 6c 61 |fine..X.|X(Simila|
|00002de0| 72 20 63 6f 6d 6d 65 6e | 74 73 20 61 70 70 6c 79 |r commen|ts apply|
|00002df0| 20 74 6f 20 50 54 59 57 | 54 4d 50 5f 48 4f 53 54 | to PTYW|TMP_HOST|
|00002e00| 2e 20 54 68 65 72 65 20 | 61 72 65 20 61 6c 73 6f |. There |are also|
|00002e10| 20 50 54 59 55 54 4d 50 | 5f 53 57 48 4f 53 54 0a | PTYUTMP|_SWHOST.|
|00002e20| 58 61 6e 64 20 50 54 59 | 57 54 4d 50 5f 53 57 48 |Xand PTY|WTMP_SWH|
|00002e30| 4f 53 54 2c 20 64 65 66 | 61 75 6c 74 73 20 50 54 |OST, def|aults PT|
|00002e40| 59 55 54 4d 50 5f 48 4f | 53 54 20 61 6e 64 20 22 |YUTMP_HO|ST and "|
|00002e50| 70 74 79 2d 73 65 73 73 | 75 73 65 72 22 0a 58 72 |pty-sess|user".Xr|
|00002e60| 65 73 70 65 63 74 69 76 | 65 6c 79 3b 20 73 65 65 |espectiv|ely; see|
|00002e70| 20 75 74 69 6c 2f 73 65 | 73 73 75 73 65 72 2e 31 | util/se|ssuser.1|
|00002e80| 20 66 6f 72 20 6d 6f 72 | 65 20 69 6e 66 6f 72 6d | for mor|e inform|
|00002e90| 61 74 69 6f 6e 2e 29 0a | 58 0a 58 2d 2d 2d 2d 2d |ation.).|X.X-----|
|00002ea0| 20 50 72 65 73 73 20 72 | 65 74 75 72 6e 20 74 6f | Press r|eturn to|
|00002eb0| 20 63 6f 6e 74 69 6e 75 | 65 2e 20 0a 58 0a 58 2f | continu|e. .X.X/|
|00002ec0| 75 73 72 2f 61 64 6d 2f | 77 74 6d 70 20 68 61 73 |usr/adm/|wtmp has|
|00002ed0| 20 74 72 61 64 69 74 69 | 6f 6e 61 6c 6c 79 20 72 | traditi|onally r|
|00002ee0| 65 63 6f 72 64 65 64 20 | 61 6c 6c 20 6c 6f 67 69 |ecorded |all logi|
|00002ef0| 6e 73 2c 20 6c 6f 67 6f | 75 74 73 2c 20 72 65 62 |ns, logo|uts, reb|
|00002f00| 6f 6f 74 73 2c 0a 58 66 | 74 70 20 73 65 73 73 69 |oots,.Xf|tp sessi|
|00002f10| 6f 6e 73 2c 20 61 6e 64 | 20 76 61 72 69 6f 75 73 |ons, and| various|
|00002f20| 20 6f 74 68 65 72 20 69 | 6e 74 65 72 65 73 74 69 | other i|nteresti|
|00002f30| 6e 67 20 65 76 65 6e 74 | 73 2e 20 28 54 68 65 20 |ng event|s. (The |
|00002f40| 65 6e 74 72 79 20 66 6f | 72 20 61 0a 58 6c 69 6e |entry fo|r a.Xlin|
|00002f50| 65 20 69 6e 20 75 74 6d | 70 20 69 73 20 74 68 65 |e in utm|p is the|
|00002f60| 20 6c 61 73 74 20 65 6e | 74 72 79 20 66 6f 72 20 | last en|try for |
|00002f70| 74 68 61 74 20 6c 69 6e | 65 20 69 6e 20 77 74 6d |that lin|e in wtm|
|00002f80| 70 2e 29 20 70 74 79 20 | 73 75 70 70 6f 72 74 73 |p.) pty |supports|
|00002f90| 20 77 74 6d 70 0a 58 66 | 75 6c 6c 79 2c 20 69 6e | wtmp.Xf|ully, in|
|00002fa0| 20 74 68 65 20 73 61 6d | 65 20 77 61 79 20 61 73 | the sam|e way as|
|00002fb0| 20 75 74 6d 70 2e 20 59 | 6f 75 20 73 68 6f 75 6c | utmp. Y|ou shoul|
|00002fc0| 64 20 6d 61 6b 65 20 77 | 74 6d 70 20 6d 6f 64 65 |d make w|tmp mode|
|00002fd0| 20 36 34 34 2c 20 6f 77 | 6e 65 72 0a 58 72 6f 6f | 644, ow|ner.Xroo|
|00002fe0| 74 20 6f 72 20 70 74 79 | 20 61 73 20 61 70 70 72 |t or pty| as appr|
|00002ff0| 6f 70 72 69 61 74 65 2e | 20 43 68 61 6e 67 65 20 |opriate.| Change |
|00003000| 50 54 59 57 54 4d 50 5f | 46 49 4c 45 20 69 66 20 |PTYWTMP_|FILE if |
|00003010| 2f 75 73 72 2f 61 64 6d | 2f 77 74 6d 70 20 69 73 |/usr/adm|/wtmp is|
|00003020| 0a 58 73 6f 6d 65 77 68 | 65 72 65 20 65 6c 73 65 |.Xsomewh|ere else|
|00003030| 2e 0a 58 0a 58 2d 2d 2d | 2d 2d 20 50 72 65 73 73 |..X.X---|-- Press|
|00003040| 20 72 65 74 75 72 6e 20 | 74 6f 20 63 6f 6e 74 69 | return |to conti|
|00003050| 6e 75 65 2e 20 0a 58 0a | 58 59 6f 75 20 63 61 6e |nue. .X.|XYou can|
|00003060| 20 74 75 72 6e 20 6f 66 | 66 20 75 74 6d 70 20 73 | turn of|f utmp s|
|00003070| 75 70 70 6f 72 74 20 62 | 79 20 75 6e 63 6f 6d 6d |upport b|y uncomm|
|00003080| 65 6e 74 69 6e 67 20 74 | 68 65 20 4e 4f 5f 55 54 |enting t|he NO_UT|
|00003090| 4d 50 20 6c 69 6e 65 20 | 69 6e 0a 58 63 6f 6e 66 |MP line |in.Xconf|
|000030a0| 69 67 2e 68 2e 20 28 4a | 75 73 74 20 64 65 6c 65 |ig.h. (J|ust dele|
|000030b0| 74 65 20 74 68 65 20 69 | 6e 69 74 69 61 6c 20 2f |te the i|nitial /|
|000030c0| 2a 2e 29 20 59 6f 75 20 | 63 61 6e 20 61 6c 73 6f |*.) You |can also|
|000030d0| 20 74 75 72 6e 20 6f 66 | 66 20 73 75 70 70 6f 72 | turn of|f suppor|
|000030e0| 74 0a 58 66 6f 72 20 77 | 74 6d 70 2c 20 64 69 73 |t.Xfor w|tmp, dis|
|000030f0| 63 6f 6e 6e 65 63 74 61 | 62 6c 65 20 73 65 73 73 |connecta|ble sess|
|00003100| 69 6f 6e 73 2c 20 6f 72 | 20 63 68 61 6e 67 69 6e |ions, or| changin|
|00003110| 67 20 70 73 65 75 64 6f | 2d 74 65 72 6d 69 6e 61 |g pseudo|-termina|
|00003120| 6c 20 66 69 6c 65 0a 58 | 6f 77 6e 65 72 73 68 69 |l file.X|ownershi|
|00003130| 70 3b 20 6a 75 73 74 20 | 75 6e 63 6f 6d 6d 65 6e |p; just |uncommen|
|00003140| 74 20 74 68 65 20 61 70 | 70 72 6f 70 72 69 61 74 |t the ap|propriat|
|00003150| 65 20 6c 69 6e 65 2e 20 | 59 6f 75 20 63 61 6e 20 |e line. |You can |
|00003160| 66 6f 72 63 65 20 75 73 | 65 20 6f 66 0a 58 65 61 |force us|e of.Xea|
|00003170| 63 68 20 6f 66 20 74 68 | 65 73 65 20 66 65 61 74 |ch of th|ese feat|
|00003180| 75 72 65 73 20 62 79 20 | 64 65 66 69 6e 69 6e 67 |ures by |defining|
|00003190| 20 4d 55 53 54 5f 55 54 | 4d 50 2c 20 65 74 63 2e | MUST_UT|MP, etc.|
|000031a0| 2c 20 69 6e 20 74 68 65 | 20 73 61 6d 65 20 77 61 |, in the| same wa|
|000031b0| 79 2e 0a 58 0a 58 4e 6f | 74 65 20 74 68 61 74 20 |y..X.XNo|te that |
|000031c0| 74 68 65 20 75 73 75 61 | 6c 20 6c 6f 67 69 6e 20 |the usua|l login |
|000031d0| 70 72 6f 67 72 61 6d 73 | 20 64 6f 20 74 68 65 69 |programs| do thei|
|000031e0| 72 20 6f 77 6e 20 77 74 | 6d 70 20 6d 61 6e 61 67 |r own wt|mp manag|
|000031f0| 65 6d 65 6e 74 2c 20 61 | 6e 64 0a 58 6d 61 6e 79 |ement, a|nd.Xmany|
|00003200| 20 61 63 63 6f 75 6e 74 | 69 6e 67 20 70 72 6f 67 | account|ing prog|
|00003210| 72 61 6d 73 20 69 6e 63 | 6f 72 72 65 63 74 6c 79 |rams inc|orrectly|
|00003220| 20 65 71 75 61 74 65 20 | 73 65 73 73 69 6f 6e 20 | equate |session |
|00003230| 74 69 6d 65 20 77 69 74 | 68 20 63 6f 6e 6e 65 63 |time wit|h connec|
|00003240| 74 0a 58 74 69 6d 65 2c | 20 73 6f 20 75 73 65 72 |t.Xtime,| so user|
|00003250| 73 20 77 69 6c 6c 20 72 | 61 72 65 6c 79 20 77 61 |s will r|arely wa|
|00003260| 6e 74 20 77 74 6d 70 2e | 20 41 73 20 6d 6f 72 65 |nt wtmp.| As more|
|00003270| 20 70 72 6f 67 72 61 6d | 73 20 61 70 70 65 61 72 | program|s appear|
|00003280| 20 75 73 69 6e 67 20 74 | 68 65 0a 58 70 74 79 20 | using t|he.Xpty |
|00003290| 69 6e 74 65 72 66 61 63 | 65 2c 20 61 6e 64 20 61 |interfac|e, and a|
|000032a0| 73 20 6c 6f 67 69 6e 20 | 70 72 6f 67 72 61 6d 73 |s login |programs|
|000032b0| 20 73 74 61 72 74 20 75 | 73 69 6e 67 20 61 20 6d | start u|sing a m|
|000032c0| 6f 72 65 20 6c 6f 67 69 | 63 61 6c 20 73 79 73 74 |ore logi|cal syst|
|000032d0| 65 6d 0a 58 66 6f 72 20 | 61 63 63 6f 75 6e 74 69 |em.Xfor |accounti|
|000032e0| 6e 67 2c 20 4d 55 53 54 | 5f 57 54 4d 50 20 6d 61 |ng, MUST|_WTMP ma|
|000032f0| 79 20 62 65 63 6f 6d 65 | 20 61 6e 20 61 70 70 72 |y become| an appr|
|00003300| 6f 70 72 69 61 74 65 20 | 77 61 79 20 74 6f 20 6d |opriate |way to m|
|00003310| 6f 6e 69 74 6f 72 0a 58 | 70 73 65 75 64 6f 2d 74 |onitor.X|pseudo-t|
|00003320| 65 72 6d 69 6e 61 6c 20 | 75 73 61 67 65 2e 20 46 |erminal |usage. F|
|00003330| 6f 72 20 74 68 65 20 6d | 6f 6d 65 6e 74 2c 20 49 |or the m|oment, I|
|00003340| 20 64 6f 20 6e 6f 74 20 | 61 64 76 69 73 65 20 73 | do not |advise s|
|00003350| 65 74 74 69 6e 67 20 61 | 6e 79 20 4e 4f 0a 58 6f |etting a|ny NO.Xo|
|00003360| 72 20 4d 55 53 54 2e 0a | 58 0a 58 2d 2d 2d 2d 2d |r MUST..|X.X-----|
|00003370| 20 50 72 65 73 73 20 72 | 65 74 75 72 6e 20 74 6f | Press r|eturn to|
|00003380| 20 63 6f 6e 74 69 6e 75 | 65 2e 20 0a 58 0a 58 70 | continu|e. .X.Xp|
|00003390| 74 79 20 73 75 62 73 63 | 72 69 62 65 73 20 28 6e |ty subsc|ribes (n|
|000033a0| 6f 74 20 76 65 72 79 20 | 77 69 6c 6c 69 6e 67 6c |ot very |willingl|
|000033b0| 79 29 20 74 6f 20 74 68 | 65 20 42 53 44 20 34 2e |y) to th|e BSD 4.|
|000033c0| 33 20 6d 6f 64 65 6c 20 | 6f 66 20 70 74 79 0a 58 |3 model |of pty.X|
|000033d0| 70 72 6f 74 65 63 74 69 | 6f 6e 2c 20 77 69 74 68 |protecti|on, with|
|000033e0| 20 61 20 66 65 77 20 74 | 77 69 73 74 73 2e 20 41 | a few t|wists. A|
|000033f0| 6c 6c 20 70 74 79 73 20 | 61 72 65 20 75 6e 64 65 |ll ptys |are unde|
|00003400| 72 20 67 72 6f 75 70 20 | 74 74 79 2c 20 61 74 20 |r group |tty, at |
|00003410| 61 6c 6c 0a 58 74 69 6d | 65 73 3b 20 69 66 20 79 |all.Xtim|es; if y|
|00003420| 6f 75 20 64 6f 6e 27 74 | 20 68 61 76 65 20 61 20 |ou don't| have a |
|00003430| 74 74 79 20 67 72 6f 75 | 70 2c 20 61 6c 6c 20 70 |tty grou|p, all p|
|00003440| 74 79 73 20 73 68 6f 75 | 6c 64 20 62 65 20 75 6e |tys shou|ld be un|
|00003450| 64 65 72 20 73 6f 6d 65 | 0a 58 6f 74 68 65 72 20 |der some|.Xother |
|00003460| 70 72 6f 74 65 63 74 65 | 64 20 67 72 6f 75 70 20 |protecte|d group |
|00003470| 61 74 20 61 6c 6c 20 74 | 69 6d 65 73 2e 20 41 6e |at all t|imes. An|
|00003480| 79 77 61 79 2c 20 70 74 | 79 20 77 69 6c 6c 20 63 |yway, pt|y will c|
|00003490| 68 61 6e 67 65 20 74 68 | 65 20 67 72 6f 75 70 20 |hange th|e group |
|000034a0| 6f 66 0a 58 65 61 63 68 | 20 70 73 65 75 64 6f 2d |of.Xeach| pseudo-|
|000034b0| 74 65 72 6d 69 6e 61 6c | 20 66 69 6c 65 20 74 6f |terminal| file to|
|000034c0| 20 50 54 59 47 52 4f 55 | 50 2c 20 64 65 66 61 75 | PTYGROU|P, defau|
|000034d0| 6c 74 20 34 2c 20 75 6e | 64 65 72 20 2d 78 63 2e |lt 4, un|der -xc.|
|000034e0| 0a 58 0a 58 0a 58 53 69 | 6e 63 65 20 79 6f 75 20 |.X.X.XSi|nce you |
|000034f0| 61 6c 72 65 61 64 79 20 | 68 61 76 65 20 61 20 74 |already |have a t|
|00003500| 74 79 20 67 72 6f 75 70 | 2c 20 67 69 64 20 34 2c |ty group|, gid 4,|
|00003510| 20 79 6f 75 27 72 65 20 | 66 69 6e 65 2e 0a 58 0a | you're |fine..X.|
|00003520| 58 5b 4e 6f 74 65 3a 20 | 49 66 20 79 6f 75 72 20 |X[Note: |If your |
|00003530| 74 74 79 20 67 72 6f 75 | 70 20 69 73 20 73 6f 6d |tty grou|p is som|
|00003540| 65 74 68 69 6e 67 20 6f | 74 68 65 72 20 74 68 61 |ething o|ther tha|
|00003550| 6e 20 34 2c 20 61 64 64 | 20 2d 44 50 54 59 47 52 |n 4, add| -DPTYGR|
|00003560| 4f 55 50 3d 36 20 28 6f | 72 0a 58 77 68 61 74 65 |OUP=6 (o|r.Xwhate|
|00003570| 76 65 72 29 20 74 6f 20 | 74 68 65 20 4d 61 6b 65 |ver) to |the Make|
|00003580| 66 69 6c 65 2e 5d 0a 58 | 0a 58 0a 58 28 55 6e 64 |file.].X|.X.X(Und|
|00003590| 65 72 20 43 61 73 65 20 | 55 4e 2c 20 64 6f 6e 27 |er Case |UN, don'|
|000035a0| 74 20 77 6f 72 72 79 20 | 61 62 6f 75 74 20 61 6c |t worry |about al|
|000035b0| 6c 20 74 68 69 73 20 67 | 72 6f 75 70 20 73 74 75 |l this g|roup stu|
|000035c0| 66 66 2e 20 4a 75 73 74 | 20 6c 65 61 76 65 0a 58 |ff. Just| leave.X|
|000035d0| 50 54 59 47 52 4f 55 50 | 20 61 6c 6f 6e 65 2e 29 |PTYGROUP| alone.)|
|000035e0| 0a 58 0a 58 2d 2d 2d 2d | 2d 20 50 72 65 73 73 20 |.X.X----|- Press |
|000035f0| 72 65 74 75 72 6e 20 74 | 6f 20 63 6f 6e 74 69 6e |return t|o contin|
|00003600| 75 65 2e 20 0a 58 0a 58 | 55 6e 64 65 72 20 2d 78 |ue. .X.X|Under -x|
|00003610| 63 2c 20 70 74 79 20 63 | 68 61 6e 67 65 73 20 74 |c, pty c|hanges t|
|00003620| 68 65 20 70 73 65 75 64 | 6f 2d 74 65 72 6d 69 6e |he pseud|o-termin|
|00003630| 61 6c 20 6f 77 6e 65 72 | 20 74 6f 20 74 68 65 20 |al owner| to the |
|00003640| 63 75 72 72 65 6e 74 20 | 72 65 61 6c 0a 58 75 69 |current |real.Xui|
|00003650| 64 2e 20 54 68 65 20 66 | 61 63 74 20 74 68 61 74 |d. The f|act that|
|00003660| 20 74 65 72 6d 69 6e 61 | 6c 73 20 6e 65 65 64 20 | termina|ls need |
|00003670| 74 6f 20 62 65 20 69 6e | 20 74 68 65 20 66 69 6c |to be in| the fil|
|00003680| 65 20 68 69 65 72 61 72 | 63 68 79 20 72 65 66 6c |e hierar|chy refl|
|00003690| 65 63 74 73 20 61 0a 58 | 73 65 72 69 6f 75 73 20 |ects a.X|serious |
|000036a0| 66 61 69 6c 75 72 65 20 | 69 6e 20 74 68 65 20 42 |failure |in the B|
|000036b0| 53 44 20 74 65 72 6d 69 | 6e 61 6c 20 6d 6f 64 65 |SD termi|nal mode|
|000036c0| 6c 3b 20 62 75 74 20 61 | 6e 79 77 61 79 2c 20 6d |l; but a|nyway, m|
|000036d0| 61 6e 79 20 70 72 6f 67 | 72 61 6d 73 0a 58 65 78 |any prog|rams.Xex|
|000036e0| 70 65 63 74 20 74 6f 20 | 62 65 20 61 62 6c 65 20 |pect to |be able |
|000036f0| 74 6f 20 66 6f 6f 6c 20 | 61 72 6f 75 6e 64 20 77 |to fool |around w|
|00003700| 69 74 68 20 2f 64 65 76 | 2f 74 74 79 2e 20 41 66 |ith /dev|/tty. Af|
|00003710| 74 65 72 20 70 74 79 20 | 69 73 20 64 6f 6e 65 20 |ter pty |is done |
|00003720| 77 69 74 68 0a 58 74 68 | 65 20 74 65 72 6d 69 6e |with.Xth|e termin|
|00003730| 61 6c 2c 20 69 74 20 73 | 65 74 73 20 74 68 65 20 |al, it s|ets the |
|00003740| 6f 77 6e 65 72 20 62 61 | 63 6b 20 74 6f 20 69 74 |owner ba|ck to it|
|00003750| 73 20 65 66 66 65 63 74 | 69 76 65 20 75 69 64 2e |s effect|ive uid.|
|00003760| 20 59 6f 75 20 63 61 6e | 0a 58 6d 6f 64 69 66 79 | You can|.Xmodify|
|00003770| 20 74 68 69 73 20 62 65 | 68 61 76 69 6f 72 20 62 | this be|havior b|
|00003780| 79 20 63 68 61 6e 67 69 | 6e 67 20 50 54 59 4f 57 |y changi|ng PTYOW|
|00003790| 4e 45 52 20 66 72 6f 6d | 20 65 75 69 64 20 74 6f |NER from| euid to|
|000037a0| 20 73 6f 6d 65 74 68 69 | 6e 67 20 65 6c 73 65 2e | somethi|ng else.|
|000037b0| 0a 58 0a 58 55 6e 64 65 | 72 20 43 61 73 65 20 55 |.X.XUnde|r Case U|
|000037c0| 4e 2c 20 50 54 59 4f 57 | 4e 45 52 20 69 73 20 69 |N, PTYOW|NER is i|
|000037d0| 72 72 65 6c 65 76 61 6e | 74 2e 0a 58 0a 58 2d 2d |rrelevan|t..X.X--|
|000037e0| 2d 2d 2d 20 50 72 65 73 | 73 20 72 65 74 75 72 6e |--- Pres|s return|
|000037f0| 20 74 6f 20 63 6f 6e 74 | 69 6e 75 65 2e 20 0a 58 | to cont|inue. .X|
|00003800| 0a 58 57 68 69 6c 65 20 | 61 20 74 74 79 20 69 73 |.XWhile |a tty is|
|00003810| 20 75 6e 75 73 65 64 2c | 20 42 53 44 20 73 79 73 | unused,| BSD sys|
|00003820| 74 65 6d 73 20 74 72 61 | 64 69 74 69 6f 6e 61 6c |tems tra|ditional|
|00003830| 6c 79 20 6c 65 61 76 65 | 20 69 74 20 75 6e 70 72 |ly leave| it unpr|
|00003840| 6f 74 65 63 74 65 64 2e | 0a 58 55 6e 66 6f 72 74 |otected.|.XUnfort|
|00003850| 75 6e 61 74 65 6c 79 2c | 20 74 68 69 73 20 6c 65 |unately,| this le|
|00003860| 61 76 65 73 20 73 6f 6d | 65 20 68 75 67 65 20 73 |aves som|e huge s|
|00003870| 65 63 75 72 69 74 79 20 | 68 6f 6c 65 73 2e 20 48 |ecurity |holes. H|
|00003880| 65 72 65 27 73 20 6f 6e | 65 20 6f 66 0a 58 74 68 |ere's on|e of.Xth|
|00003890| 65 20 62 69 67 67 65 73 | 74 20 61 64 76 61 6e 74 |e bigges|t advant|
|000038a0| 61 67 65 73 20 6f 66 20 | 61 20 70 72 69 76 69 6c |ages of |a privil|
|000038b0| 65 67 65 64 20 70 74 79 | 20 6d 61 6e 61 67 65 72 |eged pty| manager|
|000038c0| 3a 20 75 6e 75 73 65 64 | 20 74 74 79 73 20 64 6f |: unused| ttys do|
|000038d0| 6e 27 74 0a 58 68 61 76 | 65 20 74 6f 20 62 65 20 |n't.Xhav|e to be |
|000038e0| 6c 65 66 74 20 6f 70 65 | 6e 20 66 6f 72 20 61 6e |left ope|n for an|
|000038f0| 79 20 72 61 6e 64 6f 6d | 20 70 72 6f 67 72 61 6d |y random| program|
|00003900| 20 74 6f 20 75 73 65 2e | 20 41 66 74 65 72 20 69 | to use.| After i|
|00003910| 74 27 73 20 64 6f 6e 65 | 0a 58 77 69 74 68 20 61 |t's done|.Xwith a|
|00003920| 20 70 73 65 75 64 6f 2d | 74 65 72 6d 69 6e 61 6c | pseudo-|terminal|
|00003930| 2c 20 70 74 79 20 63 68 | 61 6e 67 65 73 20 69 74 |, pty ch|anges it|
|00003940| 20 74 6f 20 6d 6f 64 65 | 20 55 4e 55 53 45 44 50 | to mode| UNUSEDP|
|00003950| 54 59 4d 4f 44 45 2c 20 | 64 65 66 61 75 6c 74 0a |TYMODE, |default.|
|00003960| 58 30 36 30 30 2e 20 28 | 54 68 69 73 20 69 73 20 |X0600. (|This is |
|00003970| 61 6e 6f 74 68 65 72 20 | 63 61 73 65 20 6f 66 20 |another |case of |
|00003980| 61 20 70 6f 6f 72 20 6d | 6f 64 65 6c 20 66 6f 72 |a poor m|odel for|
|00003990| 20 6b 6c 75 64 67 69 6e | 67 20 70 74 79 20 73 75 | kludgin|g pty su|
|000039a0| 70 70 6f 72 74 0a 58 69 | 6e 74 6f 20 75 6e 70 72 |pport.Xi|nto unpr|
|000039b0| 69 76 69 6c 65 67 65 64 | 20 70 72 6f 67 72 61 6d |ivileged| program|
|000039c0| 73 2e 20 49 66 20 79 6f | 75 20 68 61 76 65 6e 27 |s. If yo|u haven'|
|000039d0| 74 20 73 65 74 20 75 70 | 20 73 65 70 61 72 61 74 |t set up| separat|
|000039e0| 65 20 70 74 79 20 62 61 | 6e 6b 73 0a 58 66 6f 72 |e pty ba|nks.Xfor|
|000039f0| 20 70 74 79 2c 20 61 6e | 64 20 79 6f 75 20 72 65 | pty, an|d you re|
|00003a00| 61 6c 6c 79 20 77 61 6e | 74 20 74 6f 20 61 6c 6c |ally wan|t to all|
|00003a10| 6f 77 20 75 6e 70 72 69 | 76 69 6c 65 67 65 64 20 |ow unpri|vileged |
|00003a20| 61 63 63 65 73 73 20 74 | 6f 20 75 6e 75 73 65 64 |access t|o unused|
|00003a30| 0a 58 70 74 79 73 2c 20 | 74 72 79 20 6d 6f 64 65 |.Xptys, |try mode|
|00003a40| 20 30 36 36 30 20 61 6e | 64 20 6d 61 6b 65 20 74 | 0660 an|d make t|
|00003a50| 68 6f 73 65 20 6f 74 68 | 65 72 20 70 72 6f 67 72 |hose oth|er progr|
|00003a60| 61 6d 73 20 73 65 74 67 | 69 64 20 74 6f 20 74 74 |ams setg|id to tt|
|00003a70| 79 2e 29 0a 58 0a 58 41 | 20 74 74 79 20 74 68 61 |y.).X.XA| tty tha|
|00003a80| 74 20 73 6f 6d 65 6f 6e | 65 27 73 20 75 73 69 6e |t someon|e's usin|
|00003a90| 67 20 63 61 6e 20 62 65 | 20 69 6e 20 6d 61 6e 79 |g can be| in many|
|00003aa0| 20 64 69 66 66 65 72 65 | 6e 74 20 6d 6f 64 65 73 | differe|nt modes|
|00003ab0| 2e 20 54 79 70 69 63 61 | 6c 6c 79 0a 58 55 53 45 |. Typica|lly.XUSE|
|00003ac0| 44 50 54 59 4d 4f 44 45 | 20 73 68 6f 75 6c 64 20 |DPTYMODE| should |
|00003ad0| 62 65 20 30 36 30 30 2c | 20 77 68 69 63 68 20 6d |be 0600,| which m|
|00003ae0| 65 61 6e 73 20 75 73 65 | 72 2d 6f 6e 6c 79 20 61 |eans use|r-only a|
|00003af0| 63 63 65 73 73 2c 20 6d | 65 73 73 61 67 65 73 20 |ccess, m|essages |
|00003b00| 6f 66 66 2c 0a 58 62 69 | 66 66 20 6f 66 66 2e 20 |off,.Xbi|ff off. |
|00003b10| 49 66 20 79 6f 75 20 72 | 65 61 6c 6c 79 2c 20 72 |If you r|eally, r|
|00003b20| 65 61 6c 6c 79 2c 20 72 | 65 61 6c 6c 79 20 77 61 |eally, r|eally wa|
|00003b30| 6e 74 20 74 6f 20 6d 61 | 6b 65 20 74 68 65 20 6d |nt to ma|ke the m|
|00003b40| 69 73 74 61 6b 65 20 6f | 66 0a 58 68 61 76 69 6e |istake o|f.Xhavin|
|00003b50| 67 20 6d 65 73 73 61 67 | 65 73 20 6f 72 20 62 69 |g messag|es or bi|
|00003b60| 66 66 20 6f 6e 20 62 79 | 20 64 65 66 61 75 6c 74 |ff on by| default|
|00003b70| 2c 20 74 72 79 20 30 36 | 32 30 2c 20 30 37 30 30 |, try 06|20, 0700|
|00003b80| 2c 20 6f 72 20 30 37 32 | 30 2e 20 4e 6f 74 65 0a |, or 072|0. Note.|
|00003b90| 58 74 68 61 74 20 74 68 | 65 20 77 6f 72 6c 64 20 |Xthat th|e world |
|00003ba0| 70 72 6f 74 65 63 74 69 | 6f 6e 20 73 68 6f 75 6c |protecti|on shoul|
|00003bb0| 64 20 61 6c 77 61 79 73 | 20 62 65 20 30 3a 20 74 |d always| be 0: t|
|00003bc0| 68 65 20 70 6f 69 6e 74 | 20 6f 66 20 74 68 65 20 |he point| of the |
|00003bd0| 74 74 79 20 67 72 6f 75 | 70 0a 58 69 73 20 74 68 |tty grou|p.Xis th|
|00003be0| 61 74 20 6f 6e 6c 79 20 | 73 65 74 67 69 64 2d 74 |at only |setgid-t|
|00003bf0| 74 79 20 70 72 6f 67 72 | 61 6d 73 20 63 61 6e 20 |ty progr|ams can |
|00003c00| 61 63 63 65 73 73 20 74 | 74 79 73 2e 0a 58 0a 58 |access t|tys..X.X|
|00003c10| 41 73 20 75 73 75 61 6c | 2c 20 79 6f 75 20 63 61 |As usual|, you ca|
|00003c20| 6e 27 74 20 64 6f 20 61 | 6e 79 74 68 69 6e 67 20 |n't do a|nything |
|00003c30| 61 62 6f 75 74 20 74 68 | 65 73 65 20 69 6e 20 43 |about th|ese in C|
|00003c40| 61 73 65 20 55 4e 2e 0a | 58 0a 58 2d 2d 2d 2d 2d |ase UN..|X.X-----|
|00003c50| 20 50 72 65 73 73 20 72 | 65 74 75 72 6e 20 74 6f | Press r|eturn to|
|00003c60| 20 63 6f 6e 74 69 6e 75 | 65 2e 20 0a 58 0a 58 4e | continu|e. .X.XN|
|00003c70| 6f 77 20 77 65 27 72 65 | 20 70 61 73 74 20 67 65 |ow we're| past ge|
|00003c80| 6e 65 72 69 63 20 63 6f | 6e 66 69 67 75 72 61 74 |neric co|nfigurat|
|00003c90| 69 6f 6e 20 61 6e 64 20 | 64 6f 77 6e 20 74 6f 20 |ion and |down to |
|00003ca0| 79 6f 75 72 20 73 79 73 | 74 65 6d 27 73 0a 58 6e |your sys|tem's.Xn|
|00003cb0| 69 74 74 79 2d 67 72 69 | 74 74 79 2e 0a 58 0a 58 |itty-gri|tty..X.X|
|00003cc0| 46 6f 72 20 70 75 72 69 | 74 79 2c 20 70 74 79 20 |For puri|ty, pty |
|00003cd0| 68 61 73 20 53 49 47 52 | 45 54 5f 54 59 50 45 2c |has SIGR|ET_TYPE,|
|00003ce0| 20 64 65 66 61 75 6c 74 | 20 69 6e 74 2c 20 61 73 | default| int, as|
|00003cf0| 20 74 68 65 20 74 79 70 | 65 20 72 65 74 75 72 6e | the typ|e return|
|00003d00| 65 64 20 62 79 20 61 0a | 58 73 69 67 6e 61 6c 20 |ed by a.|Xsignal |
|00003d10| 68 61 6e 64 6c 65 72 2e | 20 4f 6e 20 53 75 6e 73 |handler.| On Suns|
|00003d20| 20 61 6e 64 20 41 4e 53 | 49 2d 63 6f 6d 70 6c 69 | and ANS|I-compli|
|00003d30| 61 6e 74 20 6d 61 63 68 | 69 6e 65 73 2c 20 79 6f |ant mach|ines, yo|
|00003d40| 75 20 73 68 6f 75 6c 64 | 20 64 65 66 69 6e 65 0a |u should| define.|
|00003d50| 58 53 49 47 52 45 54 5f | 54 59 50 45 3d 76 6f 69 |XSIGRET_|TYPE=voi|
|00003d60| 64 2e 20 54 68 65 6e 20 | 79 6f 75 20 63 61 6e 20 |d. Then |you can |
|00003d70| 61 64 6d 69 72 65 20 74 | 68 65 20 6c 69 6e 74 20 |admire t|he lint |
|00003d80| 2d 68 61 78 63 20 2a 2e | 63 20 6f 75 74 70 75 74 |-haxc *.|c output|
|00003d90| 2e 0a 58 0a 58 2d 2d 2d | 2d 2d 20 50 72 65 73 73 |..X.X---|-- Press|
|00003da0| 20 72 65 74 75 72 6e 20 | 74 6f 20 63 6f 6e 74 69 | return |to conti|
|00003db0| 6e 75 65 2e 20 0a 58 0a | 58 4f 55 54 42 55 46 53 |nue. .X.|XOUTBUFS|
|00003dc0| 49 5a 45 2c 20 64 65 66 | 61 75 6c 74 20 31 36 33 |IZE, def|ault 163|
|00003dd0| 38 34 2c 20 69 73 20 74 | 68 65 20 73 69 7a 65 20 |84, is t|he size |
|00003de0| 6f 66 20 74 68 65 20 62 | 75 66 66 65 72 20 70 74 |of the b|uffer pt|
|00003df0| 79 20 6b 65 65 70 73 20 | 62 65 74 77 65 65 6e 0a |y keeps |between.|
|00003e00| 58 74 68 65 20 69 6e 63 | 6f 6d 69 6e 67 20 64 61 |Xthe inc|oming da|
|00003e10| 74 61 20 61 6e 64 20 74 | 68 65 20 70 73 65 75 64 |ta and t|he pseud|
|00003e20| 6f 2d 74 74 79 2c 20 61 | 6e 64 20 62 65 74 77 65 |o-tty, a|nd betwe|
|00003e30| 65 6e 20 74 68 65 20 70 | 73 65 75 64 6f 2d 74 74 |en the p|seudo-tt|
|00003e40| 79 20 61 6e 64 20 74 68 | 65 0a 58 6f 75 74 67 6f |y and th|e.Xoutgo|
|00003e50| 69 6e 67 20 64 61 74 61 | 2e 20 49 66 20 79 6f 75 |ing data|. If you|
|00003e60| 20 77 61 6e 74 20 74 6f | 20 73 70 61 72 65 20 6c | want to| spare l|
|00003e70| 65 73 73 20 74 68 61 6e | 20 33 32 4b 20 70 65 72 |ess than| 32K per|
|00003e80| 20 70 74 79 20 6a 75 73 | 74 20 66 6f 72 0a 58 62 | pty jus|t for.Xb|
|00003e90| 75 66 66 65 72 20 73 70 | 61 63 65 2c 20 66 65 65 |uffer sp|ace, fee|
|00003ea0| 6c 20 66 72 65 65 20 74 | 6f 20 63 68 61 6e 67 65 |l free t|o change|
|00003eb0| 20 74 68 69 73 2e 0a 58 | 0a 58 2d 2d 2d 2d 2d 20 | this..X|.X----- |
|00003ec0| 50 72 65 73 73 20 72 65 | 74 75 72 6e 20 74 6f 20 |Press re|turn to |
|00003ed0| 63 6f 6e 74 69 6e 75 65 | 2e 20 0a 58 0a 58 47 45 |continue|. .X.XGE|
|00003ee0| 4e 45 52 49 43 20 69 73 | 20 61 6e 6f 74 68 65 72 |NERIC is| another|
|00003ef0| 20 63 6f 6e 63 65 73 73 | 69 6f 6e 20 74 6f 20 41 | concess|ion to A|
|00003f00| 4e 53 49 20 74 61 73 74 | 65 2e 20 47 45 4e 45 52 |NSI tast|e. GENER|
|00003f10| 49 43 20 2a 20 73 68 6f | 75 6c 64 20 62 65 20 61 |IC * sho|uld be a|
|00003f20| 0a 58 70 6f 69 6e 74 65 | 72 20 74 79 70 65 20 74 |.Xpointe|r type t|
|00003f30| 68 61 74 20 61 6e 79 20 | 6f 74 68 65 72 20 70 6f |hat any |other po|
|00003f40| 69 6e 74 65 72 20 63 61 | 6e 20 62 65 20 73 61 66 |inter ca|n be saf|
|00003f50| 65 6c 79 20 63 6f 6e 76 | 65 72 74 65 64 20 74 6f |ely conv|erted to|
|00003f60| 20 61 6e 64 20 62 61 63 | 6b 3b 0a 58 47 45 4e 45 | and bac|k;.XGENE|
|00003f70| 52 49 43 20 69 73 20 63 | 68 61 72 20 62 79 20 64 |RIC is c|har by d|
|00003f80| 65 66 61 75 6c 74 2c 20 | 62 75 74 20 6f 6e 20 6e |efault, |but on n|
|00003f90| 65 77 65 72 20 6d 61 63 | 68 69 6e 65 73 20 63 61 |ewer mac|hines ca|
|00003fa0| 6e 20 62 65 20 73 65 74 | 20 74 6f 20 76 6f 69 64 |n be set| to void|
|00003fb0| 2e 0a 58 41 73 20 69 74 | 27 6c 6c 20 62 65 20 61 |..XAs it|'ll be a|
|00003fc0| 74 20 6c 65 61 73 74 20 | 66 69 76 65 20 79 65 61 |t least |five yea|
|00003fd0| 72 73 20 62 65 66 6f 72 | 65 20 41 4e 53 49 20 6d |rs befor|e ANSI m|
|00003fe0| 61 6e 61 67 65 73 20 74 | 6f 20 6f 75 74 6c 61 77 |anages t|o outlaw|
|00003ff0| 20 63 68 61 72 20 2a 2c | 0a 58 61 6e 64 20 61 73 | char *,|.Xand as|
|00004000| 20 76 6f 69 64 20 2a 20 | 69 73 20 6f 66 74 65 6e | void * |is often|
|00004010| 20 69 6e 76 61 6c 69 64 | 2c 20 49 20 61 64 76 69 | invalid|, I advi|
|00004020| 73 65 20 79 6f 75 20 74 | 6f 20 6c 65 61 76 65 20 |se you t|o leave |
|00004030| 47 45 4e 45 52 49 43 20 | 61 6c 6f 6e 65 2e 0a 58 |GENERIC |alone..X|
|00004040| 0a 58 2d 2d 2d 2d 2d 20 | 50 72 65 73 73 20 72 65 |.X----- |Press re|
|00004050| 74 75 72 6e 20 74 6f 20 | 63 6f 6e 74 69 6e 75 65 |turn to |continue|
|00004060| 2e 20 0a 58 0a 58 70 74 | 79 20 61 74 74 65 6d 70 |. .X.Xpt|y attemp|
|00004070| 74 73 20 74 6f 20 66 6f | 72 77 61 72 64 20 77 69 |ts to fo|rward wi|
|00004080| 6e 64 6f 77 2d 73 69 7a | 65 20 63 68 61 6e 67 65 |ndow-siz|e change|
|00004090| 73 20 74 72 61 6e 73 70 | 61 72 65 6e 74 6c 79 2e |s transp|arently.|
|000040a0| 20 49 74 20 61 6c 73 6f | 0a 58 73 75 70 70 6f 72 | It also|.Xsuppor|
|000040b0| 74 73 20 74 68 65 20 61 | 75 78 69 6c 69 61 72 79 |ts the a|uxiliary|
|000040c0| 20 63 68 61 72 61 63 74 | 65 72 73 20 73 74 72 75 | charact|ers stru|
|000040d0| 63 74 75 72 65 2c 20 77 | 68 69 63 68 20 6c 65 74 |cture, w|hich let|
|000040e0| 73 20 79 6f 75 20 74 79 | 70 65 20 61 0a 58 73 69 |s you ty|pe a.Xsi|
|000040f0| 6e 67 6c 65 20 63 68 61 | 72 61 63 74 65 72 20 74 |ngle cha|racter t|
|00004100| 6f 20 67 65 74 20 73 79 | 73 74 65 6d 20 61 6e 64 |o get sy|stem and|
|00004110| 20 74 74 79 20 73 74 61 | 74 75 73 2e 0a 58 0a 58 | tty sta|tus..X.X|
|00004120| 52 75 6e 6e 69 6e 67 20 | 24 20 6d 61 6e 20 34 20 |Running |$ man 4 |
|00004130| 74 74 79 20 7c 20 73 65 | 64 20 27 73 2f 2f 2f 67 |tty | se|d 's///g|
|00004140| 27 20 7c 20 67 72 65 70 | 20 2d 73 20 77 69 6e 73 |' | grep| -s wins|
|00004150| 69 7a 65 0a 58 52 65 66 | 6f 72 6d 61 74 74 69 6e |ize.XRef|ormattin|
|00004160| 67 20 70 61 67 65 2e 20 | 20 57 61 69 74 2e 2e 2e |g page. | Wait...|
|00004170| 20 64 6f 6e 65 0a 58 0a | 58 49 20 73 65 65 20 79 | done.X.|XI see y|
|00004180| 6f 75 20 64 6f 6e 27 74 | 20 68 61 76 65 20 77 69 |ou don't| have wi|
|00004190| 6e 64 6f 77 20 73 69 7a | 65 73 2e 0a 58 59 6f 75 |ndow siz|es..XYou|
|000041a0| 27 6c 6c 20 68 61 76 65 | 20 74 6f 20 63 6f 6d 6d |'ll have| to comm|
|000041b0| 65 6e 74 20 6f 75 74 20 | 23 64 65 66 69 6e 65 20 |ent out |#define |
|000041c0| 54 54 59 5f 57 49 4e 53 | 49 5a 45 20 69 6e 20 63 |TTY_WINS|IZE in c|
|000041d0| 6f 6e 66 69 67 2e 68 2e | 0a 58 28 54 68 69 73 20 |onfig.h.|.X(This |
|000041e0| 6d 61 79 20 62 65 20 69 | 6e 61 63 63 75 72 61 74 |may be i|naccurat|
|000041f0| 65 20 6f 6e 20 53 75 6e | 73 3b 20 74 72 79 20 67 |e on Sun|s; try g|
|00004200| 72 65 70 20 77 69 6e 73 | 69 7a 65 20 2f 75 73 72 |rep wins|ize /usr|
|00004210| 2f 69 6e 63 6c 75 64 65 | 2f 73 79 73 2f 74 74 2a |/include|/sys/tt*|
|00004220| 2e 68 2e 29 0a 58 0a 58 | 5b 4e 6f 74 65 3a 20 41 |.h.).X.X|[Note: A|
|00004230| 73 20 61 20 6d 61 74 74 | 65 72 20 6f 66 20 66 61 |s a matt|er of fa|
|00004240| 63 74 2c 20 74 68 65 20 | 74 65 73 74 20 69 73 20 |ct, the |test is |
|00004250| 69 6e 61 63 63 75 72 61 | 74 65 20 75 6e 64 65 72 |inaccura|te under|
|00004260| 20 53 75 6e 4f 53 20 34 | 2e 30 2e 33 2c 0a 58 77 | SunOS 4|.0.3,.Xw|
|00004270| 68 69 63 68 20 64 6f 65 | 73 20 68 61 76 65 20 77 |hich doe|s have w|
|00004280| 69 6e 64 6f 77 20 73 69 | 7a 65 73 2e 20 49 66 20 |indow si|zes. If |
|00004290| 79 6f 75 20 68 61 76 65 | 20 77 69 6e 64 6f 77 20 |you have| window |
|000042a0| 73 69 7a 65 73 2c 20 79 | 6f 75 20 64 6f 6e 27 74 |sizes, y|ou don't|
|000042b0| 20 68 61 76 65 0a 58 74 | 6f 20 64 6f 20 61 6e 79 | have.Xt|o do any|
|000042c0| 74 68 69 6e 67 2e 5d 0a | 58 0a 58 52 75 6e 6e 69 |thing.].|X.XRunni|
|000042d0| 6e 67 20 24 20 6d 61 6e | 20 34 20 74 74 79 20 7c |ng $ man| 4 tty ||
|000042e0| 20 73 65 64 20 27 73 2f | 2f 2f 67 27 20 7c 20 67 | sed 's/|//g' | g|
|000042f0| 72 65 70 20 2d 73 20 61 | 75 78 63 68 61 72 73 0a |rep -s a|uxchars.|
|00004300| 58 52 65 66 6f 72 6d 61 | 74 74 69 6e 67 20 70 61 |XReforma|tting pa|
|00004310| 67 65 2e 20 20 57 61 69 | 74 2e 2e 2e 20 64 6f 6e |ge. Wai|t... don|
|00004320| 65 0a 58 0a 58 49 20 73 | 65 65 20 79 6f 75 20 64 |e.X.XI s|ee you d|
|00004330| 6f 6e 27 74 20 68 61 76 | 65 20 61 75 78 69 6c 69 |on't hav|e auxili|
|00004340| 61 72 79 20 63 68 61 72 | 61 63 74 65 72 73 2e 0a |ary char|acters..|
|00004350| 58 0a 58 5b 4e 6f 74 65 | 3a 20 54 68 69 73 20 69 |X.X[Note|: This i|
|00004360| 73 20 74 68 65 20 75 73 | 75 61 6c 2e 20 49 66 20 |s the us|ual. If |
|00004370| 79 6f 75 20 68 61 76 65 | 20 61 75 78 69 6c 69 61 |you have| auxilia|
|00004380| 72 79 20 63 68 61 72 61 | 63 74 65 72 73 20 61 6e |ry chara|cters an|
|00004390| 64 20 77 61 6e 74 20 70 | 74 79 0a 58 74 6f 20 75 |d want p|ty.Xto u|
|000043a0| 6e 64 65 72 73 74 61 6e | 64 20 74 68 65 6d 2c 20 |nderstan|d them, |
|000043b0| 75 6e 63 6f 6d 6d 65 6e | 74 20 23 64 65 66 69 6e |uncommen|t #defin|
|000043c0| 65 20 54 54 59 5f 41 55 | 58 43 48 41 52 53 20 69 |e TTY_AU|XCHARS i|
|000043d0| 6e 20 63 6f 6e 66 69 67 | 2e 68 2e 5d 0a 58 0a 58 |n config|.h.].X.X|
|000043e0| 2d 2d 2d 2d 2d 20 50 72 | 65 73 73 20 72 65 74 75 |----- Pr|ess retu|
|000043f0| 72 6e 20 74 6f 20 63 6f | 6e 74 69 6e 75 65 2e 20 |rn to co|ntinue. |
|00004400| 0a 58 0a 58 70 74 79 20 | 61 6c 73 6f 20 70 75 74 |.X.Xpty |also put|
|00004410| 73 20 73 69 67 69 6e 74 | 65 72 72 75 70 74 28 29 |s sigint|errupt()|
|00004420| 20 61 6e 64 20 75 73 6c | 65 65 70 28 29 20 74 6f | and usl|eep() to|
|00004430| 20 67 6f 6f 64 20 75 73 | 65 20 69 6e 20 77 6f 72 | good us|e in wor|
|00004440| 6b 69 6e 67 0a 58 61 72 | 6f 75 6e 64 20 42 53 44 |king.Xar|ound BSD|
|00004450| 20 6c 69 6d 69 74 61 74 | 69 6f 6e 73 2e 20 57 69 | limitat|ions. Wi|
|00004460| 74 68 6f 75 74 20 73 69 | 67 69 6e 74 65 72 72 75 |thout si|ginterru|
|00004470| 70 74 28 29 2c 20 74 68 | 65 72 65 20 69 73 20 61 |pt(), th|ere is a|
|00004480| 62 73 6f 6c 75 74 65 6c | 79 0a 58 6e 6f 20 77 61 |bsolutel|y.Xno wa|
|00004490| 79 20 74 6f 20 67 65 74 | 20 70 65 72 2d 70 72 6f |y to get| per-pro|
|000044a0| 63 65 73 73 20 6e 6f 6e | 2d 62 6c 6f 63 6b 69 6e |cess non|-blockin|
|000044b0| 67 20 49 2f 4f 2c 20 73 | 6f 20 70 74 79 20 6d 61 |g I/O, s|o pty ma|
|000044c0| 79 20 62 6c 6f 63 6b 20 | 77 68 65 6e 20 69 74 0a |y block |when it.|
|000044d0| 58 64 6f 65 73 6e 27 74 | 20 68 61 76 65 20 74 6f |Xdoesn't| have to|
|000044e0| 20 28 6e 61 6d 65 6c 79 | 2c 20 77 68 65 6e 20 69 | (namely|, when i|
|000044f0| 74 20 68 61 73 20 4e 20 | 62 79 74 65 73 20 74 6f |t has N |bytes to|
|00004500| 20 77 72 69 74 65 20 74 | 6f 20 74 68 65 20 6f 75 | write t|o the ou|
|00004510| 74 70 75 74 2c 0a 58 74 | 68 65 20 6f 75 74 70 75 |tput,.Xt|he outpu|
|00004520| 74 20 69 73 20 61 20 70 | 69 70 65 20 77 69 74 68 |t is a p|ipe with|
|00004530| 20 4d 20 62 79 74 65 73 | 20 6f 66 20 73 70 61 63 | M bytes| of spac|
|00004540| 65 2c 20 61 6e 64 20 4e | 20 3e 20 4d 20 3e 20 30 |e, and N| > M > 0|
|00004550| 29 2e 20 49 66 20 79 6f | 75 0a 58 64 65 66 69 6e |). If yo|u.Xdefin|
|00004560| 65 20 53 49 47 49 4e 54 | 45 52 52 55 50 54 20 28 |e SIGINT|ERRUPT (|
|00004570| 61 73 20 64 65 66 61 75 | 6c 74 29 2c 20 70 74 79 |as defau|lt), pty|
|00004580| 20 77 69 6c 6c 20 74 61 | 6b 65 20 73 6f 6d 65 20 | will ta|ke some |
|00004590| 65 78 74 72 61 20 65 66 | 66 6f 72 74 20 74 6f 0a |extra ef|fort to.|
|000045a0| 58 6e 65 76 65 72 2c 20 | 65 76 65 72 2c 20 65 76 |Xnever, |ever, ev|
|000045b0| 65 72 20 62 6c 6f 63 6b | 20 77 68 65 6e 20 69 74 |er block| when it|
|000045c0| 20 64 6f 65 73 6e 27 74 | 20 68 61 76 65 20 74 6f | doesn't| have to|
|000045d0| 2e 0a 58 0a 58 41 74 20 | 6f 6e 65 20 70 6f 69 6e |..X.XAt |one poin|
|000045e0| 74 2c 20 70 74 79 20 70 | 61 75 73 65 73 20 74 6f |t, pty p|auses to|
|000045f0| 20 6b 6c 75 64 67 65 20 | 61 72 6f 75 6e 64 20 61 | kludge |around a|
|00004600| 20 63 6f 6d 6d 6f 6e 20 | 62 75 67 20 69 6e 20 55 | common |bug in U|
|00004610| 4e 49 58 2d 64 6f 6d 61 | 69 6e 0a 58 73 6f 63 6b |NIX-doma|in.Xsock|
|00004620| 65 74 73 2e 20 57 69 74 | 68 20 75 73 6c 65 65 70 |ets. Wit|h usleep|
|00004630| 28 29 20 69 74 20 77 69 | 6c 6c 20 70 61 75 73 65 |() it wi|ll pause|
|00004640| 20 6d 75 63 68 20 6d 6f | 72 65 20 62 72 69 65 66 | much mo|re brief|
|00004650| 6c 79 2e 20 54 68 69 73 | 20 6d 61 6b 65 73 0a 58 |ly. This| makes.X|
|00004660| 72 65 63 6f 6e 6e 65 63 | 74 73 20 6d 75 63 68 20 |reconnec|ts much |
|00004670| 66 61 73 74 65 72 2e 0a | 58 0a 58 52 75 6e 6e 69 |faster..|X.XRunni|
|00004680| 6e 67 20 24 20 6d 61 6e | 20 73 69 67 69 6e 74 65 |ng $ man| siginte|
|00004690| 72 72 75 70 74 20 7c 20 | 73 65 64 20 27 73 2f 2f |rrupt | |sed 's//|
|000046a0| 2f 67 27 20 7c 20 67 72 | 65 70 20 2d 73 20 73 69 |/g' | gr|ep -s si|
|000046b0| 67 69 6e 74 65 72 72 75 | 70 74 0a 58 52 65 66 6f |ginterru|pt.XRefo|
|000046c0| 72 6d 61 74 74 69 6e 67 | 20 70 61 67 65 2e 20 20 |rmatting| page. |
|000046d0| 57 61 69 74 2e 2e 2e 20 | 64 6f 6e 65 0a 58 0a 58 |Wait... |done.X.X|
|000046e0| 49 20 73 65 65 20 79 6f | 75 20 68 61 76 65 20 73 |I see yo|u have s|
|000046f0| 69 67 69 6e 74 65 72 72 | 75 70 74 28 29 2e 20 47 |iginterr|upt(). G|
|00004700| 6f 6f 64 2e 0a 58 0a 58 | 57 65 69 72 64 2c 20 61 |ood..X.X|Weird, a|
|00004710| 72 65 20 79 6f 75 20 42 | 53 44 20 34 2e 33 3f 0a |re you B|SD 4.3?.|
|00004720| 58 0a 58 5b 4e 6f 74 65 | 3a 20 57 69 74 68 6f 75 |X.X[Note|: Withou|
|00004730| 74 20 73 69 67 69 6e 74 | 65 72 72 75 70 74 28 29 |t sigint|errupt()|
|00004740| 2c 20 79 6f 75 20 68 61 | 76 65 20 74 6f 20 63 6f |, you ha|ve to co|
|00004750| 6d 6d 65 6e 74 20 6f 75 | 74 20 23 64 65 66 69 6e |mment ou|t #defin|
|00004760| 65 0a 58 53 49 47 49 4e | 54 45 52 52 55 50 54 20 |e.XSIGIN|TERRUPT |
|00004770| 69 6e 20 63 6f 6e 66 69 | 67 2e 68 2e 5d 0a 58 0a |in confi|g.h.].X.|
|00004780| 58 52 75 6e 6e 69 6e 67 | 20 24 20 6d 61 6e 20 75 |XRunning| $ man u|
|00004790| 73 6c 65 65 70 20 7c 20 | 73 65 64 20 27 73 2f 2f |sleep | |sed 's//|
|000047a0| 2f 67 27 20 7c 20 67 72 | 65 70 20 2d 73 20 75 73 |/g' | gr|ep -s us|
|000047b0| 6c 65 65 70 0a 58 52 65 | 66 6f 72 6d 61 74 74 69 |leep.XRe|formatti|
|000047c0| 6e 67 20 70 61 67 65 2e | 20 20 57 61 69 74 2e 2e |ng page.| Wait..|
|000047d0| 2e 20 64 6f 6e 65 0a 58 | 0a 58 49 20 73 65 65 20 |. done.X|.XI see |
|000047e0| 79 6f 75 20 68 61 76 65 | 20 75 73 6c 65 65 70 28 |you have| usleep(|
|000047f0| 29 2e 20 47 6f 6f 64 2e | 0a 58 0a 58 5b 4e 6f 74 |). Good.|.X.X[Not|
|00004800| 65 3a 20 57 69 74 68 6f | 75 74 20 75 73 6c 65 65 |e: Witho|ut uslee|
|00004810| 70 28 29 2c 20 79 6f 75 | 20 68 61 76 65 20 74 6f |p(), you| have to|
|00004820| 20 63 6f 6d 6d 65 6e 74 | 20 6f 75 74 20 23 64 65 | comment| out #de|
|00004830| 66 69 6e 65 20 55 53 4c | 45 45 50 20 69 6e 0a 58 |fine USL|EEP in.X|
|00004840| 63 6f 6e 66 69 67 2e 68 | 2e 5d 0a 58 0a 58 2d 2d |config.h|.].X.X--|
|00004850| 2d 2d 2d 20 50 72 65 73 | 73 20 72 65 74 75 72 6e |--- Pres|s return|
|00004860| 20 74 6f 20 63 6f 6e 74 | 69 6e 75 65 2e 20 0a 58 | to cont|inue. .X|
|00004870| 0a 58 46 69 6e 61 6c 6c | 79 20 28 61 6c 6d 6f 73 |.XFinall|y (almos|
|00004880| 74 20 64 6f 6e 65 20 77 | 69 74 68 20 63 6f 6e 66 |t done w|ith conf|
|00004890| 69 67 75 72 61 74 69 6f | 6e 21 29 2c 20 77 65 20 |iguratio|n!), we |
|000048a0| 68 61 76 65 20 74 6f 20 | 6d 61 6b 65 20 73 75 72 |have to |make sur|
|000048b0| 65 20 74 68 61 74 20 79 | 6f 75 0a 58 68 61 76 65 |e that y|ou.Xhave|
|000048c0| 20 55 4e 49 58 2d 64 6f | 6d 61 69 6e 20 73 6f 63 | UNIX-do|main soc|
|000048d0| 6b 65 74 73 2c 20 61 6e | 64 20 63 68 65 63 6b 20 |kets, an|d check |
|000048e0| 77 68 65 74 68 65 72 20 | 79 6f 75 20 68 61 76 65 |whether |you have|
|000048f0| 20 66 69 6c 65 20 64 65 | 73 63 72 69 70 74 6f 72 | file de|scriptor|
|00004900| 0a 58 70 61 73 73 69 6e | 67 2e 0a 58 0a 58 52 75 |.Xpassin|g..X.XRu|
|00004910| 6e 6e 69 6e 67 20 24 20 | 74 65 73 74 20 2d 72 20 |nning $ |test -r |
|00004920| 2f 75 73 72 2f 69 6e 63 | 6c 75 64 65 2f 73 79 73 |/usr/inc|lude/sys|
|00004930| 2f 75 6e 2e 68 0a 58 0a | 58 49 20 73 65 65 20 79 |/un.h.X.|XI see y|
|00004940| 6f 75 20 68 61 76 65 20 | 55 4e 49 58 2d 64 6f 6d |ou have |UNIX-dom|
|00004950| 61 69 6e 20 73 6f 63 6b | 65 74 73 2e 20 47 6f 6f |ain sock|ets. Goo|
|00004960| 64 2e 0a 58 0a 58 5b 4e | 6f 74 65 3a 20 49 66 20 |d..X.X[N|ote: If |
|00004970| 3c 73 79 73 2f 75 6e 2e | 68 3e 20 69 73 6e 27 74 |<sys/un.|h> isn't|
|00004980| 20 74 68 65 72 65 2c 20 | 79 6f 75 20 70 72 6f 62 | there, |you prob|
|00004990| 61 62 6c 79 20 64 6f 6e | 27 74 20 68 61 76 65 20 |ably don|'t have |
|000049a0| 55 4e 49 58 2d 64 6f 6d | 61 69 6e 0a 58 73 6f 63 |UNIX-dom|ain.Xsoc|
|000049b0| 6b 65 74 73 2c 20 77 68 | 69 63 68 20 6d 65 61 6e |kets, wh|ich mean|
|000049c0| 73 20 79 6f 75 20 63 61 | 6e 27 74 20 68 61 76 65 |s you ca|n't have|
|000049d0| 20 64 69 73 63 6f 6e 6e | 65 63 74 61 62 6c 65 20 | disconn|ectable |
|000049e0| 73 65 73 73 69 6f 6e 73 | 2e 20 44 65 66 69 6e 65 |sessions|. Define|
|000049f0| 0a 58 4e 4f 5f 55 4e 49 | 58 53 4f 43 4b 53 20 69 |.XNO_UNI|XSOCKS i|
|00004a00| 6e 20 63 6f 6e 66 69 67 | 2e 68 2e 5d 0a 58 0a 58 |n config|.h.].X.X|
|00004a10| 52 75 6e 6e 69 6e 67 20 | 24 20 6d 61 6e 20 72 65 |Running |$ man re|
|00004a20| 63 76 6d 73 67 20 7c 20 | 73 65 64 20 27 73 2f 2f |cvmsg | |sed 's//|
|00004a30| 2f 67 27 20 7c 20 67 72 | 65 70 20 2d 73 20 72 69 |/g' | gr|ep -s ri|
|00004a40| 67 68 74 73 0a 58 52 65 | 66 6f 72 6d 61 74 74 69 |ghts.XRe|formatti|
|00004a50| 6e 67 20 70 61 67 65 2e | 20 20 57 61 69 74 2e 2e |ng page.| Wait..|
|00004a60| 2e 20 64 6f 6e 65 0a 58 | 0a 58 49 20 73 65 65 20 |. done.X|.XI see |
|00004a70| 79 6f 75 20 68 61 76 65 | 20 66 69 6c 65 20 64 65 |you have| file de|
|00004a80| 73 63 72 69 70 74 6f 72 | 20 70 61 73 73 69 6e 67 |scriptor| passing|
|00004a90| 2e 20 47 6f 6f 64 2e 20 | 28 59 6f 75 72 20 66 64 |. Good. |(Your fd|
|00004aa0| 20 70 61 73 73 69 6e 67 | 20 6d 61 79 20 62 65 0a | passing| may be.|
|00004ab0| 58 62 75 67 67 79 2c 20 | 61 73 20 69 74 27 73 20 |Xbuggy, |as it's |
|00004ac0| 61 20 72 65 6c 61 74 69 | 76 65 6c 79 20 6e 65 77 |a relati|vely new|
|00004ad0| 2c 20 70 6f 77 65 72 66 | 75 6c 2c 20 61 6e 64 20 |, powerf|ul, and |
|00004ae0| 72 61 72 65 6c 79 20 65 | 78 70 6c 6f 69 74 65 64 |rarely e|xploited|
|00004af0| 0a 58 66 65 61 74 75 72 | 65 2e 20 49 66 20 79 6f |.Xfeatur|e. If yo|
|00004b00| 75 20 68 61 76 65 20 74 | 72 6f 75 62 6c 65 2c 20 |u have t|rouble, |
|00004b10| 74 72 79 20 64 65 66 69 | 6e 69 6e 67 20 4e 4f 5f |try defi|ning NO_|
|00004b20| 46 44 50 41 53 53 49 4e | 47 2e 29 0a 58 0a 58 5b |FDPASSIN|G.).X.X[|
|00004b30| 4e 6f 74 65 3a 20 49 66 | 20 74 68 65 72 65 20 69 |Note: If| there i|
|00004b40| 73 6e 27 74 20 61 20 72 | 65 63 76 6d 73 67 28 29 |sn't a r|ecvmsg()|
|00004b50| 20 6d 61 6e 20 70 61 67 | 65 20 6d 65 6e 74 69 6f | man pag|e mentio|
|00004b60| 6e 69 6e 67 20 61 63 63 | 65 73 73 20 72 69 67 68 |ning acc|ess righ|
|00004b70| 74 73 2c 20 79 6f 75 0a | 58 70 72 6f 62 61 62 6c |ts, you.|Xprobabl|
|00004b80| 79 20 64 6f 6e 27 74 20 | 68 61 76 65 20 66 69 6c |y don't |have fil|
|00004b90| 65 20 64 65 73 63 72 69 | 70 74 6f 72 20 70 61 73 |e descri|ptor pas|
|00004ba0| 73 69 6e 67 2e 20 54 68 | 69 73 20 69 73 6e 27 74 |sing. Th|is isn't|
|00004bb0| 20 61 20 64 69 73 61 73 | 74 65 72 2c 0a 58 74 68 | a disas|ter,.Xth|
|00004bc0| 6f 75 67 68 20 69 74 20 | 6d 65 61 6e 73 20 74 68 |ough it |means th|
|00004bd0| 61 74 20 72 65 63 6f 6e | 6e 65 63 74 65 64 20 73 |at recon|nected s|
|00004be0| 65 73 73 69 6f 6e 73 20 | 77 69 6c 6c 20 62 65 20 |essions |will be |
|00004bf0| 61 73 20 73 6c 6f 77 20 | 61 73 20 74 68 65 79 20 |as slow |as they |
|00004c00| 61 72 65 20 69 6e 0a 58 | 70 72 6f 67 72 61 6d 73 |are in.X|programs|
|00004c10| 20 6f 74 68 65 72 20 74 | 68 61 6e 20 70 74 79 2e | other t|han pty.|
|00004c20| 20 44 65 66 69 6e 65 20 | 4e 4f 5f 46 44 50 41 53 | Define |NO_FDPAS|
|00004c30| 53 49 4e 47 2e 5d 0a 58 | 0a 58 2d 2d 2d 2d 2d 20 |SING.].X|.X----- |
|00004c40| 50 72 65 73 73 20 72 65 | 74 75 72 6e 20 74 6f 20 |Press re|turn to |
|00004c50| 63 6f 6e 74 69 6e 75 65 | 2e 20 0a 58 0a 58 57 68 |continue|. .X.XWh|
|00004c60| 65 77 21 20 57 65 27 76 | 65 20 66 69 6e 61 6c 6c |ew! We'v|e finall|
|00004c70| 79 20 6d 61 64 65 20 69 | 74 20 74 68 72 6f 75 67 |y made i|t throug|
|00004c80| 68 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 2e |h config|uration.|
|00004c90| 20 49 66 20 79 6f 75 20 | 77 61 6e 74 2c 20 74 72 | If you |want, tr|
|00004ca0| 79 0a 58 72 75 6e 6e 69 | 6e 67 20 6c 69 6e 74 20 |y.Xrunni|ng lint |
|00004cb0| 2d 68 61 78 63 20 2a 2e | 63 20 6f 72 20 77 68 61 |-haxc *.|c or wha|
|00004cc0| 74 65 76 65 72 20 79 6f | 75 72 20 66 61 76 6f 72 |tever yo|ur favor|
|00004cd0| 69 74 65 20 63 6f 64 65 | 20 63 68 65 63 6b 65 72 |ite code| checker|
|00004ce0| 20 69 73 3b 20 74 68 65 | 0a 58 6c 69 6e 74 20 68 | is; the|.Xlint h|
|00004cf0| 65 72 65 20 67 69 76 65 | 73 20 73 6f 6d 65 20 62 |ere give|s some b|
|00004d00| 6f 67 75 73 20 65 72 72 | 6f 72 73 20 61 62 6f 75 |ogus err|ors abou|
|00004d10| 74 20 63 6f 72 72 65 63 | 74 20 63 68 61 72 20 2a |t correc|t char *|
|00004d20| 20 63 61 73 74 73 2c 20 | 61 6e 20 65 72 72 6f 72 | casts, |an error|
|00004d30| 0a 58 62 65 63 61 75 73 | 65 20 74 68 65 20 53 49 |.Xbecaus|e the SI|
|00004d40| 47 5f 49 47 4e 20 64 65 | 66 69 6e 69 74 69 6f 6e |G_IGN de|finition|
|00004d50| 20 69 73 20 75 6e 70 6f | 72 74 61 62 6c 65 2c 20 | is unpo|rtable, |
|00004d60| 61 6e 64 20 61 20 63 6f | 75 70 6c 65 20 6f 66 20 |and a co|uple of |
|00004d70| 62 7a 65 72 6f 0a 58 63 | 6f 6d 70 6c 61 69 6e 74 |bzero.Xc|omplaint|
|00004d80| 73 20 62 65 63 61 75 73 | 65 20 46 44 5f 5a 45 52 |s becaus|e FD_ZER|
|00004d90| 4f 20 69 73 6e 27 74 20 | 64 65 66 69 6e 65 64 20 |O isn't |defined |
|00004da0| 76 65 72 79 20 77 65 6c | 6c 2e 0a 58 0a 58 49 66 |very wel|l..X.XIf|
|00004db0| 20 79 6f 75 27 72 65 20 | 6f 6e 20 61 6e 20 6f 6c | you're |on an ol|
|00004dc0| 64 20 73 79 73 74 65 6d | 20 77 69 74 68 6f 75 74 |d system| without|
|00004dd0| 20 46 44 5f 5a 45 52 4f | 2c 20 46 44 5f 53 45 54 | FD_ZERO|, FD_SET|
|00004de0| 2c 20 61 6e 64 20 46 44 | 5f 49 53 53 45 54 20 69 |, and FD|_ISSET i|
|00004df0| 6e 0a 58 3c 73 79 73 2f | 74 79 70 65 73 2e 68 3e |n.X<sys/|types.h>|
|00004e00| 2c 20 49 20 72 65 63 6f | 6d 6d 65 6e 64 20 79 6f |, I reco|mmend yo|
|00004e10| 75 20 75 70 67 72 61 64 | 65 2e 20 54 72 79 20 63 |u upgrad|e. Try c|
|00004e20| 6f 70 79 69 6e 67 20 66 | 69 6c 65 2e 68 2e 6f 6c |opying f|ile.h.ol|
|00004e30| 64 20 74 6f 20 66 69 6c | 65 2e 68 0a 58 28 74 68 |d to fil|e.h.X(th|
|00004e40| 65 20 6f 72 69 67 69 6e | 61 6c 20 76 65 72 73 69 |e origin|al versi|
|00004e50| 6f 6e 20 69 73 20 69 6e | 20 66 69 6c 65 2e 68 2e |on is in| file.h.|
|00004e60| 6e 65 77 29 2e 0a 58 0a | 58 57 65 27 72 65 20 6e |new)..X.|XWe're n|
|00004e70| 65 61 72 6c 79 20 61 74 | 20 74 68 65 20 65 6e 64 |early at| the end|
|00004e80| 2e 20 43 68 61 6e 67 65 | 20 43 43 20 61 6e 64 20 |. Change| CC and |
|00004e90| 43 43 4f 50 54 53 20 69 | 6e 20 74 68 65 20 4d 61 |CCOPTS i|n the Ma|
|00004ea0| 6b 65 66 69 6c 65 20 66 | 6f 72 20 61 6e 79 0a 58 |kefile f|or any.X|
|00004eb0| 6c 61 73 74 2d 6d 69 6e | 75 74 65 20 61 64 64 69 |last-min|ute addi|
|00004ec0| 74 69 6f 6e 73 3b 20 69 | 66 20 79 6f 75 27 72 65 |tions; i|f you're|
|00004ed0| 20 77 6f 72 72 69 65 64 | 2c 20 63 68 61 6e 67 65 | worried|, change|
|00004ee0| 20 2d 73 20 74 6f 20 2d | 67 20 66 6f 72 20 64 65 | -s to -|g for de|
|00004ef0| 62 75 67 67 69 6e 67 2e | 0a 58 4e 6f 77 20 63 6f |bugging.|.XNow co|
|00004f00| 6d 70 69 6c 65 21 20 25 | 20 28 64 61 74 65 3b 20 |mpile! %| (date; |
|00004f10| 6d 61 6b 65 29 20 3e 3e | 26 20 4d 61 6b 65 6c 6f |make) >>|& Makelo|
|00004f20| 67 20 26 20 61 6e 64 20 | 63 6f 6d 65 20 62 61 63 |g & and |come bac|
|00004f30| 6b 20 74 6f 20 74 68 69 | 73 20 73 63 72 69 70 74 |k to thi|s script|
|00004f40| 2e 0a 58 0a 58 2d 2d 2d | 2d 2d 20 50 72 65 73 73 |..X.X---|-- Press|
|00004f50| 20 72 65 74 75 72 6e 20 | 74 6f 20 63 6f 6e 74 69 | return |to conti|
|00004f60| 6e 75 65 2e 20 0a 58 0a | 58 57 68 69 6c 65 20 74 |nue. .X.|XWhile t|
|00004f70| 68 65 20 70 72 6f 67 72 | 61 6d 20 69 73 20 63 6f |he progr|am is co|
|00004f80| 6d 70 69 6c 69 6e 67 2c | 20 6c 65 74 27 73 20 73 |mpiling,| let's s|
|00004f90| 74 61 72 74 20 70 72 6f | 76 69 64 69 6e 67 20 73 |tart pro|viding s|
|00004fa0| 6f 6d 65 20 73 75 70 70 | 6f 72 74 2e 0a 58 28 49 |ome supp|ort..X(I|
|00004fb0| 66 20 74 68 65 20 63 6f | 6d 70 69 6c 65 20 66 69 |f the co|mpile fi|
|00004fc0| 6e 69 73 68 65 73 20 6f | 72 20 68 61 73 20 61 6e |nishes o|r has an|
|00004fd0| 20 65 72 72 6f 72 2c 20 | 6a 75 73 74 20 69 67 6e | error, |just ign|
|00004fe0| 6f 72 65 20 69 74 20 66 | 6f 72 20 74 68 65 0a 58 |ore it f|or the.X|
|00004ff0| 6d 6f 6d 65 6e 74 2e 29 | 20 54 68 65 73 65 20 61 |moment.)| These a|
|00005000| 72 65 20 73 6f 6d 65 20 | 72 65 61 6c 20 63 68 61 |re some |real cha|
|00005010| 6e 67 65 73 2c 20 73 6f | 20 77 61 74 63 68 20 6f |nges, so| watch o|
|00005020| 75 74 21 0a 58 0a 58 46 | 69 72 73 74 2d 2d 2d 69 |ut!.X.XF|irst---i|
|00005030| 6e 20 43 61 73 65 20 50 | 54 59 20 6f 6e 6c 79 21 |n Case P|TY only!|
|00005040| 2d 2d 2d 6d 61 6b 65 20 | 61 20 6e 65 77 20 75 69 |---make |a new ui|
|00005050| 64 2c 20 70 74 79 2c 20 | 6e 6f 74 20 61 6c 6c 6f |d, pty, |not allo|
|00005060| 77 69 6e 67 20 6c 6f 67 | 69 6e 73 2e 0a 58 0a 58 |wing log|ins..X.X|
|00005070| 2f 65 74 63 2f 70 61 73 | 73 77 64 3a 20 20 70 74 |/etc/pas|swd: pt|
|00005080| 79 3a 2a 3a 77 68 61 74 | 65 76 65 72 3a 34 3a 3a |y:*:what|ever:4::|
|00005090| 3a 2f 62 69 6e 2f 74 72 | 75 65 0a 58 0a 58 2d 2d |:/bin/tr|ue.X.X--|
|000050a0| 2d 2d 2d 20 50 72 65 73 | 73 20 72 65 74 75 72 6e |--- Pres|s return|
|000050b0| 20 74 6f 20 63 6f 6e 74 | 69 6e 75 65 2e 20 0a 58 | to cont|inue. .X|
|000050c0| 0a 58 53 65 63 6f 6e 64 | 2c 20 6d 61 6b 65 20 73 |.XSecond|, make s|
|000050d0| 75 72 65 20 79 6f 75 20 | 68 61 76 65 20 61 20 74 |ure you |have a t|
|000050e0| 74 79 20 67 72 6f 75 70 | 20 73 65 74 20 75 70 2e |ty group| set up.|
|000050f0| 0a 58 0a 58 2f 65 74 63 | 2f 67 72 6f 75 70 3a 20 |.X.X/etc|/group: |
|00005100| 20 74 74 79 3a 2a 3a 34 | 3a 72 6f 6f 74 0a 58 0a | tty:*:4|:root.X.|
|00005110| 58 2d 2d 2d 2d 2d 20 50 | 72 65 73 73 20 72 65 74 |X----- P|ress ret|
|00005120| 75 72 6e 20 74 6f 20 63 | 6f 6e 74 69 6e 75 65 2e |urn to c|ontinue.|
|00005130| 20 0a 58 0a 58 54 68 69 | 72 64 2c 20 6d 61 6b 65 | .X.XThi|rd, make|
|00005140| 20 50 54 59 44 49 52 2e | 0a 58 0a 58 52 4f 4f 54 | PTYDIR.|.X.XROOT|
|00005150| 3a 20 23 20 6d 6b 64 69 | 72 20 2f 75 73 72 2f 65 |: # mkdi|r /usr/e|
|00005160| 74 63 2f 70 74 79 3b 20 | 63 68 6d 6f 64 20 37 30 |tc/pty; |chmod 70|
|00005170| 30 20 2f 75 73 72 2f 65 | 74 63 2f 70 74 79 0a 58 |0 /usr/e|tc/pty.X|
|00005180| 50 54 59 3a 20 23 20 6d | 6b 64 69 72 20 2f 75 73 |PTY: # m|kdir /us|
|00005190| 72 2f 65 74 63 2f 70 74 | 79 3b 20 63 68 6f 77 6e |r/etc/pt|y; chown|
|000051a0| 20 70 74 79 20 2f 75 73 | 72 2f 65 74 63 2f 70 74 | pty /us|r/etc/pt|
|000051b0| 79 3b 20 63 68 6d 6f 64 | 20 37 30 30 20 2f 75 73 |y; chmod| 700 /us|
|000051c0| 72 2f 65 74 63 2f 70 74 | 79 0a 58 55 4e 3a 20 25 |r/etc/pt|y.XUN: %|
|000051d0| 20 6d 6b 64 69 72 20 7e | 2f 50 54 59 3b 20 63 68 | mkdir ~|/PTY; ch|
|000051e0| 6d 6f 64 20 37 30 30 20 | 7e 2f 50 54 59 0a 58 0a |mod 700 |~/PTY.X.|
|000051f0| 58 2d 2d 2d 2d 2d 20 50 | 72 65 73 73 20 72 65 74 |X----- P|ress ret|
|00005200| 75 72 6e 20 74 6f 20 63 | 6f 6e 74 69 6e 75 65 2e |urn to c|ontinue.|
|00005210| 20 0a 58 0a 58 46 6f 75 | 72 74 68 2c 20 6d 61 6b | .X.XFou|rth, mak|
|00005220| 65 20 73 75 72 65 20 79 | 6f 75 20 68 61 76 65 20 |e sure y|ou have |
|00005230| 61 6c 6c 20 74 68 65 20 | 70 73 65 75 64 6f 2d 74 |all the |pseudo-t|
|00005240| 65 72 6d 69 6e 61 6c 20 | 66 69 6c 65 73 20 73 65 |erminal |files se|
|00005250| 74 20 75 70 20 61 6e 64 | 0a 58 61 70 70 72 6f 70 |t up and|.Xapprop|
|00005260| 72 69 61 74 65 6c 79 20 | 63 6f 6e 66 69 67 75 72 |riately |configur|
|00005270| 65 64 2e 0a 58 0a 58 43 | 68 61 6e 67 65 20 65 61 |ed..X.XC|hange ea|
|00005280| 63 68 20 6f 66 20 74 68 | 65 6d 20 74 6f 20 67 72 |ch of th|em to gr|
|00005290| 6f 75 70 20 74 74 79 2e | 0a 58 0a 58 43 68 61 6e |oup tty.|.X.XChan|
|000052a0| 67 65 20 65 61 63 68 20 | 6f 66 20 74 68 65 6d 20 |ge each |of them |
|000052b0| 74 6f 20 6f 77 6e 65 72 | 20 70 74 79 20 69 6e 20 |to owner| pty in |
|000052c0| 63 61 73 65 20 50 54 59 | 20 6f 72 20 72 6f 6f 74 |case PTY| or root|
|000052d0| 20 69 6e 20 63 61 73 65 | 20 52 4f 4f 54 2e 0a 58 | in case| ROOT..X|
|000052e0| 0a 58 43 68 61 6e 67 65 | 20 65 61 63 68 20 6f 66 |.XChange| each of|
|000052f0| 20 74 68 65 6d 20 74 6f | 20 6d 6f 64 65 20 55 4e | them to| mode UN|
|00005300| 55 53 45 44 50 54 59 4d | 4f 44 45 20 28 30 36 30 |USEDPTYM|ODE (060|
|00005310| 30 29 2e 0a 58 0a 58 2d | 2d 2d 2d 2d 20 50 72 65 |0)..X.X-|---- Pre|
|00005320| 73 73 20 72 65 74 75 72 | 6e 20 74 6f 20 63 6f 6e |ss retur|n to con|
|00005330| 74 69 6e 75 65 2e 20 0a | 58 0a 58 46 69 66 74 68 |tinue. .|X.XFifth|
|00005340| 2c 20 6d 61 6b 65 20 73 | 75 72 65 20 2f 65 74 63 |, make s|ure /etc|
|00005350| 2f 75 74 6d 70 20 61 6e | 64 20 2f 75 73 72 2f 61 |/utmp an|d /usr/a|
|00005360| 64 6d 2f 77 74 6d 70 20 | 65 78 69 73 74 2c 20 6f |dm/wtmp |exist, o|
|00005370| 77 6e 65 64 20 62 79 20 | 72 6f 6f 74 20 69 6e 0a |wned by |root in.|
|00005380| 58 43 61 73 65 20 52 4f | 4f 54 20 6f 72 20 70 74 |XCase RO|OT or pt|
|00005390| 79 20 69 6e 20 43 61 73 | 65 20 50 54 59 2c 20 65 |y in Cas|e PTY, e|
|000053a0| 61 63 68 20 6d 6f 64 65 | 20 36 34 34 2e 20 28 49 |ach mode| 644. (I|
|000053b0| 6e 20 43 61 73 65 20 55 | 4e 2c 20 79 6f 75 20 70 |n Case U|N, you p|
|000053c0| 72 6f 62 61 62 6c 79 0a | 58 77 61 6e 74 20 74 6f |robably.|Xwant to|
|000053d0| 20 62 65 20 77 6f 72 6b | 69 6e 67 20 6f 6e 20 61 | be work|ing on a|
|000053e0| 20 53 75 6e 20 77 69 74 | 68 20 69 74 73 20 69 6e | Sun wit|h its in|
|000053f0| 73 65 63 75 72 65 20 2f | 65 74 63 2f 75 74 6d 70 |secure /|etc/utmp|
|00005400| 2c 20 73 6f 20 74 68 61 | 74 20 70 74 79 20 63 61 |, so tha|t pty ca|
|00005410| 6e 0a 58 74 61 6b 65 20 | 61 64 76 61 6e 74 61 67 |n.Xtake |advantag|
|00005420| 65 20 6f 66 20 69 74 2e | 20 53 69 67 68 2e 29 0a |e of it.| Sigh.).|
|00005430| 58 0a 58 2d 2d 2d 2d 2d | 20 50 72 65 73 73 20 72 |X.X-----| Press r|
|00005440| 65 74 75 72 6e 20 74 6f | 20 63 6f 6e 74 69 6e 75 |eturn to| continu|
|00005450| 65 2e 20 0a 58 0a 58 53 | 69 78 74 68 2c 20 49 20 |e. .X.XS|ixth, I |
|00005460| 61 64 76 69 73 65 20 74 | 68 61 74 20 79 6f 75 20 |advise t|hat you |
|00005470| 6d 61 6b 65 20 61 20 73 | 70 65 63 69 61 6c 20 64 |make a s|pecial d|
|00005480| 69 72 65 63 74 6f 72 79 | 20 2f 75 73 72 2f 6c 6f |irectory| /usr/lo|
|00005490| 63 61 6c 2f 70 74 79 62 | 69 6e 20 66 6f 72 0a 58 |cal/ptyb|in for.X|
|000054a0| 70 74 79 20 61 6e 64 20 | 69 74 73 20 61 73 73 6f |pty and |its asso|
|000054b0| 63 69 61 74 65 64 20 75 | 74 69 6c 69 74 69 65 73 |ciated u|tilities|
|000054c0| 2c 20 77 69 74 68 20 73 | 79 6d 62 6f 6c 69 63 20 |, with s|ymbolic |
|000054d0| 6c 69 6e 6b 73 20 69 6e | 20 2f 75 73 72 2f 6c 6f |links in| /usr/lo|
|000054e0| 63 61 6c 2e 0a 58 54 68 | 69 73 20 63 68 6f 69 63 |cal..XTh|is choic|
|000054f0| 65 20 69 73 6e 27 74 20 | 74 6f 6f 20 69 6d 70 6f |e isn't |too impo|
|00005500| 72 74 61 6e 74 2c 20 62 | 75 74 20 69 74 27 73 20 |rtant, b|ut it's |
|00005510| 65 61 73 69 65 72 20 69 | 66 20 79 6f 75 20 6b 6e |easier i|f you kn|
|00005520| 6f 77 20 61 0a 58 70 6c | 61 63 65 20 74 6f 20 70 |ow a.Xpl|ace to p|
|00005530| 75 74 20 70 72 6f 67 72 | 61 6d 73 2e 0a 58 0a 58 |ut progr|ams..X.X|
|00005540| 2d 2d 2d 2d 2d 20 50 72 | 65 73 73 20 72 65 74 75 |----- Pr|ess retu|
|00005550| 72 6e 20 74 6f 20 63 6f | 6e 74 69 6e 75 65 2e 20 |rn to co|ntinue. |
|00005560| 0a 58 0a 58 4f 6b 61 79 | 2e 20 59 6f 75 27 76 65 |.X.XOkay|. You've|
|00005570| 20 64 6f 6e 65 20 61 62 | 6f 75 74 20 61 6c 6c 20 | done ab|out all |
|00005580| 74 68 61 74 20 63 61 6e | 20 62 65 20 64 6f 6e 65 |that can| be done|
|00005590| 20 62 65 66 6f 72 65 20 | 63 6f 6d 70 69 6c 61 74 | before |compilat|
|000055a0| 69 6f 6e 0a 58 66 69 6e | 69 73 68 65 73 2c 20 73 |ion.Xfin|ishes, s|
|000055b0| 6f 20 67 6f 20 64 6f 20 | 73 6f 6d 65 74 68 69 6e |o go do |somethin|
|000055c0| 67 20 65 6c 73 65 2e 0a | 58 0a 58 2d 2d 2d 2d 2d |g else..|X.X-----|
|000055d0| 20 50 72 65 73 73 20 72 | 65 74 75 72 6e 20 74 6f | Press r|eturn to|
|000055e0| 20 63 6f 6e 74 69 6e 75 | 65 2e 20 0a 58 0a 58 54 | continu|e. .X.XT|
|000055f0| 68 65 20 63 6f 6d 70 69 | 6c 65 20 73 68 6f 75 6c |he compi|le shoul|
|00005600| 64 20 62 65 20 64 6f 6e | 65 20 6e 6f 77 2e 20 49 |d be don|e now. I|
|00005610| 66 20 61 6c 6c 20 77 65 | 6e 74 20 77 65 6c 6c 2c |f all we|nt well,|
|00005620| 20 74 68 65 20 6d 61 6b | 65 20 73 68 6f 75 6c 64 | the mak|e should|
|00005630| 20 68 61 76 65 0a 58 65 | 78 69 74 65 64 20 6e 6f | have.Xe|xited no|
|00005640| 72 6d 61 6c 6c 79 2c 20 | 4d 61 6b 65 6c 6f 67 20 |rmally, |Makelog |
|00005650| 73 68 6f 75 6c 64 20 73 | 68 6f 77 20 6e 6f 20 65 |should s|how no e|
|00005660| 72 72 6f 72 73 2c 20 61 | 6e 64 20 79 6f 75 20 73 |rrors, a|nd you s|
|00005670| 68 6f 75 6c 64 20 68 61 | 76 65 20 61 6e 0a 58 65 |hould ha|ve an.Xe|
|00005680| 78 65 63 75 74 61 62 6c | 65 20 70 74 79 20 70 72 |xecutabl|e pty pr|
|00005690| 6f 67 72 61 6d 20 73 69 | 74 74 69 6e 67 20 69 6e |ogram si|tting in|
|000056a0| 20 74 68 69 73 20 64 69 | 72 65 63 74 6f 72 79 2e | this di|rectory.|
|000056b0| 20 55 6e 66 6f 72 74 75 | 6e 61 74 65 6c 79 2c 20 | Unfortu|nately, |
|000056c0| 6c 69 66 65 0a 58 69 73 | 6e 27 74 20 61 6c 77 61 |life.Xis|n't alwa|
|000056d0| 79 73 20 73 6f 20 67 65 | 6e 65 72 6f 75 73 2e 20 |ys so ge|nerous. |
|000056e0| 48 65 72 65 20 61 72 65 | 20 61 20 66 65 77 20 6f |Here are| a few o|
|000056f0| 66 20 74 68 65 20 6d 6f | 72 65 20 63 6f 6d 6d 6f |f the mo|re commo|
|00005700| 6e 20 65 72 72 6f 72 73 | 2e 0a 58 0a 58 54 68 65 |n errors|..X.XThe|
|00005710| 20 6c 6f 61 64 65 72 20 | 63 6f 6d 70 6c 61 69 6e | loader |complain|
|00005720| 73 20 61 62 6f 75 74 20 | 6d 69 73 73 69 6e 67 20 |s about |missing |
|00005730| 67 65 74 6f 70 74 28 29 | 2c 20 6f 70 74 61 72 67 |getopt()|, optarg|
|00005740| 2c 20 61 6e 64 20 6f 70 | 74 69 6e 64 3a 20 54 68 |, and op|tind: Th|
|00005750| 65 73 65 0a 58 61 72 65 | 20 61 6c 6c 20 69 6e 20 |ese.Xare| all in |
|00005760| 74 68 65 20 67 65 74 6f | 70 74 20 6c 69 62 72 61 |the geto|pt libra|
|00005770| 72 79 2c 20 61 76 61 69 | 6c 61 62 6c 65 20 69 6e |ry, avai|lable in|
|00005780| 20 74 68 65 20 65 61 72 | 6c 79 20 76 6f 6c 75 6d | the ear|ly volum|
|00005790| 65 73 20 6f 66 0a 58 63 | 6f 6d 70 2e 73 6f 75 72 |es of.Xc|omp.sour|
|000057a0| 63 65 73 2e 75 6e 69 78 | 2e 20 49 66 20 79 6f 75 |ces.unix|. If you|
|000057b0| 20 75 73 65 20 47 4e 55 | 20 67 65 74 6f 70 74 2c | use GNU| getopt,|
|000057c0| 20 70 6c 65 61 73 65 20 | 6d 61 6b 65 20 73 75 72 | please |make sur|
|000057d0| 65 20 79 6f 75 0a 58 75 | 6e 64 65 72 73 74 61 6e |e you.Xu|nderstan|
|000057e0| 64 20 74 68 65 20 69 6d | 70 6c 69 63 61 74 69 6f |d the im|plicatio|
|000057f0| 6e 73 20 6f 66 20 69 74 | 73 20 6c 69 63 65 6e 73 |ns of it|s licens|
|00005800| 65 2e 0a 58 0a 58 54 68 | 65 20 6c 6f 61 64 65 72 |e..X.XTh|e loader|
|00005810| 20 63 6f 6d 70 6c 61 69 | 6e 73 20 61 62 6f 75 74 | complai|ns about|
|00005820| 20 6d 69 73 73 69 6e 67 | 20 46 44 5f 5a 45 52 4f | missing| FD_ZERO|
|00005830| 2c 20 46 44 5f 53 45 54 | 2c 20 61 6e 64 20 46 44 |, FD_SET|, and FD|
|00005840| 5f 49 53 53 45 54 3a 20 | 54 72 79 0a 58 63 6f 70 |_ISSET: |Try.Xcop|
|00005850| 79 69 6e 67 20 66 69 6c | 65 2e 68 2e 6f 6c 64 20 |ying fil|e.h.old |
|00005860| 74 6f 20 66 69 6c 65 2e | 68 20 61 6e 64 20 72 65 |to file.|h and re|
|00005870| 63 6f 6d 70 69 6c 69 6e | 67 2e 20 49 66 20 74 68 |compilin|g. If th|
|00005880| 65 20 63 6f 6d 70 69 6c | 65 72 20 67 69 76 65 73 |e compil|er gives|
|00005890| 0a 58 76 61 72 69 6f 75 | 73 20 66 75 72 74 68 65 |.Xvariou|s furthe|
|000058a0| 72 20 65 72 72 6f 72 73 | 20 72 65 6c 61 74 65 64 |r errors| related|
|000058b0| 20 74 6f 20 74 68 65 73 | 65 20 6d 61 63 72 6f 73 | to thes|e macros|
|000058c0| 2c 20 75 6e 63 6f 6d 6d | 65 6e 74 20 74 68 65 0a |, uncomm|ent the.|
|000058d0| 58 63 6f 6d 6d 65 6e 74 | 65 64 2d 6f 75 74 20 6c |Xcomment|ed-out l|
|000058e0| 69 6e 65 73 20 69 6e 20 | 66 69 6c 65 2e 68 2e 6f |ines in |file.h.o|
|000058f0| 6c 64 2c 20 63 6f 70 79 | 20 74 6f 20 66 69 6c 65 |ld, copy| to file|
|00005900| 2e 68 2c 20 61 6e 64 20 | 74 72 79 20 6f 6e 63 65 |.h, and |try once|
|00005910| 20 61 67 61 69 6e 2e 0a | 58 0a 58 62 63 6f 70 79 | again..|X.Xbcopy|
|00005920| 28 29 20 69 73 6e 27 74 | 20 64 65 66 69 6e 65 64 |() isn't| defined|
|00005930| 3a 20 49 6e 20 70 74 79 | 2e 68 2c 20 63 68 61 6e |: In pty|.h, chan|
|00005940| 67 65 20 62 63 6f 70 79 | 28 73 72 63 2c 64 73 74 |ge bcopy|(src,dst|
|00005950| 2c 6e 75 6d 29 20 74 6f | 0a 58 6d 65 6d 63 70 79 |,num) to|.Xmemcpy|
|00005960| 28 64 73 74 2c 73 72 63 | 2c 6e 75 6d 29 2e 20 28 |(dst,src|,num). (|
|00005970| 4e 6f 74 65 20 74 68 65 | 20 6f 72 64 65 72 2e 29 |Note the| order.)|
|00005980| 20 54 72 79 20 61 67 61 | 69 6e 2e 0a 58 0a 58 49 | Try aga|in..X.XI|
|00005990| 66 20 79 6f 75 20 73 74 | 69 6c 6c 20 63 61 6e 27 |f you st|ill can'|
|000059a0| 74 20 67 65 74 20 74 68 | 65 20 63 6f 64 65 20 74 |t get th|e code t|
|000059b0| 6f 20 63 6f 6d 70 69 6c | 65 2c 20 6c 65 74 20 74 |o compil|e, let t|
|000059c0| 68 65 20 61 75 74 68 6f | 72 20 6b 6e 6f 77 2e 0a |he autho|r know..|
|000059d0| 58 0a 58 2d 2d 2d 2d 2d | 20 50 72 65 73 73 20 72 |X.X-----| Press r|
|000059e0| 65 74 75 72 6e 20 74 6f | 20 63 6f 6e 74 69 6e 75 |eturn to| continu|
|000059f0| 65 2e 20 0a 58 0a 58 4e | 65 78 74 2c 20 63 6f 6d |e. .X.XN|ext, com|
|00005a00| 70 69 6c 65 20 74 68 65 | 20 75 74 69 6c 69 74 69 |pile the| utiliti|
|00005a10| 65 73 2e 20 54 68 65 72 | 65 20 69 73 6e 27 74 20 |es. Ther|e isn't |
|00005a20| 6d 75 63 68 20 74 6f 20 | 73 61 79 20 61 62 6f 75 |much to |say abou|
|00005a30| 74 20 74 68 65 6d 3b 0a | 58 74 68 65 79 27 72 65 |t them;.|Xthey're|
|00005a40| 20 61 6c 6c 20 70 75 62 | 6c 69 63 20 64 6f 6d 61 | all pub|lic doma|
|00005a50| 69 6e 2c 20 73 6f 6d 65 | 20 6f 66 20 74 68 65 6d |in, some| of them|
|00005a60| 20 63 6c 6f 6e 65 73 20 | 6f 66 20 6f 72 20 69 6d | clones |of or im|
|00005a70| 70 72 6f 76 65 6d 65 6e | 74 73 0a 58 6f 76 65 72 |provemen|ts.Xover|
|00005a80| 20 73 74 61 6e 64 61 72 | 64 20 75 74 69 6c 69 74 | standar|d utilit|
|00005a90| 69 65 73 2c 20 73 6f 6d | 65 20 6f 66 20 74 68 65 |ies, som|e of the|
|00005aa0| 6d 20 63 6c 6f 6e 65 73 | 20 77 69 74 68 20 73 70 |m clones| with sp|
|00005ab0| 65 63 69 61 6c 20 66 65 | 61 74 75 72 65 73 20 74 |ecial fe|atures t|
|00005ac0| 6f 0a 58 77 6f 72 6b 20 | 77 69 74 68 20 70 74 79 |o.Xwork |with pty|
|00005ad0| 2c 20 73 6f 6d 65 20 6f | 66 20 74 68 65 6d 20 65 |, some o|f them e|
|00005ae0| 6e 74 69 72 65 6c 79 20 | 6e 65 77 20 70 72 6f 67 |ntirely |new prog|
|00005af0| 72 61 6d 73 20 66 6f 72 | 20 70 74 79 27 73 20 6e |rams for| pty's n|
|00005b00| 65 77 0a 58 66 65 61 74 | 75 72 65 73 2e 20 4a 75 |ew.Xfeat|ures. Ju|
|00005b10| 73 74 20 67 6c 61 6e 63 | 65 20 61 74 20 74 68 65 |st glanc|e at the|
|00005b20| 20 74 6f 70 20 6f 66 20 | 75 74 69 6c 2f 4d 61 6b | top of |util/Mak|
|00005b30| 65 66 69 6c 65 3b 20 74 | 68 65 6e 0a 58 25 20 63 |efile; t|hen.X% c|
|00005b40| 64 20 75 74 69 6c 3b 20 | 28 64 61 74 65 3b 20 6d |d util; |(date; m|
|00005b50| 61 6b 65 29 20 3e 3e 26 | 20 4d 61 6b 65 6c 6f 67 |ake) >>&| Makelog|
|00005b60| 20 26 20 61 6e 64 20 77 | 61 69 74 2e 0a 58 0a 58 | & and w|ait..X.X|
|00005b70| 57 61 72 6e 69 6e 67 3a | 20 54 68 65 20 70 74 79 |Warning:| The pty|
|00005b80| 20 73 65 73 73 69 6f 6e | 20 64 69 72 65 63 74 6f | session| directo|
|00005b90| 72 79 20 69 73 20 68 61 | 72 64 63 6f 64 65 64 20 |ry is ha|rdcoded |
|00005ba0| 69 6e 20 75 74 69 6c 2f | 73 65 73 73 75 74 69 6c |in util/|sessutil|
|00005bb0| 2e 63 2e 0a 58 49 66 20 | 79 6f 75 20 68 61 76 65 |.c..XIf |you have|
|00005bc0| 20 63 68 61 6e 67 65 64 | 20 50 54 59 44 49 52 2c | changed| PTYDIR,|
|00005bd0| 20 63 68 65 63 6b 20 74 | 68 72 6f 75 67 68 20 73 | check t|hrough s|
|00005be0| 65 73 73 75 74 69 6c 2e | 63 20 63 61 72 65 66 75 |essutil.|c carefu|
|00005bf0| 6c 6c 79 2e 0a 58 0a 58 | 2d 2d 2d 2d 2d 20 50 72 |lly..X.X|----- Pr|
|00005c00| 65 73 73 20 72 65 74 75 | 72 6e 20 74 6f 20 63 6f |ess retu|rn to co|
|00005c10| 6e 74 69 6e 75 65 2e 20 | 0a 58 0a 58 53 6f 20 6e |ntinue. |.X.XSo n|
|00005c20| 6f 77 20 79 6f 75 20 73 | 68 6f 75 6c 64 20 68 61 |ow you s|hould ha|
|00005c30| 76 65 20 73 6f 6d 65 20 | 65 78 65 63 75 74 61 62 |ve some |executab|
|00005c40| 6c 65 73 20 73 69 74 74 | 69 6e 67 20 61 72 6f 75 |les sitt|ing arou|
|00005c50| 6e 64 20 63 6f 6c 6c 65 | 63 74 69 6e 67 20 64 75 |nd colle|cting du|
|00005c60| 73 74 2e 0a 58 49 6e 20 | 43 61 73 65 73 20 52 4f |st..XIn |Cases RO|
|00005c70| 4f 54 20 61 6e 64 20 50 | 54 59 2c 20 70 75 74 20 |OT and P|TY, put |
|00005c80| 7b 70 74 79 2c 62 69 66 | 66 2c 64 69 73 63 6f 6e |{pty,bif|f,discon|
|00005c90| 6e 65 63 74 2c 6d 65 73 | 67 2c 72 65 63 6f 6e 6e |nect,mes|g,reconn|
|00005ca0| 65 63 74 2c 73 65 73 73 | 6b 69 6c 6c 2c 0a 58 73 |ect,sess|kill,.Xs|
|00005cb0| 65 73 73 6c 69 73 74 2c | 73 65 73 73 6e 61 6d 65 |esslist,|sessname|
|00005cc0| 2c 73 65 73 73 75 73 65 | 72 7d 20 69 6e 74 6f 20 |,sessuse|r} into |
|00005cd0| 61 20 73 79 73 74 65 6d | 2d 77 69 64 65 20 64 69 |a system|-wide di|
|00005ce0| 72 65 63 74 6f 72 79 2c | 20 6f 77 6e 65 72 20 72 |rectory,| owner r|
|00005cf0| 6f 6f 74 20 6f 72 0a 58 | 70 74 79 2c 20 6d 6f 64 |oot or.X|pty, mod|
|00005d00| 65 20 34 37 35 35 2e 20 | 50 75 74 20 77 61 6c 6c |e 4755. |Put wall|
|00005d10| 20 61 6e 64 20 77 72 69 | 74 65 20 69 6e 74 6f 20 | and wri|te into |
|00005d20| 74 68 65 20 73 61 6d 65 | 20 70 6c 61 63 65 2c 20 |the same| place, |
|00005d30| 67 72 6f 75 70 20 74 74 | 79 2c 20 6d 6f 64 65 0a |group tt|y, mode.|
|00005d40| 58 32 37 35 35 2e 20 50 | 75 74 20 7b 63 6f 6e 64 |X2755. P|ut {cond|
|00005d50| 6f 6d 2c 65 78 63 6c 6f | 66 66 2c 65 78 63 6c 6f |om,exclo|ff,exclo|
|00005d60| 6e 2c 6c 61 73 74 2c 6c | 6f 63 6b 2c 73 63 72 69 |n,last,l|ock,scri|
|00005d70| 70 74 2c 73 63 72 69 70 | 74 2e 74 69 64 79 2c 73 |pt,scrip|t.tidy,s|
|00005d80| 65 73 73 2c 74 69 6f 63 | 73 74 69 2c 0a 58 74 74 |ess,tioc|sti,.Xtt|
|00005d90| 79 2c 75 2c 77 68 6f 2c | 78 64 69 73 63 6f 6e 6e |y,u,who,|xdisconn|
|00005da0| 65 63 74 2c 78 72 65 63 | 6f 6e 6e 65 63 74 2c 78 |ect,xrec|onnect,x|
|00005db0| 73 65 73 73 6b 69 6c 6c | 2c 78 73 65 73 73 6c 69 |sesskill|,xsessli|
|00005dc0| 73 74 2c 78 73 65 73 73 | 6e 61 6d 65 2c 78 73 65 |st,xsess|name,xse|
|00005dd0| 73 73 75 73 65 72 7d 0a | 58 69 6e 74 6f 20 74 68 |ssuser}.|Xinto th|
|00005de0| 65 20 73 61 6d 65 20 70 | 6c 61 63 65 2c 20 6d 6f |e same p|lace, mo|
|00005df0| 64 65 20 37 35 35 2e 20 | 4d 61 6b 65 20 61 62 73 |de 755. |Make abs|
|00005e00| 6f 6c 75 74 65 6c 79 20 | 73 75 72 65 20 6e 6f 6e |olutely |sure non|
|00005e10| 65 20 6f 66 20 74 68 65 | 20 73 68 65 6c 6c 0a 58 |e of the| shell.X|
|00005e20| 73 63 72 69 70 74 73 20 | 61 72 65 20 73 65 74 75 |scripts |are setu|
|00005e30| 69 64 2e 0a 58 0a 58 49 | 6e 20 43 61 73 65 20 55 |id..X.XI|n Case U|
|00005e40| 4e 2c 20 6a 75 73 74 20 | 70 75 74 20 61 6c 6c 20 |N, just |put all |
|00005e50| 74 68 65 20 70 72 6f 67 | 72 61 6d 73 20 73 6f 6d |the prog|rams som|
|00005e60| 65 77 68 65 72 65 20 69 | 6e 20 79 6f 75 72 20 50 |ewhere i|n your P|
|00005e70| 41 54 48 2e 0a 58 0a 58 | 54 68 61 74 27 73 20 69 |ATH..X.X|That's i|
|00005e80| 74 21 20 54 72 79 20 72 | 75 6e 6e 69 6e 67 20 54 |t! Try r|unning T|
|00005e90| 45 53 54 53 20 6e 6f 77 | 2e 0a 58 0a 58 28 54 77 |ESTS now|..X.X(Tw|
|00005ea0| 6f 20 6f 74 68 65 72 20 | 74 68 69 6e 67 73 20 79 |o other |things y|
|00005eb0| 6f 75 20 68 61 76 65 20 | 74 6f 20 64 6f 20 61 74 |ou have |to do at|
|00005ec0| 20 73 6f 6d 65 20 70 6f | 69 6e 74 3a 20 6d 6f 76 | some po|int: mov|
|00005ed0| 65 20 79 6f 75 72 20 6f | 6c 64 20 73 63 72 69 70 |e your o|ld scrip|
|00005ee0| 74 2c 0a 58 62 69 66 66 | 2c 20 6d 65 73 67 2c 20 |t,.Xbiff|, mesg, |
|00005ef0| 61 6e 64 20 73 6f 20 6f | 6e 20 74 6f 20 73 63 72 |and so o|n to scr|
|00005f00| 69 70 74 2e 6f 6c 64 2c | 20 62 69 66 66 2e 6f 6c |ipt.old,| biff.ol|
|00005f10| 64 2c 20 6d 65 73 67 2e | 6f 6c 64 2c 20 65 74 63 |d, mesg.|old, etc|
|00005f20| 2e 2c 20 77 69 74 68 0a | 58 73 79 6d 62 6f 6c 69 |., with.|Xsymboli|
|00005f30| 63 20 6c 69 6e 6b 73 20 | 74 6f 20 74 68 65 20 6e |c links |to the n|
|00005f40| 65 77 20 76 65 72 73 69 | 6f 6e 73 20 69 6e 20 74 |ew versi|ons in t|
|00005f50| 68 65 69 72 20 70 6c 61 | 63 65 3b 20 61 6e 64 20 |heir pla|ce; and |
|00005f60| 6d 6f 76 65 20 74 68 65 | 20 6f 6c 64 0a 58 2f 75 |move the| old.X/u|
|00005f70| 73 72 2f 6d 61 6e 2f 7b | 73 63 72 69 70 74 2c 62 |sr/man/{|script,b|
|00005f80| 69 66 66 2c 6d 65 73 67 | 2c 2e 2e 2e 7d 2e 31 20 |iff,mesg|,...}.1 |
|00005f90| 73 6f 6d 65 77 68 65 72 | 65 20 65 6c 73 65 2c 20 |somewher|e else, |
|00005fa0| 63 6f 70 79 20 61 6c 6c | 20 74 68 65 20 2a 2e 31 |copy all| the *.1|
|00005fb0| 0a 58 68 65 72 65 20 74 | 6f 20 2f 75 73 72 2f 6d |.Xhere t|o /usr/m|
|00005fc0| 61 6e 2f 6d 61 6e 31 2c | 20 61 6e 64 20 72 75 6e |an/man1,| and run|
|00005fd0| 20 2f 65 74 63 2f 63 61 | 74 6d 61 6e 2e 29 0a 45 | /etc/ca|tman.).E|
|00005fe0| 4e 44 5f 4f 46 5f 46 49 | 4c 45 0a 20 20 69 66 20 |ND_OF_FI|LE. if |
|00005ff0| 74 65 73 74 20 32 32 36 | 32 31 20 2d 6e 65 20 60 |test 226|21 -ne `|
|00006000| 77 63 20 2d 63 20 3c 27 | 49 4e 53 54 41 4c 4c 52 |wc -c <'|INSTALLR|
|00006010| 45 41 44 41 42 4c 45 27 | 60 3b 20 74 68 65 6e 0a |EADABLE'|`; then.|
|00006020| 20 20 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 5c | echo| shar: \|
|00006030| 22 27 49 4e 53 54 41 4c | 4c 52 45 41 44 41 42 4c |"'INSTAL|LREADABL|
|00006040| 45 27 5c 22 20 75 6e 70 | 61 63 6b 65 64 20 77 69 |E'\" unp|acked wi|
|00006050| 74 68 20 77 72 6f 6e 67 | 20 73 69 7a 65 21 0a 20 |th wrong| size!. |
|00006060| 20 66 69 0a 20 20 23 20 | 65 6e 64 20 6f 66 20 27 | fi. # |end of '|
|00006070| 49 4e 53 54 41 4c 4c 52 | 45 41 44 41 42 4c 45 27 |INSTALLR|EADABLE'|
|00006080| 0a 66 69 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |.fi.if t|est -f '|
|00006090| 6d 61 73 74 65 72 2e 63 | 27 20 2d 61 20 22 24 7b |master.c|' -a "${|
|000060a0| 31 7d 22 20 21 3d 20 22 | 2d 63 22 20 3b 20 74 68 |1}" != "|-c" ; th|
|000060b0| 65 6e 20 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |en . ec|ho shar:|
|000060c0| 20 57 69 6c 6c 20 6e 6f | 74 20 63 6c 6f 62 62 65 | Will no|t clobbe|
|000060d0| 72 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |r existi|ng file |
|000060e0| 5c 22 27 6d 61 73 74 65 | 72 2e 63 27 5c 22 0a 65 |\"'maste|r.c'\".e|
|000060f0| 6c 73 65 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |lse. ec|ho shar:|
|00006100| 20 45 78 74 72 61 63 74 | 69 6e 67 20 5c 22 27 6d | Extract|ing \"'m|
|00006110| 61 73 74 65 72 2e 63 27 | 5c 22 20 5c 28 31 38 30 |aster.c'|\" \(180|
|00006120| 38 36 20 63 68 61 72 61 | 63 74 65 72 73 5c 29 0a |86 chara|cters\).|
|00006130| 20 20 73 65 64 20 22 73 | 2f 5e 58 2f 2f 22 20 3e | sed "s|/^X//" >|
|00006140| 27 6d 61 73 74 65 72 2e | 63 27 20 3c 3c 27 45 4e |'master.|c' <<'EN|
|00006150| 44 5f 4f 46 5f 46 49 4c | 45 27 0a 58 2f 2a 20 43 |D_OF_FIL|E'.X/* C|
|00006160| 6f 70 79 72 69 67 68 74 | 20 31 39 39 30 2c 20 44 |opyright| 1990, D|
|00006170| 61 6e 69 65 6c 20 4a 2e | 20 42 65 72 6e 73 74 65 |aniel J.| Bernste|
|00006180| 69 6e 2e 20 41 6c 6c 20 | 72 69 67 68 74 73 20 72 |in. All |rights r|
|00006190| 65 73 65 72 76 65 64 2e | 20 2a 2f 0a 58 0a 58 23 |eserved.| */.X.X#|
|000061a0| 69 6e 63 6c 75 64 65 20 | 3c 73 79 73 2f 74 79 70 |include |<sys/typ|
|000061b0| 65 73 2e 68 3e 0a 58 23 | 69 6e 63 6c 75 64 65 20 |es.h>.X#|include |
|000061c0| 3c 73 79 73 2f 74 69 6d | 65 2e 68 3e 0a 58 23 69 |<sys/tim|e.h>.X#i|
|000061d0| 6e 63 6c 75 64 65 20 3c | 73 79 73 2f 72 65 73 6f |nclude <|sys/reso|
|000061e0| 75 72 63 65 2e 68 3e 0a | 58 23 69 6e 63 6c 75 64 |urce.h>.|X#includ|
|000061f0| 65 20 3c 73 79 73 2f 77 | 61 69 74 2e 68 3e 0a 58 |e <sys/w|ait.h>.X|
|00006200| 23 69 6e 63 6c 75 64 65 | 20 3c 73 74 64 69 6f 2e |#include| <stdio.|
|00006210| 68 3e 0a 58 23 69 6e 63 | 6c 75 64 65 20 22 65 72 |h>.X#inc|lude "er|
|00006220| 72 2e 68 22 0a 58 23 69 | 6e 63 6c 75 64 65 20 22 |r.h".X#i|nclude "|
|00006230| 63 6f 6e 66 69 67 2e 68 | 22 0a 58 23 69 6e 63 6c |config.h|".X#incl|
|00006240| 75 64 65 20 22 70 74 79 | 2e 68 22 0a 58 23 69 6e |ude "pty|.h".X#in|
|00006250| 63 6c 75 64 65 20 22 6d | 61 73 74 65 72 2e 68 22 |clude "m|aster.h"|
|00006260| 0a 58 23 69 6e 63 6c 75 | 64 65 20 22 73 69 67 2e |.X#inclu|de "sig.|
|00006270| 68 22 0a 58 23 69 6e 63 | 6c 75 64 65 20 22 74 74 |h".X#inc|lude "tt|
|00006280| 79 2e 68 22 0a 58 23 69 | 6e 63 6c 75 64 65 20 22 |y.h".X#i|nclude "|
|00006290| 66 69 6c 65 2e 68 22 0a | 58 23 69 6e 63 6c 75 64 |file.h".|X#includ|
|000062a0| 65 20 22 73 6f 63 6b 2e | 68 22 0a 58 23 69 6e 63 |e "sock.|h".X#inc|
|000062b0| 6c 75 64 65 20 22 6c 6f | 67 73 2e 68 22 0a 58 23 |lude "lo|gs.h".X#|
|000062c0| 69 6e 63 6c 75 64 65 20 | 22 6d 69 73 63 2e 68 22 |include |"misc.h"|
|000062d0| 0a 58 0a 58 73 74 61 74 | 69 63 20 63 68 61 72 20 |.X.Xstat|ic char |
|000062e0| 66 6e 72 65 5b 32 30 5d | 3b 0a 58 0a 58 73 74 61 |fnre[20]|;.X.Xsta|
|000062f0| 74 69 63 20 63 68 61 72 | 20 66 6e 73 65 73 73 5b |tic char| fnsess[|
|00006300| 32 30 5d 3b 0a 58 73 74 | 61 74 69 63 20 69 6e 74 |20];.Xst|atic int|
|00006310| 20 66 64 73 65 73 73 3b | 0a 58 0a 58 73 74 61 74 | fdsess;|.X.Xstat|
|00006320| 69 63 20 63 68 61 72 20 | 2a 67 6c 66 6e 73 74 79 |ic char |*glfnsty|
|00006330| 3b 0a 58 0a 58 73 74 61 | 74 69 63 20 63 68 61 72 |;.X.Xsta|tic char|
|00006340| 20 73 6f 75 74 62 75 66 | 5b 4f 55 54 42 55 46 53 | soutbuf|[OUTBUFS|
|00006350| 49 5a 45 5d 3b 0a 58 73 | 74 61 74 69 63 20 63 68 |IZE];.Xs|tatic ch|
|00006360| 61 72 20 73 70 74 79 62 | 75 66 5b 4f 55 54 42 55 |ar sptyb|uf[OUTBU|
|00006370| 46 53 49 5a 45 5d 3b 0a | 58 0a 58 73 74 61 74 69 |FSIZE];.|X.Xstati|
|00006380| 63 20 73 74 72 75 63 74 | 20 74 74 79 6d 6f 64 65 |c struct| ttymode|
|00006390| 73 20 74 6d 6f 77 69 6e | 70 74 79 3b 0a 58 73 74 |s tmowin|pty;.Xst|
|000063a0| 61 74 69 63 20 73 74 72 | 75 63 74 20 74 74 79 6d |atic str|uct ttym|
|000063b0| 6f 64 65 73 20 74 6d 6f | 77 69 6e 74 74 79 3b 0a |odes tmo|wintty;.|
|000063c0| 58 0a 58 73 74 61 74 69 | 63 20 63 68 61 72 20 2a |X.Xstati|c char *|
|000063d0| 6f 75 74 62 75 66 20 3d | 20 73 6f 75 74 62 75 66 |outbuf =| soutbuf|
|000063e0| 3b 0a 58 73 74 61 74 69 | 63 20 69 6e 74 20 6f 75 |;.Xstati|c int ou|
|000063f0| 74 62 75 66 73 69 7a 20 | 3d 20 4f 55 54 42 55 46 |tbufsiz |= OUTBUF|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.