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: Tape Archive
(archive/tar).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Tape Archive (archive/tar)
| magic
| Supported |
100%
| file
| tar archive
| default
| |
99%
| file
| tar archive (V7), file dial-inout-bsd/, mode 755 , uid 243 , gid 12 , size 0 , seconds 4404065173
| default
| |
98%
| file
| data
| default
| |
100%
| lsar
| Tar
| default
| |
100%
| gt2
| TAR Archiv gefunden (Auflistung ist deaktiviert)
| default
| |
100%
| disktype
| Pre-POSIX tar archive
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 64 69 61 6c 2d 69 6e 6f | 75 74 2d 62 73 64 2f 00 |dial-ino|ut-bsd/.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 20 20 37 | 35 35 20 00 20 20 20 32 |.... 7|55 . 2|
|00000070| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00000080| 20 20 20 20 20 20 30 20 | 20 34 34 30 34 30 36 35 | 0 | 4404065|
|00000090| 31 37 33 20 20 20 36 36 | 33 32 00 20 00 00 00 00 |173 66|32. ....|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 64 69 61 6c 2d 69 6e 6f | 75 74 2d 62 73 64 2f 53 |dial-ino|ut-bsd/S|
|00000210| 68 61 72 46 69 6c 65 2e | 48 65 61 64 65 72 73 00 |harFile.|Headers.|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00000270| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00000280| 20 20 20 20 33 34 35 20 | 20 34 34 30 34 30 36 35 | 345 | 4404065|
|00000290| 31 37 35 20 20 31 31 36 | 37 35 00 20 00 00 00 00 |175 116|75. ....|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 3d 3d 3d 20 64 69 61 6c | 2d 69 6e 6f 75 74 2d 62 |=== dial|-inout-b|
|00000410| 73 64 2e 73 68 61 72 20 | 3d 3d 3d 3d 3d 3d 3d 3d |sd.shar |========|
|00000420| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000430| 3d 0a 46 72 6f 6d 3a 20 | 57 69 6c 6c 69 61 6d 20 |=.From: |William |
|00000440| 4c 2e 20 53 65 62 6f 6b | 20 3c 6e 6f 61 6f 21 61 |L. Sebok| <noao!a|
|00000450| 73 74 72 6f 76 61 78 21 | 77 6c 73 25 68 61 6f 2e |strovax!|wls%hao.|
|00000460| 75 75 63 70 40 53 65 69 | 73 6d 6f 2e 41 52 50 41 |uucp@Sei|smo.ARPA|
|00000470| 3e 0a 54 6f 3a 20 6e 65 | 74 2e 73 6f 75 72 63 65 |>.To: ne|t.source|
|00000480| 73 0a 53 75 62 6a 65 63 | 74 3a 20 33 72 64 20 72 |s.Subjec|t: 3rd r|
|00000490| 65 76 2e 20 2d 20 34 2e | 32 20 42 53 44 20 75 75 |ev. - 4.|2 BSD uu|
|000004a0| 63 70 20 61 6e 64 20 74 | 69 70 20 64 69 61 6c 69 |cp and t|ip diali|
|000004b0| 6e 2f 64 69 61 6c 6f 75 | 74 20 6f 6e 20 73 61 6d |n/dialou|t on sam|
|000004c0| 65 20 6c 69 6e 65 0a 44 | 61 74 65 3a 20 32 33 20 |e line.D|ate: 23 |
|000004d0| 41 70 72 20 38 35 20 31 | 36 3a 34 31 3a 32 32 20 |Apr 85 1|6:41:22 |
|000004e0| 47 4d 54 0a 0a 00 0e 00 | 75 75 63 70 2e 63 69 63 |GMT.....|uucp.cic|
|000004f0| 6f 2e 44 49 46 46 00 00 | 76 02 00 00 1c 00 11 00 |o.DIFF..|v.......|
|00000500| 75 75 63 70 2e 63 6f 6e | 64 65 76 73 2e 44 49 46 |uucp.con|devs.DIF|
|00000510| 46 00 00 00 77 02 00 00 | ec 00 0e 00 75 75 63 70 |F...w...|....uucp|
|00000520| 2e 75 75 63 70 2e 44 49 | 46 46 00 00 00 00 00 00 |.uucp.DI|FF......|
|00000530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000600| 64 69 61 6c 2d 69 6e 6f | 75 74 2d 62 73 64 2f 52 |dial-ino|ut-bsd/R|
|00000610| 45 41 44 4d 45 00 00 00 | 00 00 00 00 00 00 00 00 |EADME...|........|
|00000620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000660| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00000670| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00000680| 20 20 31 30 31 30 37 20 | 20 34 34 30 34 30 36 35 | 10107 | 4404065|
|00000690| 31 33 37 20 20 20 37 36 | 31 36 00 20 00 00 00 00 |137 76|16. ....|
|000006a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000700| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000720| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000800| 54 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 61 72 |The foll|owing ar|
|00000810| 65 20 64 69 66 66 73 20 | 74 6f 20 74 68 65 20 34 |e diffs |to the 4|
|00000820| 2e 32 20 64 69 73 74 72 | 69 62 75 74 69 6f 6e 20 |.2 distr|ibution |
|00000830| 6f 66 20 75 75 63 70 20 | 61 6e 64 20 74 69 70 20 |of uucp |and tip |
|00000840| 74 6f 20 6d 61 6b 65 20 | 74 68 65 6d 0a 61 62 6c |to make |them.abl|
|00000850| 65 20 74 6f 20 75 73 65 | 20 74 68 65 20 73 61 6d |e to use| the sam|
|00000860| 65 20 6c 69 6e 65 73 20 | 66 6f 72 20 62 6f 74 68 |e lines |for both|
|00000870| 20 64 69 61 6c 69 6e 20 | 69 6e 20 61 6e 64 20 64 | dialin |in and d|
|00000880| 69 61 6c 69 6e 67 20 6f | 75 74 2e 20 20 41 20 70 |ialing o|ut. A p|
|00000890| 72 6f 67 72 61 6d 20 74 | 6f 0a 64 6f 20 74 68 65 |rogram t|o.do the|
|000008a0| 20 6c 69 6e 65 2d 74 75 | 72 6e 61 72 6f 75 6e 64 | line-tu|rnaround|
|000008b0| 20 28 61 63 75 63 6e 74 | 72 6c 29 20 69 73 20 69 | (acucnt|rl) is i|
|000008c0| 6e 63 6c 75 64 65 64 2e | 20 20 54 68 69 73 20 64 |ncluded.| This d|
|000008d0| 69 61 6c 69 6e 2d 64 69 | 61 6c 6f 75 74 20 6d 65 |ialin-di|alout me|
|000008e0| 63 68 61 6e 69 73 6d 0a | 72 75 6e 73 20 75 6e 64 |chanism.|runs und|
|000008f0| 65 72 20 61 20 76 61 6e | 69 6c 6c 61 20 34 2e 32 |er a van|illa 4.2|
|00000900| 20 42 53 44 20 6b 65 72 | 6e 65 6c 2e 20 20 53 69 | BSD ker|nel. Si|
|00000910| 6d 69 6c 61 72 20 63 68 | 61 6e 67 65 73 20 74 6f |milar ch|anges to|
|00000920| 20 75 75 63 70 20 61 6e | 64 20 74 69 70 20 72 61 | uucp an|d tip ra|
|00000930| 6e 20 68 65 72 65 0a 77 | 68 65 6e 20 77 65 20 77 |n here.w|hen we w|
|00000940| 65 72 65 20 72 75 6e 6e | 69 6e 67 20 34 2e 31 20 |ere runn|ing 4.1 |
|00000950| 42 53 44 2e 20 54 68 65 | 20 56 61 78 20 73 70 65 |BSD. The| Vax spe|
|00000960| 63 69 66 69 63 69 74 79 | 20 69 73 20 69 6e 20 74 |cificity| is in t|
|00000970| 68 65 20 61 75 78 69 6c | 69 61 72 79 20 70 72 6f |he auxil|iary pro|
|00000980| 67 72 61 6d 0a 61 63 75 | 63 6e 74 72 6c 20 77 68 |gram.acu|cntrl wh|
|00000990| 69 63 68 20 65 6e 61 62 | 6c 65 73 2f 64 69 73 61 |ich enab|les/disa|
|000009a0| 62 6c 65 73 20 6d 6f 64 | 65 6d 20 63 6f 6e 74 72 |bles mod|em contr|
|000009b0| 6f 6c 20 62 79 20 70 6f | 6b 69 6e 67 20 69 6e 74 |ol by po|king int|
|000009c0| 6f 20 2f 64 65 76 2f 6b | 6d 65 6d 20 74 6f 0a 63 |o /dev/k|mem to.c|
|000009d0| 68 61 6e 67 65 20 66 6c | 61 67 73 20 69 6e 20 74 |hange fl|ags in t|
|000009e0| 68 65 20 74 74 79 20 64 | 72 69 76 65 72 73 2e 20 |he tty d|rivers. |
|000009f0| 20 53 69 6d 69 6c 61 72 | 20 74 68 69 6e 67 73 20 | Similar| things |
|00000a00| 63 6f 75 6c 64 20 62 65 | 20 64 6f 6e 65 20 66 6f |could be| done fo|
|00000a10| 72 20 74 68 65 20 74 74 | 79 0a 64 72 69 76 65 72 |r the tt|y.driver|
|00000a20| 73 20 6f 66 20 6f 74 68 | 65 72 20 6d 61 63 68 69 |s of oth|er machi|
|00000a30| 6e 65 73 20 28 69 64 65 | 61 6c 6c 79 20 74 68 65 |nes (ide|ally the|
|00000a40| 20 6b 65 72 6e 65 6c 20 | 77 6f 75 6c 64 20 70 72 | kernel |would pr|
|00000a50| 6f 76 69 64 65 20 61 6e | 20 69 6f 63 74 6c 28 29 |ovide an| ioctl()|
|00000a60| 20 74 6f 0a 61 63 68 69 | 65 76 65 20 74 68 69 73 | to.achi|eve this|
|00000a70| 20 66 75 6e 63 74 69 6f | 6e 29 2e 0a 0a 54 68 69 | functio|n)...Thi|
|00000a80| 73 20 69 73 20 74 68 65 | 20 74 68 69 72 64 20 72 |s is the| third r|
|00000a90| 65 76 69 73 69 6f 6e 20 | 6f 66 20 74 68 69 73 20 |evision |of this |
|00000aa0| 70 6f 73 74 69 6e 67 2e | 20 54 68 65 72 65 20 77 |posting.| There w|
|00000ab0| 65 72 65 20 70 72 6f 62 | 6c 65 6d 73 20 69 6e 20 |ere prob|lems in |
|00000ac0| 74 68 65 20 0a 69 6e 74 | 65 72 61 63 74 69 6f 6e |the .int|eraction|
|00000ad0| 20 62 65 74 77 65 65 6e | 20 74 68 65 20 64 69 66 | between| the dif|
|00000ae0| 66 73 20 61 6e 64 20 70 | 61 74 63 68 2e 20 20 54 |fs and p|atch. T|
|00000af0| 68 65 20 64 69 66 66 73 | 20 61 72 65 20 22 65 64 |he diffs| are "ed|
|00000b00| 69 74 65 64 22 20 64 69 | 66 66 73 0a 62 65 63 61 |ited" di|ffs.beca|
|00000b10| 75 73 65 20 74 68 65 72 | 65 20 77 65 72 65 20 6d |use ther|e were m|
|00000b20| 61 6e 79 20 6f 74 68 65 | 72 20 63 68 61 6e 67 65 |any othe|r change|
|00000b30| 73 20 6d 61 64 65 20 68 | 65 72 65 20 74 6f 20 62 |s made h|ere to b|
|00000b40| 6f 74 68 20 70 72 6f 67 | 72 61 6d 73 2e 20 20 4d |oth prog|rams. M|
|00000b50| 61 6b 69 6e 67 0a 65 64 | 69 74 65 64 20 64 69 66 |aking.ed|ited dif|
|00000b60| 66 73 20 77 6f 72 6b 20 | 66 6f 72 20 70 61 74 63 |fs work |for patc|
|00000b70| 68 20 69 6e 76 6f 6c 76 | 65 73 20 65 78 74 72 65 |h involv|es extre|
|00000b80| 6d 65 6c 79 20 74 65 64 | 69 6f 75 73 20 61 6e 64 |mely ted|ious and|
|00000b90| 20 65 72 72 6f 72 2d 70 | 72 6f 6e 65 20 65 64 69 | error-p|rone edi|
|00000ba0| 74 69 6e 67 0a 6f 66 20 | 6c 69 6e 65 20 6e 75 6d |ting.of |line num|
|00000bb0| 62 65 72 73 2e 20 20 54 | 68 69 73 20 74 69 6d 65 |bers. T|his time|
|00000bc0| 20 74 68 65 20 64 69 66 | 66 73 20 68 61 76 65 20 | the dif|fs have |
|00000bd0| 62 65 65 6e 20 76 65 72 | 69 66 69 65 64 20 74 6f |been ver|ified to|
|00000be0| 20 77 6f 72 6b 20 77 69 | 74 68 20 70 61 74 63 68 | work wi|th patch|
|00000bf0| 20 77 68 65 6e 0a 61 70 | 70 6c 69 65 64 20 74 6f | when.ap|plied to|
|00000c00| 20 73 6f 75 72 63 65 20 | 64 69 72 65 63 74 6c 79 | source |directly|
|00000c10| 20 6f 66 66 20 61 20 34 | 2e 32 20 42 53 44 20 64 | off a 4|.2 BSD d|
|00000c20| 69 73 74 72 69 62 75 74 | 69 6f 6e 20 74 61 70 65 |istribut|ion tape|
|00000c30| 20 28 76 69 6e 74 61 67 | 65 20 4e 6f 76 2e 20 31 | (vintag|e Nov. 1|
|00000c40| 39 38 33 29 2e 0a 54 68 | 65 20 70 61 74 63 68 65 |983)..Th|e patche|
|00000c50| 64 20 73 6f 75 72 63 65 | 73 20 68 61 76 65 20 74 |d source|s have t|
|00000c60| 68 65 6e 20 62 65 65 6e | 20 76 65 72 69 66 69 65 |hen been| verifie|
|00000c70| 64 20 74 6f 20 63 6f 6d | 70 69 6c 65 20 63 6f 72 |d to com|pile cor|
|00000c80| 72 65 63 74 6c 79 2e 0a | 0a 54 68 65 20 76 65 72 |rectly..|.The ver|
|00000c90| 73 69 6f 6e 20 6f 66 20 | 61 63 75 63 6e 74 72 6c |sion of |acucntrl|
|00000ca0| 20 69 6e 63 6c 75 64 65 | 64 20 68 65 72 65 20 69 | include|d here i|
|00000cb0| 73 20 61 6c 73 6f 20 74 | 68 65 20 6c 61 74 65 73 |s also t|he lates|
|00000cc0| 74 20 76 65 72 73 69 6f | 6e 20 6f 66 20 74 68 61 |t versio|n of tha|
|00000cd0| 74 0a 70 72 6f 67 72 61 | 6d 2e 0a 0a 57 65 20 73 |t.progra|m...We s|
|00000ce0| 74 61 72 74 65 64 20 74 | 6f 20 75 73 65 20 75 75 |tarted t|o use uu|
|00000cf0| 63 70 20 61 66 74 65 72 | 20 74 68 65 20 64 69 61 |cp after| the dia|
|00000d00| 6c 69 6e 20 6c 69 6e 65 | 73 20 68 61 64 20 62 65 |lin line|s had be|
|00000d10| 65 6e 20 69 6e 20 70 6c | 61 63 65 20 66 6f 72 20 |en in pl|ace for |
|00000d20| 61 20 77 68 69 6c 65 2e | 0a 49 74 20 77 6f 75 6c |a while.|.It woul|
|00000d30| 64 20 68 61 76 65 20 62 | 65 65 6e 20 76 65 72 79 |d have b|een very|
|00000d40| 20 75 6e 70 6f 70 75 6c | 61 72 20 68 65 72 65 20 | unpopul|ar here |
|00000d50| 74 6f 20 72 65 6d 6f 76 | 65 20 6f 6e 65 20 6f 66 |to remov|e one of|
|00000d60| 20 6c 69 6e 65 73 20 66 | 72 6f 6d 20 70 75 62 6c | lines f|rom publ|
|00000d70| 69 63 20 75 73 65 0a 74 | 6f 20 6c 65 74 20 75 75 |ic use.t|o let uu|
|00000d80| 63 70 20 64 69 61 6c 20 | 6f 75 74 2e 20 20 54 68 |cp dial |out. Th|
|00000d90| 65 20 66 69 72 73 74 20 | 76 65 72 73 69 6f 6e 20 |e first |version |
|00000da0| 6f 66 20 74 68 65 73 65 | 20 63 68 61 6e 67 65 73 |of these| changes|
|00000db0| 20 72 61 6e 20 68 65 72 | 65 20 65 61 72 6c 79 20 | ran her|e early |
|00000dc0| 69 6e 0a 31 39 38 33 2e | 0a 0a 48 61 76 69 6e 67 |in.1983.|..Having|
|00000dd0| 20 74 68 69 73 20 61 62 | 69 6c 69 74 79 20 69 73 | this ab|ility is|
|00000de0| 20 61 20 76 65 72 79 20 | 75 73 65 66 75 6c 20 77 | a very |useful w|
|00000df0| 61 79 20 74 6f 20 6d 61 | 6b 65 20 66 75 6c 6c 20 |ay to ma|ke full |
|00000e00| 75 73 65 20 6f 66 20 79 | 6f 75 72 20 6d 6f 64 65 |use of y|our mode|
|00000e10| 6d 73 2e 20 46 6f 72 0a | 6f 6e 65 20 74 68 69 6e |ms. For.|one thin|
|00000e20| 67 2c 20 49 20 63 61 6e | 20 73 6d 69 6c 65 20 77 |g, I can| smile w|
|00000e30| 68 65 6e 20 61 20 6e 65 | 69 67 68 6f 72 69 6e 67 |hen a ne|ighoring|
|00000e40| 20 73 69 74 65 20 63 6f | 6d 70 6c 61 69 6e 73 20 | site co|mplains |
|00000e50| 74 68 61 74 20 74 68 65 | 69 72 20 6f 6e 65 20 64 |that the|ir one d|
|00000e60| 69 61 6c 65 72 0a 69 73 | 20 74 69 65 64 20 75 70 |ialer.is| tied up|
|00000e70| 20 66 72 6f 6d 20 6e 65 | 77 73 20 62 61 63 6b 65 | from ne|ws backe|
|00000e80| 64 20 75 70 20 74 6f 20 | 6f 6e 65 20 6f 66 20 74 |d up to |one of t|
|00000e90| 68 65 69 72 20 6e 65 69 | 67 68 62 6f 72 73 20 77 |heir nei|ghbors w|
|00000ea0| 68 69 63 68 20 68 61 73 | 20 62 65 65 6e 20 64 6f |hich has| been do|
|00000eb0| 77 6e 0a 66 6f 72 20 61 | 20 77 68 69 6c 65 20 61 |wn.for a| while a|
|00000ec0| 6e 64 20 68 61 73 20 6a | 75 73 74 20 63 6f 6d 65 |nd has j|ust come|
|00000ed0| 20 62 61 63 6b 20 75 70 | 2e 20 46 6f 72 20 61 6e | back up|. For an|
|00000ee0| 6f 74 68 65 72 20 74 68 | 69 6e 67 20 73 6f 6d 65 |other th|ing some|
|00000ef0| 20 6f 66 20 6f 75 72 20 | 6e 65 69 67 68 62 6f 72 | of our |neighbor|
|00000f00| 73 0a 73 65 65 6d 20 74 | 6f 20 62 65 20 72 65 61 |s.seem t|o be rea|
|00000f10| 63 68 61 62 6c 65 20 62 | 65 74 74 65 72 20 62 79 |chable b|etter by|
|00000f20| 20 73 6f 6d 65 20 6d 6f | 64 65 6d 73 20 74 68 61 | some mo|dems tha|
|00000f30| 6e 20 62 79 20 6f 74 68 | 65 72 73 2e 20 20 46 6f |n by oth|ers. Fo|
|00000f40| 72 20 65 78 61 6d 70 6c | 65 2c 20 49 20 63 61 6e |r exampl|e, I can|
|00000f50| 0a 6f 6e 6c 79 20 72 65 | 61 63 68 20 72 6f 63 6b |.only re|ach rock|
|00000f60| 79 32 20 77 69 74 68 20 | 61 20 52 61 63 61 6c 20 |y2 with |a Racal |
|00000f70| 56 61 64 69 63 2e 20 20 | 49 20 68 61 76 65 20 62 |Vadic. |I have b|
|00000f80| 65 65 6e 20 61 62 6c 65 | 20 74 6f 20 6f 6e 6c 79 |een able| to only|
|00000f90| 20 72 65 61 63 68 20 61 | 6b 67 75 61 2c 0a 62 75 | reach a|kgua,.bu|
|00000fa0| 72 6c 2c 20 61 6e 64 20 | 73 6a 75 76 61 78 20 77 |rl, and |sjuvax w|
|00000fb0| 69 74 68 20 61 20 48 61 | 79 65 73 2e 20 20 57 69 |ith a Ha|yes. Wi|
|00000fc0| 74 68 20 6f 75 72 20 32 | 34 30 30 20 62 61 75 64 |th our 2|400 baud|
|00000fd0| 20 6d 6f 64 65 6d 20 49 | 20 64 6f 6e 27 74 20 68 | modem I| don't h|
|00000fe0| 61 76 65 20 74 6f 20 62 | 75 79 0a 74 77 6f 20 32 |ave to b|uy.two 2|
|00000ff0| 34 30 30 20 62 61 75 64 | 20 6d 6f 64 65 6d 73 20 |400 baud| modems |
|00001000| 74 6f 20 68 61 76 65 20 | 74 77 6f 2d 77 61 79 20 |to have |two-way |
|00001010| 32 34 30 30 20 62 61 75 | 64 20 63 61 70 61 62 69 |2400 bau|d capabi|
|00001020| 6c 69 74 79 2e 0a 0a 54 | 68 65 20 6b 65 79 20 74 |lity...T|he key t|
|00001030| 6f 20 74 68 69 73 20 69 | 73 20 61 20 70 72 6f 67 |o this i|s a prog|
|00001040| 72 61 6d 20 69 73 20 70 | 72 6f 76 69 64 65 64 20 |ram is p|rovided |
|00001050| 69 6e 20 74 68 65 20 66 | 69 6c 65 20 61 63 75 63 |in the f|ile acuc|
|00001060| 6e 74 72 6c 2e 63 20 2e | 20 20 54 68 69 73 20 73 |ntrl.c .| This s|
|00001070| 68 6f 75 6c 64 0a 62 65 | 20 69 6e 73 74 61 6c 6c |hould.be| install|
|00001080| 65 64 20 73 75 69 64 20 | 74 6f 20 72 6f 6f 74 20 |ed suid |to root |
|00001090| 69 6e 20 74 68 65 20 66 | 69 6c 65 20 2f 75 73 72 |in the f|ile /usr|
|000010a0| 2f 6c 6f 63 61 6c 2f 6c | 69 62 2f 61 63 75 63 6e |/local/l|ib/acucn|
|000010b0| 74 72 6c 20 2e 20 41 20 | 73 65 74 20 6f 66 20 64 |trl . A |set of d|
|000010c0| 69 66 66 73 0a 66 6f 72 | 20 74 69 70 20 61 6e 64 |iffs.for| tip and|
|000010d0| 20 75 75 63 70 20 61 72 | 65 20 61 6c 73 6f 20 70 | uucp ar|e also p|
|000010e0| 72 6f 76 69 64 65 64 2e | 0a 0a 75 75 63 70 20 6e |rovided.|..uucp n|
|000010f0| 6f 74 65 73 3a 0a 54 68 | 65 20 33 72 64 20 66 69 |otes:.Th|e 3rd fi|
|00001100| 65 6c 64 20 6f 66 20 74 | 68 65 20 4c 2d 64 65 76 |eld of t|he L-dev|
|00001110| 69 63 65 73 20 66 69 6c | 65 20 73 68 6f 75 6c 64 |ices fil|e should|
|00001120| 20 63 6f 6e 74 61 69 6e | 20 22 69 6e 6f 75 74 22 | contain| "inout"|
|00001130| 20 20 66 6f 72 20 61 6c | 6c 20 64 65 76 69 63 65 | for al|l device|
|00001140| 73 0a 69 6e 74 65 6e 64 | 65 64 20 66 6f 72 20 64 |s.intend|ed for d|
|00001150| 69 61 6c 69 6e 2f 6f 75 | 74 20 75 73 65 2e 20 20 |ialin/ou|t use. |
|00001160| 44 65 76 69 63 65 73 20 | 77 69 74 68 6f 75 74 20 |Devices |without |
|00001170| 74 68 65 20 22 69 6e 6f | 75 74 22 20 73 70 65 63 |the "ino|ut" spec|
|00001180| 69 66 69 63 61 74 69 6f | 6e 20 77 69 6c 6c 0a 62 |ificatio|n will.b|
|00001190| 65 20 75 73 65 64 20 6c | 69 6b 65 20 62 65 66 6f |e used l|ike befo|
|000011a0| 72 65 3a 20 66 6f 72 20 | 64 69 61 6c 6f 75 74 20 |re: for |dialout |
|000011b0| 6f 6e 6c 79 2e 20 43 68 | 61 6e 67 65 73 20 61 72 |only. Ch|anges ar|
|000011c0| 65 20 69 6e 63 6c 75 64 | 65 64 20 74 6f 20 6f 6e |e includ|ed to on|
|000011d0| 6c 79 20 64 69 73 61 62 | 6c 65 0a 64 69 61 6c 69 |ly disab|le.diali|
|000011e0| 6e 73 20 6f 6e 20 74 68 | 65 20 6c 69 6e 65 20 6f |ns on th|e line o|
|000011f0| 6e 63 65 20 70 65 72 20 | 64 69 61 6c 69 6e 67 20 |nce per |dialing |
|00001200| 73 65 73 73 69 6f 6e 20 | 28 72 61 74 68 65 72 20 |session |(rather |
|00001210| 74 68 61 6e 20 65 6e 61 | 62 6c 69 6e 67 20 69 74 |than ena|bling it|
|00001220| 20 61 6e 64 0a 64 69 73 | 61 62 6c 69 6e 67 20 69 | and.dis|abling i|
|00001230| 74 20 77 68 65 6e 65 76 | 65 72 20 61 6e 6f 74 68 |t whenev|er anoth|
|00001240| 65 72 20 73 69 74 65 20 | 69 73 20 63 61 6c 6c 65 |er site |is calle|
|00001250| 64 29 2e 20 20 41 6c 73 | 6f 20 69 6e 63 6c 75 64 |d). Als|o includ|
|00001260| 65 64 20 69 73 20 74 68 | 65 20 66 69 78 20 74 6f |ed is th|e fix to|
|00001270| 0a 74 68 65 20 6e 61 73 | 74 79 20 54 49 4f 43 53 |.the nas|ty TIOCS|
|00001280| 50 47 50 20 62 75 67 20 | 77 68 69 63 68 20 63 61 |PGP bug |which ca|
|00001290| 75 73 65 64 20 61 6c 6c | 20 64 69 61 6c 69 6e 67 |used all| dialing|
|000012a0| 20 61 74 74 65 6d 70 74 | 73 20 61 66 74 65 72 20 | attempt|s after |
|000012b0| 74 68 65 20 66 69 72 73 | 74 0a 75 6e 73 75 63 63 |the firs|t.unsucc|
|000012c0| 65 73 73 66 75 6c 20 6f | 6e 65 20 74 6f 20 66 61 |essful o|ne to fa|
|000012d0| 69 6c 2e 0a 0a 74 69 70 | 20 6e 6f 74 65 73 3a 0a |il...tip| notes:.|
|000012e0| 74 69 70 20 72 75 6e 73 | 20 68 65 72 65 20 73 65 |tip runs| here se|
|000012f0| 74 67 69 64 20 74 6f 20 | 75 75 63 70 2e 20 20 49 |tgid to |uucp. I|
|00001300| 74 20 61 73 73 75 6d 65 | 73 20 74 68 61 74 20 2f |t assume|s that /|
|00001310| 75 73 72 2f 6c 6f 63 61 | 6c 2f 6c 69 62 2f 61 63 |usr/loca|l/lib/ac|
|00001320| 75 63 6e 74 72 6c 20 69 | 73 0a 65 78 65 63 75 74 |ucntrl i|s.execut|
|00001330| 61 62 6c 65 20 62 79 20 | 67 72 6f 75 70 20 75 75 |able by |group uu|
|00001340| 63 70 20 28 69 6e 20 63 | 61 73 65 20 79 6f 75 20 |cp (in c|ase you |
|00001350| 77 61 6e 74 20 74 6f 20 | 72 65 73 74 72 69 63 74 |want to |restrict|
|00001360| 20 67 65 6e 65 72 61 6c | 20 65 78 65 63 75 74 65 | general| execute|
|00001370| 0a 70 65 72 6d 69 73 73 | 69 6f 6e 20 6f 6e 20 74 |.permiss|ion on t|
|00001380| 68 69 73 20 70 72 6f 67 | 72 61 6d 29 2e 20 20 41 |his prog|ram). A|
|00001390| 20 63 68 61 6e 67 65 20 | 68 61 73 20 62 65 65 6e | change |has been|
|000013a0| 20 69 6e 63 6c 75 64 65 | 64 20 74 6f 20 61 6c 6c | include|d to all|
|000013b0| 6f 77 20 63 6f 6d 6d 61 | 0a 73 65 70 61 72 61 74 |ow comma|.separat|
|000013c0| 65 64 20 65 6e 74 72 69 | 65 73 20 69 6e 20 74 68 |ed entri|es in th|
|000013d0| 65 20 22 76 61 22 20 66 | 69 65 6c 64 20 6f 66 20 |e "va" f|ield of |
|000013e0| 74 68 65 20 72 65 6d 6f | 74 65 20 66 69 6c 65 2e |the remo|te file.|
|000013f0| 20 20 54 68 69 73 20 69 | 73 20 74 68 65 20 66 69 | This i|s the fi|
|00001400| 65 6c 64 0a 74 68 61 74 | 20 73 70 65 63 69 66 69 |eld.that| specifi|
|00001410| 65 73 20 74 68 65 20 64 | 69 61 6c 65 72 20 74 79 |es the d|ialer ty|
|00001420| 70 65 2e 20 20 57 69 74 | 68 20 6d 6f 72 65 20 64 |pe. Wit|h more d|
|00001430| 69 61 6c 65 72 73 20 61 | 76 61 69 6c 61 62 6c 65 |ialers a|vailable|
|00001440| 20 69 74 20 69 73 20 6d | 6f 72 65 20 6c 69 6b 65 | it is m|ore like|
|00001450| 6c 79 0a 74 68 61 74 20 | 74 68 65 79 20 77 69 6c |ly.that |they wil|
|00001460| 6c 20 62 65 20 6f 66 20 | 64 69 66 66 65 72 65 6e |l be of |differen|
|00001470| 74 20 74 79 70 65 73 2e | 20 20 49 66 20 74 68 65 |t types.| If the|
|00001480| 20 6e 75 6d 62 65 72 20 | 6f 66 20 22 76 61 22 20 | number |of "va" |
|00001490| 73 75 62 66 69 65 6c 64 | 73 20 69 73 20 6c 65 73 |subfield|s is les|
|000014a0| 73 0a 74 68 61 6e 20 74 | 68 65 20 6e 75 6d 62 65 |s.than t|he numbe|
|000014b0| 72 20 6f 66 20 22 64 76 | 22 20 28 69 2e 65 2e 20 |r of "dv|" (i.e. |
|000014c0| 64 65 76 69 63 65 20 6e | 61 6d 65 29 20 66 69 65 |device n|ame) fie|
|000014d0| 6c 64 73 20 74 68 65 20 | 64 65 76 69 63 65 20 74 |lds the |device t|
|000014e0| 79 70 65 20 74 68 61 74 | 20 6f 66 0a 74 68 65 20 |ype that| of.the |
|000014f0| 6c 61 73 74 20 70 72 65 | 76 69 6f 75 73 6c 79 20 |last pre|viously |
|00001500| 73 70 65 63 69 66 69 65 | 64 20 64 65 76 69 63 65 |specifie|d device|
|00001510| 2e 0a 0a 45 78 61 6d 70 | 6c 65 20 66 72 6f 6d 20 |...Examp|le from |
|00001520| 61 20 70 61 73 74 20 76 | 65 72 73 69 6f 6e 20 6f |a past v|ersion o|
|00001530| 66 20 6f 75 72 20 6f 77 | 6e 20 2f 65 74 63 2f 72 |f our ow|n /etc/r|
|00001540| 65 6d 6f 74 65 3a 0a 09 | 3a 64 76 3d 2f 64 65 76 |emote:..|:dv=/dev|
|00001550| 2f 74 74 79 64 32 2c 2f | 64 65 76 2f 74 74 79 64 |/ttyd2,/|dev/ttyd|
|00001560| 31 2c 2f 64 65 76 2f 74 | 74 79 64 30 3a 61 74 3d |1,/dev/t|tyd0:at=|
|00001570| 68 61 79 65 73 2c 76 61 | 64 69 63 3a 0a 0a 54 68 |hayes,va|dic:..Th|
|00001580| 65 20 66 69 72 73 74 20 | 6d 6f 64 65 6d 20 2f 64 |e first |modem /d|
|00001590| 65 76 2f 74 74 79 64 32 | 20 69 73 20 61 20 68 61 |ev/ttyd2| is a ha|
|000015a0| 79 65 73 2e 20 20 54 68 | 65 20 73 65 63 6f 6e 64 |yes. Th|e second|
|000015b0| 20 74 77 6f 20 6d 6f 64 | 65 6d 73 20 2f 64 65 76 | two mod|ems /dev|
|000015c0| 2f 74 74 79 64 31 20 61 | 6e 64 0a 2f 64 65 76 2f |/ttyd1 a|nd./dev/|
|000015d0| 74 74 79 64 30 20 61 72 | 65 20 76 61 64 69 63 73 |ttyd0 ar|e vadics|
|000015e0| 2e 0a 0a 49 74 20 69 73 | 20 61 73 73 75 6d 65 64 |...It is| assumed|
|000015f0| 20 69 6e 20 74 69 70 20 | 74 68 61 74 20 74 68 65 | in tip |that the|
|00001600| 20 64 69 61 6c 69 6e 2f | 64 69 61 6c 6f 75 74 20 | dialin/|dialout |
|00001610| 64 65 76 69 63 65 73 20 | 68 61 76 65 20 6e 61 6d |devices |have nam|
|00001620| 65 73 20 2f 64 65 76 2f | 74 74 79 64 3f 2e 0a 4f |es /dev/|ttyd?..O|
|00001630| 74 68 65 72 20 6e 61 6d | 65 73 20 77 69 6c 6c 20 |ther nam|es will |
|00001640| 72 65 71 75 69 72 65 20 | 6d 6f 64 69 66 69 63 61 |require |modifica|
|00001650| 74 69 6f 6e 73 20 69 6e | 20 61 63 75 63 6e 74 72 |tions in| acucntr|
|00001660| 6c 20 61 6e 64 20 69 6e | 20 75 75 63 70 6c 6f 63 |l and in| uucploc|
|00001670| 6b 2e 63 2e 0a 0a 48 6f | 70 65 66 75 6c 6c 79 2c |k.c...Ho|pefully,|
|00001680| 20 49 20 6f 72 20 73 6f | 6d 65 6f 6e 65 20 65 6c | I or so|meone el|
|00001690| 73 65 20 77 69 6c 6c 20 | 62 65 20 61 62 6c 65 20 |se will |be able |
|000016a0| 74 6f 20 64 6f 20 74 68 | 65 20 65 71 75 69 76 61 |to do th|e equiva|
|000016b0| 6c 65 6e 74 20 66 6f 72 | 20 34 2e 33 20 42 53 44 |lent for| 4.3 BSD|
|000016c0| 2e 0a 49 20 77 69 6c 6c | 20 64 6f 20 69 74 20 69 |..I will| do it i|
|000016d0| 66 20 49 20 63 61 6e 20 | 67 65 74 20 6d 79 20 68 |f I can |get my h|
|000016e0| 61 6e 64 73 20 6f 6e 20 | 61 20 34 2e 33 20 42 53 |ands on |a 4.3 BS|
|000016f0| 44 20 73 79 73 74 65 6d | 2e 20 20 48 6f 70 65 66 |D system|. Hopef|
|00001700| 75 6c 6c 79 20 34 2e 33 | 20 42 53 44 0a 77 69 6c |ully 4.3| BSD.wil|
|00001710| 6c 20 70 72 6f 76 69 64 | 65 20 62 65 74 74 65 72 |l provid|e better|
|00001720| 20 68 6f 6f 6b 73 20 74 | 6f 20 70 72 6f 76 69 64 | hooks t|o provid|
|00001730| 65 20 74 68 65 73 65 20 | 66 75 6e 63 74 69 6f 6e |e these |function|
|00001740| 73 20 74 68 61 6e 20 74 | 68 65 20 68 6f 6f 6b 73 |s than t|he hooks|
|00001750| 20 74 68 61 74 0a 74 68 | 65 20 76 65 72 73 69 6f | that.th|e versio|
|00001760| 6e 20 6f 66 20 61 63 75 | 63 6e 74 72 6c 20 75 73 |n of acu|cntrl us|
|00001770| 65 64 20 68 65 72 65 20 | 68 61 64 20 74 6f 20 75 |ed here |had to u|
|00001780| 73 65 2e 0a 0a 47 6f 6f | 64 20 6c 75 63 6b 2e 20 |se...Goo|d luck. |
|00001790| 20 49 20 77 61 6e 74 20 | 74 6f 20 6e 65 76 65 72 | I want |to never|
|000017a0| 20 67 6f 20 62 61 63 6b | 20 74 6f 20 72 65 73 65 | go back| to rese|
|000017b0| 72 76 69 6e 67 20 6d 6f | 64 65 6d 73 20 66 6f 72 |rving mo|dems for|
|000017c0| 20 64 69 61 6c 6f 75 74 | 2e 0a 0a 42 69 6c 6c 20 | dialout|...Bill |
|000017d0| 53 65 62 6f 6b 09 09 09 | 50 72 69 6e 63 65 74 6f |Sebok...|Princeto|
|000017e0| 6e 20 55 6e 69 76 65 72 | 73 69 74 79 2c 20 41 73 |n Univer|sity, As|
|000017f0| 74 72 6f 70 68 79 73 69 | 63 73 0a 7b 61 6c 6c 65 |trophysi|cs.{alle|
|00001800| 67 72 61 2c 61 6b 67 75 | 61 2c 62 75 72 6c 2c 63 |gra,akgu|a,burl,c|
|00001810| 62 6f 73 67 64 2c 64 65 | 63 76 61 78 2c 69 68 6e |bosgd,de|cvax,ihn|
|00001820| 70 34 2c 6e 6f 61 6f 2c | 70 72 69 6e 63 65 74 6f |p4,noao,|princeto|
|00001830| 6e 2c 76 61 78 31 33 35 | 7d 21 61 73 74 72 6f 76 |n,vax135|}!astrov|
|00001840| 61 78 21 77 6c 73 0a 00 | 00 00 00 00 00 00 00 00 |ax!wls..|........|
|00001850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001880| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001890| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001900| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a00| 64 69 61 6c 2d 69 6e 6f | 75 74 2d 62 73 64 2f 61 |dial-ino|ut-bsd/a|
|00001a10| 63 75 63 6e 74 72 6c 2e | 38 6c 00 00 00 00 00 00 |cucntrl.|8l......|
|00001a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a60| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00001a70| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00001a80| 20 20 31 30 36 30 37 20 | 20 34 34 30 34 30 36 35 | 10607 | 4404065|
|00001a90| 31 34 32 20 20 31 31 30 | 31 37 00 20 00 00 00 00 |142 110|17. ....|
|00001aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c00| 2e 54 48 20 61 63 75 63 | 6e 74 72 6c 20 38 20 6c |.TH acuc|ntrl 8 l|
|00001c10| 6f 63 61 6c 0a 2e 53 48 | 20 4e 41 4d 45 0a 2e 42 |ocal..SH| NAME..B|
|00001c20| 20 61 63 75 63 6e 74 72 | 6c 20 5c 2d 20 74 75 72 | acucntr|l \- tur|
|00001c30| 6e 20 61 72 6f 75 6e 64 | 20 74 74 79 20 6c 69 6e |n around| tty lin|
|00001c40| 65 20 62 65 74 77 65 65 | 6e 20 64 69 61 6c 69 6e |e betwee|n dialin|
|00001c50| 20 61 6e 64 20 64 69 61 | 6c 6f 75 74 0a 2e 53 48 | and dia|lout..SH|
|00001c60| 20 53 59 4e 4f 50 53 49 | 53 0a 2e 42 20 2f 75 73 | SYNOPSI|S..B /us|
|00001c70| 72 2f 6c 69 62 2f 6c 6f | 63 61 6c 2f 61 63 75 63 |r/lib/lo|cal/acuc|
|00001c80| 6e 74 72 6c 0a 6b 65 79 | 77 6f 72 64 20 74 74 79 |ntrl.key|word tty|
|00001c90| 6c 69 6e 65 0a 2e 53 48 | 20 44 45 53 43 52 49 50 |line..SH| DESCRIP|
|00001ca0| 54 49 4f 4e 0a 2e 50 50 | 0a 2e 49 20 41 63 75 63 |TION..PP|..I Acuc|
|00001cb0| 6e 74 72 6c 0a 74 75 72 | 6e 73 20 61 72 6f 75 6e |ntrl.tur|ns aroun|
|00001cc0| 64 20 74 65 72 6d 69 6e | 61 6c 20 6c 69 6e 65 2c |d termin|al line,|
|00001cd0| 20 65 6e 61 62 6c 69 6e | 67 20 69 74 20 74 6f 20 | enablin|g it to |
|00001ce0| 62 65 20 75 73 65 64 20 | 66 6f 72 20 62 6f 74 68 |be used |for both|
|00001cf0| 20 64 69 61 6c 69 6e 20 | 61 6e 64 20 64 69 61 6c | dialin |and dial|
|00001d00| 6f 75 74 2e 0a 4f 6e 20 | 64 69 61 6c 69 6e 20 61 |out..On |dialin a|
|00001d10| 20 74 65 72 6d 69 6e 61 | 6c 20 6c 69 6e 65 20 69 | termina|l line i|
|00001d20| 73 20 61 73 73 75 6d 65 | 64 20 74 6f 20 68 61 76 |s assume|d to hav|
|00001d30| 65 20 20 6d 6f 64 65 6d | 20 63 6f 6e 74 72 6f 6c |e modem| control|
|00001d40| 20 65 6e 61 62 6c 65 64 | 20 61 6e 64 20 61 20 67 | enabled| and a g|
|00001d50| 65 74 74 79 0a 70 72 6f | 63 65 73 73 20 69 6e 20 |etty.pro|cess in |
|00001d60| 65 78 69 73 74 65 6e 63 | 65 20 77 61 69 74 69 6e |existenc|e waitin|
|00001d70| 67 20 66 6f 72 20 6c 6f | 67 69 6e 73 2e 20 20 4f |g for lo|gins. O|
|00001d80| 6e 20 64 69 61 6c 6f 75 | 74 20 6d 6f 64 65 6d 20 |n dialou|t modem |
|00001d90| 63 6f 6e 74 72 6f 6c 20 | 69 73 20 64 69 73 61 62 |control |is disab|
|00001da0| 6c 65 64 0a 61 6e 64 20 | 74 68 65 72 65 20 69 73 |led.and |there is|
|00001db0| 20 6e 6f 20 67 65 74 74 | 79 20 70 72 6f 63 65 73 | no gett|y proces|
|00001dc0| 73 2e 0a 2e 50 50 0a 54 | 68 69 73 20 70 72 6f 67 |s...PP.T|his prog|
|00001dd0| 72 61 6d 20 6d 75 73 74 | 20 62 65 20 72 75 6e 20 |ram must| be run |
|00001de0| 73 65 74 75 69 64 20 74 | 6f 20 72 6f 6f 74 2e 0a |setuid t|o root..|
|00001df0| 2e 50 50 0a 2e 49 20 6b | 65 79 77 6f 72 64 0a 69 |.PP..I k|eyword.i|
|00001e00| 73 20 63 68 6f 73 65 6e | 20 66 72 6f 6d 20 74 68 |s chosen| from th|
|00001e10| 65 20 6c 69 73 74 3a 0a | 2e 49 20 64 69 73 61 62 |e list:.|.I disab|
|00001e20| 6c 65 0a 6f 72 0a 2e 49 | 52 20 64 69 61 6c 6f 75 |le.or..I|R dialou|
|00001e30| 74 20 2c 0a 74 6f 20 63 | 6f 6e 64 69 74 69 6f 6e |t ,.to c|ondition|
|00001e40| 20 61 20 6c 69 6e 65 20 | 66 6f 72 20 64 69 61 6c | a line |for dial|
|00001e50| 6f 75 74 3b 0a 61 6e 64 | 0a 2e 49 20 65 6e 61 62 |out;.and|..I enab|
|00001e60| 6c 65 0a 6f 72 0a 2e 49 | 52 20 64 69 61 6c 69 6e |le.or..I|R dialin|
|00001e70| 20 2c 0a 74 6f 20 63 6f | 6e 64 69 74 69 6f 6e 20 | ,.to co|ndition |
|00001e80| 61 20 6c 69 6e 65 20 66 | 6f 72 20 64 69 61 6c 69 |a line f|or diali|
|00001e90| 6e 2e 0a 2e 50 50 0a 57 | 68 65 6e 20 74 68 65 20 |n...PP.W|hen the |
|00001ea0| 6c 69 6e 65 20 69 73 20 | 63 6f 6e 64 69 74 69 6f |line is |conditio|
|00001eb0| 6e 65 64 20 66 6f 72 20 | 64 69 61 6c 69 6e 67 20 |ned for |dialing |
|00001ec0| 6f 75 74 2c 20 74 68 65 | 20 6c 6f 67 69 6e 20 6e |out, the| login n|
|00001ed0| 61 6d 65 20 6f 66 20 74 | 68 65 20 72 65 61 6c 20 |ame of t|he real |
|00001ee0| 75 69 64 0a 6f 66 20 74 | 68 65 20 70 72 6f 63 65 |uid.of t|he proce|
|00001ef0| 73 73 20 69 73 20 70 6c | 61 63 65 64 20 69 6e 20 |ss is pl|aced in |
|00001f00| 2f 65 74 63 2f 75 74 6d | 70 20 69 6e 20 63 61 70 |/etc/utm|p in cap|
|00001f10| 69 74 61 6c 73 2e 0a 54 | 68 69 73 20 64 65 63 6c |itals..T|his decl|
|00001f20| 61 72 65 73 20 74 68 61 | 74 20 74 68 65 20 6c 69 |ares tha|t the li|
|00001f30| 6e 65 20 69 73 20 69 6e | 20 75 73 65 20 61 6e 64 |ne is in| use and|
|00001f40| 20 61 63 74 73 20 61 73 | 20 61 6e 20 61 64 64 69 | acts as| an addi|
|00001f50| 74 69 6f 6e 61 6c 20 6c | 6f 63 6b 69 6e 67 0a 6d |tional l|ocking.m|
|00001f60| 65 63 68 61 6e 69 73 6d | 2e 0a 2e 49 20 41 63 75 |echanism|...I Acu|
|00001f70| 63 6e 74 72 6c 0a 77 69 | 6c 6c 20 72 65 66 75 73 |cntrl.wi|ll refus|
|00001f80| 65 20 74 6f 20 61 63 74 | 20 69 66 20 74 68 65 20 |e to act| if the |
|00001f90| 2f 65 74 63 2f 75 74 6d | 70 20 65 6e 74 72 79 20 |/etc/utm|p entry |
|00001fa0| 66 6f 72 20 74 68 65 20 | 6c 69 6e 65 20 69 73 20 |for the |line is |
|00001fb0| 6e 6f 74 20 6e 75 6c 6c | 2c 0a 69 73 20 6e 6f 74 |not null|,.is not|
|00001fc0| 20 74 68 65 20 74 68 65 | 20 75 73 65 72 27 73 20 | the the| user's |
|00001fd0| 6c 6f 67 69 6e 20 6e 61 | 6d 65 20 28 63 61 70 69 |login na|me (capi|
|00001fe0| 74 61 6c 69 7a 65 64 20 | 6f 72 20 6e 6f 74 29 2c |talized |or not),|
|00001ff0| 0a 61 6e 64 20 69 66 20 | 74 68 65 20 70 72 6f 63 |.and if |the proc|
|00002000| 65 73 73 20 69 73 20 6e | 6f 74 20 72 75 6e 6e 69 |ess is n|ot runni|
|00002010| 6e 67 20 61 73 20 74 68 | 65 20 73 75 70 65 72 75 |ng as th|e superu|
|00002020| 73 65 72 2e 0a 54 68 65 | 20 6c 61 73 74 20 63 6f |ser..The| last co|
|00002030| 6e 64 69 74 69 6f 6e 20 | 69 73 20 74 6f 20 61 6c |ndition |is to al|
|00002040| 6c 6f 77 20 74 68 65 20 | 73 75 70 65 72 75 73 65 |low the |superuse|
|00002050| 72 20 74 6f 20 63 6c 65 | 61 72 20 74 68 65 20 73 |r to cle|ar the s|
|00002060| 74 61 74 65 20 6f 66 20 | 74 68 65 20 6c 69 6e 65 |tate of |the line|
|00002070| 2e 0a 2e 50 50 0a 54 75 | 72 6e 69 6e 67 20 6d 6f |...PP.Tu|rning mo|
|00002080| 64 65 6d 20 63 6f 6e 74 | 72 6f 6c 20 6f 6e 20 6f |dem cont|rol on o|
|00002090| 72 20 6f 66 66 20 69 73 | 20 68 61 6e 64 6c 65 64 |r off is| handled|
|000020a0| 20 62 79 20 70 6f 6b 69 | 6e 67 20 69 6e 74 6f 20 | by poki|ng into |
|000020b0| 2f 64 65 76 2f 6b 6d 65 | 6d 2e 0a 49 74 20 69 73 |/dev/kme|m..It is|
|000020c0| 20 63 75 72 72 65 6e 74 | 6c 79 20 69 6d 70 6c 65 | current|ly imple|
|000020d0| 6d 65 6e 74 65 64 20 66 | 6f 72 20 64 7a 2c 20 64 |mented f|or dz, d|
|000020e0| 68 2c 20 61 6e 64 20 64 | 6d 66 20 6c 69 6e 65 73 |h, and d|mf lines|
|000020f0| 2e 0a 2e 50 50 0a 55 6e | 64 65 72 20 34 2e 32 20 |...PP.Un|der 4.2 |
|00002100| 42 53 44 20 74 68 65 20 | 70 72 6f 67 72 61 6d 20 |BSD the |program |
|00002110| 77 69 6c 6c 20 61 6c 73 | 6f 20 72 65 66 75 73 65 |will als|o refuse|
|00002120| 20 74 6f 20 64 69 73 61 | 62 6c 65 20 61 20 6c 69 | to disa|ble a li|
|00002130| 6e 65 20 69 66 20 63 61 | 72 72 69 65 72 20 69 73 |ne if ca|rrier is|
|00002140| 0a 73 65 6e 73 65 64 20 | 6f 6e 20 69 74 2e 20 20 |.sensed |on it. |
|00002150| 54 68 69 73 20 69 73 20 | 74 6f 20 61 76 6f 69 64 |This is |to avoid|
|00002160| 20 74 68 65 20 64 65 61 | 64 20 70 65 72 69 6f 64 | the dea|d period|
|00002170| 20 77 68 65 72 65 20 73 | 6f 6d 65 6f 6e 65 20 68 | where s|omeone h|
|00002180| 61 73 20 6a 75 73 74 20 | 64 69 61 6c 65 64 0a 69 |as just |dialed.i|
|00002190| 6e 20 61 6e 64 20 6d 61 | 64 65 20 74 68 65 20 63 |n and ma|de the c|
|000021a0| 6f 6e 6e 65 63 74 69 6f | 6e 20 62 75 74 20 68 61 |onnectio|n but ha|
|000021b0| 73 20 6e 6f 74 20 79 65 | 74 20 6c 6f 67 67 65 64 |s not ye|t logged|
|000021c0| 20 69 6e 2e 0a 2e 50 50 | 0a 2e 49 20 54 74 79 6c | in...PP|..I Ttyl|
|000021d0| 69 6e 65 0a 63 61 6e 20 | 62 65 20 65 69 74 68 65 |ine.can |be eithe|
|000021e0| 72 20 6f 66 20 74 68 65 | 20 66 6f 72 6d 20 74 74 |r of the| form tt|
|000021f0| 79 2a 20 6f 72 20 2f 64 | 65 76 2f 74 74 79 2a 2e |y* or /d|ev/tty*.|
|00002200| 0a 45 6e 61 62 6c 69 6e | 67 2f 64 69 73 61 62 6c |.Enablin|g/disabl|
|00002210| 69 6e 67 20 61 20 6c 69 | 6e 65 20 77 68 6f 73 65 |ing a li|ne whose|
|00002220| 20 6e 61 6d 65 20 64 6f | 65 73 20 6e 6f 74 20 62 | name do|es not b|
|00002230| 65 67 69 6e 20 77 69 74 | 68 20 74 74 79 64 3f 20 |egin wit|h ttyd? |
|00002240| 69 73 20 70 72 6f 68 69 | 62 69 74 65 64 0a 75 6e |is prohi|bited.un|
|00002250| 6c 65 73 73 20 74 68 65 | 20 72 65 61 6c 20 75 69 |less the| real ui|
|00002260| 64 20 6f 66 20 74 68 65 | 20 70 72 6f 63 65 73 73 |d of the| process|
|00002270| 20 69 73 20 30 20 6f 72 | 20 69 66 20 74 68 65 20 | is 0 or| if the |
|00002280| 6c 6f 67 69 6e 20 6e 61 | 6d 65 20 63 6f 72 72 65 |login na|me corre|
|00002290| 73 70 6f 6e 64 69 6e 67 | 20 74 6f 0a 74 68 65 20 |sponding| to.the |
|000022a0| 72 65 61 6c 20 75 69 64 | 20 69 73 20 75 75 63 70 |real uid| is uucp|
|000022b0| 2e 20 20 54 68 69 73 20 | 69 73 20 61 20 73 65 63 |. This |is a sec|
|000022c0| 75 72 69 74 79 20 70 72 | 65 63 61 75 74 69 6f 6e |urity pr|ecaution|
|000022d0| 2e 0a 2e 50 50 20 0a 53 | 74 65 70 73 20 74 61 6b |...PP .S|teps tak|
|000022e0| 65 6e 20 77 68 65 6e 20 | 64 69 73 61 62 6c 69 6e |en when |disablin|
|000022f0| 67 0a 2e 52 49 20 28 20 | 69 20 2e 20 65 20 2e 0a |g..RI ( |i . e ..|
|00002300| 73 65 74 75 70 20 66 6f | 72 20 64 69 61 6c 69 6e |setup fo|r dialin|
|00002310| 67 20 6f 75 74 29 0a 2e | 49 50 20 31 29 0a 63 68 |g out)..|IP 1).ch|
|00002320| 65 63 6b 20 69 6e 70 75 | 74 20 61 72 67 75 6d 65 |eck inpu|t argume|
|00002330| 6e 74 73 0a 2e 49 50 20 | 32 29 0a 6c 6f 6f 6b 20 |nts..IP |2).look |
|00002340| 69 6e 20 2f 65 74 63 2f | 75 74 6d 70 20 74 6f 20 |in /etc/|utmp to |
|00002350| 63 68 65 63 6b 20 74 68 | 61 74 20 74 68 65 20 6c |check th|at the l|
|00002360| 69 6e 65 20 69 73 20 6e | 6f 74 20 69 6e 20 75 73 |ine is n|ot in us|
|00002370| 65 20 62 79 20 61 6e 6f | 74 68 65 72 20 75 73 65 |e by ano|ther use|
|00002380| 72 0a 2e 49 50 20 33 29 | 0a 64 69 73 61 62 6c 65 |r..IP 3)|.disable|
|00002390| 20 6d 6f 64 65 6d 20 63 | 6f 6e 74 72 6f 6c 20 6f | modem c|ontrol o|
|000023a0| 6e 20 6c 69 6e 65 0a 2e | 49 50 20 34 29 0a 63 68 |n line..|IP 4).ch|
|000023b0| 65 63 6b 20 66 6f 72 20 | 63 61 72 72 69 65 72 20 |eck for |carrier |
|000023c0| 6f 6e 20 64 65 76 69 63 | 65 0a 2e 49 50 20 35 29 |on devic|e..IP 5)|
|000023d0| 0a 63 68 61 6e 67 65 20 | 6f 77 6e 65 72 20 6f 66 |.change |owner of|
|000023e0| 20 64 65 76 69 63 65 20 | 74 6f 20 72 65 61 6c 20 | device |to real |
|000023f0| 75 69 64 0a 2e 49 50 20 | 36 29 0a 65 64 69 74 20 |uid..IP |6).edit |
|00002400| 2f 65 74 63 2f 74 74 79 | 73 2c 20 20 63 68 61 6e |/etc/tty|s, chan|
|00002410| 67 69 6e 67 20 74 68 65 | 20 66 69 72 73 74 20 63 |ging the| first c|
|00002420| 68 61 72 61 63 74 65 72 | 20 6f 66 20 74 68 65 20 |haracter| of the |
|00002430| 61 70 70 72 6f 70 72 69 | 61 74 65 20 6c 69 6e 65 |appropri|ate line|
|00002440| 20 74 6f 20 30 0a 2e 49 | 50 20 37 29 0a 73 65 6e | to 0..I|P 7).sen|
|00002450| 64 20 61 20 68 61 6e 67 | 75 70 20 74 6f 20 70 72 |d a hang|up to pr|
|00002460| 6f 63 65 73 73 20 31 20 | 74 6f 20 70 6f 6b 65 20 |ocess 1 |to poke |
|00002470| 69 6e 69 74 20 74 6f 20 | 64 69 73 61 62 6c 65 20 |init to |disable |
|00002480| 67 65 74 74 79 0a 2e 49 | 50 20 38 29 0a 70 6f 73 |getty..I|P 8).pos|
|00002490| 74 20 75 69 64 20 6e 61 | 6d 65 20 69 6e 20 63 61 |t uid na|me in ca|
|000024a0| 70 69 74 61 6c 73 20 69 | 6e 20 2f 65 74 63 2f 75 |pitals i|n /etc/u|
|000024b0| 74 6d 70 20 74 6f 20 6c | 65 74 20 77 6f 72 6c 64 |tmp to l|et world|
|000024c0| 20 6b 6e 6f 77 20 64 65 | 76 69 63 65 20 68 61 73 | know de|vice has|
|000024d0| 20 62 65 65 6e 20 67 72 | 61 62 62 65 64 0a 2e 49 | been gr|abbed..I|
|000024e0| 50 20 39 29 0a 6d 61 6b | 65 20 73 75 72 65 20 74 |P 9).mak|e sure t|
|000024f0| 68 61 74 20 44 54 52 20 | 69 73 20 6f 6e 0a 2e 50 |hat DTR |is on..P|
|00002500| 50 0a 53 74 65 70 73 20 | 74 61 6b 65 6e 20 77 68 |P.Steps |taken wh|
|00002510| 65 6e 20 65 6e 61 62 6c | 69 6e 67 0a 2e 52 49 20 |en enabl|ing..RI |
|00002520| 28 20 69 20 2e 20 65 20 | 2e 0a 73 65 74 75 70 20 |( i . e |..setup |
|00002530| 66 6f 72 20 64 69 61 6c | 69 6e 29 0a 2e 49 50 20 |for dial|in)..IP |
|00002540| 31 29 0a 63 68 65 63 6b | 20 69 6e 70 75 74 20 61 |1).check| input a|
|00002550| 72 67 75 6d 65 6e 74 73 | 0a 2e 49 50 20 32 29 0a |rguments|..IP 2).|
|00002560| 6c 6f 6f 6b 20 69 6e 20 | 2f 65 74 63 2f 75 74 6d |look in |/etc/utm|
|00002570| 70 20 74 6f 20 63 68 65 | 63 6b 20 74 68 61 74 20 |p to che|ck that |
|00002580| 74 68 65 20 6c 69 6e 65 | 20 69 73 20 6e 6f 74 20 |the line| is not |
|00002590| 69 6e 20 75 73 65 20 62 | 79 20 61 6e 6f 74 68 65 |in use b|y anothe|
|000025a0| 72 20 75 73 65 72 0a 2e | 49 50 20 33 29 0a 6d 61 |r user..|IP 3).ma|
|000025b0| 6b 65 20 73 75 72 65 20 | 6d 6f 64 65 6d 20 63 6f |ke sure |modem co|
|000025c0| 6e 74 72 6f 6c 20 6f 6e | 20 6c 69 6e 65 20 69 73 |ntrol on| line is|
|000025d0| 20 64 69 73 61 62 6c 65 | 64 0a 2e 49 50 20 34 29 | disable|d..IP 4)|
|000025e0| 0a 74 75 72 6e 20 6f 66 | 66 20 44 54 52 20 74 6f |.turn of|f DTR to|
|000025f0| 20 6d 61 6b 65 20 73 75 | 72 65 20 6c 69 6e 65 20 | make su|re line |
|00002600| 69 73 20 68 75 6e 67 20 | 75 70 0a 2e 49 50 20 35 |is hung |up..IP 5|
|00002610| 29 0a 63 6f 6e 64 69 74 | 69 6f 6e 20 6c 69 6e 65 |).condit|ion line|
|00002620| 3a 20 63 6c 65 61 72 20 | 65 78 63 6c 75 73 69 76 |: clear |exclusiv|
|00002630| 65 20 75 73 65 20 61 6e | 64 20 73 65 74 20 68 61 |e use an|d set ha|
|00002640| 6e 67 75 70 20 6f 6e 20 | 63 6c 6f 73 65 20 6d 6f |ngup on |close mo|
|00002650| 64 65 73 0a 2e 49 50 20 | 36 29 0a 74 75 72 6e 20 |des..IP |6).turn |
|00002660| 6f 6e 20 6d 6f 64 65 6d | 20 63 6f 6e 74 72 6f 6c |on modem| control|
|00002670| 0a 2e 49 50 20 37 29 0a | 65 64 69 74 20 2f 65 74 |..IP 7).|edit /et|
|00002680| 63 2f 74 74 79 73 2c 20 | 20 63 68 61 6e 67 69 6e |c/ttys, | changin|
|00002690| 67 20 74 68 65 20 66 69 | 72 73 74 20 63 68 61 72 |g the fi|rst char|
|000026a0| 61 63 74 65 72 20 6f 66 | 20 74 68 65 20 61 70 70 |acter of| the app|
|000026b0| 72 6f 70 72 69 61 74 65 | 20 6c 69 6e 65 20 74 6f |ropriate| line to|
|000026c0| 20 31 0a 2e 49 50 20 38 | 29 0a 73 65 6e 64 20 61 | 1..IP 8|).send a|
|000026d0| 20 68 61 6e 67 75 70 20 | 74 6f 20 70 72 6f 63 65 | hangup |to proce|
|000026e0| 73 73 20 31 20 74 6f 20 | 70 6f 6b 65 20 69 6e 69 |ss 1 to |poke ini|
|000026f0| 74 20 74 6f 20 65 6e 61 | 62 6c 65 20 67 65 74 74 |t to ena|ble gett|
|00002700| 79 0a 2e 49 50 20 39 29 | 0a 63 6c 65 61 72 20 75 |y..IP 9)|.clear u|
|00002710| 69 64 20 6e 61 6d 65 20 | 66 6f 72 20 2f 65 74 63 |id name |for /etc|
|00002720| 2f 75 74 6d 70 0a 2e 53 | 48 20 48 49 53 54 4f 52 |/utmp..S|H HISTOR|
|00002730| 59 0a 2e 50 50 0a 46 69 | 72 73 74 20 77 72 69 74 |Y..PP.Fi|rst writ|
|00002740| 74 65 6e 20 62 79 20 41 | 6c 6c 61 6e 20 57 69 6c |ten by A|llan Wil|
|00002750| 6b 65 73 20 28 66 69 73 | 68 65 72 21 61 6c 6c 61 |kes (fis|her!alla|
|00002760| 6e 29 0a 2e 50 50 0a 4d | 6f 64 69 66 69 65 64 20 |n)..PP.M|odified |
|00002770| 4a 75 6e 65 20 38 2c 31 | 39 38 33 20 62 79 20 57 |June 8,1|983 by W|
|00002780| 2e 53 65 62 6f 6b 20 28 | 61 73 74 72 6f 76 61 78 |.Sebok (|astrovax|
|00002790| 21 77 6c 73 29 20 74 6f | 20 70 6f 6b 65 20 74 68 |!wls) to| poke th|
|000027a0| 65 20 6b 65 72 6e 65 6c | 20 72 61 74 68 65 72 0a |e kernel| rather.|
|000027b0| 74 68 61 6e 20 75 73 65 | 20 61 20 6b 65 72 6e 65 |than use| a kerne|
|000027c0| 6c 20 68 61 63 6b 20 74 | 6f 20 74 75 72 6e 20 6f |l hack t|o turn o|
|000027d0| 6e 2f 6f 66 66 20 6d 6f | 64 65 6d 20 63 6f 6e 74 |n/off mo|dem cont|
|000027e0| 72 6f 6c 2c 20 75 73 69 | 6e 67 20 61 20 73 75 62 |rol, usi|ng a sub|
|000027f0| 72 6f 75 74 69 6e 65 0a | 73 74 6f 6c 65 6e 20 66 |routine.|stolen f|
|00002800| 72 6f 6d 20 61 20 70 72 | 6f 67 72 61 6d 20 77 72 |rom a pr|ogram wr|
|00002810| 69 74 74 65 6e 20 62 79 | 20 54 73 75 74 6f 6d 75 |itten by| Tsutomu|
|00002820| 20 53 68 69 6d 6f 6d 75 | 72 61 20 7b 61 73 74 72 | Shimomu|ra {astr|
|00002830| 6f 76 61 78 2c 65 73 63 | 68 65 72 7d 21 74 73 75 |ovax,esc|her}!tsu|
|00002840| 74 6f 6d 75 0a 2e 50 50 | 0a 57 6f 72 6b 65 64 20 |tomu..PP|.Worked |
|00002850| 6f 76 65 72 20 6d 61 6e | 79 20 74 69 6d 65 73 20 |over man|y times |
|00002860| 62 79 20 57 2e 53 65 62 | 6f 6b 0a 2e 52 49 20 28 |by W.Seb|ok..RI (|
|00002870| 20 69 20 2e 20 65 20 2e | 0a 68 61 63 6b 65 64 20 | i . e .|.hacked |
|00002880| 74 6f 20 64 65 61 74 68 | 29 0a 2e 53 48 20 46 49 |to death|)..SH FI|
|00002890| 4c 45 53 0a 2f 64 65 76 | 2f 6b 6d 65 6d 2c 20 2f |LES./dev|/kmem, /|
|000028a0| 76 6d 75 6e 69 78 2c 20 | 2f 65 74 63 2f 74 74 79 |vmunix, |/etc/tty|
|000028b0| 73 2c 20 2f 65 74 63 2f | 75 74 6d 70 2c 20 2f 64 |s, /etc/|utmp, /d|
|000028c0| 65 76 2f 74 74 79 2a 0a | 2e 53 48 20 42 55 47 53 |ev/tty*.|.SH BUGS|
|000028d0| 0a 2e 50 50 0a 53 65 6e | 73 69 6e 67 20 63 61 72 |..PP.Sen|sing car|
|000028e0| 72 69 65 72 20 72 65 71 | 75 69 72 65 73 20 74 68 |rier req|uires th|
|000028f0| 65 20 34 2e 32 20 42 53 | 44 20 54 49 4f 43 4d 47 |e 4.2 BS|D TIOCMG|
|00002900| 45 54 20 69 6f 63 74 6c | 20 63 61 6c 6c 2e 20 20 |ET ioctl| call. |
|00002910| 55 6e 66 6f 72 74 75 6e | 61 74 65 6c 79 20 74 68 |Unfortun|ately th|
|00002920| 69 73 0a 69 6f 63 74 6c | 20 69 73 20 6e 6f 74 20 |is.ioctl| is not |
|00002930| 69 6d 70 6c 65 6d 65 6e | 74 65 64 20 69 6e 20 74 |implemen|ted in t|
|00002940| 68 65 20 76 61 6e 69 6c | 6c 61 20 34 2e 32 20 42 |he vanil|la 4.2 B|
|00002950| 53 44 20 64 68 20 64 72 | 69 76 65 72 20 65 76 65 |SD dh dr|iver eve|
|00002960| 6e 20 74 68 6f 75 67 68 | 20 74 68 65 0a 64 7a 20 |n though| the.dz |
|00002970| 61 6e 64 20 64 6d 66 20 | 64 72 69 76 65 72 73 20 |and dmf |drivers |
|00002980| 75 73 65 20 61 6e 20 65 | 6d 75 6c 61 74 69 6f 6e |use an e|mulation|
|00002990| 20 6f 66 20 74 68 65 20 | 44 48 31 31 27 73 20 6d | of the |DH11's m|
|000029a0| 6f 64 65 6d 20 63 6f 6e | 74 72 6f 6c 20 62 69 74 |odem con|trol bit|
|000029b0| 73 2e 20 54 68 69 73 0a | 68 61 73 20 62 65 65 6e |s. This.|has been|
|000029c0| 20 66 69 78 65 64 20 68 | 65 72 65 2e 0a 2e 50 50 | fixed h|ere...PP|
|000029d0| 0a 53 6f 6d 65 20 74 69 | 6d 65 20 28 63 75 72 72 |.Some ti|me (curr|
|000029e0| 65 6e 74 6c 79 20 32 20 | 73 65 63 6f 6e 64 73 29 |ently 2 |seconds)|
|000029f0| 20 69 73 20 72 65 71 75 | 69 72 65 64 20 62 65 74 | is requ|ired bet|
|00002a00| 77 65 65 6e 20 64 69 73 | 61 62 6c 69 6e 67 20 6d |ween dis|abling m|
|00002a10| 6f 64 65 6d 20 63 6f 6e | 74 72 6f 6c 0a 61 6e 64 |odem con|trol.and|
|00002a20| 20 6f 70 65 6e 69 6e 67 | 20 74 68 65 20 64 65 76 | opening| the dev|
|00002a30| 69 63 65 2e 20 20 54 68 | 69 73 20 69 73 20 70 72 |ice. Th|is is pr|
|00002a40| 6f 62 61 62 6c 79 20 62 | 65 63 61 75 73 65 20 6f |obably b|ecause o|
|00002a50| 66 20 61 20 72 61 63 65 | 20 77 69 74 68 20 67 65 |f a race| with ge|
|00002a60| 74 74 79 20 77 68 6f 73 | 65 0a 6f 70 65 6e 20 69 |tty whos|e.open i|
|00002a70| 73 20 66 69 6e 61 6c 6c | 79 20 62 65 69 6e 67 20 |s finall|y being |
|00002a80| 61 6c 6c 6f 77 65 64 20 | 74 6f 20 63 6f 6d 70 6c |allowed |to compl|
|00002a90| 65 74 65 2e 20 20 54 68 | 69 73 20 74 69 6d 65 20 |ete. Th|is time |
|00002aa0| 69 6e 74 65 72 76 61 6c | 20 6d 61 79 20 6e 6f 74 |interval| may not|
|00002ab0| 20 62 65 0a 65 6e 6f 75 | 67 68 20 6f 6e 20 61 20 | be.enou|gh on a |
|00002ac0| 6c 6f 61 64 65 64 20 73 | 79 73 74 65 6d 2e 20 20 |loaded s|ystem. |
|00002ad0| 42 65 63 61 75 73 65 20 | 6f 66 20 74 68 69 73 20 |Because |of this |
|00002ae0| 70 72 6f 62 6c 65 6d 20 | 61 6e 64 20 74 68 65 20 |problem |and the |
|00002af0| 61 62 6f 76 65 20 70 72 | 6f 62 6c 65 6d 20 77 69 |above pr|oblem wi|
|00002b00| 74 68 0a 74 68 65 20 64 | 68 20 64 72 69 76 65 72 |th.the d|h driver|
|00002b10| 20 74 68 65 72 65 20 69 | 73 20 64 65 6c 69 62 65 | there i|s delibe|
|00002b20| 72 61 74 65 6c 79 20 6e | 6f 20 65 72 72 6f 72 20 |rately n|o error |
|00002b30| 6d 65 73 73 61 67 65 20 | 67 69 76 65 6e 20 77 68 |message |given wh|
|00002b40| 65 6e 20 74 68 65 20 54 | 49 4f 43 4d 47 45 54 0a |en the T|IOCMGET.|
|00002b50| 69 6f 63 74 6c 20 66 61 | 69 6c 73 2e 0a 2e 50 50 |ioctl fa|ils...PP|
|00002b60| 0a 50 72 65 76 69 6f 75 | 73 6c 79 20 74 68 65 72 |.Previou|sly ther|
|00002b70| 65 20 77 61 73 20 73 69 | 6d 69 6c 61 72 20 73 79 |e was si|milar sy|
|00002b80| 6e 63 68 72 6f 6e 69 7a | 61 74 69 6f 6e 20 70 72 |nchroniz|ation pr|
|00002b90| 6f 62 6c 65 6d 20 77 69 | 74 68 20 74 68 65 20 69 |oblem wi|th the i|
|00002ba0| 6e 69 74 20 70 72 6f 63 | 65 73 73 2e 0a 57 68 65 |nit proc|ess..Whe|
|00002bb0| 6e 20 64 69 61 6c 69 6e | 73 20 61 72 65 20 64 69 |n dialin|s are di|
|00002bc0| 73 61 62 6c 65 64 20 74 | 68 65 20 63 61 70 69 74 |sabled t|he capit|
|00002bd0| 61 6c 69 7a 65 64 20 6e | 61 6d 65 20 6f 66 20 74 |alized n|ame of t|
|00002be0| 68 65 20 70 72 6f 63 65 | 73 73 20 63 61 6e 6e 6f |he proce|ss canno|
|00002bf0| 74 20 62 65 20 70 6f 73 | 74 65 64 0a 69 6e 74 6f |t be pos|ted.into|
|00002c00| 20 2f 65 74 63 2f 75 74 | 6d 70 20 75 6e 74 69 6c | /etc/ut|mp until|
|00002c10| 20 69 6e 69 74 20 68 61 | 73 20 66 69 6e 69 73 68 | init ha|s finish|
|00002c20| 65 64 20 63 6c 65 61 72 | 69 6e 67 20 2f 65 74 63 |ed clear|ing /etc|
|00002c30| 2f 75 74 6d 70 2e 20 20 | 48 6f 77 65 76 65 72 20 |/utmp. |However |
|00002c40| 6f 6e 65 20 64 6f 65 73 | 0a 6e 6f 74 20 6b 6e 6f |one does|.not kno|
|00002c50| 77 20 68 6f 77 20 6c 6f | 6e 67 20 74 68 61 74 20 |w how lo|ng that |
|00002c60| 77 69 6c 6c 20 74 61 6b | 65 2c 20 61 6e 64 2c 20 |will tak|e, and, |
|00002c70| 6f 6e 20 61 20 6c 6f 61 | 64 65 64 20 73 79 73 74 |on a loa|ded syst|
|00002c80| 65 6d 2c 20 20 69 74 20 | 63 61 6e 20 74 61 6b 65 |em, it |can take|
|00002c90| 20 71 75 69 74 65 0a 61 | 20 77 68 69 6c 65 2e 20 | quite.a| while. |
|00002ca0| 20 54 68 69 73 20 77 61 | 73 20 73 6f 6c 76 65 64 | This wa|s solved|
|00002cb0| 20 62 79 20 74 68 65 20 | 73 74 72 61 74 65 67 79 | by the |strategy|
|00002cc0| 20 6f 66 20 31 29 20 70 | 6f 73 74 69 6e 67 20 74 | of 1) p|osting t|
|00002cd0| 68 65 20 6e 61 6d 65 2c | 20 32 29 20 70 6f 6b 69 |he name,| 2) poki|
|00002ce0| 6e 67 0a 69 6e 69 74 2c | 20 33 29 20 67 6f 69 6e |ng.init,| 3) goin|
|00002cf0| 67 20 69 6e 74 6f 20 61 | 20 6c 6f 6f 70 20 77 68 |g into a| loop wh|
|00002d00| 65 72 65 20 74 68 65 20 | 70 72 6f 63 65 73 73 20 |ere the |process |
|00002d10| 72 65 70 65 61 74 65 64 | 6c 79 20 77 61 69 74 73 |repeated|ly waits|
|00002d20| 20 61 20 73 65 63 6f 6e | 64 20 61 6e 64 0a 63 68 | a secon|d and.ch|
|00002d30| 65 63 6b 73 20 77 68 65 | 74 68 65 72 20 74 68 65 |ecks whe|ther the|
|00002d40| 20 65 6e 74 72 79 20 68 | 61 73 20 62 65 65 6e 20 | entry h|as been |
|00002d50| 63 6c 65 61 72 65 64 20 | 66 72 6f 6d 20 2f 65 74 |cleared |from /et|
|00002d60| 63 2f 75 74 6d 70 2c 20 | 61 6e 64 20 34 29 20 70 |c/utmp, |and 4) p|
|00002d70| 6f 73 74 69 6e 67 20 74 | 68 65 0a 6e 61 6d 65 20 |osting t|he.name |
|00002d80| 61 67 61 69 6e 2e 0a 20 | 6d 6f 64 65 6d 20 2f 64 |again.. |modem /d|
|00002d90| 65 76 2f 74 74 79 64 32 | 20 69 73 20 61 20 68 61 |ev/ttyd2| is a ha|
|00002da0| 79 65 73 2e 20 20 54 68 | 65 20 73 65 63 6f 6e 64 |yes. Th|e second|
|00002db0| 20 74 77 6f 20 6d 6f 64 | 65 6d 73 20 2f 64 65 76 | two mod|ems /dev|
|00002dc0| 2f 74 74 79 64 31 20 61 | 6e 64 0a 2f 64 65 76 2f |/ttyd1 a|nd./dev/|
|00002dd0| 74 74 79 64 30 20 61 72 | 65 20 76 61 64 69 63 73 |ttyd0 ar|e vadics|
|00002de0| 2e 0a 0a 49 74 20 69 73 | 20 61 73 73 75 6d 65 64 |...It is| assumed|
|00002df0| 20 69 6e 20 74 69 70 20 | 74 68 61 74 20 74 68 65 | in tip |that the|
|00002e00| 64 69 61 6c 2d 69 6e 6f | 75 74 2d 62 73 64 2f 61 |dial-ino|ut-bsd/a|
|00002e10| 63 75 63 6e 74 72 6c 2e | 63 00 00 00 00 00 00 00 |cucntrl.|c.......|
|00002e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e60| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00002e70| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00002e80| 20 20 33 33 36 36 32 20 | 20 34 34 30 34 30 36 35 | 33662 | 4404065|
|00002e90| 31 35 30 20 20 31 30 37 | 32 33 00 20 00 00 00 00 |150 107|23. ....|
|00002ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003000| 2f 2a 20 20 61 63 75 63 | 6e 74 72 6c 20 2d 20 74 |/* acuc|ntrl - t|
|00003010| 75 72 6e 20 61 72 6f 75 | 6e 64 20 74 74 79 20 6c |urn arou|nd tty l|
|00003020| 69 6e 65 20 62 65 74 77 | 65 65 6e 20 64 69 61 6c |ine betw|een dial|
|00003030| 69 6e 20 61 6e 64 20 64 | 69 61 6c 6f 75 74 0a 20 |in and d|ialout. |
|00003040| 2a 20 0a 20 2a 20 24 48 | 65 61 64 65 72 3a 20 61 |* . * $H|eader: a|
|00003050| 63 75 63 6e 74 72 6c 2e | 63 2c 76 20 31 2e 34 20 |cucntrl.|c,v 1.4 |
|00003060| 38 35 2f 30 34 2f 32 33 | 20 31 31 3a 33 33 3a 30 |85/04/23| 11:33:0|
|00003070| 39 20 72 6f 6f 74 20 45 | 78 70 20 24 0a 20 2a 0a |9 root E|xp $. *.|
|00003080| 20 2a 20 55 73 61 67 65 | 3a 09 61 63 75 63 6e 74 | * Usage|:.acucnt|
|00003090| 72 6c 20 7b 65 6e 61 62 | 6c 65 2c 64 69 73 61 62 |rl {enab|le,disab|
|000030a0| 6c 65 7d 20 2f 64 65 76 | 2f 74 74 79 64 58 0a 20 |le} /dev|/ttydX. |
|000030b0| 2a 0a 20 2a 20 48 69 73 | 74 6f 72 79 3a 0a 20 2a |*. * His|tory:. *|
|000030c0| 0a 20 2a 20 46 69 72 73 | 74 20 77 72 69 74 74 65 |. * Firs|t writte|
|000030d0| 6e 20 62 79 20 41 6c 6c | 61 6e 20 57 69 6c 6b 65 |n by All|an Wilke|
|000030e0| 73 20 28 66 69 73 68 65 | 72 21 61 6c 6c 61 6e 29 |s (fishe|r!allan)|
|000030f0| 0a 20 2a 0a 20 2a 20 4d | 6f 64 69 66 69 65 64 20 |. *. * M|odified |
|00003100| 4a 75 6e 65 20 38 2c 31 | 39 38 33 20 62 79 20 57 |June 8,1|983 by W|
|00003110| 2e 53 65 62 6f 6b 20 28 | 61 73 74 72 6f 76 61 78 |.Sebok (|astrovax|
|00003120| 21 77 6c 73 29 20 74 6f | 20 70 6f 6b 65 20 6b 65 |!wls) to| poke ke|
|00003130| 72 6e 65 6c 20 72 61 74 | 68 65 72 0a 20 2a 20 74 |rnel rat|her. * t|
|00003140| 68 61 6e 20 75 73 65 20 | 6b 65 72 6e 65 6c 20 68 |han use |kernel h|
|00003150| 61 63 6b 20 74 6f 20 74 | 75 72 6e 20 6f 6e 2f 6f |ack to t|urn on/o|
|00003160| 66 66 20 6d 6f 64 65 6d | 20 63 6f 6e 74 72 6f 6c |ff modem| control|
|00003170| 2c 20 75 73 69 6e 67 20 | 61 20 73 75 62 72 6f 75 |, using |a subrou|
|00003180| 74 69 6e 65 0a 20 2a 20 | 73 74 6f 6c 65 6e 20 66 |tine. * |stolen f|
|00003190| 72 6f 6d 20 70 72 6f 67 | 72 61 6d 20 77 72 69 74 |rom prog|ram writ|
|000031a0| 74 65 6e 20 62 79 20 54 | 73 75 74 6f 6d 75 20 53 |ten by T|sutomu S|
|000031b0| 68 69 6d 6f 6d 75 72 61 | 20 7b 61 73 74 72 6f 76 |himomura| {astrov|
|000031c0| 61 78 2c 65 73 63 68 65 | 72 7d 21 74 73 75 74 6f |ax,esche|r}!tsuto|
|000031d0| 6d 75 0a 20 2a 0a 20 2a | 20 57 6f 72 6b 65 64 20 |mu. *. *| Worked |
|000031e0| 6f 76 65 72 20 6d 61 6e | 79 20 74 69 6d 65 73 20 |over man|y times |
|000031f0| 62 79 20 57 2e 53 65 62 | 6f 6b 20 28 69 2e 65 2e |by W.Seb|ok (i.e.|
|00003200| 20 68 61 63 6b 65 64 20 | 74 6f 20 64 65 61 74 68 | hacked |to death|
|00003210| 29 0a 20 2a 0a 20 2a 20 | 24 4c 6f 67 3a 09 61 63 |). *. * |$Log:.ac|
|00003220| 75 63 6e 74 72 6c 2e 63 | 2c 76 20 24 0a 20 2a 20 |ucntrl.c|,v $. * |
|00003230| 52 65 76 69 73 69 6f 6e | 20 31 2e 34 20 20 38 35 |Revision| 1.4 85|
|00003240| 2f 30 34 2f 32 33 20 20 | 31 31 3a 33 33 3a 30 39 |/04/23 |11:33:09|
|00003250| 20 20 72 6f 6f 74 0a 20 | 2a 20 6d 6f 76 65 64 20 | root. |* moved |
|00003260| 42 53 44 34 5f 32 20 64 | 65 66 69 6e 69 74 69 6f |BSD4_2 d|efinitio|
|00003270| 6e 20 74 6f 20 6d 61 6b | 65 66 69 6c 65 20 61 6e |n to mak|efile an|
|00003280| 64 20 74 6f 6f 6b 20 6f | 75 74 20 69 6e 63 6c 75 |d took o|ut inclu|
|00003290| 64 65 20 6f 66 20 73 69 | 67 6e 61 6c 2e 68 0a 20 |de of si|gnal.h. |
|000032a0| 2a 20 0a 20 2a 20 52 65 | 76 69 73 69 6f 6e 20 31 |* . * Re|vision 1|
|000032b0| 2e 33 20 20 38 35 2f 30 | 33 2f 32 39 20 20 31 33 |.3 85/0|3/29 13|
|000032c0| 3a 32 31 3a 35 39 20 20 | 72 6f 6f 74 0a 20 2a 20 |:21:59 |root. * |
|000032d0| 61 64 64 65 64 20 70 61 | 72 65 6e 74 68 65 73 65 |added pa|renthese|
|000032e0| 73 20 74 6f 20 74 65 73 | 74 20 66 6f 72 20 2f 64 |s to tes|t for /d|
|000032f0| 65 76 2f 74 74 79 64 58 | 2e 20 20 54 68 65 20 6f |ev/ttydX|. The o|
|00003300| 70 65 72 61 74 6f 72 20 | 70 72 65 63 65 63 65 6e |perator |prececen|
|00003310| 63 65 20 77 61 73 0a 20 | 2a 20 6e 6f 74 20 77 68 |ce was. |* not wh|
|00003320| 61 74 20 49 20 74 68 6f | 75 67 68 74 20 69 74 20 |at I tho|ught it |
|00003330| 77 61 73 0a 20 2a 20 0a | 20 2a 20 52 65 76 69 73 |was. * .| * Revis|
|00003340| 69 6f 6e 20 31 2e 32 20 | 20 38 35 2f 30 33 2f 31 |ion 1.2 | 85/03/1|
|00003350| 37 20 20 31 33 3a 34 39 | 3a 34 34 20 20 72 6f 6f |7 13:49|:44 roo|
|00003360| 74 0a 20 2a 20 31 29 20 | 66 69 78 65 64 20 69 6e |t. * 1) |fixed in|
|00003370| 66 69 6e 69 74 65 20 6c | 6f 6f 70 20 77 68 65 6e |finite l|oop when|
|00003380| 20 61 20 6c 69 6e 65 20 | 61 6c 72 65 61 64 79 20 | a line |already |
|00003390| 64 69 73 61 62 6c 65 64 | 20 77 61 73 20 64 69 73 |disabled| was dis|
|000033a0| 61 62 6c 65 64 20 61 67 | 61 69 6e 2e 0a 20 2a 20 |abled ag|ain.. * |
|000033b0| 32 29 20 66 69 78 65 64 | 20 64 61 74 61 20 74 79 |2) fixed| data ty|
|000033c0| 70 65 73 20 6f 66 20 6d | 6f 64 65 6d 20 63 6f 6e |pes of m|odem con|
|000033d0| 74 72 6f 6c 20 66 6c 61 | 67 73 2e 20 20 49 6e 20 |trol fla|gs. In |
|000033e0| 70 61 72 74 69 63 75 6c | 61 72 20 74 68 65 20 69 |particul|ar the i|
|000033f0| 6e 20 74 68 65 0a 20 2a | 20 64 7a 20 64 72 69 76 |n the. *| dz driv|
|00003400| 65 72 20 69 74 20 77 61 | 73 20 77 72 69 74 69 6e |er it wa|s writin|
|00003410| 67 20 6f 75 74 20 61 20 | 73 68 6f 72 74 20 77 68 |g out a |short wh|
|00003420| 65 6e 20 69 74 20 73 68 | 6f 75 6c 64 20 68 61 76 |en it sh|ould hav|
|00003430| 65 20 62 65 65 6e 20 77 | 72 69 74 69 6e 67 20 6f |e been w|riting o|
|00003440| 75 74 0a 20 2a 20 61 6e | 20 69 6e 74 2e 20 20 41 |ut. * an| int. A|
|00003450| 6c 73 6f 2c 20 69 74 20 | 77 61 73 20 61 64 64 72 |lso, it |was addr|
|00003460| 65 73 73 69 6e 67 20 64 | 6d 66 73 6f 66 74 43 41 |essing d|mfsoftCA|
|00003470| 52 20 61 73 20 61 20 73 | 68 6f 72 74 20 61 72 72 |R as a s|hort arr|
|00003480| 61 79 20 77 68 65 6e 20 | 69 74 0a 20 2a 20 73 68 |ay when |it. * sh|
|00003490| 6f 75 6c 64 20 68 61 76 | 65 20 62 65 65 6e 20 61 |ould hav|e been a|
|000034a0| 64 64 72 65 73 73 69 6e | 67 20 69 74 20 61 73 20 |ddressin|g it as |
|000034b0| 61 20 63 68 61 72 20 61 | 72 72 61 79 2e 0a 20 2a |a char a|rray.. *|
|000034c0| 20 33 29 20 64 69 64 20 | 76 61 72 69 6f 75 73 20 | 3) did |various |
|000034d0| 63 6c 65 61 6e 75 70 73 | 20 74 6f 20 65 6e 61 62 |cleanups| to enab|
|000034e0| 6c 65 20 69 74 20 74 6f | 20 70 61 73 73 20 6c 69 |le it to| pass li|
|000034f0| 6e 74 2e 0a 20 2a 20 0a | 20 2a 20 52 65 76 69 73 |nt.. * .| * Revis|
|00003500| 69 6f 6e 20 31 2e 31 20 | 20 38 35 2f 30 32 2f 31 |ion 1.1 | 85/02/1|
|00003510| 38 20 20 31 33 3a 35 30 | 3a 30 33 20 20 72 6f 6f |8 13:50|:03 roo|
|00003520| 74 0a 20 2a 20 49 6e 69 | 74 69 61 6c 20 72 65 76 |t. * Ini|tial rev|
|00003530| 69 73 69 6f 6e 0a 20 2a | 20 0a 20 2a 20 4f 70 65 |ision. *| . * Ope|
|00003540| 72 61 74 69 6f 6e 3a 0a | 20 2a 20 20 20 64 69 73 |ration:.| * dis|
|00003550| 61 62 6c 65 20 28 69 2e | 65 2e 20 73 65 74 75 70 |able (i.|e. setup|
|00003560| 20 66 6f 72 20 64 69 61 | 6c 69 6e 67 20 6f 75 74 | for dia|ling out|
|00003570| 29 0a 20 2a 09 28 31 29 | 20 63 68 65 63 6b 20 69 |). *.(1)| check i|
|00003580| 6e 70 75 74 20 61 72 67 | 75 6d 65 6e 74 73 0a 20 |nput arg|uments. |
|00003590| 2a 09 28 32 29 20 6c 6f | 6f 6b 20 69 6e 20 2f 65 |*.(2) lo|ok in /e|
|000035a0| 74 63 2f 75 74 6d 70 20 | 74 6f 20 63 68 65 63 6b |tc/utmp |to check|
|000035b0| 20 74 68 61 74 20 74 68 | 65 20 6c 69 6e 65 20 69 | that th|e line i|
|000035c0| 73 20 6e 6f 74 20 69 6e | 20 75 73 65 20 62 79 20 |s not in| use by |
|000035d0| 61 6e 6f 74 68 65 72 0a | 20 2a 09 28 33 29 20 64 |another.| *.(3) d|
|000035e0| 69 73 61 62 6c 65 20 6d | 6f 64 65 6d 20 63 6f 6e |isable m|odem con|
|000035f0| 74 72 6f 6c 20 6f 6e 20 | 74 65 72 6d 69 6e 61 6c |trol on |terminal|
|00003600| 0a 20 2a 09 28 34 29 20 | 63 68 65 63 6b 20 66 6f |. *.(4) |check fo|
|00003610| 72 20 63 61 72 72 69 65 | 72 20 6f 6e 20 64 65 76 |r carrie|r on dev|
|00003620| 69 63 65 0a 20 2a 09 28 | 35 29 20 63 68 61 6e 67 |ice. *.(|5) chang|
|00003630| 65 20 6f 77 6e 65 72 20 | 6f 66 20 64 65 76 69 63 |e owner |of devic|
|00003640| 65 20 74 6f 20 72 65 61 | 6c 20 69 64 0a 20 2a 09 |e to rea|l id. *.|
|00003650| 28 36 29 20 65 64 69 74 | 20 2f 65 74 63 2f 74 74 |(6) edit| /etc/tt|
|00003660| 79 73 2c 20 20 63 68 61 | 6e 67 69 6e 67 20 74 68 |ys, cha|nging th|
|00003670| 65 20 66 69 72 73 74 20 | 63 68 61 72 61 63 74 65 |e first |characte|
|00003680| 72 20 6f 66 20 74 68 65 | 20 61 70 70 72 6f 70 72 |r of the| appropr|
|00003690| 69 61 74 65 0a 20 2a 09 | 20 20 20 20 6c 69 6e 65 |iate. *.| line|
|000036a0| 20 74 6f 20 30 0a 20 2a | 09 28 37 29 20 73 65 6e | to 0. *|.(7) sen|
|000036b0| 64 20 61 20 68 61 6e 67 | 75 70 20 74 6f 20 70 72 |d a hang|up to pr|
|000036c0| 6f 63 65 73 73 20 31 20 | 74 6f 20 70 6f 6b 65 20 |ocess 1 |to poke |
|000036d0| 69 6e 69 74 20 74 6f 20 | 64 69 73 61 62 6c 65 20 |init to |disable |
|000036e0| 67 65 74 74 79 0a 20 2a | 09 28 38 29 20 70 6f 73 |getty. *|.(8) pos|
|000036f0| 74 20 75 69 64 20 6e 61 | 6d 65 20 69 6e 20 63 61 |t uid na|me in ca|
|00003700| 70 69 74 61 6c 73 20 69 | 6e 20 2f 65 74 63 2f 75 |pitals i|n /etc/u|
|00003710| 74 6d 70 20 74 6f 20 6c | 65 74 20 77 6f 72 6c 64 |tmp to l|et world|
|00003720| 20 6b 6e 6f 77 20 64 65 | 76 69 63 65 20 68 61 73 | know de|vice has|
|00003730| 0a 20 2a 09 20 20 20 20 | 62 65 65 6e 20 67 72 61 |. *. |been gra|
|00003740| 62 62 65 64 0a 20 2a 09 | 28 39 29 20 6d 61 6b 65 |bbed. *.|(9) make|
|00003750| 20 73 75 72 65 20 74 68 | 61 74 20 44 54 52 20 69 | sure th|at DTR i|
|00003760| 73 20 6f 6e 0a 20 2a 0a | 20 2a 20 20 20 65 6e 61 |s on. *.| * ena|
|00003770| 62 6c 65 20 28 69 2e 65 | 2e 29 20 72 65 73 74 6f |ble (i.e|.) resto|
|00003780| 72 65 20 66 6f 72 20 64 | 69 61 6c 69 6e 0a 20 2a |re for d|ialin. *|
|00003790| 09 28 31 29 20 63 68 65 | 63 6b 20 69 6e 70 75 74 |.(1) che|ck input|
|000037a0| 20 61 72 67 75 6d 65 6e | 74 73 0a 20 2a 09 28 32 | argumen|ts. *.(2|
|000037b0| 29 20 6c 6f 6f 6b 20 69 | 6e 20 2f 65 74 63 2f 75 |) look i|n /etc/u|
|000037c0| 74 6d 70 20 74 6f 20 63 | 68 65 63 6b 20 74 68 61 |tmp to c|heck tha|
|000037d0| 74 20 74 68 65 20 6c 69 | 6e 65 20 69 73 20 6e 6f |t the li|ne is no|
|000037e0| 74 20 69 6e 20 75 73 65 | 20 62 79 20 61 6e 6f 74 |t in use| by anot|
|000037f0| 68 65 72 0a 20 2a 09 28 | 33 29 20 6d 61 6b 65 20 |her. *.(|3) make |
|00003800| 73 75 72 65 20 6d 6f 64 | 65 6d 20 63 6f 6e 74 72 |sure mod|em contr|
|00003810| 6f 6c 20 6f 6e 20 74 65 | 72 6d 69 6e 61 6c 20 69 |ol on te|rminal i|
|00003820| 73 20 64 69 73 61 62 6c | 65 64 0a 20 2a 09 28 34 |s disabl|ed. *.(4|
|00003830| 29 20 74 75 72 6e 20 6f | 66 66 20 44 54 52 20 74 |) turn o|ff DTR t|
|00003840| 6f 20 6d 61 6b 65 20 73 | 75 72 65 20 6c 69 6e 65 |o make s|ure line|
|00003850| 20 69 73 20 68 75 6e 67 | 20 75 70 0a 20 2a 09 28 | is hung| up. *.(|
|00003860| 35 29 20 63 6f 6e 64 69 | 74 69 6f 6e 20 6c 69 6e |5) condi|tion lin|
|00003870| 65 3a 20 63 6c 65 61 72 | 20 65 78 63 6c 75 73 69 |e: clear| exclusi|
|00003880| 76 65 20 75 73 65 20 61 | 6e 64 20 73 65 74 20 68 |ve use a|nd set h|
|00003890| 61 6e 67 75 70 20 6f 6e | 20 63 6c 6f 73 65 20 6d |angup on| close m|
|000038a0| 6f 64 65 73 0a 20 2a 09 | 28 36 29 20 74 75 72 6e |odes. *.|(6) turn|
|000038b0| 20 6f 6e 20 6d 6f 64 65 | 6d 20 63 6f 6e 74 72 6f | on mode|m contro|
|000038c0| 6c 0a 20 2a 09 28 37 29 | 20 65 64 69 74 20 2f 65 |l. *.(7)| edit /e|
|000038d0| 74 63 2f 74 74 79 73 2c | 20 20 63 68 61 6e 67 69 |tc/ttys,| changi|
|000038e0| 6e 67 20 74 68 65 20 66 | 69 72 73 74 20 63 68 61 |ng the f|irst cha|
|000038f0| 72 61 63 74 65 72 20 6f | 66 20 74 68 65 20 61 70 |racter o|f the ap|
|00003900| 70 72 6f 70 72 69 61 74 | 65 0a 20 2a 09 20 20 20 |propriat|e. *. |
|00003910| 20 6c 69 6e 65 20 74 6f | 20 31 0a 20 2a 09 28 38 | line to| 1. *.(8|
|00003920| 29 20 73 65 6e 64 20 61 | 20 68 61 6e 67 75 70 20 |) send a| hangup |
|00003930| 74 6f 20 70 72 6f 63 65 | 73 73 20 31 20 74 6f 20 |to proce|ss 1 to |
|00003940| 70 6f 6b 65 20 69 6e 69 | 74 20 74 6f 20 65 6e 61 |poke ini|t to ena|
|00003950| 62 6c 65 20 67 65 74 74 | 79 0a 20 2a 09 28 39 29 |ble gett|y. *.(9)|
|00003960| 20 63 6c 65 61 72 20 75 | 69 64 20 6e 61 6d 65 20 | clear u|id name |
|00003970| 66 6f 72 20 2f 65 74 63 | 2f 75 74 6d 70 0a 20 2a |for /etc|/utmp. *|
|00003980| 2f 0a 0a 2f 2a 20 23 64 | 65 66 69 6e 65 20 53 45 |/../* #d|efine SE|
|00003990| 4e 53 45 43 41 52 52 49 | 45 52 20 2a 2f 0a 0a 23 |NSECARRI|ER */..#|
|000039a0| 69 6e 63 6c 75 64 65 20 | 3c 73 79 73 2f 70 61 72 |include |<sys/par|
|000039b0| 61 6d 2e 68 3e 0a 23 69 | 6e 63 6c 75 64 65 20 3c |am.h>.#i|nclude <|
|000039c0| 73 79 73 2f 62 75 66 2e | 68 3e 0a 23 69 6e 63 6c |sys/buf.|h>.#incl|
|000039d0| 75 64 65 20 3c 73 79 73 | 2f 63 6f 6e 66 2e 68 3e |ude <sys|/conf.h>|
|000039e0| 0a 23 69 66 64 65 66 20 | 42 53 44 34 5f 32 0a 23 |.#ifdef |BSD4_2.#|
|000039f0| 69 6e 63 6c 75 64 65 20 | 22 2f 73 79 73 2f 76 61 |include |"/sys/va|
|00003a00| 78 75 62 61 2f 75 62 61 | 76 61 72 2e 68 22 0a 23 |xuba/uba|var.h".#|
|00003a10| 65 6c 73 65 0a 23 69 6e | 63 6c 75 64 65 20 3c 73 |else.#in|clude <s|
|00003a20| 79 73 2f 75 62 61 76 61 | 72 2e 68 3e 0a 23 65 6e |ys/ubava|r.h>.#en|
|00003a30| 64 69 66 0a 23 69 6e 63 | 6c 75 64 65 20 3c 73 79 |dif.#inc|lude <sy|
|00003a40| 73 2f 73 74 61 74 2e 68 | 3e 0a 23 69 6e 63 6c 75 |s/stat.h|>.#inclu|
|00003a50| 64 65 20 3c 6e 6c 69 73 | 74 2e 68 3e 0a 23 69 6e |de <nlis|t.h>.#in|
|00003a60| 63 6c 75 64 65 20 3c 73 | 67 74 74 79 2e 68 3e 0a |clude <s|gtty.h>.|
|00003a70| 23 69 6e 63 6c 75 64 65 | 20 3c 75 74 6d 70 2e 68 |#include| <utmp.h|
|00003a80| 3e 0a 23 69 6e 63 6c 75 | 64 65 20 3c 70 77 64 2e |>.#inclu|de <pwd.|
|00003a90| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 3c 73 74 64 |h>.#incl|ude <std|
|00003aa0| 69 6f 2e 68 3e 0a 0a 23 | 64 65 66 69 6e 65 20 4e |io.h>..#|define N|
|00003ab0| 44 5a 4c 49 4e 45 09 38 | 09 2f 2a 20 6c 69 6e 65 |DZLINE.8|./* line|
|00003ac0| 73 2f 64 7a 20 2a 2f 0a | 23 64 65 66 69 6e 65 20 |s/dz */.|#define |
|00003ad0| 4e 44 48 4c 49 4e 45 09 | 31 36 09 2f 2a 20 6c 69 |NDHLINE.|16./* li|
|00003ae0| 6e 65 73 2f 64 68 20 2a | 2f 0a 23 64 65 66 69 6e |nes/dh *|/.#defin|
|00003af0| 65 20 4e 44 4d 46 4c 49 | 4e 45 20 38 09 2f 2a 20 |e NDMFLI|NE 8./* |
|00003b00| 6c 69 6e 65 73 2f 64 6d | 66 20 2a 2f 0a 0a 23 64 |lines/dm|f */..#d|
|00003b10| 65 66 69 6e 65 20 44 5a | 31 31 09 31 0a 23 64 65 |efine DZ|11.1.#de|
|00003b20| 66 69 6e 65 20 44 48 31 | 31 09 32 0a 23 64 65 66 |fine DH1|1.2.#def|
|00003b30| 69 6e 65 20 44 4d 46 09 | 33 0a 0a 23 64 65 66 69 |ine DMF.|3..#defi|
|00003b40| 6e 65 20 4e 4c 56 41 4c | 55 45 28 76 61 6c 29 09 |ne NLVAL|UE(val).|
|00003b50| 28 6e 6c 5b 76 61 6c 5d | 2e 6e 5f 76 61 6c 75 65 |(nl[val]|.n_value|
|00003b60| 29 0a 0a 73 74 72 75 63 | 74 20 6e 6c 69 73 74 20 |)..struc|t nlist |
|00003b70| 6e 6c 5b 5d 20 3d 20 7b | 0a 23 64 65 66 69 6e 65 |nl[] = {|.#define|
|00003b80| 20 43 44 45 56 53 57 09 | 30 0a 09 7b 20 22 5f 63 | CDEVSW.|0..{ "_c|
|00003b90| 64 65 76 73 77 22 20 7d | 2c 0a 0a 23 64 65 66 69 |devsw" }|,..#defi|
|00003ba0| 6e 65 20 44 5a 4f 50 45 | 4e 09 31 0a 09 7b 20 22 |ne DZOPE|N.1..{ "|
|00003bb0| 5f 64 7a 6f 70 65 6e 22 | 20 7d 2c 0a 23 64 65 66 |_dzopen"| },.#def|
|00003bc0| 69 6e 65 20 44 5a 49 4e | 46 4f 09 32 0a 09 7b 20 |ine DZIN|FO.2..{ |
|00003bd0| 22 5f 64 7a 69 6e 66 6f | 22 20 7d 2c 0a 23 64 65 |"_dzinfo|" },.#de|
|00003be0| 66 69 6e 65 20 4e 44 5a | 31 31 09 33 0a 09 7b 20 |fine NDZ|11.3..{ |
|00003bf0| 22 5f 64 7a 5f 63 6e 74 | 22 20 7d 2c 0a 23 64 65 |"_dz_cnt|" },.#de|
|00003c00| 66 69 6e 65 20 44 5a 53 | 43 41 52 09 34 0a 09 7b |fine DZS|CAR.4..{|
|00003c10| 20 22 5f 64 7a 73 6f 66 | 74 43 41 52 22 20 7d 2c | "_dzsof|tCAR" },|
|00003c20| 0a 0a 23 64 65 66 69 6e | 65 20 44 48 4f 50 45 4e |..#defin|e DHOPEN|
|00003c30| 09 35 0a 09 7b 20 22 5f | 64 68 6f 70 65 6e 22 20 |.5..{ "_|dhopen" |
|00003c40| 7d 2c 0a 23 64 65 66 69 | 6e 65 20 44 48 49 4e 46 |},.#defi|ne DHINF|
|00003c50| 4f 09 36 0a 09 7b 20 22 | 5f 64 68 69 6e 66 6f 22 |O.6..{ "|_dhinfo"|
|00003c60| 20 7d 2c 0a 23 64 65 66 | 69 6e 65 20 4e 44 48 31 | },.#def|ine NDH1|
|00003c70| 31 09 37 0a 09 7b 20 22 | 5f 6e 64 68 31 31 22 20 |1.7..{ "|_ndh11" |
|00003c80| 7d 2c 0a 23 64 65 66 69 | 6e 65 20 44 48 53 43 41 |},.#defi|ne DHSCA|
|00003c90| 52 09 38 0a 09 7b 20 22 | 5f 64 68 73 6f 66 74 43 |R.8..{ "|_dhsoftC|
|00003ca0| 41 52 22 20 7d 2c 0a 0a | 23 64 65 66 69 6e 65 20 |AR" },..|#define |
|00003cb0| 44 4d 46 4f 50 45 4e 09 | 39 0a 09 7b 20 22 5f 64 |DMFOPEN.|9..{ "_d|
|00003cc0| 6d 66 6f 70 65 6e 22 20 | 7d 2c 0a 23 64 65 66 69 |mfopen" |},.#defi|
|00003cd0| 6e 65 20 44 4d 46 49 4e | 46 4f 09 31 30 0a 09 7b |ne DMFIN|FO.10..{|
|00003ce0| 20 22 5f 64 6d 66 69 6e | 66 6f 22 20 7d 2c 0a 23 | "_dmfin|fo" },.#|
|00003cf0| 64 65 66 69 6e 65 20 4e | 44 4d 46 09 31 31 0a 09 |define N|DMF.11..|
|00003d00| 7b 20 22 5f 6e 64 6d 66 | 22 20 7d 2c 0a 23 64 65 |{ "_ndmf|" },.#de|
|00003d10| 66 69 6e 65 20 44 4d 46 | 53 43 41 52 09 31 32 0a |fine DMF|SCAR.12.|
|00003d20| 09 7b 20 22 5f 64 6d 66 | 73 6f 66 74 43 41 52 22 |.{ "_dmf|softCAR"|
|00003d30| 20 7d 2c 0a 0a 09 7b 20 | 22 5c 30 22 20 7d 0a 7d | },...{ |"\0" }.}|
|00003d40| 3b 0a 0a 23 64 65 66 69 | 6e 65 20 45 4e 41 42 4c |;..#defi|ne ENABL|
|00003d50| 45 09 31 0a 23 64 65 66 | 69 6e 65 20 44 49 53 41 |E.1.#def|ine DISA|
|00003d60| 42 4c 45 09 30 0a 0a 63 | 68 61 72 20 45 74 63 75 |BLE.0..c|har Etcu|
|00003d70| 74 6d 70 5b 5d 20 3d 20 | 22 2f 65 74 63 2f 75 74 |tmp[] = |"/etc/ut|
|00003d80| 6d 70 22 3b 0a 63 68 61 | 72 20 45 74 63 74 74 79 |mp";.cha|r Etctty|
|00003d90| 73 5b 5d 20 3d 20 22 2f | 65 74 63 2f 74 74 79 73 |s[] = "/|etc/ttys|
|00003da0| 22 3b 0a 63 68 61 72 20 | 44 65 76 68 6f 6d 65 5b |";.char |Devhome[|
|00003db0| 5d 20 3d 20 22 2f 64 65 | 76 22 3b 0a 0a 63 68 61 |] = "/de|v";..cha|
|00003dc0| 72 20 75 73 61 67 65 5b | 5d 20 3d 20 22 55 73 61 |r usage[|] = "Usa|
|00003dd0| 67 65 3a 20 61 63 75 63 | 6e 74 72 6c 20 7b 64 69 |ge: acuc|ntrl {di|
|00003de0| 73 7c 65 6e 7d 61 62 6c | 65 20 74 74 79 64 58 5c |s|en}abl|e ttydX\|
|00003df0| 6e 22 3b 0a 0a 73 74 72 | 75 63 74 20 75 74 6d 70 |n";..str|uct utmp|
|00003e00| 20 75 74 6d 70 3b 0a 63 | 68 61 72 20 72 65 73 65 | utmp;.c|har rese|
|00003e10| 74 74 74 79 2c 20 72 65 | 73 65 74 6d 6f 64 65 6d |ttty, re|setmodem|
|00003e20| 3b 0a 69 6e 74 20 65 74 | 63 75 74 6d 70 3b 0a 6f |;.int et|cutmp;.o|
|00003e30| 66 66 5f 74 20 75 74 6d | 70 6c 6f 63 3b 0a 6f 66 |ff_t utm|ploc;.of|
|00003e40| 66 5f 74 20 74 74 79 73 | 6c 6e 62 65 67 3b 0a 0a |f_t ttys|lnbeg;..|
|00003e50| 23 64 65 66 69 6e 65 20 | 4e 41 4d 53 49 5a 09 73 |#define |NAMSIZ.s|
|00003e60| 69 7a 65 6f 66 28 75 74 | 6d 70 2e 75 74 5f 6e 61 |izeof(ut|mp.ut_na|
|00003e70| 6d 65 29 0a 23 64 65 66 | 69 6e 65 09 4c 49 4e 53 |me).#def|ine.LINS|
|00003e80| 49 5a 09 73 69 7a 65 6f | 66 28 75 74 6d 70 2e 75 |IZ.sizeo|f(utmp.u|
|00003e90| 74 5f 6c 69 6e 65 29 0a | 0a 6d 61 69 6e 28 61 72 |t_line).|.main(ar|
|00003ea0| 67 63 2c 20 61 72 67 76 | 29 0a 69 6e 74 20 61 72 |gc, argv|).int ar|
|00003eb0| 67 63 3b 20 63 68 61 72 | 20 2a 61 72 67 76 5b 5d |gc; char| *argv[]|
|00003ec0| 3b 0a 7b 0a 09 72 65 67 | 69 73 74 65 72 20 63 68 |;.{..reg|ister ch|
|00003ed0| 61 72 20 2a 70 3b 0a 09 | 72 65 67 69 73 74 65 72 |ar *p;..|register|
|00003ee0| 20 69 6e 74 20 69 3b 0a | 09 63 68 61 72 20 75 6e | int i;.|.char un|
|00003ef0| 61 6d 65 5b 4e 41 4d 53 | 49 5a 5d 2c 20 55 6e 61 |ame[NAMS|IZ], Una|
|00003f00| 6d 65 5b 4e 41 4d 53 49 | 5a 5d 3b 0a 09 69 6e 74 |me[NAMSI|Z];..int|
|00003f10| 20 65 6e 61 62 6c 65 20 | 3b 0a 09 63 68 61 72 20 | enable |;..char |
|00003f20| 2a 64 65 76 69 63 65 3b | 0a 09 69 6e 74 20 64 65 |*device;|..int de|
|00003f30| 76 66 69 6c 65 3b 0a 09 | 69 6e 74 20 75 69 64 2c |vfile;..|int uid,|
|00003f40| 20 67 69 64 3b 0a 09 6f | 66 66 5f 74 20 6c 73 65 | gid;..o|ff_t lse|
|00003f50| 65 6b 28 29 3b 0a 09 73 | 74 72 75 63 74 20 70 61 |ek();..s|truct pa|
|00003f60| 73 73 77 64 20 2a 67 65 | 74 70 77 75 69 64 28 29 |sswd *ge|tpwuid()|
|00003f70| 3b 0a 09 63 68 61 72 20 | 2a 72 69 6e 64 65 78 28 |;..char |*rindex(|
|00003f80| 29 3b 0a 09 65 78 74 65 | 72 6e 20 69 6e 74 20 65 |);..exte|rn int e|
|00003f90| 72 72 6e 6f 3b 0a 09 65 | 78 74 65 72 6e 20 63 68 |rrno;..e|xtern ch|
|00003fa0| 61 72 20 2a 73 79 73 5f | 65 72 72 6c 69 73 74 5b |ar *sys_|errlist[|
|00003fb0| 5d 3b 0a 0a 09 2f 2a 20 | 63 68 65 63 6b 20 69 6e |];.../* |check in|
|00003fc0| 70 75 74 20 61 72 67 75 | 6d 65 6e 74 73 20 2a 2f |put argu|ments */|
|00003fd0| 0a 09 69 66 20 28 61 72 | 67 63 21 3d 33 29 20 7b |..if (ar|gc!=3) {|
|00003fe0| 0a 09 09 66 70 72 69 6e | 74 66 28 73 74 64 65 72 |...fprin|tf(stder|
|00003ff0| 72 2c 20 75 73 61 67 65 | 29 3b 0a 09 09 65 78 69 |r, usage|);...exi|
|00004000| 74 28 31 29 3b 0a 09 7d | 0a 0a 09 2f 2a 20 69 6e |t(1);..}|.../* in|
|00004010| 74 65 72 70 72 65 74 20 | 63 6f 6d 6d 61 6e 64 20 |terpret |command |
|00004020| 74 79 70 65 20 2a 2f 0a | 09 69 66 20 28 70 72 65 |type */.|.if (pre|
|00004030| 66 69 78 28 61 72 67 76 | 5b 31 5d 2c 20 22 64 69 |fix(argv|[1], "di|
|00004040| 73 61 62 6c 65 22 29 20 | 20 7c 7c 20 73 74 72 63 |sable") | || strc|
|00004050| 6d 70 28 61 72 67 76 5b | 31 5d 2c 22 64 69 61 6c |mp(argv[|1],"dial|
|00004060| 6f 75 74 22 29 3d 3d 30 | 29 0a 09 09 65 6e 61 62 |out")==0|)...enab|
|00004070| 6c 65 20 3d 20 30 3b 0a | 09 65 6c 73 65 20 69 66 |le = 0;.|.else if|
|00004080| 20 28 70 72 65 66 69 78 | 28 61 72 67 76 5b 31 5d | (prefix|(argv[1]|
|00004090| 2c 20 22 65 6e 61 62 6c | 65 22 29 20 20 7c 7c 20 |, "enabl|e") || |
|000040a0| 73 74 72 63 6d 70 28 61 | 72 67 76 5b 31 5d 2c 22 |strcmp(a|rgv[1],"|
|000040b0| 64 69 61 6c 69 6e 22 29 | 3d 3d 30 29 0a 09 09 65 |dialin")|==0)...e|
|000040c0| 6e 61 62 6c 65 20 3d 20 | 31 3b 0a 09 65 6c 73 65 |nable = |1;..else|
|000040d0| 20 7b 0a 09 09 66 70 72 | 69 6e 74 66 28 73 74 64 | {...fpr|intf(std|
|000040e0| 65 72 72 2c 20 75 73 61 | 67 65 29 3b 0a 09 09 65 |err, usa|ge);...e|
|000040f0| 78 69 74 28 31 29 3b 0a | 09 7d 0a 0a 09 64 65 76 |xit(1);.|.}...dev|
|00004100| 69 63 65 20 3d 20 72 69 | 6e 64 65 78 28 61 72 67 |ice = ri|ndex(arg|
|00004110| 76 5b 32 5d 2c 27 2f 27 | 29 3b 0a 09 64 65 76 69 |v[2],'/'|);..devi|
|00004120| 63 65 20 3d 20 28 64 65 | 76 69 63 65 20 3d 3d 20 |ce = (de|vice == |
|00004130| 4e 55 4c 4c 29 20 3f 20 | 61 72 67 76 5b 32 5d 3a |NULL) ? |argv[2]:|
|00004140| 20 64 65 76 69 63 65 2b | 31 3b 0a 0a 09 2f 2a 20 | device+|1;.../* |
|00004150| 6f 6e 6c 79 20 72 65 63 | 6f 67 6e 69 7a 65 20 64 |only rec|ognize d|
|00004160| 65 76 69 63 65 73 20 6f | 66 20 74 68 65 20 66 6f |evices o|f the fo|
|00004170| 72 6d 20 74 74 79 64 58 | 20 2a 2f 0a 09 69 66 20 |rm ttydX| */..if |
|00004180| 28 73 74 72 6e 63 6d 70 | 28 64 65 76 69 63 65 2c |(strncmp|(device,|
|00004190| 22 74 74 79 64 22 2c 34 | 29 21 3d 30 29 20 7b 0a |"ttyd",4|)!=0) {.|
|000041a0| 09 09 66 70 72 69 6e 74 | 66 28 73 74 64 65 72 72 |..fprint|f(stderr|
|000041b0| 2c 22 42 61 64 20 44 65 | 76 69 63 65 20 4e 61 6d |,"Bad De|vice Nam|
|000041c0| 65 20 25 73 22 2c 64 65 | 76 69 63 65 29 3b 0a 09 |e %s",de|vice);..|
|000041d0| 09 65 78 69 74 28 31 29 | 3b 0a 09 7d 0a 0a 09 6f |.exit(1)|;..}...o|
|000041e0| 70 6e 74 74 79 73 28 64 | 65 76 69 63 65 29 3b 0a |pnttys(d|evice);.|
|000041f0| 0a 09 2f 2a 20 47 65 74 | 20 6e 6c 69 73 74 20 69 |../* Get| nlist i|
|00004200| 6e 66 6f 20 2a 2f 0a 09 | 6e 6c 69 73 74 28 22 2f |nfo */..|nlist("/|
|00004210| 76 6d 75 6e 69 78 22 2c | 6e 6c 29 3b 0a 0a 09 2f |vmunix",|nl);.../|
|00004220| 2a 20 43 68 64 69 72 20 | 74 6f 20 2f 64 65 76 20 |* Chdir |to /dev |
|00004230| 2a 2f 0a 09 69 66 28 63 | 68 64 69 72 28 44 65 76 |*/..if(c|hdir(Dev|
|00004240| 68 6f 6d 65 29 20 3c 20 | 30 29 20 7b 0a 09 09 66 |home) < |0) {...f|
|00004250| 70 72 69 6e 74 66 28 73 | 74 64 65 72 72 2c 20 22 |printf(s|tderr, "|
|00004260| 43 61 6e 6e 6f 74 20 63 | 68 64 69 72 20 74 6f 20 |Cannot c|hdir to |
|00004270| 25 73 3a 20 25 73 5c 72 | 5c 6e 22 2c 0a 09 09 09 |%s: %s\r|\n",....|
|00004280| 44 65 76 68 6f 6d 65 2c | 20 73 79 73 5f 65 72 72 |Devhome,| sys_err|
|00004290| 6c 69 73 74 5b 65 72 72 | 6e 6f 5d 29 3b 0a 09 09 |list[err|no]);...|
|000042a0| 65 78 69 74 28 31 29 3b | 0a 09 7d 0a 0a 09 2f 2a |exit(1);|..}.../*|
|000042b0| 20 47 65 74 20 75 69 64 | 20 69 6e 66 6f 72 6d 61 | Get uid| informa|
|000042c0| 74 69 6f 6e 20 2a 2f 0a | 09 75 69 64 20 3d 20 67 |tion */.|.uid = g|
|000042d0| 65 74 75 69 64 28 29 3b | 0a 09 67 69 64 20 3d 20 |etuid();|..gid = |
|000042e0| 67 65 74 67 69 64 28 29 | 3b 0a 0a 09 70 20 3d 20 |getgid()|;...p = |
|000042f0| 67 65 74 70 77 75 69 64 | 28 75 69 64 29 2d 3e 70 |getpwuid|(uid)->p|
|00004300| 77 5f 6e 61 6d 65 3b 0a | 09 69 66 20 28 70 3d 3d |w_name;.|.if (p==|
|00004310| 4e 55 4c 4c 29 20 7b 0a | 09 09 66 70 72 69 6e 74 |NULL) {.|..fprint|
|00004320| 66 28 73 74 64 65 72 72 | 2c 22 63 61 6e 6e 6f 74 |f(stderr|,"cannot|
|00004330| 20 67 65 74 20 75 69 64 | 20 6e 61 6d 65 5c 6e 22 | get uid| name\n"|
|00004340| 29 3b 0a 09 09 65 78 69 | 74 28 31 29 3b 0a 09 7d |);...exi|t(1);..}|
|00004350| 0a 0a 09 2f 2a 20 20 74 | 6f 20 75 70 70 65 72 20 |.../* t|o upper |
|00004360| 63 61 73 65 20 2a 2f 0a | 09 69 20 3d 20 30 3b 0a |case */.|.i = 0;.|
|00004370| 09 64 6f 20 7b 0a 09 09 | 75 6e 61 6d 65 5b 69 5d |.do {...|uname[i]|
|00004380| 20 3d 20 2a 70 3b 0a 09 | 09 55 6e 61 6d 65 5b 69 | = *p;..|.Uname[i|
|00004390| 5d 20 3d 20 28 2a 70 3e | 3d 27 61 27 20 26 26 20 |] = (*p>|='a' && |
|000043a0| 2a 70 3c 3d 27 7a 27 29 | 20 3f 20 28 2a 70 20 2d |*p<='z')| ? (*p -|
|000043b0| 20 28 27 61 27 2d 27 41 | 27 29 29 20 3a 20 2a 70 | ('a'-'A|')) : *p|
|000043c0| 3b 0a 09 09 69 2b 2b 3b | 20 70 2b 2b 3b 0a 09 7d |;...i++;| p++;..}|
|000043d0| 20 77 68 69 6c 65 20 28 | 2a 70 20 26 26 20 69 3c | while (|*p && i<|
|000043e0| 4e 41 4d 53 49 5a 29 3b | 0a 0a 0a 09 2f 2a 20 63 |NAMSIZ);|..../* c|
|000043f0| 68 65 63 6b 20 74 6f 20 | 73 65 65 20 69 66 20 6c |heck to |see if l|
|00004400| 69 6e 65 20 69 73 20 62 | 65 69 6e 67 20 75 73 65 |ine is b|eing use|
|00004410| 64 20 2a 2f 0a 09 69 66 | 28 20 28 65 74 63 75 74 |d */..if|( (etcut|
|00004420| 6d 70 20 3d 20 6f 70 65 | 6e 28 45 74 63 75 74 6d |mp = ope|n(Etcutm|
|00004430| 70 2c 20 32 29 29 20 3c | 20 30 29 20 7b 0a 09 09 |p, 2)) <| 0) {...|
|00004440| 66 70 72 69 6e 74 66 28 | 73 74 64 65 72 72 2c 22 |fprintf(|stderr,"|
|00004450| 4f 6e 20 6f 70 65 6e 20 | 25 73 20 6f 70 65 6e 3a |On open |%s open:|
|00004460| 20 25 73 5c 6e 22 2c 0a | 09 09 09 45 74 63 75 74 | %s\n",.|...Etcut|
|00004470| 6d 70 2c 73 79 73 5f 65 | 72 72 6c 69 73 74 5b 65 |mp,sys_e|rrlist[e|
|00004480| 72 72 6e 6f 5d 29 3b 0a | 09 09 65 78 69 74 28 31 |rrno]);.|..exit(1|
|00004490| 29 3b 0a 09 7d 0a 0a 09 | 28 76 6f 69 64 29 6c 73 |);..}...|(void)ls|
|000044a0| 65 65 6b 28 65 74 63 75 | 74 6d 70 2c 75 74 6d 70 |eek(etcu|tmp,utmp|
|000044b0| 6c 6f 63 2c 20 30 29 3b | 0a 0a 09 69 20 3d 20 72 |loc, 0);|...i = r|
|000044c0| 65 61 64 28 65 74 63 75 | 74 6d 70 2c 28 63 68 61 |ead(etcu|tmp,(cha|
|000044d0| 72 20 2a 29 26 75 74 6d | 70 2c 73 69 7a 65 6f 66 |r *)&utm|p,sizeof|
|000044e0| 28 73 74 72 75 63 74 20 | 75 74 6d 70 29 29 3b 0a |(struct |utmp));.|
|000044f0| 0a 09 69 66 28 0a 09 09 | 69 20 3d 3d 20 73 69 7a |..if(...|i == siz|
|00004500| 65 6f 66 28 73 74 72 75 | 63 74 20 75 74 6d 70 29 |eof(stru|ct utmp)|
|00004510| 20 26 26 0a 09 09 75 74 | 6d 70 2e 75 74 5f 6c 69 | &&...ut|mp.ut_li|
|00004520| 6e 65 5b 30 5d 20 21 3d | 20 27 5c 30 27 20 20 26 |ne[0] !=| '\0' &|
|00004530| 26 0a 09 09 75 74 6d 70 | 2e 75 74 5f 6e 61 6d 65 |&...utmp|.ut_name|
|00004540| 5b 30 5d 20 21 3d 20 27 | 5c 30 27 20 20 26 26 0a |[0] != '|\0' &&.|
|00004550| 09 09 28 0a 09 09 09 21 | 75 70 63 61 73 65 28 75 |..(....!|upcase(u|
|00004560| 74 6d 70 2e 75 74 5f 6e | 61 6d 65 2c 4e 41 4d 53 |tmp.ut_n|ame,NAMS|
|00004570| 49 5a 29 20 7c 7c 0a 09 | 09 09 28 0a 09 09 09 09 |IZ) ||..|..(.....|
|00004580| 75 69 64 20 21 3d 20 30 | 20 26 26 0a 09 09 09 09 |uid != 0| &&.....|
|00004590| 73 74 72 6e 63 6d 70 28 | 75 74 6d 70 2e 75 74 5f |strncmp(|utmp.ut_|
|000045a0| 6e 61 6d 65 2c 55 6e 61 | 6d 65 2c 4e 41 4d 53 49 |name,Una|me,NAMSI|
|000045b0| 5a 29 20 21 3d 20 30 0a | 09 09 09 29 0a 09 09 29 |Z) != 0.|...)...)|
|000045c0| 0a 09 29 20 7b 0a 09 09 | 66 70 72 69 6e 74 66 28 |..) {...|fprintf(|
|000045d0| 73 74 64 65 72 72 2c 20 | 22 25 73 20 69 6e 20 75 |stderr, |"%s in u|
|000045e0| 73 65 20 62 79 20 25 73 | 5c 6e 22 2c 20 64 65 76 |se by %s|\n", dev|
|000045f0| 69 63 65 2c 20 75 74 6d | 70 2e 75 74 5f 6e 61 6d |ice, utm|p.ut_nam|
|00004600| 65 29 3b 0a 09 09 65 78 | 69 74 28 32 29 3b 0a 09 |e);...ex|it(2);..|
|00004610| 7d 0a 0a 09 2f 2a 20 44 | 69 73 61 62 6c 65 20 6d |}.../* D|isable m|
|00004620| 6f 64 65 6d 20 63 6f 6e | 74 72 6f 6c 20 2a 2f 0a |odem con|trol */.|
|00004630| 09 69 66 20 28 73 65 74 | 6d 6f 64 65 6d 28 64 65 |.if (set|modem(de|
|00004640| 76 69 63 65 2c 44 49 53 | 41 42 4c 45 29 3c 30 29 |vice,DIS|ABLE)<0)|
|00004650| 20 7b 0a 09 09 66 70 72 | 69 6e 74 66 28 73 74 64 | {...fpr|intf(std|
|00004660| 65 72 72 2c 22 55 6e 61 | 62 6c 65 20 74 6f 20 64 |err,"Una|ble to d|
|00004670| 69 73 61 62 6c 65 20 6d | 6f 64 65 6d 20 63 6f 6e |isable m|odem con|
|00004680| 74 72 6f 6c 5c 6e 22 29 | 3b 0a 09 09 65 78 69 74 |trol\n")|;...exit|
|00004690| 28 31 29 3b 0a 09 7d 0a | 0a 09 69 66 20 28 65 6e |(1);..}.|..if (en|
|000046a0| 61 62 6c 65 29 20 7b 0a | 09 09 69 66 28 28 64 65 |able) {.|..if((de|
|000046b0| 76 66 69 6c 65 20 3d 20 | 6f 70 65 6e 28 64 65 76 |vfile = |open(dev|
|000046c0| 69 63 65 2c 20 31 29 29 | 20 3c 20 30 29 20 7b 0a |ice, 1))| < 0) {.|
|000046d0| 09 09 09 66 70 72 69 6e | 74 66 28 73 74 64 65 72 |...fprin|tf(stder|
|000046e0| 72 2c 22 4f 6e 20 6f 70 | 65 6e 20 6f 66 20 25 73 |r,"On op|en of %s|
|000046f0| 3a 20 25 73 5c 6e 22 2c | 0a 09 09 09 09 64 65 76 |: %s\n",|.....dev|
|00004700| 69 63 65 2c 20 73 79 73 | 5f 65 72 72 6c 69 73 74 |ice, sys|_errlist|
|00004710| 5b 65 72 72 6e 6f 5d 29 | 3b 0a 09 09 09 28 76 6f |[errno])|;....(vo|
|00004720| 69 64 29 73 65 74 6d 6f | 64 65 6d 28 64 65 76 69 |id)setmo|dem(devi|
|00004730| 63 65 2c 72 65 73 65 74 | 6d 6f 64 65 6d 29 3b 0a |ce,reset|modem);.|
|00004740| 09 09 09 65 78 69 74 28 | 31 29 3b 0a 09 09 7d 0a |...exit(|1);...}.|
|00004750| 09 09 2f 2a 20 54 72 79 | 20 6f 6e 65 20 6c 61 73 |../* Try| one las|
|00004760| 74 20 74 69 6d 65 20 74 | 6f 20 68 61 6e 67 20 75 |t time t|o hang u|
|00004770| 70 20 2a 2f 0a 09 09 69 | 66 20 28 69 6f 63 74 6c |p */...i|f (ioctl|
|00004780| 28 64 65 76 66 69 6c 65 | 2c 28 69 6e 74 29 54 49 |(devfile|,(int)TI|
|00004790| 4f 43 43 44 54 52 2c 28 | 63 68 61 72 20 2a 29 30 |OCCDTR,(|char *)0|
|000047a0| 29 20 3c 20 30 29 0a 09 | 09 09 66 70 72 69 6e 74 |) < 0)..|..fprint|
|000047b0| 66 28 73 74 64 65 72 72 | 2c 22 4f 6e 20 54 49 4f |f(stderr|,"On TIO|
|000047c0| 43 43 44 54 52 20 69 6f | 63 74 6c 3a 20 25 73 5c |CCDTR io|ctl: %s\|
|000047d0| 6e 22 2c 0a 09 09 09 09 | 73 79 73 5f 65 72 72 6c |n",.....|sys_errl|
|000047e0| 69 73 74 5b 65 72 72 6e | 6f 5d 29 3b 0a 0a 09 09 |ist[errn|o]);....|
|000047f0| 69 66 20 28 69 6f 63 74 | 6c 28 64 65 76 66 69 6c |if (ioct|l(devfil|
|00004800| 65 2c 20 28 69 6e 74 29 | 54 49 4f 43 4e 58 43 4c |e, (int)|TIOCNXCL|
|00004810| 2c 28 63 68 61 72 20 2a | 29 30 29 20 3c 20 30 29 |,(char *|)0) < 0)|
|00004820| 0a 09 09 09 66 70 72 69 | 6e 74 66 28 73 74 64 65 |....fpri|ntf(stde|
|00004830| 72 72 2c 0a 09 09 09 20 | 20 20 20 22 43 61 6e 6e |rr,.... | "Cann|
|00004840| 6f 74 20 63 6c 65 61 72 | 20 45 78 63 6c 75 73 69 |ot clear| Exclusi|
|00004850| 76 65 20 55 73 65 20 6f | 6e 20 25 73 3a 20 25 73 |ve Use o|n %s: %s|
|00004860| 5c 6e 22 2c 0a 09 09 09 | 09 64 65 76 69 63 65 2c |\n",....|.device,|
|00004870| 20 73 79 73 5f 65 72 72 | 6c 69 73 74 5b 65 72 72 | sys_err|list[err|
|00004880| 6e 6f 5d 29 3b 0a 0a 09 | 09 69 66 20 28 69 6f 63 |no]);...|.if (ioc|
|00004890| 74 6c 28 64 65 76 66 69 | 6c 65 2c 20 28 69 6e 74 |tl(devfi|le, (int|
|000048a0| 29 54 49 4f 43 48 50 43 | 4c 2c 28 63 68 61 72 20 |)TIOCHPC|L,(char |
|000048b0| 2a 29 30 29 20 3c 20 30 | 29 0a 09 09 09 66 70 72 |*)0) < 0|)....fpr|
|000048c0| 69 6e 74 66 28 73 74 64 | 65 72 72 2c 0a 09 09 09 |intf(std|err,....|
|000048d0| 20 20 20 20 22 43 61 6e | 6e 6f 74 20 73 65 74 20 | "Can|not set |
|000048e0| 68 61 6e 67 75 70 20 6f | 6e 20 63 6c 6f 73 65 20 |hangup o|n close |
|000048f0| 6f 6e 20 25 73 3a 20 25 | 73 5c 6e 22 2c 0a 09 09 |on %s: %|s\n",...|
|00004900| 09 09 64 65 76 69 63 65 | 2c 20 73 79 73 5f 65 72 |..device|, sys_er|
|00004910| 72 6c 69 73 74 5b 65 72 | 72 6e 6f 5d 29 3b 0a 0a |rlist[er|rno]);..|
|00004920| 09 09 69 20 3d 20 72 65 | 73 65 74 6d 6f 64 65 6d |..i = re|setmodem|
|00004930| 3b 0a 0a 09 09 69 66 20 | 28 73 65 74 6d 6f 64 65 |;....if |(setmode|
|00004940| 6d 28 64 65 76 69 63 65 | 2c 45 4e 41 42 4c 45 29 |m(device|,ENABLE)|
|00004950| 20 3c 20 30 29 20 7b 0a | 09 09 09 66 70 72 69 6e | < 0) {.|...fprin|
|00004960| 74 66 28 73 74 64 65 72 | 72 2c 22 43 61 6e 6e 6f |tf(stder|r,"Canno|
|00004970| 74 20 45 6e 61 62 6c 65 | 20 6d 6f 64 65 6d 20 63 |t Enable| modem c|
|00004980| 6f 6e 74 72 6f 6c 5c 6e | 22 29 3b 0a 09 09 09 28 |ontrol\n|");....(|
|00004990| 76 6f 69 64 29 73 65 74 | 6d 6f 64 65 6d 28 64 65 |void)set|modem(de|
|000049a0| 76 69 63 65 2c 69 29 3b | 0a 09 09 09 65 78 69 74 |vice,i);|....exit|
|000049b0| 28 31 29 3b 0a 09 09 7d | 0a 09 09 72 65 73 65 74 |(1);...}|...reset|
|000049c0| 6d 6f 64 65 6d 3d 69 3b | 0a 0a 09 09 69 66 20 28 |modem=i;|....if (|
|000049d0| 73 65 74 74 79 73 28 45 | 4e 41 42 4c 45 29 29 20 |settys(E|NABLE)) |
|000049e0| 7b 0a 09 09 09 66 70 72 | 69 6e 74 66 28 73 74 64 |{....fpr|intf(std|
|000049f0| 65 72 72 2c 22 25 73 20 | 61 6c 72 65 61 64 79 20 |err,"%s |already |
|00004a00| 65 6e 61 62 6c 65 64 5c | 6e 22 2c 64 65 76 69 63 |enabled\|n",devic|
|00004a10| 65 29 3b 0a 09 09 7d 20 | 65 6c 73 65 20 7b 0a 09 |e);...} |else {..|
|00004a20| 09 09 70 6f 6b 65 69 6e | 69 74 28 64 65 76 69 63 |..pokein|it(devic|
|00004a30| 65 2c 55 6e 61 6d 65 2c | 65 6e 61 62 6c 65 29 3b |e,Uname,|enable);|
|00004a40| 0a 09 09 7d 0a 09 09 70 | 6f 73 74 28 64 65 76 69 |...}...p|ost(devi|
|00004a50| 63 65 2c 22 22 29 3b 0a | 0a 09 7d 20 65 6c 73 65 |ce,"");.|..} else|
|00004a60| 20 7b 0a 23 69 66 20 64 | 65 66 69 6e 65 64 28 54 | {.#if d|efined(T|
|00004a70| 49 4f 43 4d 47 45 54 29 | 20 26 26 20 64 65 66 69 |IOCMGET)| && defi|
|00004a80| 6e 65 64 28 53 45 4e 53 | 45 43 41 52 52 49 45 52 |ned(SENS|ECARRIER|
|00004a90| 29 0a 09 09 69 66 20 28 | 75 69 64 21 3d 30 29 20 |)...if (|uid!=0) |
|00004aa0| 7b 0a 09 09 09 69 6e 74 | 20 6c 69 6e 65 73 74 61 |{....int| linesta|
|00004ab0| 74 20 3d 20 30 3b 0a 0a | 09 09 09 2f 2a 20 63 68 |t = 0;..|.../* ch|
|00004ac0| 65 63 6b 20 66 6f 72 20 | 70 72 65 73 65 6e 63 65 |eck for |presence|
|00004ad0| 20 6f 66 20 63 61 72 72 | 69 65 72 20 2a 2f 0a 09 | of carr|ier */..|
|00004ae0| 09 09 73 6c 65 65 70 28 | 32 29 3b 20 2f 2a 20 6e |..sleep(|2); /* n|
|00004af0| 65 65 64 20 74 69 6d 65 | 20 61 66 74 65 72 20 6d |eed time| after m|
|00004b00| 6f 64 65 6d 20 63 6f 6e | 74 72 6f 6c 20 74 75 72 |odem con|trol tur|
|00004b10| 6e 6f 66 66 20 2a 2f 0a | 0a 09 09 09 69 66 28 28 |noff */.|....if((|
|00004b20| 64 65 76 66 69 6c 65 20 | 3d 20 6f 70 65 6e 28 64 |devfile |= open(d|
|00004b30| 65 76 69 63 65 2c 20 31 | 29 29 20 3c 20 30 29 20 |evice, 1|)) < 0) |
|00004b40| 7b 0a 09 09 09 09 66 70 | 72 69 6e 74 66 28 73 74 |{.....fp|rintf(st|
|00004b50| 64 65 72 72 2c 22 4f 6e | 20 6f 70 65 6e 20 6f 66 |derr,"On| open of|
|00004b60| 20 25 73 3a 20 25 73 5c | 6e 22 2c 0a 09 09 09 09 | %s: %s\|n",.....|
|00004b70| 09 64 65 76 69 63 65 2c | 20 73 79 73 5f 65 72 72 |.device,| sys_err|
|00004b80| 6c 69 73 74 5b 65 72 72 | 6e 6f 5d 29 3b 0a 09 09 |list[err|no]);...|
|00004b90| 09 09 28 76 6f 69 64 29 | 73 65 74 6d 6f 64 65 6d |..(void)|setmodem|
|00004ba0| 28 64 65 76 69 63 65 2c | 72 65 73 65 74 6d 6f 64 |(device,|resetmod|
|00004bb0| 65 6d 29 3b 0a 09 09 09 | 09 65 78 69 74 28 31 29 |em);....|.exit(1)|
|00004bc0| 3b 0a 09 09 09 7d 0a 0a | 09 09 09 28 76 6f 69 64 |;....}..|...(void|
|00004bd0| 29 69 6f 63 74 6c 28 64 | 65 76 66 69 6c 65 2c 54 |)ioctl(d|evfile,T|
|00004be0| 49 4f 43 4d 47 45 54 2c | 26 6c 69 6e 65 73 74 61 |IOCMGET,|&linesta|
|00004bf0| 74 29 3b 0a 0a 09 09 09 | 69 66 20 28 6c 69 6e 65 |t);.....|if (line|
|00004c00| 73 74 61 74 26 54 49 4f | 43 4d 5f 43 41 52 29 20 |stat&TIO|CM_CAR) |
|00004c10| 7b 0a 09 09 09 09 66 70 | 72 69 6e 74 66 28 73 74 |{.....fp|rintf(st|
|00004c20| 64 65 72 72 2c 22 25 73 | 20 69 73 20 69 6e 20 75 |derr,"%s| is in u|
|00004c30| 73 65 20 28 43 61 72 72 | 69 65 72 20 4f 6e 29 5c |se (Carr|ier On)\|
|00004c40| 6e 22 2c 0a 09 09 09 09 | 09 64 65 76 69 63 65 29 |n",.....|.device)|
|00004c50| 3b 0a 09 09 09 09 28 76 | 6f 69 64 29 73 65 74 6d |;.....(v|oid)setm|
|00004c60| 6f 64 65 6d 28 64 65 76 | 69 63 65 2c 72 65 73 65 |odem(dev|ice,rese|
|00004c70| 74 6d 6f 64 65 6d 29 3b | 0a 09 09 09 09 65 78 69 |tmodem);|.....exi|
|00004c80| 74 28 32 29 3b 0a 09 09 | 09 7d 0a 09 09 09 28 76 |t(2);...|.}....(v|
|00004c90| 6f 69 64 29 63 6c 6f 73 | 65 28 64 65 76 66 69 6c |oid)clos|e(devfil|
|00004ca0| 65 29 3b 0a 09 09 7d 0a | 23 65 6e 64 69 66 20 54 |e);...}.|#endif T|
|00004cb0| 49 4f 43 4d 47 45 54 0a | 09 09 2f 2a 20 63 68 6f |IOCMGET.|../* cho|
|00004cc0| 77 6e 20 64 65 76 69 63 | 65 20 2a 2f 0a 09 09 69 |wn devic|e */...i|
|00004cd0| 66 28 63 68 6f 77 6e 28 | 64 65 76 69 63 65 2c 20 |f(chown(|device, |
|00004ce0| 75 69 64 2c 20 67 69 64 | 29 20 3c 20 30 29 0a 09 |uid, gid|) < 0)..|
|00004cf0| 09 09 66 70 72 69 6e 74 | 66 28 73 74 64 65 72 72 |..fprint|f(stderr|
|00004d00| 2c 20 22 43 61 6e 6e 6f | 74 20 63 68 6f 77 6e 20 |, "Canno|t chown |
|00004d10| 25 73 3a 20 25 73 5c 6e | 22 2c 0a 09 09 09 09 64 |%s: %s\n|",.....d|
|00004d20| 65 76 69 63 65 2c 20 73 | 79 73 5f 65 72 72 6c 69 |evice, s|ys_errli|
|00004d30| 73 74 5b 65 72 72 6e 6f | 5d 29 3b 0a 0a 0a 09 09 |st[errno|]);.....|
|00004d40| 2f 2a 20 70 6f 6b 65 20 | 69 6e 69 74 20 2a 2f 0a |/* poke |init */.|
|00004d50| 09 09 69 66 28 73 65 74 | 74 79 73 28 44 49 53 41 |..if(set|tys(DISA|
|00004d60| 42 4c 45 29 29 20 7b 0a | 09 09 09 66 70 72 69 6e |BLE)) {.|...fprin|
|00004d70| 74 66 28 73 74 64 65 72 | 72 2c 22 25 73 20 61 6c |tf(stder|r,"%s al|
|00004d80| 72 65 61 64 79 20 64 69 | 73 61 62 6c 65 64 5c 6e |ready di|sabled\n|
|00004d90| 22 2c 64 65 76 69 63 65 | 29 3b 0a 09 09 7d 20 65 |",device|);...} e|
|00004da0| 6c 73 65 20 7b 0a 09 09 | 09 70 6f 6b 65 69 6e 69 |lse {...|.pokeini|
|00004db0| 74 28 64 65 76 69 63 65 | 2c 55 6e 61 6d 65 2c 65 |t(device|,Uname,e|
|00004dc0| 6e 61 62 6c 65 29 3b 0a | 09 09 7d 0a 09 09 70 6f |nable);.|..}...po|
|00004dd0| 73 74 28 64 65 76 69 63 | 65 2c 55 6e 61 6d 65 29 |st(devic|e,Uname)|
|00004de0| 3b 0a 09 09 69 66 28 28 | 64 65 76 66 69 6c 65 20 |;...if((|devfile |
|00004df0| 3d 20 6f 70 65 6e 28 64 | 65 76 69 63 65 2c 20 31 |= open(d|evice, 1|
|00004e00| 29 29 20 3c 20 30 29 20 | 7b 0a 09 09 09 66 70 72 |)) < 0) |{....fpr|
|00004e10| 69 6e 74 66 28 73 74 64 | 65 72 72 2c 20 22 4f 6e |intf(std|err, "On|
|00004e20| 20 25 73 20 6f 70 65 6e | 3a 20 25 73 5c 6e 22 2c | %s open|: %s\n",|
|00004e30| 0a 09 09 09 09 64 65 76 | 69 63 65 2c 20 73 79 73 |.....dev|ice, sys|
|00004e40| 5f 65 72 72 6c 69 73 74 | 5b 65 72 72 6e 6f 5d 29 |_errlist|[errno])|
|00004e50| 3b 0a 09 09 7d 20 65 6c | 73 65 20 7b 0a 09 09 09 |;...} el|se {....|
|00004e60| 69 66 28 69 6f 63 74 6c | 28 64 65 76 66 69 6c 65 |if(ioctl|(devfile|
|00004e70| 2c 20 28 69 6e 74 29 54 | 49 4f 43 53 44 54 52 2c |, (int)T|IOCSDTR,|
|00004e80| 20 28 63 68 61 72 20 2a | 29 30 29 20 3c 20 30 29 | (char *|)0) < 0)|
|00004e90| 0a 09 09 09 09 66 70 72 | 69 6e 74 66 28 73 74 64 |.....fpr|intf(std|
|00004ea0| 65 72 72 2c 0a 09 09 09 | 09 20 20 20 20 22 43 61 |err,....|. "Ca|
|00004eb0| 6e 6e 6f 74 20 73 65 74 | 20 44 54 52 20 6f 6e 20 |nnot set| DTR on |
|00004ec0| 25 73 3a 20 25 73 5c 6e | 22 2c 0a 09 09 09 09 09 |%s: %s\n|",......|
|00004ed0| 64 65 76 69 63 65 2c 20 | 73 79 73 5f 65 72 72 6c |device, |sys_errl|
|00004ee0| 69 73 74 5b 65 72 72 6e | 6f 5d 29 3b 0a 09 09 7d |ist[errn|o]);...}|
|00004ef0| 0a 09 7d 0a 0a 09 65 78 | 69 74 28 30 29 3b 0a 7d |..}...ex|it(0);.}|
|00004f00| 0a 0a 2f 2a 20 72 65 74 | 75 72 6e 20 74 72 75 65 |../* ret|urn true|
|00004f10| 20 69 66 20 6e 6f 20 6c | 6f 77 65 72 20 63 61 73 | if no l|ower cas|
|00004f20| 65 20 2a 2f 0a 75 70 63 | 61 73 65 28 73 74 72 2c |e */.upc|ase(str,|
|00004f30| 6c 65 6e 29 0a 72 65 67 | 69 73 74 65 72 20 63 68 |len).reg|ister ch|
|00004f40| 61 72 20 2a 73 74 72 3b | 0a 72 65 67 69 73 74 65 |ar *str;|.registe|
|00004f50| 72 20 69 6e 74 20 6c 65 | 6e 3b 0a 7b 0a 09 66 6f |r int le|n;.{..fo|
|00004f60| 72 20 28 3b 20 2a 73 74 | 72 2c 20 2d 2d 6c 65 6e |r (; *st|r, --len|
|00004f70| 20 3e 3d 20 30 20 3b 20 | 73 74 72 2b 2b 29 0a 09 | >= 0 ; |str++)..|
|00004f80| 09 69 66 20 28 2a 73 74 | 72 3e 3d 27 61 27 20 26 |.if (*st|r>='a' &|
|00004f90| 26 20 2a 73 74 72 3c 3d | 27 7a 27 29 0a 09 09 09 |& *str<=|'z')....|
|00004fa0| 72 65 74 75 72 6e 28 30 | 29 3b 0a 09 72 65 74 75 |return(0|);..retu|
|00004fb0| 72 6e 28 31 29 3b 0a 7d | 0a 0a 2f 2a 20 50 6f 73 |rn(1);.}|../* Pos|
|00004fc0| 74 20 6e 61 6d 65 20 74 | 6f 20 70 75 62 6c 69 63 |t name t|o public|
|00004fd0| 20 2a 2f 0a 70 6f 73 74 | 28 64 65 76 69 63 65 2c | */.post|(device,|
|00004fe0| 6e 61 6d 65 29 0a 63 68 | 61 72 20 2a 64 65 76 69 |name).ch|ar *devi|
|00004ff0| 63 65 2c 20 2a 6e 61 6d | 65 3b 0a 7b 0a 09 28 76 |ce, *nam|e;.{..(v|
|00005000| 6f 69 64 29 74 69 6d 65 | 28 28 74 69 6d 65 5f 74 |oid)time|((time_t|
|00005010| 20 2a 29 26 75 74 6d 70 | 2e 75 74 5f 74 69 6d 65 | *)&utmp|.ut_time|
|00005020| 29 3b 0a 09 73 74 72 63 | 70 79 6e 28 75 74 6d 70 |);..strc|pyn(utmp|
|00005030| 2e 75 74 5f 6c 69 6e 65 | 2c 20 64 65 76 69 63 65 |.ut_line|, device|
|00005040| 2c 20 4c 49 4e 53 49 5a | 29 3b 0a 09 73 74 72 63 |, LINSIZ|);..strc|
|00005050| 70 79 6e 28 75 74 6d 70 | 2e 75 74 5f 6e 61 6d 65 |pyn(utmp|.ut_name|
|00005060| 2c 20 6e 61 6d 65 2c 20 | 20 4e 41 4d 53 49 5a 29 |, name, | NAMSIZ)|
|00005070| 3b 0a 09 69 66 20 28 6c | 73 65 65 6b 28 65 74 63 |;..if (l|seek(etc|
|00005080| 75 74 6d 70 2c 20 75 74 | 6d 70 6c 6f 63 2c 20 30 |utmp, ut|mploc, 0|
|00005090| 29 3c 30 29 0a 09 09 66 | 70 72 69 6e 74 66 28 73 |)<0)...f|printf(s|
|000050a0| 74 64 65 72 72 2c 22 6f | 6e 20 6c 73 65 65 6b 20 |tderr,"o|n lseek |
|000050b0| 69 6e 20 2f 65 74 63 2f | 75 74 6d 70 3a 20 25 73 |in /etc/|utmp: %s|
|000050c0| 22 2c 0a 09 09 09 73 79 | 73 5f 65 72 72 6c 69 73 |",....sy|s_errlis|
|000050d0| 74 5b 65 72 72 6e 6f 5d | 29 3b 0a 09 69 66 20 28 |t[errno]|);..if (|
|000050e0| 77 72 69 74 65 28 65 74 | 63 75 74 6d 70 2c 20 28 |write(et|cutmp, (|
|000050f0| 63 68 61 72 20 2a 29 26 | 75 74 6d 70 2c 20 73 69 |char *)&|utmp, si|
|00005100| 7a 65 6f 66 28 75 74 6d | 70 29 29 3c 30 29 0a 09 |zeof(utm|p))<0)..|
|00005110| 09 66 70 72 69 6e 74 66 | 28 73 74 64 65 72 72 2c |.fprintf|(stderr,|
|00005120| 22 6f 6e 20 77 72 69 74 | 65 20 69 6e 20 2f 65 74 |"on writ|e in /et|
|00005130| 63 2f 75 74 6d 70 3a 20 | 25 73 22 2c 0a 09 09 09 |c/utmp: |%s",....|
|00005140| 73 79 73 5f 65 72 72 6c | 69 73 74 5b 65 72 72 6e |sys_errl|ist[errn|
|00005150| 6f 5d 29 3b 0a 7d 0a 09 | 0a 2f 2a 20 70 6f 6b 65 |o]);.}..|./* poke|
|00005160| 20 70 72 6f 63 65 73 73 | 20 31 20 61 6e 64 20 77 | process| 1 and w|
|00005170| 61 69 74 20 66 6f 72 20 | 69 74 20 74 6f 20 64 6f |ait for |it to do|
|00005180| 20 69 74 73 20 74 68 69 | 6e 67 20 2a 2f 0a 70 6f | its thi|ng */.po|
|00005190| 6b 65 69 6e 69 74 28 64 | 65 76 69 63 65 2c 75 6e |keinit(d|evice,un|
|000051a0| 61 6d 65 2c 65 6e 61 62 | 6c 65 29 0a 63 68 61 72 |ame,enab|le).char|
|000051b0| 20 2a 75 6e 61 6d 65 2c | 20 2a 64 65 76 69 63 65 | *uname,| *device|
|000051c0| 3b 20 69 6e 74 20 65 6e | 61 62 6c 65 3b 0a 7b 0a |; int en|able;.{.|
|000051d0| 09 73 74 72 75 63 74 20 | 75 74 6d 70 20 75 74 6d |.struct |utmp utm|
|000051e0| 70 3b 0a 09 72 65 67 69 | 73 74 65 72 20 69 6e 74 |p;..regi|ster int|
|000051f0| 20 69 3b 0a 0a 09 70 6f | 73 74 28 64 65 76 69 63 | i;...po|st(devic|
|00005200| 65 2c 20 75 6e 61 6d 65 | 29 3b 0a 0a 09 2f 2a 20 |e, uname|);.../* |
|00005210| 70 6f 6b 65 20 69 6e 69 | 74 20 2a 2f 0a 09 69 66 |poke ini|t */..if|
|00005220| 20 28 6b 69 6c 6c 28 31 | 2c 20 53 49 47 48 55 50 | (kill(1|, SIGHUP|
|00005230| 29 29 20 7b 0a 09 09 66 | 70 72 69 6e 74 66 28 73 |)) {...f|printf(s|
|00005240| 74 64 65 72 72 2c 0a 09 | 09 20 20 20 20 22 43 61 |tderr,..|. "Ca|
|00005250| 6e 6e 6f 74 20 73 65 6e | 64 20 68 61 6e 67 75 70 |nnot sen|d hangup|
|00005260| 20 74 6f 20 69 6e 69 74 | 20 70 72 6f 63 65 73 73 | to init| process|
|00005270| 3a 20 25 73 5c 6e 22 2c | 0a 09 09 09 73 79 73 5f |: %s\n",|....sys_|
|00005280| 65 72 72 6c 69 73 74 5b | 65 72 72 6e 6f 5d 29 3b |errlist[|errno]);|
|00005290| 0a 09 09 28 76 6f 69 64 | 29 73 65 74 74 79 73 28 |...(void|)settys(|
|000052a0| 72 65 73 65 74 74 74 79 | 29 3b 0a 09 09 28 76 6f |resettty|);...(vo|
|000052b0| 69 64 29 73 65 74 6d 6f | 64 65 6d 28 64 65 76 69 |id)setmo|dem(devi|
|000052c0| 63 65 2c 72 65 73 65 74 | 6d 6f 64 65 6d 29 3b 0a |ce,reset|modem);.|
|000052d0| 09 09 65 78 69 74 28 31 | 29 3b 0a 09 7d 0a 0a 09 |..exit(1|);..}...|
|000052e0| 69 66 20 28 65 6e 61 62 | 6c 65 29 0a 09 09 72 65 |if (enab|le)...re|
|000052f0| 74 75 72 6e 3b 0a 0a 09 | 2f 2a 20 77 61 69 74 20 |turn;...|/* wait |
|00005300| 74 69 6c 6c 20 69 6e 69 | 74 20 68 61 73 20 72 65 |till ini|t has re|
|00005310| 73 70 6f 6e 64 65 64 2c | 20 63 6c 65 61 72 69 6e |sponded,| clearin|
|00005320| 67 20 74 68 65 20 75 74 | 6d 70 20 65 6e 74 72 79 |g the ut|mp entry|
|00005330| 20 2a 2f 0a 09 69 3d 31 | 30 30 3b 0a 09 64 6f 20 | */..i=1|00;..do |
|00005340| 7b 0a 09 09 73 6c 65 65 | 70 28 31 29 3b 0a 09 09 |{...slee|p(1);...|
|00005350| 69 66 20 28 6c 73 65 65 | 6b 28 65 74 63 75 74 6d |if (lsee|k(etcutm|
|00005360| 70 2c 75 74 6d 70 6c 6f | 63 2c 30 29 3c 30 29 0a |p,utmplo|c,0)<0).|
|00005370| 09 09 09 66 70 72 69 6e | 74 66 28 73 74 64 65 72 |...fprin|tf(stder|
|00005380| 72 2c 22 4f 6e 20 6c 73 | 65 65 6b 20 69 6e 20 2f |r,"On ls|eek in /|
|00005390| 65 74 63 2f 75 74 6d 70 | 3a 20 25 73 22 2c 0a 09 |etc/utmp|: %s",..|
|000053a0| 09 09 09 73 79 73 5f 65 | 72 72 6c 69 73 74 5b 65 |...sys_e|rrlist[e|
|000053b0| 72 72 6e 6f 5d 29 3b 0a | 09 09 69 66 20 28 72 65 |rrno]);.|..if (re|
|000053c0| 61 64 28 65 74 63 75 74 | 6d 70 2c 28 63 68 61 72 |ad(etcut|mp,(char|
|000053d0| 20 2a 29 26 75 74 6d 70 | 2c 73 69 7a 65 6f 66 20 | *)&utmp|,sizeof |
|000053e0| 75 74 6d 70 29 3c 30 29 | 0a 09 09 09 66 70 72 69 |utmp)<0)|....fpri|
|000053f0| 6e 74 66 28 73 74 64 65 | 72 72 2c 22 4f 6e 20 72 |ntf(stde|rr,"On r|
|00005400| 65 61 64 20 66 72 6f 6d | 20 2f 65 74 63 2f 75 74 |ead from| /etc/ut|
|00005410| 6d 70 3a 20 25 73 22 2c | 0a 09 09 09 09 73 79 73 |mp: %s",|.....sys|
|00005420| 5f 65 72 72 6c 69 73 74 | 5b 65 72 72 6e 6f 5d 29 |_errlist|[errno])|
|00005430| 3b 0a 09 7d 20 77 68 69 | 6c 65 20 28 75 74 6d 70 |;..} whi|le (utmp|
|00005440| 2e 75 74 5f 6e 61 6d 65 | 5b 30 5d 20 21 3d 20 27 |.ut_name|[0] != '|
|00005450| 5c 30 27 20 26 26 20 2d | 2d 69 20 3e 20 30 29 3b |\0' && -|-i > 0);|
|00005460| 0a 7d 0a 0a 2f 2a 20 69 | 64 65 6e 74 69 66 79 20 |.}../* i|dentify |
|00005470| 74 65 72 6d 69 6e 61 6c | 20 6c 69 6e 65 20 69 6e |terminal| line in|
|00005480| 20 74 74 79 73 20 2a 2f | 0a 6f 70 6e 74 74 79 73 | ttys */|.opnttys|
|00005490| 28 64 65 76 69 63 65 29 | 0a 63 68 61 72 20 2a 64 |(device)|.char *d|
|000054a0| 65 76 69 63 65 3b 0a 7b | 0a 09 72 65 67 69 73 74 |evice;.{|..regist|
|000054b0| 65 72 20 46 49 4c 45 20 | 2a 74 74 79 73 66 69 6c |er FILE |*ttysfil|
|000054c0| 65 3b 0a 09 72 65 67 69 | 73 74 65 72 20 69 6e 74 |e;..regi|ster int|
|000054d0| 20 20 6e 64 65 76 69 63 | 65 2c 20 6c 6e 73 69 7a | ndevic|e, lnsiz|
|000054e0| 3b 20 0a 09 72 65 67 69 | 73 74 65 72 20 63 68 61 |; ..regi|ster cha|
|000054f0| 72 20 2a 70 3b 0a 09 63 | 68 61 72 20 2a 69 6e 64 |r *p;..c|har *ind|
|00005500| 65 78 28 29 3b 0a 09 63 | 68 61 72 20 6c 69 6e 65 |ex();..c|har line|
|00005510| 62 75 66 5b 31 30 30 5d | 3b 0a 0a 09 74 74 79 73 |buf[100]|;...ttys|
|00005520| 66 69 6c 65 20 3d 20 66 | 6f 70 65 6e 28 45 74 63 |file = f|open(Etc|
|00005530| 74 74 79 73 2c 20 22 72 | 22 29 3b 0a 09 69 66 28 |ttys, "r|");..if(|
|00005540| 74 74 79 73 66 69 6c 65 | 20 3d 3d 20 4e 55 4c 4c |ttysfile| == NULL|
|00005550| 29 20 7b 0a 09 09 66 70 | 72 69 6e 74 66 28 73 74 |) {...fp|rintf(st|
|00005560| 64 65 72 72 2c 20 22 43 | 61 6e 6e 6f 74 20 6f 70 |derr, "C|annot op|
|00005570| 65 6e 20 25 73 3a 20 25 | 73 5c 6e 22 2c 20 45 74 |en %s: %|s\n", Et|
|00005580| 63 74 74 79 73 2c 0a 09 | 09 09 73 79 73 5f 65 72 |cttys,..|..sys_er|
|00005590| 72 6c 69 73 74 5b 65 72 | 72 6e 6f 5d 29 3b 0a 09 |rlist[er|rno]);..|
|000055a0| 09 65 78 69 74 28 31 29 | 3b 0a 09 7d 0a 0a 09 6e |.exit(1)|;..}...n|
|000055b0| 64 65 76 69 63 65 20 3d | 20 73 74 72 6c 65 6e 28 |device =| strlen(|
|000055c0| 64 65 76 69 63 65 29 3b | 0a 09 74 74 79 73 6c 6e |device);|..ttysln|
|000055d0| 62 65 67 20 3d 20 30 3b | 0a 09 75 74 6d 70 6c 6f |beg = 0;|..utmplo|
|000055e0| 63 20 3d 20 30 3b 0a 0a | 09 77 68 69 6c 65 28 66 |c = 0;..|.while(f|
|000055f0| 67 65 74 73 28 6c 69 6e | 65 62 75 66 2c 20 73 69 |gets(lin|ebuf, si|
|00005600| 7a 65 6f 66 28 6c 69 6e | 65 62 75 66 29 20 2d 20 |zeof(lin|ebuf) - |
|00005610| 31 2c 20 74 74 79 73 66 | 69 6c 65 29 20 21 3d 20 |1, ttysf|ile) != |
|00005620| 4e 55 4c 4c 29 20 7b 0a | 09 09 75 74 6d 70 6c 6f |NULL) {.|..utmplo|
|00005630| 63 20 2b 3d 20 73 69 7a | 65 6f 66 28 75 74 6d 70 |c += siz|eof(utmp|
|00005640| 29 3b 0a 09 09 6c 6e 73 | 69 7a 20 3d 20 73 74 72 |);...lns|iz = str|
|00005650| 6c 65 6e 28 6c 69 6e 65 | 62 75 66 29 3b 0a 09 09 |len(line|buf);...|
|00005660| 69 66 20 28 28 70 20 3d | 20 69 6e 64 65 78 28 6c |if ((p =| index(l|
|00005670| 69 6e 65 62 75 66 2c 27 | 5c 6e 27 29 29 20 21 3d |inebuf,'|\n')) !=|
|00005680| 20 4e 55 4c 4c 29 0a 09 | 09 09 2a 70 20 3d 20 27 | NULL)..|..*p = '|
|00005690| 5c 30 27 3b 0a 09 09 69 | 66 28 73 74 72 6e 63 6d |\0';...i|f(strncm|
|000056a0| 70 28 64 65 76 69 63 65 | 2c 20 26 6c 69 6e 65 62 |p(device|, &lineb|
|000056b0| 75 66 5b 32 5d 2c 20 6e | 64 65 76 69 63 65 29 20 |uf[2], n|device) |
|000056c0| 3d 3d 20 30 29 20 7b 0a | 09 09 09 28 76 6f 69 64 |== 0) {.|...(void|
|000056d0| 29 66 63 6c 6f 73 65 28 | 74 74 79 73 66 69 6c 65 |)fclose(|ttysfile|
|000056e0| 29 3b 0a 09 09 09 72 65 | 74 75 72 6e 3b 0a 09 09 |);....re|turn;...|
|000056f0| 7d 0a 09 09 74 74 79 73 | 6c 6e 62 65 67 20 2b 3d |}...ttys|lnbeg +=|
|00005700| 20 6c 6e 73 69 7a 3b 0a | 09 7d 0a 09 66 70 72 69 | lnsiz;.|.}..fpri|
|00005710| 6e 74 66 28 73 74 64 65 | 72 72 2c 20 22 25 73 20 |ntf(stde|rr, "%s |
|00005720| 6e 6f 74 20 66 6f 75 6e | 64 20 69 6e 20 25 73 5c |not foun|d in %s\|
|00005730| 6e 22 2c 20 64 65 76 69 | 63 65 2c 20 45 74 63 74 |n", devi|ce, Etct|
|00005740| 74 79 73 29 3b 0a 09 65 | 78 69 74 28 31 29 3b 0a |tys);..e|xit(1);.|
|00005750| 7d 0a 0a 2f 2a 20 6d 6f | 64 69 66 79 20 61 70 70 |}../* mo|dify app|
|00005760| 72 6f 70 72 69 61 74 65 | 20 6c 69 6e 65 20 69 6e |ropriate| line in|
|00005770| 20 2f 65 74 63 2f 74 74 | 79 73 20 74 6f 20 74 75 | /etc/tt|ys to tu|
|00005780| 72 6e 20 6f 6e 2f 6f 66 | 66 20 74 68 65 20 64 65 |rn on/of|f the de|
|00005790| 76 69 63 65 20 2a 2f 0a | 73 65 74 74 79 73 28 65 |vice */.|settys(e|
|000057a0| 6e 61 62 6c 65 29 0a 69 | 6e 74 20 65 6e 61 62 6c |nable).i|nt enabl|
|000057b0| 65 3b 0a 7b 0a 09 69 6e | 74 20 69 74 74 79 73 66 |e;.{..in|t ittysf|
|000057c0| 69 6c 3b 0a 09 63 68 61 | 72 20 6f 75 74 2c 69 6e |il;..cha|r out,in|
|000057d0| 3b 0a 0a 09 69 74 74 79 | 73 66 69 6c 20 3d 20 6f |;...itty|sfil = o|
|000057e0| 70 65 6e 28 45 74 63 74 | 74 79 73 2c 20 32 29 3b |pen(Etct|tys, 2);|
|000057f0| 0a 09 69 66 28 69 74 74 | 79 73 66 69 6c 20 3d 3d |..if(itt|ysfil ==|
|00005800| 20 4e 55 4c 4c 29 20 7b | 0a 09 09 66 70 72 69 6e | NULL) {|...fprin|
|00005810| 74 66 28 73 74 64 65 72 | 72 2c 20 22 43 61 6e 6e |tf(stder|r, "Cann|
|00005820| 6f 74 20 6f 70 65 6e 20 | 25 73 20 66 6f 72 20 6f |ot open |%s for o|
|00005830| 75 74 70 75 74 3a 20 25 | 73 5c 6e 22 2c 0a 09 09 |utput: %|s\n",...|
|00005840| 09 45 74 63 74 74 79 73 | 2c 20 73 79 73 5f 65 72 |.Etcttys|, sys_er|
|00005850| 72 6c 69 73 74 5b 65 72 | 72 6e 6f 5d 29 3b 0a 09 |rlist[er|rno]);..|
|00005860| 09 65 78 69 74 28 31 29 | 3b 0a 09 7d 0a 09 28 76 |.exit(1)|;..}..(v|
|00005870| 6f 69 64 29 6c 73 65 65 | 6b 28 69 74 74 79 73 66 |oid)lsee|k(ittysf|
|00005880| 69 6c 2c 74 74 79 73 6c | 6e 62 65 67 2c 30 29 3b |il,ttysl|nbeg,0);|
|00005890| 0a 09 69 66 28 72 65 61 | 64 28 69 74 74 79 73 66 |..if(rea|d(ittysf|
|000058a0| 69 6c 2c 26 69 6e 2c 31 | 29 3c 30 29 20 7b 0a 09 |il,&in,1|)<0) {..|
|000058b0| 09 66 70 72 69 6e 74 66 | 28 73 74 64 65 72 72 2c |.fprintf|(stderr,|
|000058c0| 22 4f 6e 20 25 73 20 77 | 72 69 74 65 3a 20 25 73 |"On %s w|rite: %s|
|000058d0| 5c 6e 22 2c 0a 09 09 09 | 45 74 63 74 74 79 73 2c |\n",....|Etcttys,|
|000058e0| 20 73 79 73 5f 65 72 72 | 6c 69 73 74 5b 65 72 72 | sys_err|list[err|
|000058f0| 6e 6f 5d 29 3b 0a 09 09 | 65 78 69 74 28 31 29 3b |no]);...|exit(1);|
|00005900| 0a 09 7d 0a 09 72 65 73 | 65 74 74 74 79 20 3d 20 |..}..res|ettty = |
|00005910| 28 69 6e 20 3d 3d 20 27 | 31 27 29 3b 0a 09 6f 75 |(in == '|1');..ou|
|00005920| 74 20 3d 20 65 6e 61 62 | 6c 65 20 3f 20 27 31 27 |t = enab|le ? '1'|
|00005930| 20 3a 20 27 30 27 3b 0a | 09 28 76 6f 69 64 29 6c | : '0';.|.(void)l|
|00005940| 73 65 65 6b 28 69 74 74 | 79 73 66 69 6c 2c 74 74 |seek(itt|ysfil,tt|
|00005950| 79 73 6c 6e 62 65 67 2c | 30 29 3b 0a 09 69 66 28 |yslnbeg,|0);..if(|
|00005960| 77 72 69 74 65 28 69 74 | 74 79 73 66 69 6c 2c 26 |write(it|tysfil,&|
|00005970| 6f 75 74 2c 31 29 3c 30 | 29 20 7b 0a 09 09 66 70 |out,1)<0|) {...fp|
|00005980| 72 69 6e 74 66 28 73 74 | 64 65 72 72 2c 22 4f 6e |rintf(st|derr,"On|
|00005990| 20 25 73 20 77 72 69 74 | 65 3a 20 25 73 5c 6e 22 | %s writ|e: %s\n"|
|000059a0| 2c 0a 09 09 09 45 74 63 | 74 74 79 73 2c 20 73 79 |,....Etc|ttys, sy|
|000059b0| 73 5f 65 72 72 6c 69 73 | 74 5b 65 72 72 6e 6f 5d |s_errlis|t[errno]|
|000059c0| 29 3b 0a 09 09 65 78 69 | 74 28 31 29 3b 0a 09 7d |);...exi|t(1);..}|
|000059d0| 0a 09 28 76 6f 69 64 29 | 63 6c 6f 73 65 28 69 74 |..(void)|close(it|
|000059e0| 74 79 73 66 69 6c 29 3b | 0a 09 72 65 74 75 72 6e |tysfil);|..return|
|000059f0| 28 69 6e 3d 3d 6f 75 74 | 29 3b 0a 7d 0a 0a 2f 2a |(in==out|);.}../*|
|00005a00| 0a 20 2a 20 45 78 63 65 | 72 70 74 65 64 20 66 72 |. * Exce|rpted fr|
|00005a10| 6f 6d 20 28 4a 75 6e 65 | 20 38 2c 31 39 38 33 20 |om (June| 8,1983 |
|00005a20| 57 2e 53 65 62 6f 6b 29 | 0a 20 2a 20 3e 20 74 74 |W.Sebok)|. * > tt|
|00005a30| 79 6d 6f 64 65 6d 2e 63 | 20 2d 20 65 6e 61 62 6c |ymodem.c| - enabl|
|00005a40| 65 2f 64 69 73 61 62 6c | 65 20 6d 6f 64 65 6d 20 |e/disabl|e modem |
|00005a50| 63 6f 6e 74 72 6f 6c 20 | 66 6f 72 20 74 74 79 20 |control |for tty |
|00005a60| 6c 69 6e 65 73 2e 0a 20 | 2a 20 3e 0a 20 2a 20 3e |lines.. |* >. * >|
|00005a70| 20 4b 6e 6f 77 73 20 61 | 62 6f 75 74 20 44 5a 31 | Knows a|bout DZ1|
|00005a80| 31 73 20 61 6e 64 20 44 | 48 31 31 2f 44 4d 31 31 |1s and D|H11/DM11|
|00005a90| 73 2e 0a 20 2a 20 3e 20 | 32 33 2e 33 2e 38 33 20 |s.. * > |23.3.83 |
|00005aa0| 2d 20 54 53 0a 20 2a 20 | 3e 20 6d 6f 64 69 66 69 |- TS. * |> modifi|
|00005ab0| 65 64 20 74 6f 20 6b 6e | 6f 77 20 61 62 6f 75 74 |ed to kn|ow about|
|00005ac0| 20 44 4d 46 27 73 20 20 | 28 68 61 73 6e 27 74 20 | DMF's |(hasn't |
|00005ad0| 62 65 65 6e 20 74 65 73 | 74 65 64 29 20 4e 6f 76 |been tes|ted) Nov|
|00005ae0| 20 38 2c 31 39 38 34 20 | 2d 20 57 4c 53 0a 20 2a | 8,1984 |- WLS. *|
|00005af0| 2f 0a 0a 0a 73 65 74 6d | 6f 64 65 6d 28 74 74 79 |/...setm|odem(tty|
|00005b00| 6c 69 6e 65 2c 65 6e 61 | 62 6c 65 29 0a 63 68 61 |line,ena|ble).cha|
|00005b10| 72 20 2a 74 74 79 6c 69 | 6e 65 3b 20 69 6e 74 20 |r *ttyli|ne; int |
|00005b20| 65 6e 61 62 6c 65 3b 0a | 7b 0a 09 64 65 76 5f 74 |enable;.|{..dev_t|
|00005b30| 20 64 65 76 3b 0a 09 69 | 6e 74 20 6b 6d 65 6d 3b | dev;..i|nt kmem;|
|00005b40| 0a 09 69 6e 74 20 75 6e | 69 74 2c 6c 69 6e 65 2c |..int un|it,line,|
|00005b50| 6e 6c 69 6e 65 73 2c 61 | 64 64 72 2c 74 66 6c 61 |nlines,a|ddr,tfla|
|00005b60| 67 73 3b 0a 09 69 6e 74 | 20 64 65 76 74 79 70 65 |gs;..int| devtype|
|00005b70| 3d 30 3b 0a 09 63 68 61 | 72 20 63 66 6c 61 67 73 |=0;..cha|r cflags|
|00005b80| 3b 20 73 68 6f 72 74 20 | 73 66 6c 61 67 73 3b 0a |; short |sflags;.|
|00005b90| 23 69 66 64 65 66 20 42 | 53 44 34 5f 32 0a 09 69 |#ifdef B|SD4_2..i|
|00005ba0| 6e 74 20 66 6c 61 67 73 | 3b 0a 23 65 6c 73 65 0a |nt flags|;.#else.|
|00005bb0| 09 73 68 6f 72 74 20 66 | 6c 61 67 73 3b 0a 23 65 |.short f|lags;.#e|
|00005bc0| 6e 64 69 66 0a 09 73 74 | 72 75 63 74 20 75 62 61 |ndif..st|ruct uba|
|00005bd0| 5f 64 65 76 69 63 65 20 | 2a 75 62 69 6e 66 6f 3b |_device |*ubinfo;|
|00005be0| 0a 09 73 74 72 75 63 74 | 20 73 74 61 74 20 73 74 |..struct| stat st|
|00005bf0| 61 74 62 3b 0a 09 73 74 | 72 75 63 74 20 63 64 65 |atb;..st|ruct cde|
|00005c00| 76 73 77 20 63 64 65 76 | 73 77 3b 0a 0a 09 69 66 |vsw cdev|sw;...if|
|00005c10| 28 6e 6c 5b 43 44 45 56 | 53 57 5d 2e 6e 5f 74 79 |(nl[CDEV|SW].n_ty|
|00005c20| 70 65 20 3d 3d 20 30 29 | 20 7b 0a 09 09 66 70 72 |pe == 0)| {...fpr|
|00005c30| 69 6e 74 66 28 73 74 64 | 65 72 72 2c 22 4e 6f 20 |intf(std|err,"No |
|00005c40| 6e 61 6d 65 6c 69 73 74 | 2e 5c 6e 22 29 3b 0a 09 |namelist|.\n");..|
|00005c50| 09 72 65 74 75 72 6e 28 | 2d 31 29 3b 0a 09 7d 0a |.return(|-1);..}.|
|00005c60| 0a 09 69 66 28 28 6b 6d | 65 6d 20 3d 20 6f 70 65 |..if((km|em = ope|
|00005c70| 6e 28 22 2f 64 65 76 2f | 6b 6d 65 6d 22 2c 20 32 |n("/dev/|kmem", 2|
|00005c80| 29 29 20 3c 20 30 29 20 | 7b 0a 09 09 66 70 72 69 |)) < 0) |{...fpri|
|00005c90| 6e 74 66 28 73 74 64 65 | 72 72 2c 22 2f 64 65 76 |ntf(stde|rr,"/dev|
|00005ca0| 2f 6b 6d 65 6d 20 6f 70 | 65 6e 3a 20 25 73 5c 6e |/kmem op|en: %s\n|
|00005cb0| 22 2c 20 73 79 73 5f 65 | 72 72 6c 69 73 74 5b 65 |", sys_e|rrlist[e|
|00005cc0| 72 72 6e 6f 5d 29 3b 0a | 09 09 72 65 74 75 72 6e |rrno]);.|..return|
|00005cd0| 28 2d 31 29 3b 0a 09 7d | 0a 0a 09 69 66 28 73 74 |(-1);..}|...if(st|
|00005ce0| 61 74 28 74 74 79 6c 69 | 6e 65 2c 26 73 74 61 74 |at(ttyli|ne,&stat|
|00005cf0| 62 29 20 3c 20 30 29 20 | 7b 0a 09 09 66 70 72 69 |b) < 0) |{...fpri|
|00005d00| 6e 74 66 28 73 74 64 65 | 72 72 2c 22 25 73 20 73 |ntf(stde|rr,"%s s|
|00005d10| 74 61 74 3a 20 25 73 5c | 6e 22 2c 20 74 74 79 6c |tat: %s\|n", ttyl|
|00005d20| 69 6e 65 2c 20 73 79 73 | 5f 65 72 72 6c 69 73 74 |ine, sys|_errlist|
|00005d30| 5b 65 72 72 6e 6f 5d 29 | 3b 0a 09 09 72 65 74 75 |[errno])|;...retu|
|00005d40| 72 6e 28 2d 31 29 3b 0a | 09 7d 0a 0a 09 69 66 28 |rn(-1);.|.}...if(|
|00005d50| 28 73 74 61 74 62 2e 73 | 74 5f 6d 6f 64 65 26 53 |(statb.s|t_mode&S|
|00005d60| 5f 49 46 4d 54 29 20 21 | 3d 20 53 5f 49 46 43 48 |_IFMT) !|= S_IFCH|
|00005d70| 52 29 20 7b 0a 09 09 66 | 70 72 69 6e 74 66 28 73 |R) {...f|printf(s|
|00005d80| 74 64 65 72 72 2c 22 25 | 73 20 69 73 20 6e 6f 74 |tderr,"%|s is not|
|00005d90| 20 61 20 63 68 61 72 61 | 63 74 65 72 20 64 65 76 | a chara|cter dev|
|00005da0| 69 63 65 2e 5c 6e 22 2c | 74 74 79 6c 69 6e 65 29 |ice.\n",|ttyline)|
|00005db0| 3b 0a 09 09 72 65 74 75 | 72 6e 28 2d 31 29 3b 0a |;...retu|rn(-1);.|
|00005dc0| 09 7d 0a 0a 09 64 65 76 | 20 3d 20 73 74 61 74 62 |.}...dev| = statb|
|00005dd0| 2e 73 74 5f 72 64 65 76 | 3b 0a 09 28 76 6f 69 64 |.st_rdev|;..(void|
|00005de0| 29 6c 73 65 65 6b 28 6b | 6d 65 6d 2c 0a 09 09 28 |)lseek(k|mem,...(|
|00005df0| 6f 66 66 5f 74 29 20 26 | 28 28 28 73 74 72 75 63 |off_t) &|(((struc|
|00005e00| 74 20 63 64 65 76 73 77 | 20 2a 29 4e 4c 56 41 4c |t cdevsw| *)NLVAL|
|00005e10| 55 45 28 43 44 45 56 53 | 57 29 29 5b 6d 61 6a 6f |UE(CDEVS|W))[majo|
|00005e20| 72 28 64 65 76 29 5d 29 | 2c 30 29 3b 0a 09 28 76 |r(dev)])|,0);..(v|
|00005e30| 6f 69 64 29 72 65 61 64 | 28 6b 6d 65 6d 2c 28 63 |oid)read|(kmem,(c|
|00005e40| 68 61 72 20 2a 29 20 26 | 63 64 65 76 73 77 2c 73 |har *) &|cdevsw,s|
|00005e50| 69 7a 65 6f 66 20 63 64 | 65 76 73 77 29 3b 0a 0a |izeof cd|evsw);..|
|00005e60| 09 69 66 28 28 69 6e 74 | 29 28 63 64 65 76 73 77 |.if((int|)(cdevsw|
|00005e70| 2e 64 5f 6f 70 65 6e 29 | 20 3d 3d 20 4e 4c 56 41 |.d_open)| == NLVA|
|00005e80| 4c 55 45 28 44 5a 4f 50 | 45 4e 29 29 20 7b 0a 09 |LUE(DZOP|EN)) {..|
|00005e90| 09 64 65 76 74 79 70 65 | 20 3d 20 44 5a 31 31 3b |.devtype| = DZ11;|
|00005ea0| 0a 09 09 75 6e 69 74 20 | 3d 20 6d 69 6e 6f 72 28 |...unit |= minor(|
|00005eb0| 64 65 76 29 20 2f 20 4e | 44 5a 4c 49 4e 45 3b 0a |dev) / N|DZLINE;.|
|00005ec0| 09 09 6c 69 6e 65 20 3d | 20 6d 69 6e 6f 72 28 64 |..line =| minor(d|
|00005ed0| 65 76 29 20 25 20 4e 44 | 5a 4c 49 4e 45 3b 0a 09 |ev) % ND|ZLINE;..|
|00005ee0| 09 61 64 64 72 20 3d 20 | 28 69 6e 74 29 20 26 28 |.addr = |(int) &(|
|00005ef0| 28 28 69 6e 74 20 2a 29 | 4e 4c 56 41 4c 55 45 28 |((int *)|NLVALUE(|
|00005f00| 44 5a 49 4e 46 4f 29 29 | 5b 75 6e 69 74 5d 29 3b |DZINFO))|[unit]);|
|00005f10| 0a 09 09 28 76 6f 69 64 | 29 6c 73 65 65 6b 28 6b |...(void|)lseek(k|
|00005f20| 6d 65 6d 2c 28 6f 66 66 | 5f 74 29 20 4e 4c 56 41 |mem,(off|_t) NLVA|
|00005f30| 4c 55 45 28 4e 44 5a 31 | 31 29 2c 30 29 3b 0a 09 |LUE(NDZ1|1),0);..|
|00005f40| 7d 20 65 6c 73 65 20 69 | 66 28 28 69 6e 74 29 28 |} else i|f((int)(|
|00005f50| 63 64 65 76 73 77 2e 64 | 5f 6f 70 65 6e 29 20 3d |cdevsw.d|_open) =|
|00005f60| 3d 20 4e 4c 56 41 4c 55 | 45 28 44 48 4f 50 45 4e |= NLVALU|E(DHOPEN|
|00005f70| 29 29 20 7b 0a 09 09 64 | 65 76 74 79 70 65 20 3d |)) {...d|evtype =|
|00005f80| 20 44 48 31 31 3b 0a 09 | 09 75 6e 69 74 20 3d 20 | DH11;..|.unit = |
|00005f90| 6d 69 6e 6f 72 28 64 65 | 76 29 20 2f 20 4e 44 48 |minor(de|v) / NDH|
|00005fa0| 4c 49 4e 45 3b 0a 09 09 | 6c 69 6e 65 20 3d 20 6d |LINE;...|line = m|
|00005fb0| 69 6e 6f 72 28 64 65 76 | 29 20 25 20 4e 44 48 4c |inor(dev|) % NDHL|
|00005fc0| 49 4e 45 3b 0a 09 09 61 | 64 64 72 20 3d 20 28 69 |INE;...a|ddr = (i|
|00005fd0| 6e 74 29 20 26 28 28 28 | 69 6e 74 20 2a 29 4e 4c |nt) &(((|int *)NL|
|00005fe0| 56 41 4c 55 45 28 44 48 | 49 4e 46 4f 29 29 5b 75 |VALUE(DH|INFO))[u|
|00005ff0| 6e 69 74 5d 29 3b 0a 09 | 09 28 76 6f 69 64 29 6c |nit]);..|.(void)l|
|00006000| 73 65 65 6b 28 6b 6d 65 | 6d 2c 28 6f 66 66 5f 74 |seek(kme|m,(off_t|
|00006010| 29 20 4e 4c 56 41 4c 55 | 45 28 4e 44 48 31 31 29 |) NLVALU|E(NDH11)|
|00006020| 2c 30 29 3b 0a 09 7d 20 | 65 6c 73 65 20 69 66 28 |,0);..} |else if(|
|00006030| 28 69 6e 74 29 28 63 64 | 65 76 73 77 2e 64 5f 6f |(int)(cd|evsw.d_o|
|00006040| 70 65 6e 29 20 3d 3d 20 | 4e 4c 56 41 4c 55 45 28 |pen) == |NLVALUE(|
|00006050| 44 4d 46 4f 50 45 4e 29 | 29 20 7b 0a 09 09 64 65 |DMFOPEN)|) {...de|
|00006060| 76 74 79 70 65 20 3d 20 | 44 4d 46 3b 0a 09 09 75 |vtype = |DMF;...u|
|00006070| 6e 69 74 20 3d 20 6d 69 | 6e 6f 72 28 64 65 76 29 |nit = mi|nor(dev)|
|00006080| 20 2f 20 4e 44 4d 46 4c | 49 4e 45 3b 0a 09 09 6c | / NDMFL|INE;...l|
|00006090| 69 6e 65 20 3d 20 6d 69 | 6e 6f 72 28 64 65 76 29 |ine = mi|nor(dev)|
|000060a0| 20 25 20 4e 44 4d 46 4c | 49 4e 45 3b 0a 09 09 61 | % NDMFL|INE;...a|
|000060b0| 64 64 72 20 3d 20 28 69 | 6e 74 29 20 26 28 28 28 |ddr = (i|nt) &(((|
|000060c0| 69 6e 74 20 2a 29 4e 4c | 56 41 4c 55 45 28 44 4d |int *)NL|VALUE(DM|
|000060d0| 46 49 4e 46 4f 29 29 5b | 75 6e 69 74 5d 29 3b 0a |FINFO))[|unit]);.|
|000060e0| 09 09 28 76 6f 69 64 29 | 6c 73 65 65 6b 28 6b 6d |..(void)|lseek(km|
|000060f0| 65 6d 2c 28 6f 66 66 5f | 74 29 20 4e 4c 56 41 4c |em,(off_|t) NLVAL|
|00006100| 55 45 28 4e 44 4d 46 29 | 2c 30 29 3b 0a 09 7d 20 |UE(NDMF)|,0);..} |
|00006110| 65 6c 73 65 20 7b 0a 09 | 09 66 70 72 69 6e 74 66 |else {..|.fprintf|
|00006120| 28 73 74 64 65 72 72 2c | 22 44 65 76 69 63 65 20 |(stderr,|"Device |
|00006130| 25 73 20 28 25 64 2f 25 | 64 29 20 75 6e 6b 6e 6f |%s (%d/%|d) unkno|
|00006140| 77 6e 2e 5c 6e 22 2c 74 | 74 79 6c 69 6e 65 2c 0a |wn.\n",t|tyline,.|
|00006150| 09 09 20 20 20 20 6d 61 | 6a 6f 72 28 64 65 76 29 |.. ma|jor(dev)|
|00006160| 2c 6d 69 6e 6f 72 28 64 | 65 76 29 29 3b 0a 09 09 |,minor(d|ev));...|
|00006170| 72 65 74 75 72 6e 28 2d | 31 29 3b 0a 09 7d 0a 0a |return(-|1);..}..|
|00006180| 09 28 76 6f 69 64 29 72 | 65 61 64 28 6b 6d 65 6d |.(void)r|ead(kmem|
|00006190| 2c 28 63 68 61 72 20 2a | 29 20 26 6e 6c 69 6e 65 |,(char *|) &nline|
|000061a0| 73 2c 73 69 7a 65 6f 66 | 20 6e 6c 69 6e 65 73 29 |s,sizeof| nlines)|
|000061b0| 3b 0a 09 69 66 28 6d 69 | 6e 6f 72 28 64 65 76 29 |;..if(mi|nor(dev)|
|000061c0| 20 3e 3d 20 6e 6c 69 6e | 65 73 29 20 7b 0a 09 09 | >= nlin|es) {...|
|000061d0| 66 70 72 69 6e 74 66 28 | 73 74 64 65 72 72 2c 22 |fprintf(|stderr,"|
|000061e0| 53 75 62 2d 64 65 76 69 | 63 65 20 25 64 20 64 6f |Sub-devi|ce %d do|
|000061f0| 65 73 20 6e 6f 74 20 65 | 78 69 73 74 20 28 6f 6e |es not e|xist (on|
|00006200| 6c 79 20 25 64 29 2e 5c | 6e 22 2c 0a 09 09 20 20 |ly %d).\|n",... |
|00006210| 20 20 6d 69 6e 6f 72 28 | 64 65 76 29 2c 6e 6c 69 | minor(|dev),nli|
|00006220| 6e 65 73 29 3b 0a 09 09 | 72 65 74 75 72 6e 28 2d |nes);...|return(-|
|00006230| 31 29 3b 0a 09 7d 0a 0a | 09 28 76 6f 69 64 29 6c |1);..}..|.(void)l|
|00006240| 73 65 65 6b 28 6b 6d 65 | 6d 2c 28 6f 66 66 5f 74 |seek(kme|m,(off_t|
|00006250| 29 61 64 64 72 2c 30 29 | 3b 0a 09 28 76 6f 69 64 |)addr,0)|;..(void|
|00006260| 29 72 65 61 64 28 6b 6d | 65 6d 2c 28 63 68 61 72 |)read(km|em,(char|
|00006270| 20 2a 29 20 26 75 62 69 | 6e 66 6f 2c 73 69 7a 65 | *) &ubi|nfo,size|
|00006280| 6f 66 20 75 62 69 6e 66 | 6f 29 3b 0a 09 28 76 6f |of ubinf|o);..(vo|
|00006290| 69 64 29 6c 73 65 65 6b | 28 6b 6d 65 6d 2c 28 6f |id)lseek|(kmem,(o|
|000062a0| 66 66 5f 74 29 20 26 28 | 75 62 69 6e 66 6f 2d 3e |ff_t) &(|ubinfo->|
|000062b0| 75 69 5f 66 6c 61 67 73 | 29 2c 30 29 3b 0a 09 28 |ui_flags|),0);..(|
|000062c0| 76 6f 69 64 29 72 65 61 | 64 28 6b 6d 65 6d 2c 28 |void)rea|d(kmem,(|
|000062d0| 63 68 61 72 20 2a 29 20 | 26 66 6c 61 67 73 2c 73 |char *) |&flags,s|
|000062e0| 69 7a 65 6f 66 20 66 6c | 61 67 73 29 3b 0a 0a 09 |izeof fl|ags);...|
|000062f0| 74 66 6c 61 67 73 20 3d | 20 31 3c 3c 6c 69 6e 65 |tflags =| 1<<line|
|00006300| 3b 0a 09 72 65 73 65 74 | 6d 6f 64 65 6d 20 3d 20 |;..reset|modem = |
|00006310| 28 28 66 6c 61 67 73 26 | 74 66 6c 61 67 73 29 20 |((flags&|tflags) |
|00006320| 3d 3d 20 30 29 3b 0a 09 | 66 6c 61 67 73 20 3d 20 |== 0);..|flags = |
|00006330| 65 6e 61 62 6c 65 20 3f | 20 28 66 6c 61 67 73 20 |enable ?| (flags |
|00006340| 26 20 7e 74 66 6c 61 67 | 73 29 20 3a 20 28 66 6c |& ~tflag|s) : (fl|
|00006350| 61 67 73 20 7c 20 74 66 | 6c 61 67 73 29 3b 0a 09 |ags | tf|lags);..|
|00006360| 28 76 6f 69 64 29 6c 73 | 65 65 6b 28 6b 6d 65 6d |(void)ls|eek(kmem|
|00006370| 2c 28 6f 66 66 5f 74 29 | 20 26 28 75 62 69 6e 66 |,(off_t)| &(ubinf|
|00006380| 6f 2d 3e 75 69 5f 66 6c | 61 67 73 29 2c 30 29 3b |o->ui_fl|ags),0);|
|00006390| 0a 09 28 76 6f 69 64 29 | 77 72 69 74 65 28 6b 6d |..(void)|write(km|
|000063a0| 65 6d 2c 28 63 68 61 72 | 20 2a 29 20 26 66 6c 61 |em,(char| *) &fla|
|000063b0| 67 73 2c 20 73 69 7a 65 | 6f 66 20 66 6c 61 67 73 |gs, size|of flags|
|000063c0| 29 3b 0a 09 73 77 69 74 | 63 68 28 64 65 76 74 79 |);..swit|ch(devty|
|000063d0| 70 65 29 20 7b 0a 09 09 | 63 61 73 65 20 44 5a 31 |pe) {...|case DZ1|
|000063e0| 31 3a 0a 09 09 09 69 66 | 28 28 61 64 64 72 20 3d |1:....if|((addr =|
|000063f0| 20 4e 4c 56 41 4c 55 45 | 28 44 5a 53 43 41 52 29 | NLVALUE|(DZSCAR)|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.