home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: SHell self-extracting ARchive
(archive/shar).
You can browse this item here: portmap_3.shar
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| ASCII text
| default
| |
100%
| TrID
| Scribe Markup
| default (weak)
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 40 28 23 29 20 42 4c 55 | 52 42 20 31 2e 33 20 39 |@(#) BLU|RB 1.3 9|
|00000010| 33 2f 31 31 2f 32 31 20 | 31 37 3a 34 31 3a 34 30 |3/11/21 |17:41:40|
|00000020| 0a 0a 54 68 69 73 20 69 | 73 20 74 68 65 20 74 68 |..This i|s the th|
|00000030| 69 72 64 20 72 65 70 6c | 61 63 65 6d 65 6e 74 20 |ird repl|acement |
|00000040| 70 6f 72 74 6d 61 70 70 | 65 72 20 72 65 6c 65 61 |portmapp|er relea|
|00000050| 73 65 2e 0a 0a 54 68 65 | 72 65 20 69 73 20 61 6e |se...The|re is an|
|00000060| 20 69 6e 63 72 65 61 73 | 69 6e 67 20 69 6e 74 65 | increas|ing inte|
|00000070| 72 65 73 74 20 69 6e 20 | 61 63 63 65 73 73 20 63 |rest in |access c|
|00000080| 6f 6e 74 72 6f 6c 20 66 | 6f 72 20 74 68 65 20 4e |ontrol f|or the N|
|00000090| 49 53 2c 20 6d 6f 75 6e | 74 0a 61 6e 64 20 6f 74 |IS, moun|t.and ot|
|000000a0| 68 65 72 20 52 50 43 2d | 62 61 73 65 64 20 73 65 |her RPC-|based se|
|000000b0| 72 76 69 63 65 73 20 74 | 68 61 74 20 61 72 65 20 |rvices t|hat are |
|000000c0| 6e 6f 72 6d 61 6c 6c 79 | 20 72 65 67 69 73 74 65 |normally| registe|
|000000d0| 72 65 64 20 77 69 74 68 | 20 74 68 65 0a 70 6f 72 |red with| the.por|
|000000e0| 74 6d 61 70 20 70 72 6f | 63 65 73 73 2e 20 50 6f |tmap pro|cess. Po|
|000000f0| 73 73 69 62 6c 65 20 61 | 74 74 61 63 6b 73 20 6f |ssible a|ttacks o|
|00000100| 6e 20 52 50 43 20 64 61 | 65 6d 6f 6e 73 20 69 6e |n RPC da|emons in|
|00000110| 76 6f 6c 76 65 3a 0a 0a | 20 20 20 20 2d 20 74 68 |volve:..| - th|
|00000120| 65 66 74 20 6f 66 20 4e | 49 53 20 28 59 50 29 20 |eft of N|IS (YP) |
|00000130| 70 61 73 73 77 6f 72 64 | 20 66 69 6c 65 73 0a 0a |password| files..|
|00000140| 20 20 20 20 2d 20 79 70 | 73 65 74 20 74 6f 20 66 | - yp|set to f|
|00000150| 6f 72 63 65 20 68 6f 73 | 74 73 20 74 6f 20 62 69 |orce hos|ts to bi|
|00000160| 6e 64 20 74 6f 20 61 20 | 72 6f 67 75 65 20 4e 49 |nd to a |rogue NI|
|00000170| 53 20 28 59 50 29 20 73 | 65 72 76 65 72 0a 0a 20 |S (YP) s|erver.. |
|00000180| 20 20 20 2d 20 74 68 65 | 66 74 20 6f 66 20 4e 46 | - the|ft of NF|
|00000190| 53 20 66 69 6c 65 20 68 | 61 6e 64 6c 65 73 0a 0a |S file h|andles..|
|000001a0| 4d 79 20 63 6f 6e 74 72 | 69 62 75 74 69 6f 6e 20 |My contr|ibution |
|000001b0| 69 73 20 61 20 72 65 70 | 6c 61 63 65 6d 65 6e 74 |is a rep|lacement|
|000001c0| 20 70 6f 72 74 6d 61 70 | 20 70 72 6f 67 72 61 6d | portmap| program|
|000001d0| 2c 20 64 65 72 69 76 65 | 64 20 66 72 6f 6d 20 73 |, derive|d from s|
|000001e0| 6f 75 72 63 65 0a 63 6f | 64 65 20 69 6e 20 74 68 |ource.co|de in th|
|000001f0| 65 20 52 50 43 53 52 43 | 20 34 2e 30 20 61 6e 64 |e RPCSRC| 4.0 and|
|00000200| 20 74 68 65 20 54 49 52 | 50 43 20 73 6f 75 72 63 | the TIR|PC sourc|
|00000210| 65 20 64 69 73 74 72 69 | 62 75 74 69 6f 6e 73 2e |e distri|butions.|
|00000220| 20 20 41 63 63 65 73 73 | 0a 63 6f 6e 74 72 6f 6c | Access|.control|
|00000230| 20 69 73 20 69 6e 20 74 | 68 65 20 73 74 79 6c 65 | is in t|he style|
|00000240| 20 6f 66 20 6d 79 20 74 | 63 70 20 77 72 61 70 70 | of my t|cp wrapp|
|00000250| 65 72 20 28 6c 6f 67 5f | 74 63 70 29 20 70 61 63 |er (log_|tcp) pac|
|00000260| 6b 61 67 65 2e 20 49 74 | 20 73 68 6f 75 6c 64 0a |kage. It| should.|
|00000270| 77 6f 72 6b 20 77 69 74 | 68 20 61 6c 6c 20 53 75 |work wit|h all Su|
|00000280| 6e 4f 53 20 34 2e 78 20 | 61 6e 64 20 55 6c 74 72 |nOS 4.x |and Ultr|
|00000290| 69 78 20 3e 3d 20 33 2e | 30 20 72 65 6c 65 61 73 |ix >= 3.|0 releas|
|000002a0| 65 73 2e 20 48 6f 77 65 | 76 65 72 2c 20 74 68 65 |es. Howe|ver, the|
|000002b0| 20 73 6f 75 72 63 65 0a | 69 73 20 72 65 61 73 6f | source.|is reaso|
|000002c0| 6e 61 62 6c 79 20 70 6f | 72 74 61 62 6c 65 20 61 |nably po|rtable a|
|000002d0| 6e 64 20 74 68 65 20 63 | 6f 64 65 20 73 68 6f 75 |nd the c|ode shou|
|000002e0| 6c 64 20 77 6f 72 6b 20 | 6f 6e 20 6d 6f 73 74 20 |ld work |on most |
|000002f0| 55 4e 49 58 20 73 79 73 | 74 65 6d 73 0a 74 68 61 |UNIX sys|tems.tha|
|00000300| 74 20 70 72 6f 76 69 64 | 65 20 53 55 4e 52 50 43 |t provid|e SUNRPC|
|00000310| 20 6f 6e 20 74 6f 70 20 | 6f 66 20 42 53 44 2d 73 | on top |of BSD-s|
|00000320| 74 79 6c 65 20 54 43 50 | 2f 49 50 2e 20 53 79 73 |tyle TCP|/IP. Sys|
|00000330| 74 65 6d 20 56 2e 34 20 | 73 75 70 70 6f 72 74 20 |tem V.4 |support |
|00000340| 69 73 0a 70 72 6f 62 6c | 65 6d 61 74 69 63 2c 20 |is.probl|ematic, |
|00000350| 74 68 6f 75 67 68 2e 0a | 0a 54 68 65 20 70 72 65 |though..|.The pre|
|00000360| 73 65 6e 74 20 70 6f 72 | 74 6d 61 70 20 76 65 72 |sent por|tmap ver|
|00000370| 73 69 6f 6e 20 61 74 74 | 65 6d 70 74 73 20 74 6f |sion att|empts to|
|00000380| 20 63 6c 6f 73 65 20 61 | 6c 6c 20 70 6f 72 74 6d | close a|ll portm|
|00000390| 61 70 20 73 65 63 75 72 | 69 74 79 0a 70 72 6f 62 |ap secur|ity.prob|
|000003a0| 6c 65 6d 73 20 74 68 61 | 74 20 61 72 65 20 6b 6e |lems tha|t are kn|
|000003b0| 6f 77 6e 20 74 6f 20 6d | 65 2e 20 49 74 20 73 68 |own to m|e. It sh|
|000003c0| 6f 75 6c 64 20 62 65 20 | 61 73 20 73 65 63 75 72 |ould be |as secur|
|000003d0| 65 20 61 73 20 74 68 65 | 20 70 6f 72 74 6d 61 70 |e as the| portmap|
|000003e0| 0a 64 61 65 6d 6f 6e 20 | 74 68 61 74 20 63 6f 6d |.daemon |that com|
|000003f0| 65 73 20 77 69 74 68 20 | 74 68 65 20 53 75 6e 4f |es with |the SunO|
|00000400| 53 20 34 2e 78 20 70 6f | 72 74 6d 61 70 2b 4e 49 |S 4.x po|rtmap+NI|
|00000410| 53 20 70 61 74 63 68 20 | 28 70 61 74 63 68 20 69 |S patch |(patch i|
|00000420| 64 0a 31 30 30 34 38 32 | 2d 30 32 29 2e 20 54 68 |d.100482|-02). Th|
|00000430| 65 20 52 45 41 44 4d 45 | 20 66 69 6c 65 20 67 69 |e README| file gi|
|00000440| 76 65 73 20 61 20 63 6f | 6d 70 6c 65 74 65 20 6c |ves a co|mplete l|
|00000450| 69 73 74 20 6f 66 20 73 | 65 63 75 72 69 74 79 0a |ist of s|ecurity.|
|00000460| 66 65 61 74 75 72 65 73 | 2e 0a 0a 57 69 74 68 6f |features|...Witho|
|00000470| 75 74 20 74 68 65 20 61 | 76 61 69 6c 61 62 69 6c |ut the a|vailabil|
|00000480| 69 74 79 20 6f 66 20 70 | 6f 72 74 6d 61 70 20 73 |ity of p|ortmap s|
|00000490| 6f 75 72 63 65 2c 20 70 | 6f 73 73 69 62 6c 65 20 |ource, p|ossible |
|000004a0| 61 6c 74 65 72 6e 61 74 | 69 76 65 73 20 61 72 65 |alternat|ives are|
|000004b0| 0a 31 29 20 70 61 63 6b | 65 74 20 66 69 6c 74 65 |.1) pack|et filte|
|000004c0| 72 69 6e 67 20 77 69 74 | 68 20 61 20 73 6d 61 72 |ring wit|h a smar|
|000004d0| 74 20 72 6f 75 74 65 72 | 3b 20 32 29 20 6c 69 6e |t router|; 2) lin|
|000004e0| 6b 69 6e 67 20 74 68 65 | 20 70 6f 72 74 6d 61 70 |king the| portmap|
|000004f0| 0a 65 78 65 63 75 74 61 | 62 6c 65 20 61 67 61 69 |.executa|ble agai|
|00000500| 6e 73 74 20 74 68 65 20 | 73 65 63 75 72 65 6c 69 |nst the |secureli|
|00000510| 62 20 73 68 61 72 65 64 | 20 6c 69 62 72 61 72 79 |b shared| library|
|00000520| 2e 20 4c 69 6e 6b 69 6e | 67 20 52 50 43 20 64 61 |. Linkin|g RPC da|
|00000530| 65 6d 6f 6e 73 0a 61 67 | 61 69 6e 73 74 20 74 68 |emons.ag|ainst th|
|00000540| 65 20 73 65 63 75 72 65 | 6c 69 62 20 6c 69 62 72 |e secure|lib libr|
|00000550| 61 72 79 20 69 73 20 61 | 20 67 6f 6f 64 20 69 64 |ary is a| good id|
|00000560| 65 61 2c 20 61 6e 79 77 | 61 79 2e 0a 0a 54 68 65 |ea, anyw|ay...The|
|00000570| 20 73 6f 75 72 63 65 20 | 69 73 20 61 76 61 69 6c | source |is avail|
|00000580| 61 62 6c 65 20 66 6f 72 | 20 61 6e 6f 6e 79 6d 6f |able for| anonymo|
|00000590| 75 73 20 46 54 50 20 66 | 72 6f 6d 20 66 74 70 2e |us FTP f|rom ftp.|
|000005a0| 77 69 6e 2e 74 75 65 2e | 6e 6c 20 64 69 72 65 63 |win.tue.|nl direc|
|000005b0| 74 6f 72 79 0a 2f 70 75 | 62 2f 73 65 63 75 72 69 |tory./pu|b/securi|
|000005c0| 74 79 2f 70 6f 72 74 6d | 61 70 5f 2a 2e 73 68 61 |ty/portm|ap_*.sha|
|000005d0| 72 2e 5a 2e 0a 0a 09 57 | 69 65 74 73 65 20 56 65 |r.Z....W|ietse Ve|
|000005e0| 6e 65 6d 61 20 28 77 69 | 65 74 73 65 40 77 7a 76 |nema (wi|etse@wzv|
|000005f0| 2e 77 69 6e 2e 74 75 65 | 2e 6e 6c 29 0a 09 4d 61 |.win.tue|.nl)..Ma|
|00000600| 74 68 65 6d 61 74 69 63 | 73 20 61 6e 64 20 43 6f |thematic|s and Co|
|00000610| 6d 70 75 74 69 6e 67 20 | 53 63 69 65 6e 63 65 0a |mputing |Science.|
|00000620| 09 45 69 6e 64 68 6f 76 | 65 6e 20 55 6e 69 76 65 |.Eindhov|en Unive|
|00000630| 72 73 69 74 79 20 6f 66 | 20 54 65 63 68 6e 6f 6c |rsity of| Technol|
|00000640| 6f 67 79 0a 09 54 68 65 | 20 4e 65 74 68 65 72 6c |ogy..The| Netherl|
|00000650| 61 6e 64 73 0a 0a 23 21 | 20 2f 62 69 6e 2f 73 68 |ands..#!| /bin/sh|
|00000660| 0a 23 20 54 68 69 73 20 | 69 73 20 61 20 73 68 65 |.# This |is a she|
|00000670| 6c 6c 20 61 72 63 68 69 | 76 65 2e 20 20 52 65 6d |ll archi|ve. Rem|
|00000680| 6f 76 65 20 61 6e 79 74 | 68 69 6e 67 20 62 65 66 |ove anyt|hing bef|
|00000690| 6f 72 65 20 74 68 69 73 | 20 6c 69 6e 65 2c 20 74 |ore this| line, t|
|000006a0| 68 65 6e 20 75 6e 70 61 | 63 6b 0a 23 20 69 74 20 |hen unpa|ck.# it |
|000006b0| 62 79 20 73 61 76 69 6e | 67 20 69 74 20 69 6e 74 |by savin|g it int|
|000006c0| 6f 20 61 20 66 69 6c 65 | 20 61 6e 64 20 74 79 70 |o a file| and typ|
|000006d0| 69 6e 67 20 22 73 68 20 | 66 69 6c 65 22 2e 20 20 |ing "sh |file". |
|000006e0| 54 6f 20 6f 76 65 72 77 | 72 69 74 65 20 65 78 69 |To overw|rite exi|
|000006f0| 73 74 69 6e 67 0a 23 20 | 66 69 6c 65 73 2c 20 74 |sting.# |files, t|
|00000700| 79 70 65 20 22 73 68 20 | 66 69 6c 65 20 2d 63 22 |ype "sh |file -c"|
|00000710| 2e 20 20 59 6f 75 20 63 | 61 6e 20 61 6c 73 6f 20 |. You c|an also |
|00000720| 66 65 65 64 20 74 68 69 | 73 20 61 73 20 73 74 61 |feed thi|s as sta|
|00000730| 6e 64 61 72 64 20 69 6e | 70 75 74 20 76 69 61 0a |ndard in|put via.|
|00000740| 23 20 75 6e 73 68 61 72 | 2c 20 6f 72 20 62 79 20 |# unshar|, or by |
|00000750| 74 79 70 69 6e 67 20 22 | 73 68 20 3c 66 69 6c 65 |typing "|sh <file|
|00000760| 22 2c 20 65 2e 67 2e 2e | 20 20 49 66 20 74 68 69 |", e.g..| If thi|
|00000770| 73 20 61 72 63 68 69 76 | 65 20 69 73 20 63 6f 6d |s archiv|e is com|
|00000780| 70 6c 65 74 65 2c 20 79 | 6f 75 0a 23 20 77 69 6c |plete, y|ou.# wil|
|00000790| 6c 20 73 65 65 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |l see th|e follow|
|000007a0| 69 6e 67 20 6d 65 73 73 | 61 67 65 20 61 74 20 74 |ing mess|age at t|
|000007b0| 68 65 20 65 6e 64 3a 0a | 23 09 09 22 45 6e 64 20 |he end:.|#.."End |
|000007c0| 6f 66 20 73 68 65 6c 6c | 20 61 72 63 68 69 76 65 |of shell| archive|
|000007d0| 2e 22 0a 23 20 43 6f 6e | 74 65 6e 74 73 3a 20 20 |.".# Con|tents: |
|000007e0| 52 45 41 44 4d 45 20 4d | 61 6b 65 66 69 6c 65 20 |README M|akefile |
|000007f0| 70 6f 72 74 6d 61 70 2e | 63 20 64 61 65 6d 6f 6e |portmap.|c daemon|
|00000800| 2e 63 20 73 74 72 65 72 | 72 6f 72 2e 63 0a 23 20 |.c strer|ror.c.# |
|00000810| 20 20 64 69 66 66 73 5f | 77 72 74 5f 62 73 64 20 | diffs_|wrt_bsd |
|00000820| 70 6d 61 70 5f 64 75 6d | 70 2e 63 20 70 6d 61 70 |pmap_dum|p.c pmap|
|00000830| 5f 73 65 74 2e 63 20 66 | 72 6f 6d 5f 6c 6f 63 61 |_set.c f|rom_loca|
|00000840| 6c 2e 63 20 70 6d 61 70 | 5f 63 68 65 63 6b 2e 63 |l.c pmap|_check.c|
|00000850| 0a 23 20 20 20 70 6d 61 | 70 5f 63 68 65 63 6b 2e |.# pma|p_check.|
|00000860| 68 20 42 4c 55 52 42 0a | 23 20 57 72 61 70 70 65 |h BLURB.|# Wrappe|
|00000870| 64 20 62 79 20 77 69 65 | 74 73 65 40 77 7a 76 20 |d by wie|tse@wzv |
|00000880| 6f 6e 20 53 75 6e 20 4e | 6f 76 20 32 31 20 32 31 |on Sun N|ov 21 21|
|00000890| 3a 33 34 3a 35 34 20 31 | 39 39 33 0a 50 41 54 48 |:34:54 1|993.PATH|
|000008a0| 3d 2f 62 69 6e 3a 2f 75 | 73 72 2f 62 69 6e 3a 2f |=/bin:/u|sr/bin:/|
|000008b0| 75 73 72 2f 75 63 62 20 | 3b 20 65 78 70 6f 72 74 |usr/ucb |; export|
|000008c0| 20 50 41 54 48 0a 69 66 | 20 74 65 73 74 20 2d 66 | PATH.if| test -f|
|000008d0| 20 52 45 41 44 4d 45 20 | 2d 61 20 22 24 7b 31 7d | README |-a "${1}|
|000008e0| 22 20 21 3d 20 22 2d 63 | 22 20 3b 20 74 68 65 6e |" != "-c|" ; then|
|000008f0| 20 0a 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 57 | . echo| shar: W|
|00000900| 69 6c 6c 20 6e 6f 74 20 | 6f 76 65 72 2d 77 72 69 |ill not |over-wri|
|00000910| 74 65 20 65 78 69 73 74 | 69 6e 67 20 66 69 6c 65 |te exist|ing file|
|00000920| 20 5c 22 52 45 41 44 4d | 45 5c 22 0a 65 6c 73 65 | \"READM|E\".else|
|00000930| 0a 65 63 68 6f 20 73 68 | 61 72 3a 20 45 78 74 72 |.echo sh|ar: Extr|
|00000940| 61 63 74 69 6e 67 20 5c | 22 52 45 41 44 4d 45 5c |acting \|"README\|
|00000950| 22 20 5c 28 38 31 32 32 | 20 63 68 61 72 61 63 74 |" \(8122| charact|
|00000960| 65 72 73 5c 29 0a 73 65 | 64 20 22 73 2f 5e 58 2f |ers\).se|d "s/^X/|
|00000970| 2f 22 20 3e 52 45 41 44 | 4d 45 20 3c 3c 27 45 4e |/" >READ|ME <<'EN|
|00000980| 44 5f 4f 46 5f 52 45 41 | 44 4d 45 27 0a 58 40 28 |D_OF_REA|DME'.X@(|
|00000990| 23 29 20 52 45 41 44 4d | 45 20 31 2e 35 20 39 33 |#) READM|E 1.5 93|
|000009a0| 2f 31 31 2f 32 31 20 32 | 31 3a 32 35 3a 33 34 0a |/11/21 2|1:25:34.|
|000009b0| 58 0a 58 54 68 69 73 20 | 69 73 20 74 68 65 20 52 |X.XThis |is the R|
|000009c0| 45 41 44 4d 45 20 66 69 | 6c 65 20 66 6f 72 20 74 |EADME fi|le for t|
|000009d0| 68 65 20 33 72 64 20 65 | 6e 68 61 6e 63 65 64 20 |he 3rd e|nhanced |
|000009e0| 70 6f 72 74 6d 61 70 70 | 65 72 20 72 65 6c 65 61 |portmapp|er relea|
|000009f0| 73 65 2e 0a 58 0a 58 44 | 65 73 63 72 69 70 74 69 |se..X.XD|escripti|
|00000a00| 6f 6e 0a 58 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0a |on.X----|-------.|
|00000a10| 58 0a 58 54 68 69 73 20 | 52 45 41 44 4d 45 20 64 |X.XThis |README d|
|00000a20| 65 73 63 72 69 62 65 73 | 20 61 20 72 65 70 6c 61 |escribes| a repla|
|00000a30| 63 65 6d 65 6e 74 20 70 | 6f 72 74 6d 61 70 70 65 |cement p|ortmappe|
|00000a40| 72 20 77 69 74 68 20 61 | 63 63 65 73 73 20 63 6f |r with a|ccess co|
|00000a50| 6e 74 72 6f 6c 20 69 6e | 0a 58 74 68 65 20 73 74 |ntrol in|.Xthe st|
|00000a60| 79 6c 65 20 6f 66 20 74 | 68 65 20 74 63 70 20 77 |yle of t|he tcp w|
|00000a70| 72 61 70 70 65 72 20 28 | 6c 6f 67 5f 74 63 70 29 |rapper (|log_tcp)|
|00000a80| 20 70 61 63 6b 61 67 65 | 20 61 6e 64 20 61 20 68 | package| and a h|
|00000a90| 61 6e 64 66 75 6c 20 6f | 66 20 6f 74 68 65 72 0a |andful o|f other.|
|00000aa0| 58 65 6e 68 61 6e 63 65 | 6d 65 6e 74 73 2e 20 20 |Xenhance|ments. |
|00000ab0| 54 68 65 20 70 6f 72 74 | 6d 61 70 70 65 72 20 70 |The port|mapper p|
|00000ac0| 72 6f 76 69 64 65 73 20 | 61 20 73 69 6d 70 6c 65 |rovides |a simple|
|00000ad0| 20 6d 65 63 68 61 6e 69 | 73 6d 20 74 6f 20 64 69 | mechani|sm to di|
|00000ae0| 73 63 6f 75 72 61 67 65 | 0a 58 61 63 63 65 73 73 |scourage|.Xaccess|
|00000af0| 20 74 6f 20 74 68 65 20 | 4e 49 53 20 28 59 50 29 | to the |NIS (YP)|
|00000b00| 2c 20 4e 46 53 2c 20 61 | 6e 64 20 6f 74 68 65 72 |, NFS, a|nd other|
|00000b10| 20 73 65 72 76 69 63 65 | 73 20 72 65 67 69 73 74 | service|s regist|
|00000b20| 65 72 65 64 20 77 69 74 | 68 20 74 68 65 0a 58 70 |ered wit|h the.Xp|
|00000b30| 6f 72 74 6d 61 70 70 65 | 72 2e 0a 58 0a 58 4c 69 |ortmappe|r..X.XLi|
|00000b40| 6b 65 20 61 6c 6c 20 70 | 6f 72 74 6d 61 70 70 65 |ke all p|ortmappe|
|00000b50| 72 73 2c 20 74 68 69 73 | 20 6f 6e 65 20 69 73 20 |rs, this| one is |
|00000b60| 69 6e 74 65 6e 64 65 64 | 20 74 6f 20 62 65 20 73 |intended| to be s|
|00000b70| 74 61 72 74 65 64 20 61 | 74 20 62 6f 6f 74 20 74 |tarted a|t boot t|
|00000b80| 69 6d 65 2e 0a 58 44 61 | 65 6d 6f 6e 73 20 74 68 |ime..XDa|emons th|
|00000b90| 61 74 20 6f 66 66 65 72 | 20 52 50 43 20 73 65 72 |at offer| RPC ser|
|00000ba0| 76 69 63 65 73 20 74 65 | 6c 6c 20 74 68 65 20 70 |vices te|ll the p|
|00000bb0| 6f 72 74 6d 61 70 70 65 | 72 20 6f 6e 20 77 68 61 |ortmappe|r on wha|
|00000bc0| 74 20 70 6f 72 74 20 74 | 68 65 79 0a 58 6c 69 73 |t port t|hey.Xlis|
|00000bd0| 74 65 6e 2e 20 55 6e 6c | 69 6b 65 20 74 68 65 20 |ten. Unl|ike the |
|00000be0| 77 65 6c 6c 2d 6b 6e 6f | 77 6e 20 73 65 72 76 69 |well-kno|wn servi|
|00000bf0| 63 65 73 20 72 65 67 69 | 73 74 65 72 65 64 20 77 |ces regi|stered w|
|00000c00| 69 74 68 20 74 68 65 20 | 69 6e 65 74 64 2c 20 52 |ith the |inetd, R|
|00000c10| 50 43 0a 58 6e 65 74 77 | 6f 72 6b 20 70 6f 72 74 |PC.Xnetw|ork port|
|00000c20| 20 6e 75 6d 62 65 72 73 | 20 6d 61 79 20 63 68 61 | numbers| may cha|
|00000c30| 6e 67 65 20 65 61 63 68 | 20 74 69 6d 65 20 74 68 |nge each| time th|
|00000c40| 65 20 73 79 73 74 65 6d | 20 69 73 20 62 6f 6f 74 |e system| is boot|
|00000c50| 65 64 2e 0a 58 57 68 65 | 6e 65 76 65 72 20 61 20 |ed..XWhe|never a |
|00000c60| 63 6c 69 65 6e 74 20 77 | 61 6e 74 73 20 74 6f 20 |client w|ants to |
|00000c70| 75 73 65 20 61 6e 20 52 | 50 43 20 73 65 72 76 69 |use an R|PC servi|
|00000c80| 63 65 20 69 74 20 69 73 | 20 73 75 70 70 6f 73 65 |ce it is| suppose|
|00000c90| 64 20 74 6f 20 66 69 72 | 73 74 0a 58 61 73 6b 20 |d to fir|st.Xask |
|00000ca0| 74 68 65 20 70 6f 72 74 | 6d 61 70 70 65 72 20 6f |the port|mapper o|
|00000cb0| 6e 20 77 68 61 74 20 70 | 6f 72 74 20 74 68 65 20 |n what p|ort the |
|00000cc0| 63 6f 72 72 65 73 70 6f | 6e 64 69 6e 67 20 64 61 |correspo|nding da|
|00000cd0| 65 6d 6f 6e 20 69 73 20 | 6c 69 73 74 65 6e 69 6e |emon is |listenin|
|00000ce0| 67 2e 0a 58 54 68 65 20 | 72 70 63 69 6e 66 6f 20 |g..XThe |rpcinfo |
|00000cf0| 63 6f 6d 6d 61 6e 64 20 | 63 61 6e 20 74 65 6c 6c |command |can tell|
|00000d00| 20 79 6f 75 20 77 68 61 | 74 20 52 50 43 20 73 65 | you wha|t RPC se|
|00000d10| 72 76 69 63 65 73 20 79 | 6f 75 72 20 73 79 73 74 |rvices y|our syst|
|00000d20| 65 6d 20 6f 66 66 65 72 | 73 2e 0a 58 0a 58 41 73 |em offer|s..X.XAs|
|00000d30| 20 64 65 73 63 72 69 62 | 65 64 20 69 6e 20 74 68 | describ|ed in th|
|00000d40| 65 20 66 65 61 74 75 72 | 65 73 20 73 65 63 74 69 |e featur|es secti|
|00000d50| 6f 6e 20 62 65 6c 6f 77 | 2c 20 74 68 65 20 72 65 |on below|, the re|
|00000d60| 70 6c 61 63 65 6d 65 6e | 74 20 70 6f 72 74 6d 61 |placemen|t portma|
|00000d70| 70 70 65 72 0a 58 63 61 | 6e 20 70 72 65 76 65 6e |pper.Xca|n preven|
|00000d80| 74 20 75 6e 64 65 73 69 | 72 61 62 6c 65 20 63 6c |t undesi|rable cl|
|00000d90| 69 65 6e 74 2d 73 65 72 | 76 65 72 20 69 6e 74 65 |ient-ser|ver inte|
|00000da0| 72 61 63 74 69 6f 6e 73 | 2e 20 20 49 6e 20 73 6f |ractions|. In so|
|00000db0| 6d 65 20 63 61 73 65 73 | 2c 0a 58 62 65 74 74 65 |me cases|,.Xbette|
|00000dc0| 72 20 6f 72 20 65 71 75 | 69 76 61 6c 65 6e 74 20 |r or equ|ivalent |
|00000dd0| 61 6c 74 65 72 6e 61 74 | 69 76 65 73 20 61 72 65 |alternat|ives are|
|00000de0| 20 61 76 61 69 6c 61 62 | 6c 65 3a 0a 58 0a 58 20 | availab|le:.X.X |
|00000df0| 20 20 20 54 68 65 20 53 | 75 6e 4f 53 20 70 6f 72 | The S|unOS por|
|00000e00| 74 6d 61 70 20 74 68 61 | 74 20 69 73 20 70 72 6f |tmap tha|t is pro|
|00000e10| 76 69 64 65 64 20 77 69 | 74 68 20 70 61 74 63 68 |vided wi|th patch|
|00000e20| 20 69 64 20 31 30 30 34 | 38 32 2d 30 32 20 73 68 | id 1004|82-02 sh|
|00000e30| 6f 75 6c 64 0a 58 20 20 | 20 20 63 6c 6f 73 65 20 |ould.X | close |
|00000e40| 74 68 65 20 73 61 6d 65 | 20 73 65 63 75 72 69 74 |the same| securit|
|00000e50| 79 20 68 6f 6c 65 73 2e | 20 20 49 6e 20 61 64 64 |y holes.| In add|
|00000e60| 69 74 69 6f 6e 2c 20 69 | 74 20 70 72 6f 76 69 64 |ition, i|t provid|
|00000e70| 65 73 20 4e 49 53 0a 58 | 20 20 20 20 64 61 65 6d |es NIS.X| daem|
|00000e80| 6f 6e 73 20 77 69 74 68 | 20 74 68 65 69 72 20 6f |ons with| their o|
|00000e90| 77 6e 20 61 63 63 65 73 | 73 20 63 6f 6e 74 72 6f |wn acces|s contro|
|00000ea0| 6c 20 6c 69 73 74 73 2e | 20 54 68 69 73 20 69 73 |l lists.| This is|
|00000eb0| 20 62 65 74 74 65 72 20 | 74 68 61 6e 0a 58 20 20 | better |than.X |
|00000ec0| 20 20 6a 75 73 74 20 70 | 6f 72 74 6d 61 70 70 65 | just p|ortmappe|
|00000ed0| 72 20 61 63 63 65 73 73 | 20 63 6f 6e 74 72 6f 6c |r access| control|
|00000ee0| 2e 0a 58 0a 58 20 20 20 | 20 54 68 65 20 22 73 65 |..X.X | The "se|
|00000ef0| 63 75 72 65 6c 69 62 22 | 20 73 68 61 72 65 64 20 |curelib"| shared |
|00000f00| 6c 69 62 72 61 72 79 20 | 28 65 65 63 73 2e 6e 77 |library |(eecs.nw|
|00000f10| 75 2e 65 64 75 3a 2f 70 | 75 62 2f 73 65 63 75 72 |u.edu:/p|ub/secur|
|00000f20| 65 6c 69 62 2e 74 61 72 | 29 0a 58 20 20 20 20 69 |elib.tar|).X i|
|00000f30| 6d 70 6c 65 6d 65 6e 74 | 73 20 61 63 63 65 73 73 |mplement|s access|
|00000f40| 20 63 6f 6e 74 72 6f 6c | 20 66 6f 72 20 61 6c 6c | control| for all|
|00000f50| 20 6b 69 6e 64 73 20 6f | 66 20 28 52 50 43 29 20 | kinds o|f (RPC) |
|00000f60| 73 65 72 76 69 63 65 73 | 2c 20 6e 6f 74 0a 58 20 |services|, not.X |
|00000f70| 20 20 20 6a 75 73 74 20 | 74 68 65 20 70 6f 72 74 | just |the port|
|00000f80| 6d 61 70 70 65 72 2e 0a | 58 0a 58 20 20 20 20 52 |mapper..|X.X R|
|00000f90| 65 70 6f 72 74 65 64 6c | 79 2c 20 49 72 69 78 20 |eportedl|y, Irix |
|00000fa0| 34 2e 30 2e 78 20 61 6c | 72 65 61 64 79 20 68 61 |4.0.x al|ready ha|
|00000fb0| 73 20 61 20 73 65 63 75 | 72 65 64 20 70 6f 72 74 |s a secu|red port|
|00000fc0| 6d 61 70 70 65 72 2e 0a | 58 0a 58 48 6f 77 65 76 |mapper..|X.XHowev|
|00000fd0| 65 72 2c 20 76 65 6e 64 | 6f 72 73 20 73 74 69 6c |er, vend|ors stil|
|00000fe0| 6c 20 73 68 69 70 20 70 | 6f 72 74 6d 61 70 20 69 |l ship p|ortmap i|
|00000ff0| 6d 70 6c 65 6d 65 6e 74 | 61 74 69 6f 6e 73 20 74 |mplement|ations t|
|00001000| 68 61 74 20 61 6c 6c 6f | 77 20 61 6e 79 6f 6e 65 |hat allo|w anyone|
|00001010| 0a 58 74 6f 20 72 65 61 | 64 20 6f 72 20 6d 6f 64 |.Xto rea|d or mod|
|00001020| 69 66 79 20 69 74 73 20 | 74 61 62 6c 65 73 20 61 |ify its |tables a|
|00001030| 6e 64 20 74 68 61 74 20 | 77 69 6c 6c 20 68 61 70 |nd that |will hap|
|00001040| 70 69 6c 79 20 66 6f 72 | 77 61 72 64 20 61 6e 79 |pily for|ward any|
|00001050| 20 72 65 71 75 65 73 74 | 0a 58 73 6f 20 74 68 61 | request|.Xso tha|
|00001060| 74 20 69 74 20 61 70 70 | 65 61 72 73 20 74 6f 20 |t it app|ears to |
|00001070| 63 6f 6d 65 20 66 72 6f | 6d 20 74 68 65 20 6c 6f |come fro|m the lo|
|00001080| 63 61 6c 20 73 79 73 74 | 65 6d 2e 0a 58 0a 58 46 |cal syst|em..X.XF|
|00001090| 65 61 74 75 72 65 73 0a | 58 2d 2d 2d 2d 2d 2d 2d |eatures.|X-------|
|000010a0| 2d 0a 58 0a 58 2d 20 6f | 70 74 69 6f 6e 61 6c 3a |-.X.X- o|ptional:|
|000010b0| 20 68 6f 73 74 20 61 63 | 63 65 73 73 20 63 6f 6e | host ac|cess con|
|000010c0| 74 72 6f 6c 2e 20 54 68 | 65 20 6c 6f 63 61 6c 20 |trol. Th|e local |
|000010d0| 68 6f 73 74 20 69 73 20 | 61 6c 77 61 79 73 20 63 |host is |always c|
|000010e0| 6f 6e 73 69 64 65 72 65 | 64 0a 58 61 75 74 68 6f |onsidere|d.Xautho|
|000010f0| 72 69 7a 65 64 2e 20 41 | 63 63 65 73 73 20 63 6f |rized. A|ccess co|
|00001100| 6e 74 72 6f 6c 20 72 65 | 71 75 69 72 65 73 20 74 |ntrol re|quires t|
|00001110| 68 65 20 6c 69 62 77 72 | 61 70 2e 61 20 6c 69 62 |he libwr|ap.a lib|
|00001120| 72 61 72 79 20 74 68 61 | 74 20 63 6f 6d 65 73 0a |rary tha|t comes.|
|00001130| 58 77 69 74 68 20 72 65 | 63 65 6e 74 20 74 63 70 |Xwith re|cent tcp|
|00001140| 20 77 72 61 70 70 65 72 | 20 28 6c 6f 67 5f 74 63 | wrapper| (log_tc|
|00001150| 70 29 20 69 6d 70 6c 65 | 6d 65 6e 74 61 74 69 6f |p) imple|mentatio|
|00001160| 6e 73 2e 0a 58 0a 58 2d | 20 72 65 71 75 65 73 74 |ns..X.X-| request|
|00001170| 73 20 74 6f 20 63 68 61 | 6e 67 65 20 74 68 65 20 |s to cha|nge the |
|00001180| 70 6f 72 74 6d 61 70 20 | 74 61 62 6c 65 73 20 61 |portmap |tables a|
|00001190| 72 65 20 61 63 63 65 70 | 74 65 64 20 6f 6e 6c 79 |re accep|ted only|
|000011a0| 20 77 68 65 6e 20 74 68 | 65 79 0a 58 63 6f 6d 65 | when th|ey.Xcome|
|000011b0| 20 66 72 6f 6d 20 74 68 | 65 20 6c 6f 63 61 6c 20 | from th|e local |
|000011c0| 73 79 73 74 65 6d 2e 0a | 58 0a 58 2d 20 6f 70 74 |system..|X.X- opt|
|000011d0| 69 6f 6e 61 6c 3a 20 72 | 65 71 75 65 73 74 73 20 |ional: r|equests |
|000011e0| 74 6f 20 28 75 6e 29 72 | 65 67 69 73 74 65 72 20 |to (un)r|egister |
|000011f0| 73 65 72 76 69 63 65 73 | 20 74 68 61 74 20 6c 69 |services| that li|
|00001200| 73 74 65 6e 20 6f 6e 20 | 70 72 69 76 69 6c 65 67 |sten on |privileg|
|00001210| 65 64 0a 58 70 6f 72 74 | 73 20 28 70 6f 72 74 20 |ed.Xport|s (port |
|00001220| 3c 20 31 30 32 34 29 20 | 61 72 65 20 61 63 63 65 |< 1024) |are acce|
|00001230| 70 74 65 64 20 6f 6e 6c | 79 20 77 68 65 6e 20 74 |pted onl|y when t|
|00001240| 68 65 20 72 65 71 75 65 | 73 74 73 20 74 68 65 6d |he reque|sts them|
|00001250| 73 65 6c 76 65 73 20 63 | 6f 6d 65 0a 58 66 72 6f |selves c|ome.Xfro|
|00001260| 6d 20 61 20 70 72 69 76 | 69 6c 65 67 65 64 20 70 |m a priv|ileged p|
|00001270| 6f 72 74 2e 20 54 68 69 | 73 20 66 65 61 74 75 72 |ort. Thi|s featur|
|00001280| 65 20 69 73 20 6f 70 74 | 69 6f 6e 61 6c 20 62 65 |e is opt|ional be|
|00001290| 63 61 75 73 65 20 6f 66 | 20 6f 6c 64 65 72 20 52 |cause of| older R|
|000012a0| 50 43 0a 58 69 6d 70 6c | 65 6d 65 6e 74 61 74 69 |PC.Ximpl|ementati|
|000012b0| 6f 6e 73 2e 0a 58 0a 58 | 2d 20 72 65 71 75 65 73 |ons..X.X|- reques|
|000012c0| 74 73 20 74 68 61 74 20 | 61 72 65 20 66 6f 72 77 |ts that |are forw|
|000012d0| 61 72 64 65 64 20 62 79 | 20 74 68 65 20 70 6f 72 |arded by| the por|
|000012e0| 74 6d 61 70 70 65 72 20 | 77 69 6c 6c 20 62 65 20 |tmapper |will be |
|000012f0| 66 6f 72 77 61 72 64 65 | 64 0a 58 74 68 72 6f 75 |forwarde|d.Xthrou|
|00001300| 67 68 20 61 6e 20 75 6e | 70 72 69 76 69 6c 65 67 |gh an un|privileg|
|00001310| 65 64 20 70 6f 72 74 2e | 0a 58 0a 58 2d 20 74 68 |ed port.|.X.X- th|
|00001320| 65 20 70 6f 72 74 6d 61 | 70 70 65 72 20 72 65 66 |e portma|pper ref|
|00001330| 75 73 65 73 20 74 6f 20 | 66 6f 72 77 61 72 64 20 |uses to |forward |
|00001340| 72 65 71 75 65 73 74 73 | 20 74 6f 20 72 70 63 20 |requests| to rpc |
|00001350| 64 61 65 6d 6f 6e 73 20 | 74 68 61 74 20 64 6f 20 |daemons |that do |
|00001360| 28 6f 72 0a 58 73 68 6f | 75 6c 64 29 20 76 65 72 |(or.Xsho|uld) ver|
|00001370| 69 66 79 20 74 68 65 20 | 6f 72 69 67 69 6e 20 6f |ify the |origin o|
|00001380| 66 20 65 61 63 68 20 72 | 65 71 75 65 73 74 3a 20 |f each r|equest: |
|00001390| 77 68 65 6e 20 74 68 65 | 20 70 6f 72 74 6d 61 70 |when the| portmap|
|000013a0| 70 65 72 20 66 6f 72 77 | 61 72 64 73 0a 58 61 20 |per forw|ards.Xa |
|000013b0| 72 65 71 75 65 73 74 20 | 69 74 20 61 70 70 65 61 |request |it appea|
|000013c0| 72 73 20 74 6f 20 63 6f | 6d 65 20 66 72 6f 6d 20 |rs to co|me from |
|000013d0| 74 68 65 20 6c 6f 63 61 | 6c 20 6d 61 63 68 69 6e |the loca|l machin|
|000013e0| 65 2e 20 41 74 20 70 72 | 65 73 65 6e 74 2c 20 74 |e. At pr|esent, t|
|000013f0| 68 65 0a 58 70 6f 72 74 | 6d 61 70 70 65 72 20 72 |he.Xport|mapper r|
|00001400| 65 66 75 73 65 73 20 74 | 6f 20 66 6f 72 77 61 72 |efuses t|o forwar|
|00001410| 64 20 61 6c 6c 20 52 50 | 43 20 63 61 6c 6c 73 20 |d all RP|C calls |
|00001420| 74 6f 20 69 74 73 65 6c | 66 2c 20 61 6e 64 20 6d |to itsel|f, and m|
|00001430| 6f 73 74 20 52 50 43 0a | 58 63 61 6c 6c 73 20 74 |ost RPC.|Xcalls t|
|00001440| 6f 20 74 68 65 20 4e 46 | 53 20 6d 6f 75 6e 74 64 |o the NF|S mountd|
|00001450| 2f 6e 66 73 64 20 64 61 | 65 6d 6f 6e 73 2c 20 61 |/nfsd da|emons, a|
|00001460| 6e 64 20 74 6f 20 74 68 | 65 20 4e 49 53 20 64 61 |nd to th|e NIS da|
|00001470| 65 6d 6f 6e 73 2e 0a 58 | 0a 58 52 65 73 74 72 69 |emons..X|.XRestri|
|00001480| 63 74 69 6f 6e 73 0a 58 | 2d 2d 2d 2d 2d 2d 2d 2d |ctions.X|--------|
|00001490| 2d 2d 2d 2d 0a 58 0a 58 | 4c 69 6d 69 74 69 6e 67 |----.X.X|Limiting|
|000014a0| 20 61 63 63 65 73 73 20 | 74 6f 20 74 68 65 20 70 | access |to the p|
|000014b0| 6f 72 74 6d 61 70 70 65 | 72 20 64 6f 65 73 20 6e |ortmappe|r does n|
|000014c0| 6f 74 20 70 72 6f 74 65 | 63 74 20 79 6f 75 20 66 |ot prote|ct you f|
|000014d0| 72 6f 6d 20 64 69 72 65 | 63 74 0a 58 61 74 74 61 |rom dire|ct.Xatta|
|000014e0| 63 6b 73 20 6f 6e 20 74 | 68 65 20 72 70 63 20 64 |cks on t|he rpc d|
|000014f0| 61 65 6d 6f 6e 73 3b 20 | 74 68 65 20 6d 61 69 6e |aemons; |the main|
|00001500| 20 74 61 73 6b 20 6f 66 | 20 70 6f 72 74 6d 61 70 | task of| portmap|
|00001510| 20 69 73 20 74 6f 20 6d | 61 69 6e 74 61 69 6e 20 | is to m|aintain |
|00001520| 61 0a 58 74 61 62 6c 65 | 20 6f 66 20 61 76 61 69 |a.Xtable| of avai|
|00001530| 6c 61 62 6c 65 20 52 50 | 43 20 73 65 72 76 69 63 |lable RP|C servic|
|00001540| 65 73 20 61 6e 64 20 6f | 66 20 74 68 65 20 6e 65 |es and o|f the ne|
|00001550| 74 77 6f 72 6b 20 70 6f | 72 74 73 20 74 68 61 74 |twork po|rts that|
|00001560| 20 74 68 65 79 20 61 72 | 65 0a 58 6c 69 73 74 65 | they ar|e.Xliste|
|00001570| 6e 69 6e 67 20 6f 6e 2e | 20 54 68 65 20 73 65 63 |ning on.| The sec|
|00001580| 75 72 65 6c 69 62 20 63 | 61 6e 20 62 65 20 75 73 |urelib c|an be us|
|00001590| 65 64 20 74 6f 20 70 72 | 6f 74 65 63 74 20 69 6e |ed to pr|otect in|
|000015a0| 64 69 76 69 64 75 61 6c | 20 52 50 43 0a 58 64 61 |dividual| RPC.Xda|
|000015b0| 65 6d 6f 6e 73 2c 20 61 | 6e 64 20 74 68 65 20 6c |emons, a|nd the l|
|000015c0| 61 74 65 73 74 20 53 75 | 6e 4f 53 20 70 6f 72 74 |atest Su|nOS port|
|000015d0| 6d 61 70 2b 4e 49 53 20 | 66 69 78 20 61 6c 72 65 |map+NIS |fix alre|
|000015e0| 61 64 79 20 70 72 6f 74 | 65 63 74 73 20 74 68 65 |ady prot|ects the|
|000015f0| 20 4e 49 53 0a 58 64 61 | 65 6d 6f 6e 73 20 61 6e | NIS.Xda|emons an|
|00001600| 64 20 69 6d 70 6c 65 6d | 65 6e 74 73 20 6c 69 6d |d implem|ents lim|
|00001610| 69 74 65 64 20 66 6f 72 | 77 61 72 64 69 6e 67 2e |ited for|warding.|
|00001620| 0a 58 0a 58 4f 6e 20 74 | 68 65 20 6f 74 68 65 72 |.X.XOn t|he other|
|00001630| 20 68 61 6e 64 2c 20 65 | 76 65 6e 20 74 68 6f 75 | hand, e|ven thou|
|00001640| 67 68 20 61 20 70 6f 72 | 74 6d 61 70 70 65 72 20 |gh a por|tmapper |
|00001650| 77 69 74 68 20 61 63 63 | 65 73 73 20 63 6f 6e 74 |with acc|ess cont|
|00001660| 72 6f 6c 20 6f 6e 6c 79 | 0a 58 6d 61 6b 65 73 20 |rol only|.Xmakes |
|00001670| 61 6e 20 61 74 74 61 63 | 6b 20 6d 6f 72 65 20 64 |an attac|k more d|
|00001680| 69 66 66 69 63 75 6c 74 | 2c 20 69 74 20 73 74 69 |ifficult|, it sti|
|00001690| 6c 6c 20 70 72 6f 76 69 | 64 65 73 20 61 6e 20 65 |ll provi|des an e|
|000016a0| 78 63 65 6c 6c 65 6e 74 | 20 65 61 72 6c 79 0a 58 |xcellent| early.X|
|000016b0| 77 61 72 6e 69 6e 67 20 | 73 79 73 74 65 6d 2e 0a |warning |system..|
|000016c0| 58 0a 58 4f 72 69 67 69 | 6e 20 61 6e 64 20 70 6f |X.XOrigi|n and po|
|000016d0| 72 74 61 62 69 6c 69 74 | 79 0a 58 2d 2d 2d 2d 2d |rtabilit|y.X-----|
|000016e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000016f0| 2d 0a 58 0a 58 54 68 65 | 20 73 6f 75 72 63 65 73 |-.X.XThe| sources|
|00001700| 20 69 6e 20 74 68 69 73 | 20 64 69 73 74 72 69 62 | in this| distrib|
|00001710| 75 74 69 6f 6e 20 61 72 | 65 20 64 65 72 69 76 65 |ution ar|e derive|
|00001720| 64 20 66 72 6f 6d 20 63 | 6f 64 65 20 6f 6e 20 74 |d from c|ode on t|
|00001730| 68 65 20 73 65 63 6f 6e | 64 0a 58 42 53 44 20 6e |he secon|d.XBSD n|
|00001740| 65 74 77 6f 72 6b 69 6e | 67 20 74 61 70 65 2c 20 |etworkin|g tape, |
|00001750| 77 68 69 63 68 20 77 61 | 73 20 64 65 72 69 76 65 |which wa|s derive|
|00001760| 64 20 66 72 6f 6d 20 53 | 75 6e 27 73 20 52 50 43 |d from S|un's RPC|
|00001770| 53 52 43 20 34 2e 30 20 | 63 6f 64 65 2c 20 61 6e |SRC 4.0 |code, an|
|00001780| 64 0a 58 66 72 6f 6d 20 | 53 75 6e 27 73 20 54 49 |d.Xfrom |Sun's TI|
|00001790| 52 50 43 20 28 74 72 61 | 6e 73 70 6f 72 74 2d 69 |RPC (tra|nsport-i|
|000017a0| 6e 64 65 70 65 6e 64 65 | 6e 74 20 72 70 63 29 20 |ndepende|nt rpc) |
|000017b0| 64 69 73 74 72 69 62 75 | 74 69 6f 6e 2e 20 0a 58 |distribu|tion. .X|
|000017c0| 0a 58 54 68 65 20 63 6f | 64 65 20 63 6f 6d 70 69 |.XThe co|de compi|
|000017d0| 6c 65 73 20 66 69 6e 65 | 20 77 69 74 68 20 53 75 |les fine| with Su|
|000017e0| 6e 4f 53 20 34 2e 31 2e | 78 2c 20 55 6c 74 72 69 |nOS 4.1.|x, Ultri|
|000017f0| 78 20 34 2e 78 20 61 6e | 64 20 45 53 49 58 20 53 |x 4.x an|d ESIX S|
|00001800| 79 73 74 65 6d 20 56 0a | 58 72 65 6c 65 61 73 65 |ystem V.|Xrelease|
|00001810| 20 34 2e 30 2c 20 62 75 | 74 20 49 20 65 78 70 65 | 4.0, bu|t I expe|
|00001820| 63 74 20 69 74 20 77 69 | 6c 6c 20 77 6f 72 6b 20 |ct it wi|ll work |
|00001830| 77 69 74 68 20 6d 61 6e | 79 20 6f 74 68 65 72 20 |with man|y other |
|00001840| 55 4e 49 58 20 66 6c 61 | 76 6f 75 72 73 2e 0a 58 |UNIX fla|vours..X|
|00001850| 54 65 73 74 65 64 20 77 | 69 74 68 20 53 75 6e 4f |Tested w|ith SunO|
|00001860| 53 20 34 2e 31 2e 31 3b | 20 61 6e 20 65 61 72 6c |S 4.1.1;| an earl|
|00001870| 69 65 72 20 76 65 72 73 | 69 6f 6e 20 77 61 73 20 |ier vers|ion was |
|00001880| 61 6c 73 6f 20 74 65 73 | 74 65 64 20 77 69 74 68 |also tes|ted with|
|00001890| 20 55 6c 74 72 69 78 0a | 58 33 2e 30 2e 20 20 53 | Ultrix.|X3.0. S|
|000018a0| 79 73 56 2e 34 20 75 73 | 65 73 20 61 20 64 69 66 |ysV.4 us|es a dif|
|000018b0| 66 65 72 65 6e 74 20 70 | 72 6f 67 72 61 6d 20 74 |ferent p|rogram t|
|000018c0| 68 61 74 20 74 68 65 20 | 70 6f 72 74 6d 61 70 70 |hat the |portmapp|
|000018d0| 65 72 2c 20 68 6f 77 65 | 76 65 72 3b 0a 58 72 70 |er, howe|ver;.Xrp|
|000018e0| 63 62 69 6e 64 20 69 73 | 20 74 68 65 20 6e 61 6d |cbind is| the nam|
|000018f0| 65 2c 20 61 6e 64 20 69 | 74 20 63 61 6e 20 64 6f |e, and i|t can do|
|00001900| 20 6d 75 63 68 20 6d 6f | 72 65 20 74 68 61 6e 20 | much mo|re than |
|00001910| 74 68 65 20 6f 6c 64 20 | 70 6f 72 74 6d 61 70 70 |the old |portmapp|
|00001920| 65 72 2e 0a 58 0a 58 49 | 6e 73 74 61 6c 6c 61 74 |er..X.XI|nstallat|
|00001930| 69 6f 6e 0a 58 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |ion.X---|--------|
|00001940| 2d 0a 58 0a 58 28 31 29 | 20 46 6f 6c 6c 6f 77 20 |-.X.X(1)| Follow |
|00001950| 74 68 65 20 69 6e 73 74 | 72 75 63 74 69 6f 6e 73 |the inst|ructions|
|00001960| 20 69 6e 20 74 68 65 20 | 4d 61 6b 65 66 69 6c 65 | in the |Makefile|
|00001970| 2c 20 74 68 65 6e 20 62 | 75 69 6c 64 20 74 68 65 |, then b|uild the|
|00001980| 20 70 6f 72 74 6d 61 70 | 20 61 6e 64 0a 58 61 75 | portmap| and.Xau|
|00001990| 78 69 6c 69 61 72 79 20 | 65 78 65 63 75 74 61 62 |xiliary |executab|
|000019a0| 6c 65 73 2e 0a 58 0a 58 | 28 32 29 20 42 65 66 6f |les..X.X|(2) Befo|
|000019b0| 72 65 20 6b 69 6c 6c 69 | 6e 67 20 74 68 65 20 70 |re killi|ng the p|
|000019c0| 72 65 73 65 6e 74 20 70 | 6f 72 74 6d 61 70 20 70 |resent p|ortmap p|
|000019d0| 72 6f 63 65 73 73 2c 20 | 73 61 76 65 20 74 68 65 |rocess, |save the|
|000019e0| 20 70 72 65 73 65 6e 74 | 0a 58 70 6f 72 74 6d 61 | present|.Xportma|
|000019f0| 70 70 65 72 20 74 61 62 | 6c 65 73 20 75 73 69 6e |pper tab|les usin|
|00001a00| 67 20 74 68 65 20 63 6f | 6d 6d 61 6e 64 3a 0a 58 |g the co|mmand:.X|
|00001a10| 0a 58 09 2e 2f 70 6d 61 | 70 5f 64 75 6d 70 20 3e |.X../pma|p_dump >|
|00001a20| 74 61 62 6c 65 0a 58 0a | 58 49 66 20 79 6f 75 20 |table.X.|XIf you |
|00001a30| 6b 69 6c 6c 20 74 68 65 | 20 70 6f 72 74 6d 61 70 |kill the| portmap|
|00001a40| 20 70 72 6f 63 65 73 73 | 20 77 69 74 68 6f 75 74 | process| without|
|00001a50| 20 73 61 76 69 6e 67 20 | 69 74 73 20 74 61 62 6c | saving |its tabl|
|00001a60| 65 73 20 79 6f 75 20 77 | 69 6c 6c 20 68 61 76 65 |es you w|ill have|
|00001a70| 0a 58 74 6f 20 72 65 62 | 6f 6f 74 20 74 68 65 20 |.Xto reb|oot the |
|00001a80| 6d 61 63 68 69 6e 65 2e | 0a 58 0a 58 4e 6f 74 65 |machine.|.X.XNote|
|00001a90| 3a 20 74 68 65 20 69 6e | 66 6f 72 6d 61 74 69 6f |: the in|formatio|
|00001aa0| 6e 20 69 6e 20 74 68 65 | 20 70 6f 72 74 6d 61 70 |n in the| portmap|
|00001ab0| 20 74 61 62 6c 65 73 20 | 69 73 20 64 79 6e 61 6d | tables |is dynam|
|00001ac0| 69 63 3a 20 46 6f 72 20 | 65 78 61 6d 70 6c 65 2c |ic: For |example,|
|00001ad0| 20 69 74 0a 58 77 69 6c | 6c 20 62 65 20 64 69 66 | it.Xwil|l be dif|
|00001ae0| 66 65 72 65 6e 74 20 61 | 66 74 65 72 20 65 61 63 |ferent a|fter eac|
|00001af0| 68 20 72 65 62 6f 6f 74 | 2e 20 4f 6e 20 61 20 53 |h reboot|. On a S|
|00001b00| 75 6e 2c 20 69 74 20 65 | 76 65 6e 20 63 68 61 6e |un, it e|ven chan|
|00001b10| 67 65 73 20 65 61 63 68 | 0a 58 74 69 6d 65 20 61 |ges each|.Xtime a|
|00001b20| 20 77 69 6e 64 6f 77 69 | 6e 67 20 73 79 73 74 65 | windowi|ng syste|
|00001b30| 6d 20 69 73 20 73 74 61 | 72 74 65 64 20 74 68 61 |m is sta|rted tha|
|00001b40| 74 20 75 73 65 73 20 74 | 68 65 20 73 65 6c 65 63 |t uses t|he selec|
|00001b50| 74 69 6f 6e 20 73 65 72 | 76 69 63 65 2e 0a 58 0a |tion ser|vice..X.|
|00001b60| 58 28 33 29 20 4b 69 6c | 6c 20 74 68 65 20 72 75 |X(3) Kil|l the ru|
|00001b70| 6e 6e 69 6e 67 20 70 6f | 72 74 6d 61 70 20 70 72 |nning po|rtmap pr|
|00001b80| 6f 63 65 73 73 20 61 6e | 64 20 73 74 61 72 74 20 |ocess an|d start |
|00001b90| 74 68 65 20 6e 65 77 20 | 70 6f 72 74 6d 61 70 0a |the new |portmap.|
|00001ba0| 58 70 72 6f 67 72 61 6d | 2e 20 20 54 68 65 6e 20 |Xprogram|. Then |
|00001bb0| 28 73 74 69 6c 6c 20 61 | 73 20 72 6f 6f 74 29 20 |(still a|s root) |
|00001bc0| 69 6e 69 74 69 61 6c 69 | 7a 65 20 74 68 65 20 70 |initiali|ze the p|
|00001bd0| 6f 72 74 6d 61 70 20 74 | 61 62 6c 65 73 20 77 69 |ortmap t|ables wi|
|00001be0| 74 68 3a 0a 58 0a 58 09 | 2e 2f 70 6d 61 70 5f 73 |th:.X.X.|./pmap_s|
|00001bf0| 65 74 20 3c 74 61 62 6c | 65 0a 58 0a 58 28 34 29 |et <tabl|e.X.X(4)|
|00001c00| 20 49 66 20 79 6f 75 20 | 67 65 74 20 65 72 72 6f | If you |get erro|
|00001c10| 72 20 6d 65 73 73 61 67 | 65 73 20 6f 66 20 74 68 |r messag|es of th|
|00001c20| 65 20 66 6f 72 6d 3a 20 | 22 6e 6f 74 20 72 65 67 |e form: |"not reg|
|00001c30| 69 73 74 65 72 65 64 3a | 20 78 78 78 78 22 2c 0a |istered:| xxxx",.|
|00001c40| 58 64 69 73 61 62 6c 65 | 20 74 68 65 20 43 48 45 |Xdisable| the CHE|
|00001c50| 43 4b 5f 50 4f 52 54 20 | 66 65 61 74 75 72 65 20 |CK_PORT |feature |
|00001c60| 69 6e 20 74 68 65 20 4d | 61 6b 65 66 69 6c 65 2c |in the M|akefile,|
|00001c70| 20 72 65 6d 6f 76 65 20 | 70 6d 61 70 5f 63 68 65 | remove |pmap_che|
|00001c80| 63 6b 2e 6f 20 61 6e 64 | 0a 58 72 65 62 75 69 6c |ck.o and|.Xrebuil|
|00001c90| 64 20 74 68 65 20 70 6f | 72 74 6d 61 70 20 70 72 |d the po|rtmap pr|
|00001ca0| 6f 67 72 61 6d 2e 20 20 | 54 68 65 6e 20 70 72 6f |ogram. |Then pro|
|00001cb0| 63 65 65 64 20 77 69 74 | 68 20 73 74 65 70 20 33 |ceed wit|h step 3|
|00001cc0| 2e 0a 58 0a 58 49 6e 20 | 6f 72 64 65 72 20 74 6f |..X.XIn |order to|
|00001cd0| 20 72 65 76 65 72 74 20 | 74 6f 20 74 68 65 20 6f | revert |to the o|
|00001ce0| 72 69 67 69 6e 61 6c 20 | 70 6f 72 74 6d 61 70 20 |riginal |portmap |
|00001cf0| 64 61 65 6d 6f 6e 2c 20 | 6b 69 6c 6c 20 6f 66 66 |daemon, |kill off|
|00001d00| 20 74 68 65 20 72 75 6e | 6e 69 6e 67 0a 58 6f 6e | the run|ning.Xon|
|00001d10| 65 2c 20 72 65 73 74 61 | 72 74 20 74 68 65 20 6f |e, resta|rt the o|
|00001d20| 72 69 67 69 6e 61 6c 20 | 6f 6e 65 20 61 6e 64 20 |riginal |one and |
|00001d30| 72 65 6c 6f 61 64 20 69 | 74 73 20 74 61 62 6c 65 |reload i|ts table|
|00001d40| 73 20 75 73 69 6e 67 20 | 74 68 65 0a 58 22 70 6d |s using |the.X"pm|
|00001d50| 61 70 5f 73 65 74 22 20 | 63 6f 6d 6d 61 6e 64 20 |ap_set" |command |
|00001d60| 61 73 20 73 68 6f 77 6e | 20 61 62 6f 76 65 2e 0a |as shown| above..|
|00001d70| 58 0a 58 41 63 63 65 73 | 73 20 63 6f 6e 74 72 6f |X.XAcces|s contro|
|00001d80| 6c 3a 0a 58 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |l:.X----|--------|
|00001d90| 2d 2d 2d 0a 58 0a 58 42 | 79 20 64 65 66 61 75 6c |---.X.XB|y defaul|
|00001da0| 74 2c 20 68 6f 73 74 20 | 61 63 63 65 73 73 20 63 |t, host |access c|
|00001db0| 6f 6e 74 72 6f 6c 20 69 | 73 20 65 6e 61 62 6c 65 |ontrol i|s enable|
|00001dc0| 64 2e 20 48 6f 77 65 76 | 65 72 2c 20 74 68 65 20 |d. Howev|er, the |
|00001dd0| 68 6f 73 74 20 74 68 61 | 74 20 72 75 6e 73 0a 58 |host tha|t runs.X|
|00001de0| 74 68 65 20 70 6f 72 74 | 6d 61 70 70 65 72 20 69 |the port|mapper i|
|00001df0| 73 20 61 6c 77 61 79 73 | 20 63 6f 6e 73 69 64 65 |s always| conside|
|00001e00| 72 65 64 20 61 75 74 68 | 6f 72 69 7a 65 64 2e 20 |red auth|orized. |
|00001e10| 54 68 65 20 68 6f 73 74 | 20 61 63 63 65 73 73 20 |The host| access |
|00001e20| 63 6f 6e 74 72 6f 6c 0a | 58 74 61 62 6c 65 73 20 |control.|Xtables |
|00001e30| 61 72 65 20 6e 65 76 65 | 72 20 63 6f 6e 73 75 6c |are neve|r consul|
|00001e40| 74 65 64 20 77 69 74 68 | 20 72 65 71 75 65 73 74 |ted with| request|
|00001e50| 73 20 66 72 6f 6d 20 74 | 68 65 20 6c 6f 63 61 6c |s from t|he local|
|00001e60| 20 73 79 73 74 65 6d 20 | 69 74 73 65 6c 66 3b 0a | system |itself;.|
|00001e70| 58 74 68 65 79 20 61 72 | 65 20 61 6c 77 61 79 73 |Xthey ar|e always|
|00001e80| 20 63 6f 6e 73 75 6c 74 | 65 64 20 77 69 74 68 20 | consult|ed with |
|00001e90| 72 65 71 75 65 73 74 73 | 20 66 72 6f 6d 20 6f 74 |requests| from ot|
|00001ea0| 68 65 72 20 68 6f 73 74 | 73 2e 0a 58 0a 58 49 6e |her host|s..X.XIn|
|00001eb0| 20 6f 72 64 65 72 20 74 | 6f 20 61 76 6f 69 64 20 | order t|o avoid |
|00001ec0| 64 65 61 64 6c 6f 63 6b | 73 2c 20 74 68 65 20 70 |deadlock|s, the p|
|00001ed0| 6f 72 74 6d 61 70 20 70 | 72 6f 67 72 61 6d 20 64 |ortmap p|rogram d|
|00001ee0| 6f 65 73 20 6e 6f 74 20 | 61 74 74 65 6d 70 74 20 |oes not |attempt |
|00001ef0| 74 6f 0a 58 6c 6f 6f 6b | 20 75 70 20 74 68 65 20 |to.Xlook| up the |
|00001f00| 72 65 6d 6f 74 65 20 68 | 6f 73 74 20 6e 61 6d 65 |remote h|ost name|
|00001f10| 20 6f 72 20 75 73 65 72 | 20 6e 61 6d 65 2c 20 6e | or user| name, n|
|00001f20| 6f 72 20 77 69 6c 6c 20 | 69 74 20 74 72 79 20 74 |or will |it try t|
|00001f30| 6f 20 6d 61 74 63 68 20 | 4e 49 53 0a 58 6e 65 74 |o match |NIS.Xnet|
|00001f40| 67 72 6f 75 70 73 2e 20 | 54 68 65 20 75 70 73 68 |groups. |The upsh|
|00001f50| 6f 74 20 6f 66 20 61 6c | 6c 20 74 68 69 73 20 69 |ot of al|l this i|
|00001f60| 73 20 74 68 61 74 20 6f | 6e 6c 79 20 6e 65 74 77 |s that o|nly netw|
|00001f70| 6f 72 6b 20 6e 75 6d 62 | 65 72 20 70 61 74 74 65 |ork numb|er patte|
|00001f80| 72 6e 73 0a 58 77 69 6c | 6c 20 77 6f 72 6b 20 66 |rns.Xwil|l work f|
|00001f90| 6f 72 20 70 6f 72 74 6d | 61 70 20 61 63 63 65 73 |or portm|ap acces|
|00001fa0| 73 20 63 6f 6e 74 72 6f | 6c 2e 0a 58 0a 58 53 61 |s contro|l..X.XSa|
|00001fb0| 6d 70 6c 65 20 65 6e 74 | 72 69 65 73 20 66 6f 72 |mple ent|ries for|
|00001fc0| 20 74 68 65 20 68 6f 73 | 74 20 61 63 63 65 73 73 | the hos|t access|
|00001fd0| 2d 63 6f 6e 74 72 6f 6c | 20 66 69 6c 65 73 20 61 |-control| files a|
|00001fe0| 72 65 3a 0a 58 0a 58 20 | 20 20 20 2f 65 74 63 2f |re:.X.X | /etc/|
|00001ff0| 68 6f 73 74 73 2e 61 6c | 6c 6f 77 3a 0a 58 09 70 |hosts.al|low:.X.p|
|00002000| 6f 72 74 6d 61 70 3a 20 | 79 6f 75 72 2e 73 75 62 |ortmap: |your.sub|
|00002010| 2e 6e 65 74 2e 6e 75 6d | 62 65 72 2f 79 6f 75 72 |.net.num|ber/your|
|00002020| 2e 73 75 62 2e 6e 65 74 | 2e 6d 61 73 6b 0a 58 09 |.sub.net|.mask.X.|
|00002030| 70 6f 72 74 6d 61 70 3a | 20 32 35 35 2e 32 35 35 |portmap:| 255.255|
|00002040| 2e 32 35 35 2e 32 35 35 | 20 30 2e 30 2e 30 2e 30 |.255.255| 0.0.0.0|
|00002050| 0a 58 0a 58 20 20 20 20 | 2f 65 74 63 2f 68 6f 73 |.X.X |/etc/hos|
|00002060| 74 73 2e 64 65 6e 79 0a | 58 09 70 6f 72 74 6d 61 |ts.deny.|X.portma|
|00002070| 70 3a 20 41 4c 4c 3a 20 | 28 2f 73 6f 6d 65 2f 77 |p: ALL: |(/some/w|
|00002080| 68 65 72 65 2f 73 61 66 | 65 5f 66 69 6e 67 65 72 |here/saf|e_finger|
|00002090| 20 2d 6c 20 40 25 68 20 | 7c 20 6d 61 69 6c 20 72 | -l @%h || mail r|
|000020a0| 6f 6f 74 29 20 26 0a 58 | 0a 58 54 68 65 20 73 79 |oot) &.X|.XThe sy|
|000020b0| 6e 74 61 78 20 6f 66 20 | 74 68 65 20 61 63 63 65 |ntax of |the acce|
|000020c0| 73 73 2d 63 6f 6e 74 72 | 6f 6c 20 66 69 6c 65 73 |ss-contr|ol files|
|000020d0| 20 69 73 20 64 65 73 63 | 72 69 62 65 64 20 69 6e | is desc|ribed in|
|000020e0| 20 74 68 65 0a 58 68 6f | 73 74 73 5f 61 63 63 65 | the.Xho|sts_acce|
|000020f0| 73 73 2e 35 20 6d 61 6e | 75 61 6c 20 70 61 67 65 |ss.5 man|ual page|
|00002100| 20 74 68 61 74 20 63 6f | 6d 65 73 20 77 69 74 68 | that co|mes with|
|00002110| 20 74 68 65 20 74 63 70 | 20 77 72 61 70 70 65 72 | the tcp| wrapper|
|00002120| 20 28 6c 6f 67 5f 74 63 | 70 29 0a 58 73 6f 75 72 | (log_tc|p).Xsour|
|00002130| 63 65 73 2e 20 20 54 68 | 65 20 73 61 66 65 5f 66 |ces. Th|e safe_f|
|00002140| 69 6e 67 65 72 20 63 6f | 6d 6d 61 6e 64 20 63 6f |inger co|mmand co|
|00002150| 6d 65 73 20 77 69 74 68 | 20 6c 61 74 65 72 20 77 |mes with| later w|
|00002160| 72 61 70 70 65 72 20 72 | 65 6c 65 61 73 65 73 2e |rapper r|eleases.|
|00002170| 0a 58 0a 58 54 68 65 20 | 66 69 72 73 74 20 6c 69 |.X.XThe |first li|
|00002180| 6e 65 20 69 6e 20 74 68 | 65 20 68 6f 73 74 73 2e |ne in th|e hosts.|
|00002190| 61 6c 6c 6f 77 20 66 69 | 6c 65 20 70 65 72 6d 69 |allow fi|le permi|
|000021a0| 74 73 20 61 63 63 65 73 | 73 20 66 72 6f 6d 20 61 |ts acces|s from a|
|000021b0| 6c 6c 20 73 79 73 74 65 | 6d 73 0a 58 77 69 74 68 |ll syste|ms.Xwith|
|000021c0| 69 6e 20 79 6f 75 72 20 | 6f 77 6e 20 73 75 62 6e |in your |own subn|
|000021d0| 65 74 3b 20 73 6f 6d 65 | 20 72 70 63 20 73 65 72 |et; some| rpc ser|
|000021e0| 76 69 63 65 73 20 72 65 | 6c 79 20 6f 6e 20 62 72 |vices re|ly on br|
|000021f0| 6f 61 64 63 61 73 74 73 | 20 61 6e 64 20 77 69 6c |oadcasts| and wil|
|00002200| 6c 0a 58 63 6f 6e 74 61 | 63 74 20 79 6f 75 72 20 |l.Xconta|ct your |
|00002210| 70 6f 72 74 6d 61 70 70 | 65 72 20 61 6e 79 77 61 |portmapp|er anywa|
|00002220| 79 3b 20 61 6e 64 20 6f | 6e 63 65 20 61 6e 20 69 |y; and o|nce an i|
|00002230| 6e 74 72 75 64 65 72 20 | 68 61 73 20 61 63 63 65 |ntruder |has acce|
|00002240| 73 73 20 74 6f 20 79 6f | 75 72 0a 58 6c 6f 63 61 |ss to yo|ur.Xloca|
|00002250| 6c 20 6e 65 74 77 6f 72 | 6b 20 73 65 67 6d 65 6e |l networ|k segmen|
|00002260| 74 20 79 6f 75 27 72 65 | 20 61 6c 72 65 61 64 79 |t you're| already|
|00002270| 20 69 6e 20 64 65 65 70 | 20 74 72 6f 75 62 6c 65 | in deep| trouble|
|00002280| 2e 0a 58 0a 58 54 68 65 | 20 73 65 63 6f 6e 64 20 |..X.XThe| second |
|00002290| 6c 69 6e 65 20 69 6e 20 | 74 68 65 20 68 6f 73 74 |line in |the host|
|000022a0| 73 2e 61 6c 6c 6f 77 20 | 66 69 6c 65 20 6d 61 79 |s.allow |file may|
|000022b0| 20 62 65 20 6e 65 65 64 | 65 64 20 69 66 20 74 68 | be need|ed if th|
|000022c0| 65 72 65 20 61 72 65 0a | 58 61 6e 79 20 50 43 2d |ere are.|Xany PC-|
|000022d0| 4e 46 53 20 73 79 73 74 | 65 6d 73 20 6f 6e 20 79 |NFS syst|ems on y|
|000022e0| 6f 75 72 20 6e 65 74 77 | 6f 72 6b 20 73 65 67 6d |our netw|ork segm|
|000022f0| 65 6e 74 2e 0a 58 0a 58 | 46 6f 72 20 73 65 63 75 |ent..X.X|For secu|
|00002300| 72 69 74 79 20 72 65 61 | 73 6f 6e 73 2c 20 74 68 |rity rea|sons, th|
|00002310| 65 20 70 6f 72 74 6d 61 | 70 20 70 72 6f 63 65 73 |e portma|p proces|
|00002320| 73 20 64 72 6f 70 73 20 | 72 6f 6f 74 20 70 72 69 |s drops |root pri|
|00002330| 76 69 6c 65 67 73 20 61 | 66 74 65 72 0a 58 69 6e |vilegs a|fter.Xin|
|00002340| 69 74 69 61 6c 69 7a 61 | 74 69 6f 6e 2e 20 54 68 |itializa|tion. Th|
|00002350| 65 20 61 63 63 65 73 73 | 20 63 6f 6e 74 72 6f 6c |e access| control|
|00002360| 20 66 69 6c 65 73 20 73 | 68 6f 75 6c 64 20 74 68 | files s|hould th|
|00002370| 65 72 65 66 6f 72 65 20 | 62 65 20 72 65 61 64 61 |erefore |be reada|
|00002380| 62 6c 65 0a 58 66 6f 72 | 20 67 72 6f 75 70 20 6f |ble.Xfor| group o|
|00002390| 72 20 77 6f 72 6c 64 2e | 0a 58 0a 58 54 65 73 74 |r world.|.X.XTest|
|000023a0| 69 6e 67 3a 0a 58 2d 2d | 2d 2d 2d 2d 2d 2d 0a 58 |ing:.X--|------.X|
|000023b0| 0a 58 4e 6f 72 6d 61 6c | 6c 79 2c 20 6f 6e 6c 79 |.XNormal|ly, only|
|000023c0| 20 72 65 6a 65 63 74 65 | 64 20 72 65 71 75 65 73 | rejecte|d reques|
|000023d0| 74 73 20 77 69 6c 6c 20 | 62 65 20 72 65 70 6f 72 |ts will |be repor|
|000023e0| 74 65 64 20 76 69 61 20 | 74 68 65 20 73 79 73 6c |ted via |the sysl|
|000023f0| 6f 67 0a 58 64 61 65 6d | 6f 6e 2e 20 20 4c 6f 67 |og.Xdaem|on. Log|
|00002400| 67 69 6e 67 20 69 73 20 | 64 6f 6e 65 20 69 6e 20 |ging is |done in |
|00002410| 61 20 63 68 69 6c 64 20 | 70 72 6f 63 65 73 73 2c |a child |process,|
|00002420| 20 69 6e 20 6f 72 64 65 | 72 20 74 6f 20 61 76 6f | in orde|r to avo|
|00002430| 69 64 0a 58 70 6f 73 73 | 69 62 6c 65 20 64 65 61 |id.Xposs|ible dea|
|00002440| 64 6c 6f 63 6b 20 69 6e | 20 63 61 73 65 20 74 68 |dlock in| case th|
|00002450| 65 20 6c 6f 67 67 69 6e | 67 20 63 6f 64 65 20 6e |e loggin|g code n|
|00002460| 65 65 64 73 20 61 73 73 | 69 73 74 61 6e 63 65 20 |eeds ass|istance |
|00002470| 66 72 6f 6d 0a 58 74 68 | 65 20 70 6f 72 74 6d 61 |from.Xth|e portma|
|00002480| 70 70 65 72 2e 0a 58 0a | 58 42 79 20 64 65 66 61 |pper..X.|XBy defa|
|00002490| 75 6c 74 2c 20 74 68 65 | 20 70 6f 72 74 6d 61 70 |ult, the| portmap|
|000024a0| 70 65 72 20 77 69 6c 6c | 20 62 65 20 75 74 74 65 |per will| be utte|
|000024b0| 72 6c 79 20 73 69 6c 65 | 6e 74 2e 20 49 6e 20 66 |rly sile|nt. In f|
|000024c0| 61 63 74 2c 20 74 68 65 | 20 70 6f 72 74 6d 61 70 |act, the| portmap|
|000024d0| 0a 58 64 61 65 6d 6f 6e | 20 69 73 20 6e 6f 74 20 |.Xdaemon| is not |
|000024e0| 63 6f 6e 73 75 6c 74 65 | 64 20 74 68 61 74 20 6f |consulte|d that o|
|000024f0| 66 74 65 6e 2e 20 53 65 | 6e 64 69 6e 67 20 61 20 |ften. Se|nding a |
|00002500| 53 49 47 49 4e 54 20 73 | 69 67 6e 61 6c 20 74 6f |SIGINT s|ignal to|
|00002510| 20 74 68 65 0a 58 70 6f | 72 74 6d 61 70 20 70 72 | the.Xpo|rtmap pr|
|00002520| 6f 63 65 73 73 20 77 69 | 6c 6c 20 65 6e 61 62 6c |ocess wi|ll enabl|
|00002530| 65 20 74 68 65 20 6c 6f | 67 67 69 6e 67 20 6f 66 |e the lo|gging of|
|00002540| 20 61 6c 6c 20 72 65 71 | 75 65 73 74 73 2e 20 0a | all req|uests. .|
|00002550| 58 0a 58 41 6e 6f 74 68 | 65 72 20 77 61 79 20 74 |X.XAnoth|er way t|
|00002560| 6f 20 65 6e 61 62 6c 65 | 20 76 65 72 62 6f 73 65 |o enable| verbose|
|00002570| 20 6c 6f 67 67 69 6e 67 | 20 69 73 20 74 6f 20 73 | logging| is to s|
|00002580| 74 61 72 74 20 74 68 65 | 20 64 61 65 6d 6f 6e 20 |tart the| daemon |
|00002590| 77 69 74 68 20 74 68 65 | 0a 58 22 2d 76 22 20 6f |with the|.X"-v" o|
|000025a0| 70 74 69 6f 6e 2e 20 53 | 65 65 20 61 62 6f 76 65 |ption. S|ee above|
|000025b0| 2c 20 73 74 65 70 73 20 | 28 32 29 20 61 6e 64 20 |, steps |(2) and |
|000025c0| 6c 61 74 65 72 2c 20 6f | 6e 20 68 6f 77 20 74 6f |later, o|n how to|
|000025d0| 20 73 74 6f 70 20 61 6e | 64 20 72 65 73 74 61 72 | stop an|d restar|
|000025e0| 74 0a 58 74 68 65 20 70 | 6f 72 74 6d 61 70 70 65 |t.Xthe p|ortmappe|
|000025f0| 72 20 77 69 74 68 6f 75 | 74 20 68 61 76 69 6e 67 |r withou|t having|
|00002600| 20 74 6f 20 72 65 62 6f | 6f 74 2e 0a 58 0a 58 57 | to rebo|ot..X.XW|
|00002610| 61 72 6e 69 6e 67 3a 20 | 20 77 69 74 68 20 73 6f |arning: | with so|
|00002620| 6d 65 20 48 50 2d 55 58 | 20 76 65 72 73 69 6f 6e |me HP-UX| version|
|00002630| 73 2c 20 77 68 65 6e 20 | 76 65 72 62 6f 73 65 20 |s, when |verbose |
|00002640| 6c 6f 67 67 69 6e 67 20 | 69 73 20 6f 6e 2c 20 74 |logging |is on, t|
|00002650| 68 65 0a 58 73 79 73 74 | 65 6d 20 66 69 6c 6c 73 |he.Xsyst|em fills|
|00002660| 20 75 70 20 77 69 74 68 | 20 7a 6f 6d 62 69 65 20 | up with| zombie |
|00002670| 70 72 6f 63 65 73 73 65 | 73 2e 20 54 68 69 73 20 |processe|s. This |
|00002680| 63 61 6e 20 62 65 20 66 | 69 78 65 64 20 62 79 20 |can be f|ixed by |
|00002690| 63 6f 6d 70 69 6c 69 6e | 67 0a 58 77 69 74 68 20 |compilin|g.Xwith |
|000026a0| 2d 44 49 47 4e 4f 52 45 | 5f 53 49 47 43 48 4c 44 |-DIGNORE|_SIGCHLD|
|000026b0| 20 28 73 65 65 20 69 6e | 73 74 72 75 63 74 69 6f | (see in|structio|
|000026c0| 6e 73 20 69 6e 20 74 68 | 65 20 4d 61 6b 65 66 69 |ns in th|e Makefi|
|000026d0| 6c 65 29 2e 0a 58 0a 58 | 57 69 74 68 20 76 65 72 |le)..X.X|With ver|
|000026e0| 62 6f 73 65 20 6c 6f 67 | 67 69 6e 67 20 74 75 72 |bose log|ging tur|
|000026f0| 6e 65 64 20 6f 6e 2c 20 | 72 65 71 75 65 73 74 73 |ned on, |requests|
|00002700| 20 73 75 63 68 20 61 73 | 20 22 79 70 63 61 74 22 | such as| "ypcat"|
|00002710| 20 6f 72 20 22 72 70 63 | 69 6e 66 6f 0a 58 2d 70 | or "rpc|info.X-p|
|00002720| 22 20 73 68 6f 75 6c 64 | 20 73 68 6f 77 20 75 70 |" should| show up|
|00002730| 20 77 69 74 68 20 6c 6f | 67 20 66 69 6c 65 20 65 | with lo|g file e|
|00002740| 6e 74 72 69 65 73 20 73 | 75 63 68 20 61 73 3a 0a |ntries s|uch as:.|
|00002750| 58 0a 58 20 4d 4d 4d 20 | 64 64 20 68 68 3a 6d 6d |X.X MMM |dd hh:mm|
|00002760| 3a 73 73 20 68 6f 73 74 | 6e 61 6d 65 20 70 6f 72 |:ss host|name por|
|00002770| 74 6d 61 70 5b 70 69 64 | 5d 3a 20 63 6f 6e 6e 65 |tmap[pid|]: conne|
|00002780| 63 74 20 66 72 6f 6d 20 | 78 2e 78 2e 78 2e 78 20 |ct from |x.x.x.x |
|00002790| 74 6f 20 67 65 74 70 6f | 72 74 28 79 70 73 65 72 |to getpo|rt(ypser|
|000027a0| 76 29 0a 58 20 4d 4d 4d | 20 64 64 20 68 68 3a 6d |v).X MMM| dd hh:m|
|000027b0| 6d 3a 73 73 20 68 6f 73 | 74 6e 61 6d 65 20 70 6f |m:ss hos|tname po|
|000027c0| 72 74 6d 61 70 5b 70 69 | 64 5d 3a 20 63 6f 6e 6e |rtmap[pi|d]: conn|
|000027d0| 65 63 74 20 66 72 6f 6d | 20 79 2e 79 2e 79 2e 79 |ect from| y.y.y.y|
|000027e0| 20 74 6f 20 64 75 6d 70 | 28 29 09 0a 58 0a 58 53 | to dump|()..X.XS|
|000027f0| 65 6e 64 20 53 49 47 49 | 4e 54 20 74 6f 20 74 68 |end SIGI|NT to th|
|00002800| 65 20 70 6f 72 74 6d 61 | 70 70 65 72 20 74 6f 20 |e portma|pper to |
|00002810| 74 75 72 6e 20 74 68 65 | 20 76 65 72 62 6f 73 65 |turn the| verbose|
|00002820| 20 6c 6f 67 67 69 6e 67 | 20 6f 66 66 2e 0a 58 0a | logging| off..X.|
|00002830| 58 41 63 6b 6e 6f 77 6c | 65 64 67 65 6d 65 6e 74 |XAcknowl|edgement|
|00002840| 73 0a 58 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |s.X-----|--------|
|00002850| 2d 2d 2d 0a 58 0a 58 43 | 61 73 70 65 72 20 48 2e |---.X.XC|asper H.|
|00002860| 53 2e 20 44 69 6b 20 28 | 63 61 73 70 65 72 40 66 |S. Dik (|casper@f|
|00002870| 77 69 2e 75 76 61 2e 6e | 6c 29 20 70 72 6f 76 69 |wi.uva.n|l) provi|
|00002880| 64 65 64 20 76 61 6c 75 | 61 62 6c 65 20 69 6e 66 |ded valu|able inf|
|00002890| 6f 72 6d 61 74 69 6f 6e | 20 6f 6e 0a 58 52 50 43 |ormation| on.XRPC|
|000028a0| 20 73 65 63 75 72 69 74 | 79 20 61 6e 64 20 74 65 | securit|y and te|
|000028b0| 73 74 65 64 20 61 6e 20 | 69 6e 74 65 72 6d 65 64 |sted an |intermed|
|000028c0| 69 61 74 65 20 76 65 72 | 73 69 6f 6e 20 6f 66 20 |iate ver|sion of |
|000028d0| 74 68 65 20 70 6f 72 74 | 6d 61 70 70 65 72 20 77 |the port|mapper w|
|000028e0| 69 74 68 0a 58 53 75 6e | 4f 53 20 34 2e 31 2e 32 |ith.XSun|OS 4.1.2|
|000028f0| 2e 20 20 4c 79 66 6f 72 | 64 20 44 2e 20 52 69 63 |. Lyfor|d D. Ric|
|00002900| 68 20 28 72 69 63 68 40 | 65 63 65 2e 6e 70 73 2e |h (rich@|ece.nps.|
|00002910| 6e 61 76 79 2e 6d 69 6c | 29 20 77 61 73 20 68 65 |navy.mil|) was he|
|00002920| 6c 70 66 75 6c 20 77 69 | 74 68 0a 58 70 6f 72 74 |lpful wi|th.Xport|
|00002930| 69 6e 67 20 74 68 65 20 | 64 61 65 6d 6f 6e 20 74 |ing the |daemon t|
|00002940| 6f 20 55 6c 74 72 69 78 | 20 33 2e 78 2e 20 4c 69 |o Ultrix| 3.x. Li|
|00002950| 6f 6e 65 6c 20 43 6f 6e | 73 20 28 63 6f 6e 73 40 |onel Con|s (cons@|
|00002960| 64 78 63 65 72 6e 2e 63 | 65 72 6e 2e 63 68 29 0a |dxcern.c|ern.ch).|
|00002970| 58 73 6f 6c 76 65 64 20 | 74 68 65 20 48 50 2d 55 |Xsolved |the HP-U|
|00002980| 58 20 70 72 6f 62 6c 65 | 6d 2e 0a 58 0a 58 09 57 |X proble|m..X.X.W|
|00002990| 69 65 74 73 65 20 56 65 | 6e 65 6d 61 20 28 77 69 |ietse Ve|nema (wi|
|000029a0| 65 74 73 65 40 77 7a 76 | 2e 77 69 6e 2e 74 75 65 |etse@wzv|.win.tue|
|000029b0| 2e 6e 6c 29 0a 58 09 4d | 61 74 68 65 6d 61 74 69 |.nl).X.M|athemati|
|000029c0| 63 73 20 61 6e 64 20 43 | 6f 6d 70 75 74 69 6e 67 |cs and C|omputing|
|000029d0| 20 53 63 69 65 6e 63 65 | 0a 58 09 45 69 6e 64 68 | Science|.X.Eindh|
|000029e0| 6f 76 65 6e 20 55 6e 69 | 76 65 72 73 69 74 79 20 |oven Uni|versity |
|000029f0| 6f 66 20 54 65 63 68 6e | 6f 6c 6f 67 79 0a 58 09 |of Techn|ology.X.|
|00002a00| 54 68 65 20 4e 65 74 68 | 65 72 6c 61 6e 64 73 0a |The Neth|erlands.|
|00002a10| 45 4e 44 5f 4f 46 5f 52 | 45 41 44 4d 45 0a 69 66 |END_OF_R|EADME.if|
|00002a20| 20 74 65 73 74 20 38 31 | 32 32 20 2d 6e 65 20 60 | test 81|22 -ne `|
|00002a30| 77 63 20 2d 63 20 3c 52 | 45 41 44 4d 45 60 3b 20 |wc -c <R|EADME`; |
|00002a40| 74 68 65 6e 0a 20 20 20 | 20 65 63 68 6f 20 73 68 |then. | echo sh|
|00002a50| 61 72 3a 20 5c 22 52 45 | 41 44 4d 45 5c 22 20 75 |ar: \"RE|ADME\" u|
|00002a60| 6e 70 61 63 6b 65 64 20 | 77 69 74 68 20 77 72 6f |npacked |with wro|
|00002a70| 6e 67 20 73 69 7a 65 21 | 0a 66 69 0a 23 20 65 6e |ng size!|.fi.# en|
|00002a80| 64 20 6f 66 20 6f 76 65 | 72 77 72 69 74 69 6e 67 |d of ove|rwriting|
|00002a90| 20 63 68 65 63 6b 0a 66 | 69 0a 69 66 20 74 65 73 | check.f|i.if tes|
|00002aa0| 74 20 2d 66 20 4d 61 6b | 65 66 69 6c 65 20 2d 61 |t -f Mak|efile -a|
|00002ab0| 20 22 24 7b 31 7d 22 20 | 21 3d 20 22 2d 63 22 20 | "${1}" |!= "-c" |
|00002ac0| 3b 20 74 68 65 6e 20 0a | 20 20 65 63 68 6f 20 73 |; then .| echo s|
|00002ad0| 68 61 72 3a 20 57 69 6c | 6c 20 6e 6f 74 20 6f 76 |har: Wil|l not ov|
|00002ae0| 65 72 2d 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |er-write| existin|
|00002af0| 67 20 66 69 6c 65 20 5c | 22 4d 61 6b 65 66 69 6c |g file \|"Makefil|
|00002b00| 65 5c 22 0a 65 6c 73 65 | 0a 65 63 68 6f 20 73 68 |e\".else|.echo sh|
|00002b10| 61 72 3a 20 45 78 74 72 | 61 63 74 69 6e 67 20 5c |ar: Extr|acting \|
|00002b20| 22 4d 61 6b 65 66 69 6c | 65 5c 22 20 5c 28 33 35 |"Makefil|e\" \(35|
|00002b30| 30 33 20 63 68 61 72 61 | 63 74 65 72 73 5c 29 0a |03 chara|cters\).|
|00002b40| 73 65 64 20 22 73 2f 5e | 58 2f 2f 22 20 3e 4d 61 |sed "s/^|X//" >Ma|
|00002b50| 6b 65 66 69 6c 65 20 3c | 3c 27 45 4e 44 5f 4f 46 |kefile <|<'END_OF|
|00002b60| 5f 4d 61 6b 65 66 69 6c | 65 27 0a 58 23 20 40 28 |_Makefil|e'.X# @(|
|00002b70| 23 29 20 4d 61 6b 65 66 | 69 6c 65 20 31 2e 34 20 |#) Makef|ile 1.4 |
|00002b80| 39 33 2f 31 31 2f 32 31 | 20 31 37 3a 33 36 3a 35 |93/11/21| 17:36:5|
|00002b90| 33 0a 58 0a 58 23 23 23 | 23 23 23 23 23 23 23 23 |3.X.X###|########|
|00002ba0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002bb0| 23 23 23 23 23 23 23 23 | 23 0a 58 23 23 23 20 42 |########|#.X### B|
|00002bc0| 65 67 69 6e 6e 69 6e 67 | 20 6f 66 20 63 6f 6e 66 |eginning| of conf|
|00002bd0| 69 67 75 72 61 62 6c 65 | 20 73 74 75 66 66 2e 0a |igurable| stuff..|
|00002be0| 58 0a 58 23 20 42 79 20 | 64 65 66 61 75 6c 74 2c |X.X# By |default,|
|00002bf0| 20 6c 6f 67 66 69 6c 65 | 20 65 6e 74 72 69 65 73 | logfile| entries|
|00002c00| 20 61 72 65 20 77 72 69 | 74 74 65 6e 20 74 6f 20 | are wri|tten to |
|00002c10| 74 68 65 20 73 61 6d 65 | 20 66 69 6c 65 20 61 73 |the same| file as|
|00002c20| 20 75 73 65 64 20 66 6f | 72 0a 58 23 20 73 65 6e | used fo|r.X# sen|
|00002c30| 64 6d 61 69 6c 20 74 72 | 61 6e 73 61 63 74 69 6f |dmail tr|ansactio|
|00002c40| 6e 20 6c 6f 67 73 2e 20 | 43 68 61 6e 67 65 20 74 |n logs. |Change t|
|00002c50| 68 65 20 64 65 66 69 6e | 69 74 69 6f 6e 20 6f 66 |he defin|ition of|
|00002c60| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 6d | the fol|lowing m|
|00002c70| 61 63 72 6f 0a 58 23 20 | 69 66 20 79 6f 75 20 64 |acro.X# |if you d|
|00002c80| 69 73 61 67 72 65 65 2e | 20 53 65 65 20 60 6d 61 |isagree.| See `ma|
|00002c90| 6e 20 33 20 73 79 73 6c | 6f 67 27 20 66 6f 72 20 |n 3 sysl|og' for |
|00002ca0| 65 78 61 6d 70 6c 65 73 | 2e 20 53 6f 6d 65 20 73 |examples|. Some s|
|00002cb0| 79 73 6c 6f 67 20 76 65 | 72 73 69 6f 6e 73 0a 58 |yslog ve|rsions.X|
|00002cc0| 23 20 64 6f 20 6e 6f 74 | 20 70 72 6f 76 69 64 65 |# do not| provide|
|00002cd0| 20 74 68 69 73 20 66 6c | 65 78 69 62 69 6c 69 74 | this fl|exibilit|
|00002ce0| 79 2e 0a 58 23 0a 58 46 | 41 43 49 4c 49 54 59 3d |y..X#.XF|ACILITY=|
|00002cf0| 4c 4f 47 5f 4d 41 49 4c | 0a 58 0a 58 23 20 54 6f |LOG_MAIL|.X.X# To|
|00002d00| 20 64 69 73 61 62 6c 65 | 20 68 6f 73 74 20 61 63 | disable| host ac|
|00002d10| 63 65 73 73 20 63 6f 6e | 74 72 6f 6c 2c 20 63 6f |cess con|trol, co|
|00002d20| 6d 6d 65 6e 74 20 6f 75 | 74 20 74 68 65 20 66 6f |mment ou|t the fo|
|00002d30| 6c 6c 6f 77 69 6e 67 20 | 6d 61 63 72 6f 20 64 65 |llowing |macro de|
|00002d40| 66 69 6e 69 74 69 6f 6e | 2e 0a 58 23 20 4e 6f 74 |finition|..X# Not|
|00002d50| 65 3a 20 68 6f 73 74 20 | 61 63 63 65 73 73 20 63 |e: host |access c|
|00002d60| 6f 6e 74 72 6f 6c 20 72 | 65 71 75 69 72 65 73 20 |ontrol r|equires |
|00002d70| 74 68 65 20 73 74 72 74 | 6f 6b 28 29 20 61 6e 64 |the strt|ok() and|
|00002d80| 20 73 74 72 63 68 72 28 | 29 20 72 6f 75 74 69 6e | strchr(|) routin|
|00002d90| 65 73 2e 0a 58 23 20 48 | 6f 73 74 20 61 63 63 65 |es..X# H|ost acce|
|00002da0| 73 73 20 63 6f 6e 74 72 | 6f 6c 20 63 61 6e 20 61 |ss contr|ol can a|
|00002db0| 6c 73 6f 20 62 65 20 74 | 75 72 6e 65 64 20 6f 66 |lso be t|urned of|
|00002dc0| 66 20 62 79 20 70 72 6f | 76 69 64 69 6e 67 20 6e |f by pro|viding n|
|00002dd0| 6f 20 61 63 63 65 73 73 | 20 63 6f 6e 74 72 6f 6c |o access| control|
|00002de0| 0a 58 23 20 74 61 62 6c | 65 73 2e 20 54 68 65 20 |.X# tabl|es. The |
|00002df0| 6c 6f 63 61 6c 20 73 79 | 73 74 65 6d 2c 20 73 69 |local sy|stem, si|
|00002e00| 6e 63 65 20 69 74 20 72 | 75 6e 73 20 74 68 65 20 |nce it r|uns the |
|00002e10| 70 6f 72 74 6d 61 70 20 | 64 61 65 6d 6f 6e 2c 20 |portmap |daemon, |
|00002e20| 69 73 20 61 6c 77 61 79 | 73 0a 58 23 20 74 72 65 |is alway|s.X# tre|
|00002e30| 61 74 65 64 20 61 73 20 | 61 6e 20 61 75 74 68 6f |ated as |an autho|
|00002e40| 72 69 7a 65 64 20 68 6f | 73 74 2e 0a 58 0a 58 48 |rized ho|st..X.XH|
|00002e50| 4f 53 54 53 5f 41 43 43 | 45 53 53 3d 20 2d 44 48 |OSTS_ACC|ESS= -DH|
|00002e60| 4f 53 54 53 5f 41 43 43 | 45 53 53 0a 58 0a 58 23 |OSTS_ACC|ESS.X.X#|
|00002e70| 20 43 6f 6d 6d 65 6e 74 | 20 6f 75 74 20 69 66 20 | Comment| out if |
|00002e80| 79 6f 75 72 20 52 50 43 | 20 6c 69 62 72 61 72 79 |your RPC| library|
|00002e90| 20 64 6f 65 73 20 6e 6f | 74 20 61 6c 6c 6f 63 61 | does no|t alloca|
|00002ea0| 74 65 20 70 72 69 76 69 | 6c 65 67 65 64 20 70 6f |te privi|leged po|
|00002eb0| 72 74 73 20 66 6f 72 0a | 58 23 20 72 65 71 75 65 |rts for.|X# reque|
|00002ec0| 73 74 73 20 66 72 6f 6d | 20 70 72 6f 63 65 73 73 |sts from| process|
|00002ed0| 65 73 20 77 69 74 68 20 | 72 6f 6f 74 20 70 72 69 |es with |root pri|
|00002ee0| 76 69 6c 65 67 65 2c 20 | 6f 72 20 74 68 65 20 6e |vilege, |or the n|
|00002ef0| 65 77 20 70 6f 72 74 6d | 61 70 20 77 69 6c 6c 0a |ew portm|ap will.|
|00002f00| 58 23 20 61 6c 77 61 79 | 73 20 72 65 6a 65 63 74 |X# alway|s reject|
|00002f10| 20 72 65 71 75 65 73 74 | 73 20 74 6f 20 72 65 67 | request|s to reg|
|00002f20| 69 73 74 65 72 2f 75 6e | 72 65 67 69 73 74 65 72 |ister/un|register|
|00002f30| 20 73 65 72 76 69 63 65 | 73 20 6f 6e 20 70 72 69 | service|s on pri|
|00002f40| 76 69 6c 65 67 65 64 0a | 58 23 20 70 6f 72 74 73 |vileged.|X# ports|
|00002f50| 2e 20 59 6f 75 20 63 61 | 6e 20 66 69 6e 64 20 6f |. You ca|n find o|
|00002f60| 75 74 20 62 79 20 72 75 | 6e 6e 69 6e 67 20 22 72 |ut by ru|nning "r|
|00002f70| 70 63 69 6e 66 6f 20 2d | 70 22 3b 20 69 66 20 61 |pcinfo -|p"; if a|
|00002f80| 6c 6c 20 6d 6f 75 6e 74 | 64 20 61 6e 64 20 4e 49 |ll mount|d and NI|
|00002f90| 53 0a 58 23 20 64 61 65 | 6d 6f 6e 73 20 75 73 65 |S.X# dae|mons use|
|00002fa0| 20 61 20 70 6f 72 74 20 | 3e 3d 20 31 30 32 34 20 | a port |>= 1024 |
|00002fb0| 79 6f 75 20 73 68 6f 75 | 6c 64 20 70 72 6f 62 61 |you shou|ld proba|
|00002fc0| 62 6c 79 20 64 69 73 61 | 62 6c 65 20 74 68 65 20 |bly disa|ble the |
|00002fd0| 6e 65 78 74 20 6c 69 6e | 65 2e 0a 58 0a 58 43 48 |next lin|e..X.XCH|
|00002fe0| 45 43 4b 5f 50 4f 52 54 | 20 3d 20 2d 44 43 48 45 |ECK_PORT| = -DCHE|
|00002ff0| 43 4b 5f 50 4f 52 54 0a | 58 0a 58 23 20 57 68 65 |CK_PORT.|X.X# Whe|
|00003000| 6e 20 74 68 65 20 70 6f | 72 74 6d 61 70 70 65 72 |n the po|rtmapper|
|00003010| 20 63 61 6e 6e 6f 74 20 | 66 69 6e 64 20 61 6e 79 | cannot |find any|
|00003020| 20 6c 6f 63 61 6c 20 69 | 6e 74 65 72 66 61 63 65 | local i|nterface|
|00003030| 73 20 28 69 74 20 77 69 | 6c 6c 20 63 6f 6d 70 6c |s (it wi|ll compl|
|00003040| 61 69 6e 0a 58 23 20 74 | 6f 20 74 68 65 20 73 79 |ain.X# t|o the sy|
|00003050| 73 6c 6f 67 20 64 61 65 | 6d 6f 6e 29 20 79 6f 75 |slog dae|mon) you|
|00003060| 72 20 73 79 73 74 65 6d | 20 70 72 6f 62 61 62 6c |r system| probabl|
|00003070| 79 20 68 61 73 20 76 61 | 72 69 61 62 6c 65 2d 6c |y has va|riable-l|
|00003080| 65 6e 67 74 68 20 73 6f | 63 6b 65 74 0a 58 23 20 |ength so|cket.X# |
|00003090| 61 64 64 72 65 73 73 20 | 73 74 72 75 63 74 75 72 |address |structur|
|000030a0| 65 73 20 28 73 74 72 75 | 63 74 20 73 6f 63 6b 61 |es (stru|ct socka|
|000030b0| 64 64 72 20 68 61 73 20 | 61 20 73 61 5f 6c 65 6e |ddr has |a sa_len|
|000030c0| 20 63 6f 6d 70 6f 6e 65 | 6e 74 3b 20 65 78 61 6d | compone|nt; exam|
|000030d0| 70 6c 65 3a 0a 58 23 20 | 34 2e 34 42 53 44 29 2e |ple:.X# |4.4BSD).|
|000030e0| 20 55 6e 63 6f 6d 6d 65 | 6e 74 20 6e 65 78 74 20 | Uncomme|nt next |
|000030f0| 6d 61 63 72 6f 20 64 65 | 66 69 6e 69 74 69 6f 6e |macro de|finition|
|00003100| 20 69 6e 20 74 68 61 74 | 20 63 61 73 65 2e 0a 58 | in that| case..X|
|00003110| 23 0a 58 23 20 53 41 5f | 4c 45 4e 20 3d 20 2d 44 |#.X# SA_|LEN = -D|
|00003120| 48 41 53 5f 53 41 5f 4c | 45 4e 0a 58 0a 58 23 20 |HAS_SA_L|EN.X.X# |
|00003130| 57 69 74 68 20 76 65 72 | 62 6f 73 65 20 6c 6f 67 |With ver|bose log|
|00003140| 67 69 6e 67 20 6f 6e 2c | 20 48 50 2d 55 58 20 39 |ging on,| HP-UX 9|
|00003150| 2e 78 20 6c 65 61 76 65 | 73 20 7a 6f 6d 62 69 65 |.x leave|s zombie|
|00003160| 73 20 62 65 68 69 6e 64 | 20 77 68 65 6e 20 53 49 |s behind| when SI|
|00003170| 47 43 48 4c 44 0a 58 23 | 20 69 73 20 6e 6f 74 20 |GCHLD.X#| is not |
|00003180| 69 67 6e 6f 72 65 64 2e | 20 45 6e 61 62 6c 65 20 |ignored.| Enable |
|00003190| 6e 65 78 74 20 6d 61 63 | 72 6f 20 66 6f 72 20 61 |next mac|ro for a|
|000031a0| 20 66 69 78 2e 0a 58 23 | 0a 58 23 20 5a 4f 4d 42 | fix..X#|.X# ZOMB|
|000031b0| 49 45 53 20 3d 20 2d 44 | 49 47 4e 4f 52 45 5f 53 |IES = -D|IGNORE_S|
|000031c0| 49 47 43 48 4c 44 0a 58 | 0a 58 23 20 55 6e 63 6f |IGCHLD.X|.X# Unco|
|000031d0| 6d 6d 65 6e 74 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |mment th|e follow|
|000031e0| 69 6e 67 20 6d 61 63 72 | 6f 20 69 66 20 79 6f 75 |ing macr|o if you|
|000031f0| 72 20 73 79 73 74 65 6d | 20 64 6f 65 73 20 6e 6f |r system| does no|
|00003200| 74 20 68 61 76 65 20 75 | 5f 6c 6f 6e 67 2e 0a 58 |t have u|_long..X|
|00003210| 23 0a 58 23 20 55 4c 4f | 4e 47 09 3d 2d 44 75 5f |#.X# ULO|NG.=-Du_|
|00003220| 6c 6f 6e 67 3d 22 75 6e | 73 69 67 6e 65 64 20 6c |long="un|signed l|
|00003230| 6f 6e 67 22 0a 58 0a 58 | 23 20 4c 61 74 65 72 20 |ong".X.X|# Later |
|00003240| 76 65 72 73 69 6f 6e 73 | 20 6f 66 20 74 68 65 20 |versions| of the |
|00003250| 74 63 70 20 77 72 61 70 | 70 65 72 20 28 6c 6f 67 |tcp wrap|per (log|
|00003260| 5f 74 63 70 20 70 61 63 | 6b 61 67 65 29 20 63 6f |_tcp pac|kage) co|
|00003270| 6d 65 20 77 69 74 68 20 | 61 0a 58 23 20 6c 69 62 |me with |a.X# lib|
|00003280| 77 72 61 70 2e 61 20 6f | 62 6a 65 63 74 20 6c 69 |wrap.a o|bject li|
|00003290| 62 72 61 72 79 2e 20 57 | 52 41 50 5f 44 49 52 20 |brary. W|RAP_DIR |
|000032a0| 73 68 6f 75 6c 64 20 73 | 70 65 63 69 66 79 20 74 |should s|pecify t|
|000032b0| 68 65 20 64 69 72 65 63 | 74 6f 72 79 20 77 69 74 |he direc|tory wit|
|000032c0| 68 0a 58 23 20 74 68 61 | 74 20 6c 69 62 72 61 72 |h.X# tha|t librar|
|000032d0| 79 2e 0a 58 0a 58 57 52 | 41 50 5f 44 49 52 3d 20 |y..X.XWR|AP_DIR= |
|000032e0| 2e 2e 2f 74 63 70 5f 77 | 72 61 70 70 65 72 73 0a |../tcp_w|rappers.|
|000032f0| 58 0a 58 23 20 41 75 78 | 69 6c 69 61 72 79 20 6f |X.X# Aux|iliary o|
|00003300| 62 6a 65 63 74 20 66 69 | 6c 65 73 20 74 68 61 74 |bject fi|les that|
|00003310| 20 6d 61 79 20 62 65 20 | 6d 69 73 73 69 6e 67 20 | may be |missing |
|00003320| 66 72 6f 6d 20 79 6f 75 | 72 20 43 20 6c 69 62 72 |from you|r C libr|
|00003330| 61 72 79 2e 0a 58 23 0a | 58 41 55 58 09 3d 20 64 |ary..X#.|XAUX.= d|
|00003340| 61 65 6d 6f 6e 2e 6f 20 | 73 74 72 65 72 72 6f 72 |aemon.o |strerror|
|00003350| 2e 6f 0a 58 0a 58 23 20 | 55 6e 63 6f 6d 6d 65 6e |.o.X.X# |Uncommen|
|00003360| 74 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |t the fo|llowing |
|00003370| 6d 61 63 72 6f 20 64 65 | 66 69 6e 69 74 69 6f 6e |macro de|finition|
|00003380| 73 20 69 66 20 79 6f 75 | 20 61 72 65 20 72 75 6e |s if you| are run|
|00003390| 6e 69 6e 67 20 53 59 53 | 56 2e 34 2e 0a 58 23 20 |ning SYS|V.4..X# |
|000033a0| 54 68 69 73 20 77 6f 6e | 27 74 20 68 65 6c 70 20 |This won|'t help |
|000033b0| 6d 75 63 68 20 62 65 63 | 61 75 73 65 20 53 59 53 |much bec|ause SYS|
|000033c0| 56 2e 34 20 75 73 65 73 | 20 72 70 63 62 69 6e 64 |V.4 uses| rpcbind|
|000033d0| 20 69 6e 73 74 65 61 64 | 20 6f 66 20 70 6f 72 74 | instead| of port|
|000033e0| 6d 61 70 2e 0a 58 23 0a | 58 23 20 43 43 09 3d 20 |map..X#.|X# CC.= |
|000033f0| 2f 75 73 72 2f 75 63 62 | 2f 63 63 0a 58 23 20 4c |/usr/ucb|/cc.X# L|
|00003400| 49 42 53 09 3d 20 2d 6c | 72 70 63 73 6f 63 0a 58 |IBS.= -l|rpcsoc.X|
|00003410| 23 20 53 59 53 09 3d 20 | 2d 44 53 59 53 56 34 30 |# SYS.= |-DSYSV40|
|00003420| 0a 58 0a 58 23 20 41 75 | 78 69 6c 69 61 72 79 20 |.X.X# Au|xiliary |
|00003430| 6c 69 62 72 61 72 69 65 | 73 20 74 68 61 74 20 79 |librarie|s that y|
|00003440| 6f 75 20 6d 61 79 20 68 | 61 76 65 20 74 6f 20 73 |ou may h|ave to s|
|00003450| 70 65 63 69 66 79 0a 58 | 23 0a 58 23 20 4c 49 42 |pecify.X|#.X# LIB|
|00003460| 53 09 3d 20 2d 6c 72 70 | 63 0a 58 0a 58 23 23 23 |S.= -lrp|c.X.X###|
|00003470| 20 45 6e 64 20 6f 66 20 | 63 6f 6e 66 69 67 75 72 | End of |configur|
|00003480| 61 62 6c 65 20 73 74 75 | 66 66 2e 0a 58 23 23 23 |able stu|ff..X###|
|00003490| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000034a0| 23 23 23 23 23 23 23 23 | 23 23 23 0a 58 0a 58 53 |########|###.X.XS|
|000034b0| 48 45 4c 4c 09 3d 20 2f | 62 69 6e 2f 73 68 0a 58 |HELL.= /|bin/sh.X|
|000034c0| 0a 58 43 4f 50 54 09 3d | 20 2d 44 63 6f 6e 73 74 |.XCOPT.=| -Dconst|
|000034d0| 3d 20 2d 44 70 65 72 72 | 6f 72 3d 78 70 65 72 72 |= -Dperr|or=xperr|
|000034e0| 6f 72 20 24 28 48 4f 53 | 54 53 5f 41 43 43 45 53 |or $(HOS|TS_ACCES|
|000034f0| 53 29 20 24 28 43 48 45 | 43 4b 5f 50 4f 52 54 29 |S) $(CHE|CK_PORT)|
|00003500| 20 5c 0a 58 09 24 28 53 | 59 53 29 20 2d 44 46 41 | \.X.$(S|YS) -DFA|
|00003510| 43 49 4c 49 54 59 3d 24 | 28 46 41 43 49 4c 49 54 |CILITY=$|(FACILIT|
|00003520| 59 29 20 24 28 55 4c 4f | 4e 47 29 20 24 28 5a 4f |Y) $(ULO|NG) $(ZO|
|00003530| 4d 42 49 45 53 29 20 24 | 28 53 41 5f 4c 45 4e 29 |MBIES) $|(SA_LEN)|
|00003540| 0a 58 43 46 4c 41 47 53 | 09 3d 20 24 28 43 4f 50 |.XCFLAGS|.= $(COP|
|00003550| 54 29 20 2d 4f 0a 58 4f | 42 4a 45 43 54 53 09 3d |T) -O.XO|BJECTS.=|
|00003560| 20 70 6f 72 74 6d 61 70 | 2e 6f 20 70 6d 61 70 5f | portmap|.o pmap_|
|00003570| 63 68 65 63 6b 2e 6f 20 | 66 72 6f 6d 5f 6c 6f 63 |check.o |from_loc|
|00003580| 61 6c 2e 6f 20 24 28 41 | 55 58 29 0a 58 0a 58 61 |al.o $(A|UX).X.Xa|
|00003590| 6c 6c 3a 09 70 6f 72 74 | 6d 61 70 20 70 6d 61 70 |ll:.port|map pmap|
|000035a0| 5f 64 75 6d 70 20 70 6d | 61 70 5f 73 65 74 0a 58 |_dump pm|ap_set.X|
|000035b0| 0a 58 70 6f 72 74 6d 61 | 70 3a 20 24 28 4f 42 4a |.Xportma|p: $(OBJ|
|000035c0| 45 43 54 53 29 20 24 28 | 57 52 41 50 5f 44 49 52 |ECTS) $(|WRAP_DIR|
|000035d0| 29 2f 6c 69 62 77 72 61 | 70 2e 61 0a 58 09 24 28 |)/libwra|p.a.X.$(|
|000035e0| 43 43 29 20 24 28 43 46 | 4c 41 47 53 29 20 2d 6f |CC) $(CF|LAGS) -o|
|000035f0| 20 24 40 20 24 28 4f 42 | 4a 45 43 54 53 29 20 24 | $@ $(OB|JECTS) $|
|00003600| 28 57 52 41 50 5f 44 49 | 52 29 2f 6c 69 62 77 72 |(WRAP_DI|R)/libwr|
|00003610| 61 70 2e 61 20 24 28 4c | 49 42 53 29 0a 58 0a 58 |ap.a $(L|IBS).X.X|
|00003620| 70 6d 61 70 5f 64 75 6d | 70 3a 20 70 6d 61 70 5f |pmap_dum|p: pmap_|
|00003630| 64 75 6d 70 2e 63 0a 58 | 09 24 28 43 43 29 20 24 |dump.c.X|.$(CC) $|
|00003640| 28 43 46 4c 41 47 53 29 | 20 2d 6f 20 24 40 20 24 |(CFLAGS)| -o $@ $|
|00003650| 3f 20 24 28 4c 49 42 53 | 29 0a 58 0a 58 70 6d 61 |? $(LIBS|).X.Xpma|
|00003660| 70 5f 73 65 74 3a 20 70 | 6d 61 70 5f 73 65 74 2e |p_set: p|map_set.|
|00003670| 63 0a 58 09 24 28 43 43 | 29 20 24 28 43 46 4c 41 |c.X.$(CC|) $(CFLA|
|00003680| 47 53 29 20 2d 6f 20 24 | 40 20 24 3f 20 24 28 4c |GS) -o $|@ $? $(L|
|00003690| 49 42 53 29 0a 58 0a 58 | 66 72 6f 6d 5f 6c 6f 63 |IBS).X.X|from_loc|
|000036a0| 61 6c 3a 20 66 72 6f 6d | 5f 6c 6f 63 61 6c 2e 63 |al: from|_local.c|
|000036b0| 0a 58 09 63 63 20 24 28 | 43 46 4c 41 47 53 29 20 |.X.cc $(|CFLAGS) |
|000036c0| 2d 44 54 45 53 54 20 2d | 6f 20 24 40 20 66 72 6f |-DTEST -|o $@ fro|
|000036d0| 6d 5f 6c 6f 63 61 6c 2e | 63 0a 58 0a 58 6c 69 6e |m_local.|c.X.Xlin|
|000036e0| 74 3a 09 0a 58 09 6c 69 | 6e 74 20 24 28 43 4f 50 |t:..X.li|nt $(COP|
|000036f0| 54 29 20 24 28 4f 42 4a | 45 43 54 53 3a 25 2e 6f |T) $(OBJ|ECTS:%.o|
|00003700| 3d 25 2e 63 29 0a 58 0a | 58 63 6c 65 61 6e 3a 0a |=%.c).X.|Xclean:.|
|00003710| 58 09 72 6d 20 2d 66 20 | 2a 2e 6f 20 70 6f 72 74 |X.rm -f |*.o port|
|00003720| 6d 61 70 20 70 6d 61 70 | 5f 64 75 6d 70 20 70 6d |map pmap|_dump pm|
|00003730| 61 70 5f 73 65 74 20 66 | 72 6f 6d 5f 6c 6f 63 61 |ap_set f|rom_loca|
|00003740| 6c 20 63 6f 72 65 0a 58 | 0a 58 73 68 61 72 3a 0a |l core.X|.Xshar:.|
|00003750| 58 09 40 73 68 61 72 20 | 52 45 41 44 4d 45 20 4d |X.@shar |README M|
|00003760| 61 6b 65 66 69 6c 65 20 | 70 6f 72 74 6d 61 70 2e |akefile |portmap.|
|00003770| 63 20 64 61 65 6d 6f 6e | 2e 63 20 73 74 72 65 72 |c daemon|.c strer|
|00003780| 72 6f 72 2e 63 20 64 69 | 66 66 73 5f 77 72 74 5f |ror.c di|ffs_wrt_|
|00003790| 62 73 64 20 5c 0a 58 09 | 70 6d 61 70 5f 64 75 6d |bsd \.X.|pmap_dum|
|000037a0| 70 2e 63 20 70 6d 61 70 | 5f 73 65 74 2e 63 20 66 |p.c pmap|_set.c f|
|000037b0| 72 6f 6d 5f 6c 6f 63 61 | 6c 2e 63 20 70 6d 61 70 |rom_loca|l.c pmap|
|000037c0| 5f 63 68 65 63 6b 2e 63 | 20 70 6d 61 70 5f 63 68 |_check.c| pmap_ch|
|000037d0| 65 63 6b 2e 68 20 42 4c | 55 52 42 0a 58 0a 58 64 |eck.h BL|URB.X.Xd|
|000037e0| 69 66 66 73 5f 77 72 74 | 5f 62 73 64 3a 20 70 6f |iffs_wrt|_bsd: po|
|000037f0| 72 74 6d 61 70 2e 63 2e | 62 73 64 20 70 6f 72 74 |rtmap.c.|bsd port|
|00003800| 6d 61 70 2e 63 20 64 61 | 65 6d 6f 6e 2e 63 2e 62 |map.c da|emon.c.b|
|00003810| 73 64 20 64 61 65 6d 6f | 6e 2e 63 0a 58 09 2d 28 |sd daemo|n.c.X.-(|
|00003820| 64 69 66 66 20 2d 63 20 | 70 6f 72 74 6d 61 70 2e |diff -c |portmap.|
|00003830| 63 2e 62 73 64 20 70 6f | 72 74 6d 61 70 2e 63 3b |c.bsd po|rtmap.c;|
|00003840| 20 64 69 66 66 20 2d 63 | 20 64 61 65 6d 6f 6e 2e | diff -c| daemon.|
|00003850| 63 2e 62 73 64 20 64 61 | 65 6d 6f 6e 2e 63 29 20 |c.bsd da|emon.c) |
|00003860| 3e 24 40 0a 58 0a 58 64 | 65 70 73 3a 0a 58 09 40 |>$@.X.Xd|eps:.X.@|
|00003870| 24 28 43 43 29 20 2d 4d | 20 24 28 43 46 4c 41 47 |$(CC) -M| $(CFLAG|
|00003880| 53 29 20 2a 2e 63 20 7c | 20 67 72 65 70 20 2d 76 |S) *.c || grep -v|
|00003890| 20 2f 75 73 72 2f 69 6e | 63 6c 75 64 65 20 7c 73 | /usr/in|clude |s|
|000038a0| 65 64 20 27 73 2f 5c 2e | 5c 2f 2f 2f 27 0a 58 0a |ed 's/\.|\///'.X.|
|000038b0| 58 64 61 65 6d 6f 6e 2e | 6f 3a 20 64 61 65 6d 6f |Xdaemon.|o: daemo|
|000038c0| 6e 2e 63 0a 58 66 72 6f | 6d 5f 6c 6f 63 61 6c 2e |n.c.Xfro|m_local.|
|000038d0| 6f 3a 20 66 72 6f 6d 5f | 6c 6f 63 61 6c 2e 63 0a |o: from_|local.c.|
|000038e0| 58 70 6d 61 70 5f 63 68 | 65 63 6b 2e 6f 3a 20 70 |Xpmap_ch|eck.o: p|
|000038f0| 6d 61 70 5f 63 68 65 63 | 6b 2e 63 20 70 6d 61 70 |map_chec|k.c pmap|
|00003900| 5f 63 68 65 63 6b 2e 68 | 20 4d 61 6b 65 66 69 6c |_check.h| Makefil|
|00003910| 65 0a 58 70 6d 61 70 5f | 64 75 6d 70 2e 6f 3a 20 |e.Xpmap_|dump.o: |
|00003920| 70 6d 61 70 5f 64 75 6d | 70 2e 63 0a 58 70 6d 61 |pmap_dum|p.c.Xpma|
|00003930| 70 5f 73 65 74 2e 6f 3a | 20 70 6d 61 70 5f 73 65 |p_set.o:| pmap_se|
|00003940| 74 2e 63 0a 58 70 6f 72 | 74 6d 61 70 2e 6f 3a 20 |t.c.Xpor|tmap.o: |
|00003950| 70 6f 72 74 6d 61 70 2e | 63 0a 58 70 6f 72 74 6d |portmap.|c.Xportm|
|00003960| 61 70 2e 6f 3a 20 70 6d | 61 70 5f 63 68 65 63 6b |ap.o: pm|ap_check|
|00003970| 2e 68 0a 58 73 74 72 65 | 72 72 6f 72 2e 6f 3a 20 |.h.Xstre|rror.o: |
|00003980| 73 74 72 65 72 72 6f 72 | 2e 63 0a 45 4e 44 5f 4f |strerror|.c.END_O|
|00003990| 46 5f 4d 61 6b 65 66 69 | 6c 65 0a 69 66 20 74 65 |F_Makefi|le.if te|
|000039a0| 73 74 20 33 35 30 33 20 | 2d 6e 65 20 60 77 63 20 |st 3503 |-ne `wc |
|000039b0| 2d 63 20 3c 4d 61 6b 65 | 66 69 6c 65 60 3b 20 74 |-c <Make|file`; t|
|000039c0| 68 65 6e 0a 20 20 20 20 | 65 63 68 6f 20 73 68 61 |hen. |echo sha|
|000039d0| 72 3a 20 5c 22 4d 61 6b | 65 66 69 6c 65 5c 22 20 |r: \"Mak|efile\" |
|000039e0| 75 6e 70 61 63 6b 65 64 | 20 77 69 74 68 20 77 72 |unpacked| with wr|
|000039f0| 6f 6e 67 20 73 69 7a 65 | 21 0a 66 69 0a 23 20 65 |ong size|!.fi.# e|
|00003a00| 6e 64 20 6f 66 20 6f 76 | 65 72 77 72 69 74 69 6e |nd of ov|erwritin|
|00003a10| 67 20 63 68 65 63 6b 0a | 66 69 0a 69 66 20 74 65 |g check.|fi.if te|
|00003a20| 73 74 20 2d 66 20 70 6f | 72 74 6d 61 70 2e 63 20 |st -f po|rtmap.c |
|00003a30| 2d 61 20 22 24 7b 31 7d | 22 20 21 3d 20 22 2d 63 |-a "${1}|" != "-c|
|00003a40| 22 20 3b 20 74 68 65 6e | 20 0a 20 20 65 63 68 6f |" ; then| . echo|
|00003a50| 20 73 68 61 72 3a 20 57 | 69 6c 6c 20 6e 6f 74 20 | shar: W|ill not |
|00003a60| 6f 76 65 72 2d 77 72 69 | 74 65 20 65 78 69 73 74 |over-wri|te exist|
|00003a70| 69 6e 67 20 66 69 6c 65 | 20 5c 22 70 6f 72 74 6d |ing file| \"portm|
|00003a80| 61 70 2e 63 5c 22 0a 65 | 6c 73 65 0a 65 63 68 6f |ap.c\".e|lse.echo|
|00003a90| 20 73 68 61 72 3a 20 45 | 78 74 72 61 63 74 69 6e | shar: E|xtractin|
|00003aa0| 67 20 5c 22 70 6f 72 74 | 6d 61 70 2e 63 5c 22 20 |g \"port|map.c\" |
|00003ab0| 5c 28 31 35 39 36 34 20 | 63 68 61 72 61 63 74 65 |\(15964 |characte|
|00003ac0| 72 73 5c 29 0a 73 65 64 | 20 22 73 2f 5e 58 2f 2f |rs\).sed| "s/^X//|
|00003ad0| 22 20 3e 70 6f 72 74 6d | 61 70 2e 63 20 3c 3c 27 |" >portm|ap.c <<'|
|00003ae0| 45 4e 44 5f 4f 46 5f 70 | 6f 72 74 6d 61 70 2e 63 |END_OF_p|ortmap.c|
|00003af0| 27 0a 58 2f 2a 2d 0a 58 | 20 2a 20 43 6f 70 79 72 |'.X/*-.X| * Copyr|
|00003b00| 69 67 68 74 20 28 63 29 | 20 31 39 39 30 20 54 68 |ight (c)| 1990 Th|
|00003b10| 65 20 52 65 67 65 6e 74 | 73 20 6f 66 20 74 68 65 |e Regent|s of the|
|00003b20| 20 55 6e 69 76 65 72 73 | 69 74 79 20 6f 66 20 43 | Univers|ity of C|
|00003b30| 61 6c 69 66 6f 72 6e 69 | 61 2e 0a 58 20 2a 20 41 |aliforni|a..X * A|
|00003b40| 6c 6c 20 72 69 67 68 74 | 73 20 72 65 73 65 72 76 |ll right|s reserv|
|00003b50| 65 64 2e 0a 58 20 2a 0a | 58 20 2a 20 52 65 64 69 |ed..X *.|X * Redi|
|00003b60| 73 74 72 69 62 75 74 69 | 6f 6e 20 61 6e 64 20 75 |stributi|on and u|
|00003b70| 73 65 20 69 6e 20 73 6f | 75 72 63 65 20 61 6e 64 |se in so|urce and|
|00003b80| 20 62 69 6e 61 72 79 20 | 66 6f 72 6d 73 2c 20 77 | binary |forms, w|
|00003b90| 69 74 68 20 6f 72 20 77 | 69 74 68 6f 75 74 0a 58 |ith or w|ithout.X|
|00003ba0| 20 2a 20 6d 6f 64 69 66 | 69 63 61 74 69 6f 6e 2c | * modif|ication,|
|00003bb0| 20 61 72 65 20 70 65 72 | 6d 69 74 74 65 64 20 70 | are per|mitted p|
|00003bc0| 72 6f 76 69 64 65 64 20 | 74 68 61 74 20 74 68 65 |rovided |that the|
|00003bd0| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 63 6f 6e 64 69 | followi|ng condi|
|00003be0| 74 69 6f 6e 73 0a 58 20 | 2a 20 61 72 65 20 6d 65 |tions.X |* are me|
|00003bf0| 74 3a 0a 58 20 2a 20 31 | 2e 20 52 65 64 69 73 74 |t:.X * 1|. Redist|
|00003c00| 72 69 62 75 74 69 6f 6e | 73 20 6f 66 20 73 6f 75 |ribution|s of sou|
|00003c10| 72 63 65 20 63 6f 64 65 | 20 6d 75 73 74 20 72 65 |rce code| must re|
|00003c20| 74 61 69 6e 20 74 68 65 | 20 61 62 6f 76 65 20 63 |tain the| above c|
|00003c30| 6f 70 79 72 69 67 68 74 | 0a 58 20 2a 20 20 20 20 |opyright|.X * |
|00003c40| 6e 6f 74 69 63 65 2c 20 | 74 68 69 73 20 6c 69 73 |notice, |this lis|
|00003c50| 74 20 6f 66 20 63 6f 6e | 64 69 74 69 6f 6e 73 20 |t of con|ditions |
|00003c60| 61 6e 64 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |and the |followin|
|00003c70| 67 20 64 69 73 63 6c 61 | 69 6d 65 72 2e 0a 58 20 |g discla|imer..X |
|00003c80| 2a 20 32 2e 20 52 65 64 | 69 73 74 72 69 62 75 74 |* 2. Red|istribut|
|00003c90| 69 6f 6e 73 20 69 6e 20 | 62 69 6e 61 72 79 20 66 |ions in |binary f|
|00003ca0| 6f 72 6d 20 6d 75 73 74 | 20 72 65 70 72 6f 64 75 |orm must| reprodu|
|00003cb0| 63 65 20 74 68 65 20 61 | 62 6f 76 65 20 63 6f 70 |ce the a|bove cop|
|00003cc0| 79 72 69 67 68 74 0a 58 | 20 2a 20 20 20 20 6e 6f |yright.X| * no|
|00003cd0| 74 69 63 65 2c 20 74 68 | 69 73 20 6c 69 73 74 20 |tice, th|is list |
|00003ce0| 6f 66 20 63 6f 6e 64 69 | 74 69 6f 6e 73 20 61 6e |of condi|tions an|
|00003cf0| 64 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |d the fo|llowing |
|00003d00| 64 69 73 63 6c 61 69 6d | 65 72 20 69 6e 20 74 68 |disclaim|er in th|
|00003d10| 65 0a 58 20 2a 20 20 20 | 20 64 6f 63 75 6d 65 6e |e.X * | documen|
|00003d20| 74 61 74 69 6f 6e 20 61 | 6e 64 2f 6f 72 20 6f 74 |tation a|nd/or ot|
|00003d30| 68 65 72 20 6d 61 74 65 | 72 69 61 6c 73 20 70 72 |her mate|rials pr|
|00003d40| 6f 76 69 64 65 64 20 77 | 69 74 68 20 74 68 65 20 |ovided w|ith the |
|00003d50| 64 69 73 74 72 69 62 75 | 74 69 6f 6e 2e 0a 58 20 |distribu|tion..X |
|00003d60| 2a 20 33 2e 20 41 6c 6c | 20 61 64 76 65 72 74 69 |* 3. All| adverti|
|00003d70| 73 69 6e 67 20 6d 61 74 | 65 72 69 61 6c 73 20 6d |sing mat|erials m|
|00003d80| 65 6e 74 69 6f 6e 69 6e | 67 20 66 65 61 74 75 72 |entionin|g featur|
|00003d90| 65 73 20 6f 72 20 75 73 | 65 20 6f 66 20 74 68 69 |es or us|e of thi|
|00003da0| 73 20 73 6f 66 74 77 61 | 72 65 0a 58 20 2a 20 20 |s softwa|re.X * |
|00003db0| 20 20 6d 75 73 74 20 64 | 69 73 70 6c 61 79 20 74 | must d|isplay t|
|00003dc0| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 61 63 6b |he follo|wing ack|
|00003dd0| 6e 6f 77 6c 65 64 67 65 | 6d 65 6e 74 3a 0a 58 20 |nowledge|ment:.X |
|00003de0| 2a 09 54 68 69 73 20 70 | 72 6f 64 75 63 74 20 69 |*.This p|roduct i|
|00003df0| 6e 63 6c 75 64 65 73 20 | 73 6f 66 74 77 61 72 65 |ncludes |software|
|00003e00| 20 64 65 76 65 6c 6f 70 | 65 64 20 62 79 20 74 68 | develop|ed by th|
|00003e10| 65 20 55 6e 69 76 65 72 | 73 69 74 79 20 6f 66 0a |e Univer|sity of.|
|00003e20| 58 20 2a 09 43 61 6c 69 | 66 6f 72 6e 69 61 2c 20 |X *.Cali|fornia, |
|00003e30| 42 65 72 6b 65 6c 65 79 | 20 61 6e 64 20 69 74 73 |Berkeley| and its|
|00003e40| 20 63 6f 6e 74 72 69 62 | 75 74 6f 72 73 2e 0a 58 | contrib|utors..X|
|00003e50| 20 2a 20 34 2e 20 4e 65 | 69 74 68 65 72 20 74 68 | * 4. Ne|ither th|
|00003e60| 65 20 6e 61 6d 65 20 6f | 66 20 74 68 65 20 55 6e |e name o|f the Un|
|00003e70| 69 76 65 72 73 69 74 79 | 20 6e 6f 72 20 74 68 65 |iversity| nor the|
|00003e80| 20 6e 61 6d 65 73 20 6f | 66 20 69 74 73 20 63 6f | names o|f its co|
|00003e90| 6e 74 72 69 62 75 74 6f | 72 73 0a 58 20 2a 20 20 |ntributo|rs.X * |
|00003ea0| 20 20 6d 61 79 20 62 65 | 20 75 73 65 64 20 74 6f | may be| used to|
|00003eb0| 20 65 6e 64 6f 72 73 65 | 20 6f 72 20 70 72 6f 6d | endorse| or prom|
|00003ec0| 6f 74 65 20 70 72 6f 64 | 75 63 74 73 20 64 65 72 |ote prod|ucts der|
|00003ed0| 69 76 65 64 20 66 72 6f | 6d 20 74 68 69 73 20 73 |ived fro|m this s|
|00003ee0| 6f 66 74 77 61 72 65 0a | 58 20 2a 20 20 20 20 77 |oftware.|X * w|
|00003ef0| 69 74 68 6f 75 74 20 73 | 70 65 63 69 66 69 63 20 |ithout s|pecific |
|00003f00| 70 72 69 6f 72 20 77 72 | 69 74 74 65 6e 20 70 65 |prior wr|itten pe|
|00003f10| 72 6d 69 73 73 69 6f 6e | 2e 0a 58 20 2a 0a 58 20 |rmission|..X *.X |
|00003f20| 2a 20 54 48 49 53 20 53 | 4f 46 54 57 41 52 45 20 |* THIS S|OFTWARE |
|00003f30| 49 53 20 50 52 4f 56 49 | 44 45 44 20 42 59 20 54 |IS PROVI|DED BY T|
|00003f40| 48 45 20 52 45 47 45 4e | 54 53 20 41 4e 44 20 43 |HE REGEN|TS AND C|
|00003f50| 4f 4e 54 52 49 42 55 54 | 4f 52 53 20 60 60 41 53 |ONTRIBUT|ORS ``AS|
|00003f60| 20 49 53 27 27 20 41 4e | 44 0a 58 20 2a 20 41 4e | IS'' AN|D.X * AN|
|00003f70| 59 20 45 58 50 52 45 53 | 53 20 4f 52 20 49 4d 50 |Y EXPRES|S OR IMP|
|00003f80| 4c 49 45 44 20 57 41 52 | 52 41 4e 54 49 45 53 2c |LIED WAR|RANTIES,|
|00003f90| 20 49 4e 43 4c 55 44 49 | 4e 47 2c 20 42 55 54 20 | INCLUDI|NG, BUT |
|00003fa0| 4e 4f 54 20 4c 49 4d 49 | 54 45 44 20 54 4f 2c 20 |NOT LIMI|TED TO, |
|00003fb0| 54 48 45 0a 58 20 2a 20 | 49 4d 50 4c 49 45 44 20 |THE.X * |IMPLIED |
|00003fc0| 57 41 52 52 41 4e 54 49 | 45 53 20 4f 46 20 4d 45 |WARRANTI|ES OF ME|
|00003fd0| 52 43 48 41 4e 54 41 42 | 49 4c 49 54 59 20 41 4e |RCHANTAB|ILITY AN|
|00003fe0| 44 20 46 49 54 4e 45 53 | 53 20 46 4f 52 20 41 20 |D FITNES|S FOR A |
|00003ff0| 50 41 52 54 49 43 55 4c | 41 52 20 50 55 52 50 4f |PARTICUL|AR PURPO|
|00004000| 53 45 0a 58 20 2a 20 41 | 52 45 20 44 49 53 43 4c |SE.X * A|RE DISCL|
|00004010| 41 49 4d 45 44 2e 20 20 | 49 4e 20 4e 4f 20 45 56 |AIMED. |IN NO EV|
|00004020| 45 4e 54 20 53 48 41 4c | 4c 20 54 48 45 20 52 45 |ENT SHAL|L THE RE|
|00004030| 47 45 4e 54 53 20 4f 52 | 20 43 4f 4e 54 52 49 42 |GENTS OR| CONTRIB|
|00004040| 55 54 4f 52 53 20 42 45 | 20 4c 49 41 42 4c 45 0a |UTORS BE| LIABLE.|
|00004050| 58 20 2a 20 46 4f 52 20 | 41 4e 59 20 44 49 52 45 |X * FOR |ANY DIRE|
|00004060| 43 54 2c 20 49 4e 44 49 | 52 45 43 54 2c 20 49 4e |CT, INDI|RECT, IN|
|00004070| 43 49 44 45 4e 54 41 4c | 2c 20 53 50 45 43 49 41 |CIDENTAL|, SPECIA|
|00004080| 4c 2c 20 45 58 45 4d 50 | 4c 41 52 59 2c 20 4f 52 |L, EXEMP|LARY, OR|
|00004090| 20 43 4f 4e 53 45 51 55 | 45 4e 54 49 41 4c 0a 58 | CONSEQU|ENTIAL.X|
|000040a0| 20 2a 20 44 41 4d 41 47 | 45 53 20 28 49 4e 43 4c | * DAMAG|ES (INCL|
|000040b0| 55 44 49 4e 47 2c 20 42 | 55 54 20 4e 4f 54 20 4c |UDING, B|UT NOT L|
|000040c0| 49 4d 49 54 45 44 20 54 | 4f 2c 20 50 52 4f 43 55 |IMITED T|O, PROCU|
|000040d0| 52 45 4d 45 4e 54 20 4f | 46 20 53 55 42 53 54 49 |REMENT O|F SUBSTI|
|000040e0| 54 55 54 45 20 47 4f 4f | 44 53 0a 58 20 2a 20 4f |TUTE GOO|DS.X * O|
|000040f0| 52 20 53 45 52 56 49 43 | 45 53 3b 20 4c 4f 53 53 |R SERVIC|ES; LOSS|
|00004100| 20 4f 46 20 55 53 45 2c | 20 44 41 54 41 2c 20 4f | OF USE,| DATA, O|
|00004110| 52 20 50 52 4f 46 49 54 | 53 3b 20 4f 52 20 42 55 |R PROFIT|S; OR BU|
|00004120| 53 49 4e 45 53 53 20 49 | 4e 54 45 52 52 55 50 54 |SINESS I|NTERRUPT|
|00004130| 49 4f 4e 29 0a 58 20 2a | 20 48 4f 57 45 56 45 52 |ION).X *| HOWEVER|
|00004140| 20 43 41 55 53 45 44 20 | 41 4e 44 20 4f 4e 20 41 | CAUSED |AND ON A|
|00004150| 4e 59 20 54 48 45 4f 52 | 59 20 4f 46 20 4c 49 41 |NY THEOR|Y OF LIA|
|00004160| 42 49 4c 49 54 59 2c 20 | 57 48 45 54 48 45 52 20 |BILITY, |WHETHER |
|00004170| 49 4e 20 43 4f 4e 54 52 | 41 43 54 2c 20 53 54 52 |IN CONTR|ACT, STR|
|00004180| 49 43 54 0a 58 20 2a 20 | 4c 49 41 42 49 4c 49 54 |ICT.X * |LIABILIT|
|00004190| 59 2c 20 4f 52 20 54 4f | 52 54 20 28 49 4e 43 4c |Y, OR TO|RT (INCL|
|000041a0| 55 44 49 4e 47 20 4e 45 | 47 4c 49 47 45 4e 43 45 |UDING NE|GLIGENCE|
|000041b0| 20 4f 52 20 4f 54 48 45 | 52 57 49 53 45 29 20 41 | OR OTHE|RWISE) A|
|000041c0| 52 49 53 49 4e 47 20 49 | 4e 20 41 4e 59 20 57 41 |RISING I|N ANY WA|
|000041d0| 59 0a 58 20 2a 20 4f 55 | 54 20 4f 46 20 54 48 45 |Y.X * OU|T OF THE|
|000041e0| 20 55 53 45 20 4f 46 20 | 54 48 49 53 20 53 4f 46 | USE OF |THIS SOF|
|000041f0| 54 57 41 52 45 2c 20 45 | 56 45 4e 20 49 46 20 41 |TWARE, E|VEN IF A|
|00004200| 44 56 49 53 45 44 20 4f | 46 20 54 48 45 20 50 4f |DVISED O|F THE PO|
|00004210| 53 53 49 42 49 4c 49 54 | 59 20 4f 46 0a 58 20 2a |SSIBILIT|Y OF.X *|
|00004220| 20 53 55 43 48 20 44 41 | 4d 41 47 45 2e 0a 58 20 | SUCH DA|MAGE..X |
|00004230| 2a 2f 0a 58 0a 58 23 69 | 66 6e 64 65 66 20 6c 69 |*/.X.X#i|fndef li|
|00004240| 6e 74 0a 58 63 68 61 72 | 20 63 6f 70 79 72 69 67 |nt.Xchar| copyrig|
|00004250| 68 74 5b 5d 20 3d 0a 58 | 22 40 28 23 29 20 43 6f |ht[] =.X|"@(#) Co|
|00004260| 70 79 72 69 67 68 74 20 | 28 63 29 20 31 39 39 30 |pyright |(c) 1990|
|00004270| 20 54 68 65 20 52 65 67 | 65 6e 74 73 20 6f 66 20 | The Reg|ents of |
|00004280| 74 68 65 20 55 6e 69 76 | 65 72 73 69 74 79 20 6f |the Univ|ersity o|
|00004290| 66 20 43 61 6c 69 66 6f | 72 6e 69 61 2e 5c 6e 5c |f Califo|rnia.\n\|
|000042a0| 0a 58 20 41 6c 6c 20 72 | 69 67 68 74 73 20 72 65 |.X All r|ights re|
|000042b0| 73 65 72 76 65 64 2e 5c | 6e 22 3b 0a 58 23 65 6e |served.\|n";.X#en|
|000042c0| 64 69 66 20 2f 2a 20 6e | 6f 74 20 6c 69 6e 74 20 |dif /* n|ot lint |
|000042d0| 2a 2f 0a 58 0a 58 23 69 | 66 6e 64 65 66 20 6c 69 |*/.X.X#i|fndef li|
|000042e0| 6e 74 0a 58 73 74 61 74 | 69 63 20 63 68 61 72 20 |nt.Xstat|ic char |
|000042f0| 73 63 63 73 69 64 5b 5d | 20 3d 20 22 40 28 23 29 |sccsid[]| = "@(#)|
|00004300| 70 6f 72 74 6d 61 70 2e | 63 09 35 2e 34 20 28 42 |portmap.|c.5.4 (B|
|00004310| 65 72 6b 65 6c 65 79 29 | 20 34 2f 31 39 2f 39 31 |erkeley)| 4/19/91|
|00004320| 22 3b 0a 58 23 65 6e 64 | 69 66 20 2f 2a 20 6e 6f |";.X#end|if /* no|
|00004330| 74 20 6c 69 6e 74 20 2a | 2f 0a 58 0a 58 2f 2a 0a |t lint *|/.X.X/*.|
|00004340| 58 40 28 23 29 70 6f 72 | 74 6d 61 70 2e 63 09 32 |X@(#)por|tmap.c.2|
|00004350| 2e 33 20 38 38 2f 30 38 | 2f 31 31 20 34 2e 30 20 |.3 88/08|/11 4.0 |
|00004360| 52 50 43 53 52 43 0a 58 | 73 74 61 74 69 63 20 63 |RPCSRC.X|static c|
|00004370| 68 61 72 20 73 63 63 73 | 69 64 5b 5d 20 3d 20 22 |har sccs|id[] = "|
|00004380| 40 28 23 29 70 6f 72 74 | 6d 61 70 2e 63 20 31 2e |@(#)port|map.c 1.|
|00004390| 33 32 20 38 37 2f 30 38 | 2f 30 36 20 43 6f 70 79 |32 87/08|/06 Copy|
|000043a0| 72 20 31 39 38 34 20 53 | 75 6e 20 4d 69 63 72 6f |r 1984 S|un Micro|
|000043b0| 22 3b 0a 58 2a 2f 0a 58 | 0a 58 2f 2a 0a 58 20 2a |";.X*/.X|.X/*.X *|
|000043c0| 20 70 6f 72 74 6d 61 70 | 2e 63 2c 20 49 6d 70 6c | portmap|.c, Impl|
|000043d0| 65 6d 65 6e 74 73 20 74 | 68 65 20 70 72 6f 67 72 |ements t|he progr|
|000043e0| 61 6d 2c 76 65 72 73 69 | 6f 6e 20 74 6f 20 70 6f |am,versi|on to po|
|000043f0| 72 74 20 6e 75 6d 62 65 | 72 20 6d 61 70 70 69 6e |rt numbe|r mappin|
|00004400| 67 20 66 6f 72 0a 58 20 | 2a 20 72 70 63 2e 0a 58 |g for.X |* rpc..X|
|00004410| 20 2a 2f 0a 58 0a 58 2f | 2a 0a 58 20 2a 20 53 75 | */.X.X/|*.X * Su|
|00004420| 6e 20 52 50 43 20 69 73 | 20 61 20 70 72 6f 64 75 |n RPC is| a produ|
|00004430| 63 74 20 6f 66 20 53 75 | 6e 20 4d 69 63 72 6f 73 |ct of Su|n Micros|
|00004440| 79 73 74 65 6d 73 2c 20 | 49 6e 63 2e 20 61 6e 64 |ystems, |Inc. and|
|00004450| 20 69 73 20 70 72 6f 76 | 69 64 65 64 20 66 6f 72 | is prov|ided for|
|00004460| 0a 58 20 2a 20 75 6e 72 | 65 73 74 72 69 63 74 65 |.X * unr|estricte|
|00004470| 64 20 75 73 65 20 70 72 | 6f 76 69 64 65 64 20 74 |d use pr|ovided t|
|00004480| 68 61 74 20 74 68 69 73 | 20 6c 65 67 65 6e 64 20 |hat this| legend |
|00004490| 69 73 20 69 6e 63 6c 75 | 64 65 64 20 6f 6e 20 61 |is inclu|ded on a|
|000044a0| 6c 6c 20 74 61 70 65 0a | 58 20 2a 20 6d 65 64 69 |ll tape.|X * medi|
|000044b0| 61 20 61 6e 64 20 61 73 | 20 61 20 70 61 72 74 20 |a and as| a part |
|000044c0| 6f 66 20 74 68 65 20 73 | 6f 66 74 77 61 72 65 20 |of the s|oftware |
|000044d0| 70 72 6f 67 72 61 6d 20 | 69 6e 20 77 68 6f 6c 65 |program |in whole|
|000044e0| 20 6f 72 20 70 61 72 74 | 2e 20 20 55 73 65 72 73 | or part|. Users|
|000044f0| 0a 58 20 2a 20 6d 61 79 | 20 63 6f 70 79 20 6f 72 |.X * may| copy or|
|00004500| 20 6d 6f 64 69 66 79 20 | 53 75 6e 20 52 50 43 20 | modify |Sun RPC |
|00004510| 77 69 74 68 6f 75 74 20 | 63 68 61 72 67 65 2c 20 |without |charge, |
|00004520| 62 75 74 20 61 72 65 20 | 6e 6f 74 20 61 75 74 68 |but are |not auth|
|00004530| 6f 72 69 7a 65 64 0a 58 | 20 2a 20 74 6f 20 6c 69 |orized.X| * to li|
|00004540| 63 65 6e 73 65 20 6f 72 | 20 64 69 73 74 72 69 62 |cense or| distrib|
|00004550| 75 74 65 20 69 74 20 74 | 6f 20 61 6e 79 6f 6e 65 |ute it t|o anyone|
|00004560| 20 65 6c 73 65 20 65 78 | 63 65 70 74 20 61 73 20 | else ex|cept as |
|00004570| 70 61 72 74 20 6f 66 20 | 61 20 70 72 6f 64 75 63 |part of |a produc|
|00004580| 74 20 6f 72 0a 58 20 2a | 20 70 72 6f 67 72 61 6d |t or.X *| program|
|00004590| 20 64 65 76 65 6c 6f 70 | 65 64 20 62 79 20 74 68 | develop|ed by th|
|000045a0| 65 20 75 73 65 72 2e 0a | 58 20 2a 20 0a 58 20 2a |e user..|X * .X *|
|000045b0| 20 53 55 4e 20 52 50 43 | 20 49 53 20 50 52 4f 56 | SUN RPC| IS PROV|
|000045c0| 49 44 45 44 20 41 53 20 | 49 53 20 57 49 54 48 20 |IDED AS |IS WITH |
|000045d0| 4e 4f 20 57 41 52 52 41 | 4e 54 49 45 53 20 4f 46 |NO WARRA|NTIES OF|
|000045e0| 20 41 4e 59 20 4b 49 4e | 44 20 49 4e 43 4c 55 44 | ANY KIN|D INCLUD|
|000045f0| 49 4e 47 20 54 48 45 0a | 58 20 2a 20 57 41 52 52 |ING THE.|X * WARR|
|00004600| 41 4e 54 49 45 53 20 4f | 46 20 44 45 53 49 47 4e |ANTIES O|F DESIGN|
|00004610| 2c 20 4d 45 52 43 48 41 | 4e 54 49 42 49 4c 49 54 |, MERCHA|NTIBILIT|
|00004620| 59 20 41 4e 44 20 46 49 | 54 4e 45 53 53 20 46 4f |Y AND FI|TNESS FO|
|00004630| 52 20 41 20 50 41 52 54 | 49 43 55 4c 41 52 0a 58 |R A PART|ICULAR.X|
|00004640| 20 2a 20 50 55 52 50 4f | 53 45 2c 20 4f 52 20 41 | * PURPO|SE, OR A|
|00004650| 52 49 53 49 4e 47 20 46 | 52 4f 4d 20 41 20 43 4f |RISING F|ROM A CO|
|00004660| 55 52 53 45 20 4f 46 20 | 44 45 41 4c 49 4e 47 2c |URSE OF |DEALING,|
|00004670| 20 55 53 41 47 45 20 4f | 52 20 54 52 41 44 45 20 | USAGE O|R TRADE |
|00004680| 50 52 41 43 54 49 43 45 | 2e 0a 58 20 2a 20 0a 58 |PRACTICE|..X * .X|
|00004690| 20 2a 20 53 75 6e 20 52 | 50 43 20 69 73 20 70 72 | * Sun R|PC is pr|
|000046a0| 6f 76 69 64 65 64 20 77 | 69 74 68 20 6e 6f 20 73 |ovided w|ith no s|
|000046b0| 75 70 70 6f 72 74 20 61 | 6e 64 20 77 69 74 68 6f |upport a|nd witho|
|000046c0| 75 74 20 61 6e 79 20 6f | 62 6c 69 67 61 74 69 6f |ut any o|bligatio|
|000046d0| 6e 20 6f 6e 20 74 68 65 | 0a 58 20 2a 20 70 61 72 |n on the|.X * par|
|000046e0| 74 20 6f 66 20 53 75 6e | 20 4d 69 63 72 6f 73 79 |t of Sun| Microsy|
|000046f0| 73 74 65 6d 73 2c 20 49 | 6e 63 2e 20 74 6f 20 61 |stems, I|nc. to a|
|00004700| 73 73 69 73 74 20 69 6e | 20 69 74 73 20 75 73 65 |ssist in| its use|
|00004710| 2c 20 63 6f 72 72 65 63 | 74 69 6f 6e 2c 0a 58 20 |, correc|tion,.X |
|00004720| 2a 20 6d 6f 64 69 66 69 | 63 61 74 69 6f 6e 20 6f |* modifi|cation o|
|00004730| 72 20 65 6e 68 61 6e 63 | 65 6d 65 6e 74 2e 0a 58 |r enhanc|ement..X|
|00004740| 20 2a 20 0a 58 20 2a 20 | 53 55 4e 20 4d 49 43 52 | * .X * |SUN MICR|
|00004750| 4f 53 59 53 54 45 4d 53 | 2c 20 49 4e 43 2e 20 53 |OSYSTEMS|, INC. S|
|00004760| 48 41 4c 4c 20 48 41 56 | 45 20 4e 4f 20 4c 49 41 |HALL HAV|E NO LIA|
|00004770| 42 49 4c 49 54 59 20 57 | 49 54 48 20 52 45 53 50 |BILITY W|ITH RESP|
|00004780| 45 43 54 20 54 4f 20 54 | 48 45 0a 58 20 2a 20 49 |ECT TO T|HE.X * I|
|00004790| 4e 46 52 49 4e 47 45 4d | 45 4e 54 20 4f 46 20 43 |NFRINGEM|ENT OF C|
|000047a0| 4f 50 59 52 49 47 48 54 | 53 2c 20 54 52 41 44 45 |OPYRIGHT|S, TRADE|
|000047b0| 20 53 45 43 52 45 54 53 | 20 4f 52 20 41 4e 59 20 | SECRETS| OR ANY |
|000047c0| 50 41 54 45 4e 54 53 20 | 42 59 20 53 55 4e 20 52 |PATENTS |BY SUN R|
|000047d0| 50 43 0a 58 20 2a 20 4f | 52 20 41 4e 59 20 50 41 |PC.X * O|R ANY PA|
|000047e0| 52 54 20 54 48 45 52 45 | 4f 46 2e 0a 58 20 2a 20 |RT THERE|OF..X * |
|000047f0| 0a 58 20 2a 20 49 6e 20 | 6e 6f 20 65 76 65 6e 74 |.X * In |no event|
|00004800| 20 77 69 6c 6c 20 53 75 | 6e 20 4d 69 63 72 6f 73 | will Su|n Micros|
|00004810| 79 73 74 65 6d 73 2c 20 | 49 6e 63 2e 20 62 65 20 |ystems, |Inc. be |
|00004820| 6c 69 61 62 6c 65 20 66 | 6f 72 20 61 6e 79 20 6c |liable f|or any l|
|00004830| 6f 73 74 20 72 65 76 65 | 6e 75 65 0a 58 20 2a 20 |ost reve|nue.X * |
|00004840| 6f 72 20 70 72 6f 66 69 | 74 73 20 6f 72 20 6f 74 |or profi|ts or ot|
|00004850| 68 65 72 20 73 70 65 63 | 69 61 6c 2c 20 69 6e 64 |her spec|ial, ind|
|00004860| 69 72 65 63 74 20 61 6e | 64 20 63 6f 6e 73 65 71 |irect an|d conseq|
|00004870| 75 65 6e 74 69 61 6c 20 | 64 61 6d 61 67 65 73 2c |uential |damages,|
|00004880| 20 65 76 65 6e 20 69 66 | 0a 58 20 2a 20 53 75 6e | even if|.X * Sun|
|00004890| 20 68 61 73 20 62 65 65 | 6e 20 61 64 76 69 73 65 | has bee|n advise|
|000048a0| 64 20 6f 66 20 74 68 65 | 20 70 6f 73 73 69 62 69 |d of the| possibi|
|000048b0| 6c 69 74 79 20 6f 66 20 | 73 75 63 68 20 64 61 6d |lity of |such dam|
|000048c0| 61 67 65 73 2e 0a 58 20 | 2a 20 0a 58 20 2a 20 53 |ages..X |* .X * S|
|000048d0| 75 6e 20 4d 69 63 72 6f | 73 79 73 74 65 6d 73 2c |un Micro|systems,|
|000048e0| 20 49 6e 63 2e 0a 58 20 | 2a 20 32 35 35 30 20 47 | Inc..X |* 2550 G|
|000048f0| 61 72 63 69 61 20 41 76 | 65 6e 75 65 0a 58 20 2a |arcia Av|enue.X *|
|00004900| 20 4d 6f 75 6e 74 61 69 | 6e 20 56 69 65 77 2c 20 | Mountai|n View, |
|00004910| 43 61 6c 69 66 6f 72 6e | 69 61 20 20 39 34 30 34 |Californ|ia 9404|
|00004920| 33 0a 58 20 2a 2f 0a 58 | 0a 58 23 69 6e 63 6c 75 |3.X */.X|.X#inclu|
|00004930| 64 65 20 3c 72 70 63 2f | 72 70 63 2e 68 3e 0a 58 |de <rpc/|rpc.h>.X|
|00004940| 23 69 6e 63 6c 75 64 65 | 20 3c 72 70 63 2f 70 6d |#include| <rpc/pm|
|00004950| 61 70 5f 70 72 6f 74 2e | 68 3e 0a 58 23 69 6e 63 |ap_prot.|h>.X#inc|
|00004960| 6c 75 64 65 20 3c 73 74 | 64 69 6f 2e 68 3e 0a 58 |lude <st|dio.h>.X|
|00004970| 23 69 6e 63 6c 75 64 65 | 20 3c 73 79 73 6c 6f 67 |#include| <syslog|
|00004980| 2e 68 3e 0a 58 23 69 6e | 63 6c 75 64 65 20 3c 6e |.h>.X#in|clude <n|
|00004990| 65 74 64 62 2e 68 3e 0a | 58 23 69 6e 63 6c 75 64 |etdb.h>.|X#includ|
|000049a0| 65 20 3c 73 79 73 2f 73 | 6f 63 6b 65 74 2e 68 3e |e <sys/s|ocket.h>|
|000049b0| 0a 58 23 69 6e 63 6c 75 | 64 65 20 3c 73 79 73 2f |.X#inclu|de <sys/|
|000049c0| 69 6f 63 74 6c 2e 68 3e | 0a 58 23 69 6e 63 6c 75 |ioctl.h>|.X#inclu|
|000049d0| 64 65 20 3c 73 79 73 2f | 77 61 69 74 2e 68 3e 0a |de <sys/|wait.h>.|
|000049e0| 58 23 69 6e 63 6c 75 64 | 65 20 3c 73 79 73 2f 73 |X#includ|e <sys/s|
|000049f0| 69 67 6e 61 6c 2e 68 3e | 0a 58 23 69 6e 63 6c 75 |ignal.h>|.X#inclu|
|00004a00| 64 65 20 3c 73 79 73 2f | 74 69 6d 65 2e 68 3e 0a |de <sys/|time.h>.|
|00004a10| 58 23 69 6e 63 6c 75 64 | 65 20 3c 73 79 73 2f 72 |X#includ|e <sys/r|
|00004a20| 65 73 6f 75 72 63 65 2e | 68 3e 0a 58 23 69 66 64 |esource.|h>.X#ifd|
|00004a30| 65 66 20 53 59 53 56 34 | 30 0a 58 23 69 6e 63 6c |ef SYSV4|0.X#incl|
|00004a40| 75 64 65 20 3c 6e 65 74 | 69 6e 65 74 2f 69 6e 2e |ude <net|inet/in.|
|00004a50| 68 3e 0a 58 23 65 6e 64 | 69 66 0a 58 0a 58 65 78 |h>.X#end|if.X.Xex|
|00004a60| 74 65 72 6e 20 63 68 61 | 72 20 2a 73 74 72 65 72 |tern cha|r *strer|
|00004a70| 72 6f 72 28 29 3b 0a 58 | 65 78 74 65 72 6e 20 63 |ror();.X|extern c|
|00004a80| 68 61 72 20 2a 6d 61 6c | 6c 6f 63 28 29 3b 0a 58 |har *mal|loc();.X|
|00004a90| 0a 58 23 69 66 6e 64 65 | 66 20 4c 4f 47 5f 50 45 |.X#ifnde|f LOG_PE|
|00004aa0| 52 52 4f 52 0a 58 23 64 | 65 66 69 6e 65 20 4c 4f |RROR.X#d|efine LO|
|00004ab0| 47 5f 50 45 52 52 4f 52 | 20 30 0a 58 23 65 6e 64 |G_PERROR| 0.X#end|
|00004ac0| 69 66 0a 58 0a 58 23 69 | 66 6e 64 65 66 20 4c 4f |if.X.X#i|fndef LO|
|00004ad0| 47 5f 44 41 45 4d 4f 4e | 0a 58 23 64 65 66 69 6e |G_DAEMON|.X#defin|
|00004ae0| 65 20 4c 4f 47 5f 44 41 | 45 4d 4f 4e 20 30 0a 58 |e LOG_DA|EMON 0.X|
|00004af0| 23 65 6e 64 69 66 0a 58 | 0a 58 23 69 66 6e 64 65 |#endif.X|.X#ifnde|
|00004b00| 66 20 73 76 63 5f 67 65 | 74 63 61 6c 6c 65 72 09 |f svc_ge|tcaller.|
|00004b10| 09 2f 2a 20 53 59 53 56 | 34 20 2a 2f 0a 58 23 20 |./* SYSV|4 */.X# |
|00004b20| 20 64 65 66 69 6e 65 20 | 73 76 63 5f 67 65 74 63 | define |svc_getc|
|00004b30| 61 6c 6c 65 72 20 73 76 | 63 5f 67 65 74 72 70 63 |aller sv|c_getrpc|
|00004b40| 63 61 6c 6c 65 72 0a 58 | 23 65 6e 64 69 66 0a 58 |caller.X|#endif.X|
|00004b50| 0a 58 76 6f 69 64 20 72 | 65 67 5f 73 65 72 76 69 |.Xvoid r|eg_servi|
|00004b60| 63 65 28 29 3b 0a 58 76 | 6f 69 64 20 72 65 61 70 |ce();.Xv|oid reap|
|00004b70| 28 29 3b 0a 58 73 74 61 | 74 69 63 20 76 6f 69 64 |();.Xsta|tic void|
|00004b80| 20 63 61 6c 6c 69 74 28 | 29 3b 0a 58 73 74 72 75 | callit(|);.Xstru|
|00004b90| 63 74 20 70 6d 61 70 6c | 69 73 74 20 2a 70 6d 61 |ct pmapl|ist *pma|
|00004ba0| 70 6c 69 73 74 3b 0a 58 | 69 6e 74 20 64 65 62 75 |plist;.X|int debu|
|00004bb0| 67 67 69 6e 67 20 3d 20 | 30 3b 0a 58 65 78 74 65 |gging = |0;.Xexte|
|00004bc0| 72 6e 20 69 6e 74 20 65 | 72 72 6e 6f 3b 0a 58 0a |rn int e|rrno;.X.|
|00004bd0| 58 23 69 6e 63 6c 75 64 | 65 20 22 70 6d 61 70 5f |X#includ|e "pmap_|
|00004be0| 63 68 65 63 6b 2e 68 22 | 0a 58 0a 58 6d 61 69 6e |check.h"|.X.Xmain|
|00004bf0| 28 61 72 67 63 2c 20 61 | 72 67 76 29 0a 58 09 69 |(argc, a|rgv).X.i|
|00004c00| 6e 74 20 61 72 67 63 3b | 0a 58 09 63 68 61 72 20 |nt argc;|.X.char |
|00004c10| 2a 2a 61 72 67 76 3b 0a | 58 7b 0a 58 09 53 56 43 |**argv;.|X{.X.SVC|
|00004c20| 58 50 52 54 20 2a 78 70 | 72 74 3b 0a 58 09 69 6e |XPRT *xp|rt;.X.in|
|00004c30| 74 20 73 6f 63 6b 2c 20 | 63 3b 0a 58 09 73 74 72 |t sock, |c;.X.str|
|00004c40| 75 63 74 20 73 6f 63 6b | 61 64 64 72 5f 69 6e 20 |uct sock|addr_in |
|00004c50| 61 64 64 72 3b 0a 58 09 | 69 6e 74 20 6c 65 6e 20 |addr;.X.|int len |
|00004c60| 3d 20 73 69 7a 65 6f 66 | 28 73 74 72 75 63 74 20 |= sizeof|(struct |
|00004c70| 73 6f 63 6b 61 64 64 72 | 5f 69 6e 29 3b 0a 58 09 |sockaddr|_in);.X.|
|00004c80| 72 65 67 69 73 74 65 72 | 20 73 74 72 75 63 74 20 |register| struct |
|00004c90| 70 6d 61 70 6c 69 73 74 | 20 2a 70 6d 6c 3b 0a 58 |pmaplist| *pml;.X|
|00004ca0| 0a 58 09 77 68 69 6c 65 | 20 28 28 63 20 3d 20 67 |.X.while| ((c = g|
|00004cb0| 65 74 6f 70 74 28 61 72 | 67 63 2c 20 61 72 67 76 |etopt(ar|gc, argv|
|00004cc0| 2c 20 22 64 76 22 29 29 | 20 21 3d 20 45 4f 46 29 |, "dv"))| != EOF)|
|00004cd0| 20 7b 0a 58 09 09 73 77 | 69 74 63 68 20 28 63 29 | {.X..sw|itch (c)|
|00004ce0| 20 7b 0a 58 0a 58 09 09 | 63 61 73 65 20 27 64 27 | {.X.X..|case 'd'|
|00004cf0| 3a 0a 58 09 09 09 64 65 | 62 75 67 67 69 6e 67 20 |:.X...de|bugging |
|00004d00| 3d 20 31 3b 0a 58 09 09 | 09 62 72 65 61 6b 3b 0a |= 1;.X..|.break;.|
|00004d10| 58 0a 58 09 09 63 61 73 | 65 20 27 76 27 3a 0a 58 |X.X..cas|e 'v':.X|
|00004d20| 09 09 09 76 65 72 62 6f | 73 65 6c 6f 67 20 3d 20 |...verbo|selog = |
|00004d30| 31 3b 0a 58 09 09 09 62 | 72 65 61 6b 3b 0a 58 0a |1;.X...b|reak;.X.|
|00004d40| 58 09 09 64 65 66 61 75 | 6c 74 3a 0a 58 09 09 09 |X..defau|lt:.X...|
|00004d50| 28 76 6f 69 64 29 20 66 | 70 72 69 6e 74 66 28 73 |(void) f|printf(s|
|00004d60| 74 64 65 72 72 2c 20 22 | 75 73 61 67 65 3a 20 25 |tderr, "|usage: %|
|00004d70| 73 20 5b 2d 64 76 5d 5c | 6e 22 2c 20 61 72 67 76 |s [-dv]\|n", argv|
|00004d80| 5b 30 5d 29 3b 0a 58 09 | 09 09 28 76 6f 69 64 29 |[0]);.X.|..(void)|
|00004d90| 20 66 70 72 69 6e 74 66 | 28 73 74 64 65 72 72 2c | fprintf|(stderr,|
|00004da0| 20 22 2d 64 3a 20 64 65 | 62 75 67 67 69 6e 67 20 | "-d: de|bugging |
|00004db0| 6d 6f 64 65 5c 6e 22 29 | 3b 0a 58 09 09 09 28 76 |mode\n")|;.X...(v|
|00004dc0| 6f 69 64 29 20 66 70 72 | 69 6e 74 66 28 73 74 64 |oid) fpr|intf(std|
|00004dd0| 65 72 72 2c 20 22 2d 76 | 3a 20 76 65 72 62 6f 73 |err, "-v|: verbos|
|00004de0| 65 20 6c 6f 67 67 69 6e | 67 5c 6e 22 29 3b 0a 58 |e loggin|g\n");.X|
|00004df0| 09 09 09 65 78 69 74 28 | 31 29 3b 0a 58 09 09 7d |...exit(|1);.X..}|
|00004e00| 0a 58 09 7d 0a 58 0a 58 | 09 69 66 20 28 21 64 65 |.X.}.X.X|.if (!de|
|00004e10| 62 75 67 67 69 6e 67 20 | 26 26 20 64 61 65 6d 6f |bugging |&& daemo|
|00004e20| 6e 28 30 2c 20 30 29 29 | 20 7b 0a 58 09 09 28 76 |n(0, 0))| {.X..(v|
|00004e30| 6f 69 64 29 20 66 70 72 | 69 6e 74 66 28 73 74 64 |oid) fpr|intf(std|
|00004e40| 65 72 72 2c 20 22 70 6f | 72 74 6d 61 70 3a 20 66 |err, "po|rtmap: f|
|00004e50| 6f 72 6b 3a 20 25 73 22 | 2c 20 73 74 72 65 72 72 |ork: %s"|, strerr|
|00004e60| 6f 72 28 65 72 72 6e 6f | 29 29 3b 0a 58 09 09 65 |or(errno|));.X..e|
|00004e70| 78 69 74 28 31 29 3b 0a | 58 09 7d 0a 58 0a 58 23 |xit(1);.|X.}.X.X#|
|00004e80| 69 66 64 65 66 20 4c 4f | 47 5f 4d 41 49 4c 0a 58 |ifdef LO|G_MAIL.X|
|00004e90| 09 6f 70 65 6e 6c 6f 67 | 28 22 70 6f 72 74 6d 61 |.openlog|("portma|
|00004ea0| 70 22 2c 20 64 65 62 75 | 67 67 69 6e 67 20 3f 20 |p", debu|gging ? |
|00004eb0| 4c 4f 47 5f 50 49 44 20 | 7c 20 4c 4f 47 5f 50 45 |LOG_PID || LOG_PE|
|00004ec0| 52 52 4f 52 20 3a 20 4c | 4f 47 5f 50 49 44 2c 0a |RROR : L|OG_PID,.|
|00004ed0| 58 09 20 20 20 20 46 41 | 43 49 4c 49 54 59 29 3b |X. FA|CILITY);|
|00004ee0| 0a 58 23 65 6c 73 65 0a | 58 09 6f 70 65 6e 6c 6f |.X#else.|X.openlo|
|00004ef0| 67 28 22 70 6f 72 74 6d | 61 70 22 2c 20 64 65 62 |g("portm|ap", deb|
|00004f00| 75 67 67 69 6e 67 20 3f | 20 4c 4f 47 5f 50 49 44 |ugging ?| LOG_PID|
|00004f10| 20 7c 20 4c 4f 47 5f 50 | 45 52 52 4f 52 20 3a 20 | | LOG_P|ERROR : |
|00004f20| 4c 4f 47 5f 50 49 44 29 | 3b 0a 58 23 65 6e 64 69 |LOG_PID)|;.X#endi|
|00004f30| 66 0a 58 0a 58 09 69 66 | 20 28 28 73 6f 63 6b 20 |f.X.X.if| ((sock |
|00004f40| 3d 20 73 6f 63 6b 65 74 | 28 41 46 5f 49 4e 45 54 |= socket|(AF_INET|
|00004f50| 2c 20 53 4f 43 4b 5f 44 | 47 52 41 4d 2c 20 49 50 |, SOCK_D|GRAM, IP|
|00004f60| 50 52 4f 54 4f 5f 55 44 | 50 29 29 20 3c 20 30 29 |PROTO_UD|P)) < 0)|
|00004f70| 20 7b 0a 58 09 09 73 79 | 73 6c 6f 67 28 4c 4f 47 | {.X..sy|slog(LOG|
|00004f80| 5f 45 52 52 2c 20 22 63 | 61 6e 6e 6f 74 20 63 72 |_ERR, "c|annot cr|
|00004f90| 65 61 74 65 20 75 64 70 | 20 73 6f 63 6b 65 74 3a |eate udp| socket:|
|00004fa0| 20 25 6d 22 29 3b 0a 58 | 09 09 65 78 69 74 28 31 | %m");.X|..exit(1|
|00004fb0| 29 3b 0a 58 09 7d 0a 58 | 0a 58 09 61 64 64 72 2e |);.X.}.X|.X.addr.|
|00004fc0| 73 69 6e 5f 61 64 64 72 | 2e 73 5f 61 64 64 72 20 |sin_addr|.s_addr |
|00004fd0| 3d 20 30 3b 0a 58 09 61 | 64 64 72 2e 73 69 6e 5f |= 0;.X.a|ddr.sin_|
|00004fe0| 66 61 6d 69 6c 79 20 3d | 20 41 46 5f 49 4e 45 54 |family =| AF_INET|
|00004ff0| 3b 0a 58 09 61 64 64 72 | 2e 73 69 6e 5f 70 6f 72 |;.X.addr|.sin_por|
|00005000| 74 20 3d 20 68 74 6f 6e | 73 28 50 4d 41 50 50 4f |t = hton|s(PMAPPO|
|00005010| 52 54 29 3b 0a 58 09 69 | 66 20 28 62 69 6e 64 28 |RT);.X.i|f (bind(|
|00005020| 73 6f 63 6b 2c 20 28 73 | 74 72 75 63 74 20 73 6f |sock, (s|truct so|
|00005030| 63 6b 61 64 64 72 20 2a | 29 26 61 64 64 72 2c 20 |ckaddr *|)&addr, |
|00005040| 6c 65 6e 29 20 21 3d 20 | 30 29 20 7b 0a 58 09 09 |len) != |0) {.X..|
|00005050| 73 79 73 6c 6f 67 28 4c | 4f 47 5f 45 52 52 2c 20 |syslog(L|OG_ERR, |
|00005060| 22 63 61 6e 6e 6f 74 20 | 62 69 6e 64 20 75 64 70 |"cannot |bind udp|
|00005070| 3a 20 25 6d 22 29 3b 0a | 58 09 09 65 78 69 74 28 |: %m");.|X..exit(|
|00005080| 31 29 3b 0a 58 09 7d 0a | 58 0a 58 09 69 66 20 28 |1);.X.}.|X.X.if (|
|00005090| 28 78 70 72 74 20 3d 20 | 73 76 63 75 64 70 5f 63 |(xprt = |svcudp_c|
|000050a0| 72 65 61 74 65 28 73 6f | 63 6b 29 29 20 3d 3d 20 |reate(so|ck)) == |
|000050b0| 28 53 56 43 58 50 52 54 | 20 2a 29 4e 55 4c 4c 29 |(SVCXPRT| *)NULL)|
|000050c0| 20 7b 0a 58 09 09 73 79 | 73 6c 6f 67 28 4c 4f 47 | {.X..sy|slog(LOG|
|000050d0| 5f 45 52 52 2c 20 22 63 | 6f 75 6c 64 6e 27 74 20 |_ERR, "c|ouldn't |
|000050e0| 64 6f 20 75 64 70 5f 63 | 72 65 61 74 65 22 29 3b |do udp_c|reate");|
|000050f0| 0a 58 09 09 65 78 69 74 | 28 31 29 3b 0a 58 09 7d |.X..exit|(1);.X.}|
|00005100| 0a 58 09 2f 2a 20 6d 61 | 6b 65 20 61 6e 20 65 6e |.X./* ma|ke an en|
|00005110| 74 72 79 20 66 6f 72 20 | 6f 75 72 73 65 6c 66 20 |try for |ourself |
|00005120| 2a 2f 0a 58 09 70 6d 6c | 20 3d 20 28 73 74 72 75 |*/.X.pml| = (stru|
|00005130| 63 74 20 70 6d 61 70 6c | 69 73 74 20 2a 29 6d 61 |ct pmapl|ist *)ma|
|00005140| 6c 6c 6f 63 28 28 75 5f | 69 6e 74 29 73 69 7a 65 |lloc((u_|int)size|
|00005150| 6f 66 28 73 74 72 75 63 | 74 20 70 6d 61 70 6c 69 |of(struc|t pmapli|
|00005160| 73 74 29 29 3b 0a 58 09 | 70 6d 6c 2d 3e 70 6d 6c |st));.X.|pml->pml|
|00005170| 5f 6e 65 78 74 20 3d 20 | 30 3b 0a 58 09 70 6d 6c |_next = |0;.X.pml|
|00005180| 2d 3e 70 6d 6c 5f 6d 61 | 70 2e 70 6d 5f 70 72 6f |->pml_ma|p.pm_pro|
|00005190| 67 20 3d 20 50 4d 41 50 | 50 52 4f 47 3b 0a 58 09 |g = PMAP|PROG;.X.|
|000051a0| 70 6d 6c 2d 3e 70 6d 6c | 5f 6d 61 70 2e 70 6d 5f |pml->pml|_map.pm_|
|000051b0| 76 65 72 73 20 3d 20 50 | 4d 41 50 56 45 52 53 3b |vers = P|MAPVERS;|
|000051c0| 0a 58 09 70 6d 6c 2d 3e | 70 6d 6c 5f 6d 61 70 2e |.X.pml->|pml_map.|
|000051d0| 70 6d 5f 70 72 6f 74 20 | 3d 20 49 50 50 52 4f 54 |pm_prot |= IPPROT|
|000051e0| 4f 5f 55 44 50 3b 0a 58 | 09 70 6d 6c 2d 3e 70 6d |O_UDP;.X|.pml->pm|
|000051f0| 6c 5f 6d 61 70 2e 70 6d | 5f 70 6f 72 74 20 3d 20 |l_map.pm|_port = |
|00005200| 50 4d 41 50 50 4f 52 54 | 3b 0a 58 09 70 6d 61 70 |PMAPPORT|;.X.pmap|
|00005210| 6c 69 73 74 20 3d 20 70 | 6d 6c 3b 0a 58 0a 58 09 |list = p|ml;.X.X.|
|00005220| 69 66 20 28 28 73 6f 63 | 6b 20 3d 20 73 6f 63 6b |if ((soc|k = sock|
|00005230| 65 74 28 41 46 5f 49 4e | 45 54 2c 20 53 4f 43 4b |et(AF_IN|ET, SOCK|
|00005240| 5f 53 54 52 45 41 4d 2c | 20 49 50 50 52 4f 54 4f |_STREAM,| IPPROTO|
|00005250| 5f 54 43 50 29 29 20 3c | 20 30 29 20 7b 0a 58 09 |_TCP)) <| 0) {.X.|
|00005260| 09 73 79 73 6c 6f 67 28 | 4c 4f 47 5f 45 52 52 2c |.syslog(|LOG_ERR,|
|00005270| 20 22 63 61 6e 6e 6f 74 | 20 63 72 65 61 74 65 20 | "cannot| create |
|00005280| 74 63 70 20 73 6f 63 6b | 65 74 3a 20 25 6d 22 29 |tcp sock|et: %m")|
|00005290| 3b 0a 58 09 09 65 78 69 | 74 28 31 29 3b 0a 58 09 |;.X..exi|t(1);.X.|
|000052a0| 7d 0a 58 09 69 66 20 28 | 62 69 6e 64 28 73 6f 63 |}.X.if (|bind(soc|
|000052b0| 6b 2c 20 28 73 74 72 75 | 63 74 20 73 6f 63 6b 61 |k, (stru|ct socka|
|000052c0| 64 64 72 20 2a 29 26 61 | 64 64 72 2c 20 6c 65 6e |ddr *)&a|ddr, len|
|000052d0| 29 20 21 3d 20 30 29 20 | 7b 0a 58 09 09 73 79 73 |) != 0) |{.X..sys|
|000052e0| 6c 6f 67 28 4c 4f 47 5f | 45 52 52 2c 20 22 63 61 |log(LOG_|ERR, "ca|
|000052f0| 6e 6e 6f 74 20 62 69 6e | 64 20 75 64 70 3a 20 25 |nnot bin|d udp: %|
|00005300| 6d 22 29 3b 0a 58 09 09 | 65 78 69 74 28 31 29 3b |m");.X..|exit(1);|
|00005310| 0a 58 09 7d 0a 58 09 69 | 66 20 28 28 78 70 72 74 |.X.}.X.i|f ((xprt|
|00005320| 20 3d 20 73 76 63 74 63 | 70 5f 63 72 65 61 74 65 | = svctc|p_create|
|00005330| 28 73 6f 63 6b 2c 20 52 | 50 43 53 4d 41 4c 4c 4d |(sock, R|PCSMALLM|
|00005340| 53 47 53 49 5a 45 2c 20 | 52 50 43 53 4d 41 4c 4c |SGSIZE, |RPCSMALL|
|00005350| 4d 53 47 53 49 5a 45 29 | 29 0a 58 09 20 20 20 20 |MSGSIZE)|).X. |
|00005360| 3d 3d 20 28 53 56 43 58 | 50 52 54 20 2a 29 4e 55 |== (SVCX|PRT *)NU|
|00005370| 4c 4c 29 20 7b 0a 58 09 | 09 73 79 73 6c 6f 67 28 |LL) {.X.|.syslog(|
|00005380| 4c 4f 47 5f 45 52 52 2c | 20 22 63 6f 75 6c 64 6e |LOG_ERR,| "couldn|
|00005390| 27 74 20 64 6f 20 74 63 | 70 5f 63 72 65 61 74 65 |'t do tc|p_create|
|000053a0| 22 29 3b 0a 58 09 09 65 | 78 69 74 28 31 29 3b 0a |");.X..e|xit(1);.|
|000053b0| 58 09 7d 0a 58 09 2f 2a | 20 6d 61 6b 65 20 61 6e |X.}.X./*| make an|
|000053c0| 20 65 6e 74 72 79 20 66 | 6f 72 20 6f 75 72 73 65 | entry f|or ourse|
|000053d0| 6c 66 20 2a 2f 0a 58 09 | 70 6d 6c 20 3d 20 28 73 |lf */.X.|pml = (s|
|000053e0| 74 72 75 63 74 20 70 6d | 61 70 6c 69 73 74 20 2a |truct pm|aplist *|
|000053f0| 29 6d 61 6c 6c 6f 63 28 | 28 75 5f 69 6e 74 29 73 |)malloc(|(u_int)s|
|00005400| 69 7a 65 6f 66 28 73 74 | 72 75 63 74 20 70 6d 61 |izeof(st|ruct pma|
|00005410| 70 6c 69 73 74 29 29 3b | 0a 58 09 70 6d 6c 2d 3e |plist));|.X.pml->|
|00005420| 70 6d 6c 5f 6d 61 70 2e | 70 6d 5f 70 72 6f 67 20 |pml_map.|pm_prog |
|00005430| 3d 20 50 4d 41 50 50 52 | 4f 47 3b 0a 58 09 70 6d |= PMAPPR|OG;.X.pm|
|00005440| 6c 2d 3e 70 6d 6c 5f 6d | 61 70 2e 70 6d 5f 76 65 |l->pml_m|ap.pm_ve|
|00005450| 72 73 20 3d 20 50 4d 41 | 50 56 45 52 53 3b 0a 58 |rs = PMA|PVERS;.X|
|00005460| 09 70 6d 6c 2d 3e 70 6d | 6c 5f 6d 61 70 2e 70 6d |.pml->pm|l_map.pm|
|00005470| 5f 70 72 6f 74 20 3d 20 | 49 50 50 52 4f 54 4f 5f |_prot = |IPPROTO_|
|00005480| 54 43 50 3b 0a 58 09 70 | 6d 6c 2d 3e 70 6d 6c 5f |TCP;.X.p|ml->pml_|
|00005490| 6d 61 70 2e 70 6d 5f 70 | 6f 72 74 20 3d 20 50 4d |map.pm_p|ort = PM|
|000054a0| 41 50 50 4f 52 54 3b 0a | 58 09 70 6d 6c 2d 3e 70 |APPORT;.|X.pml->p|
|000054b0| 6d 6c 5f 6e 65 78 74 20 | 3d 20 70 6d 61 70 6c 69 |ml_next |= pmapli|
|000054c0| 73 74 3b 0a 58 09 70 6d | 61 70 6c 69 73 74 20 3d |st;.X.pm|aplist =|
|000054d0| 20 70 6d 6c 3b 0a 58 0a | 58 09 28 76 6f 69 64 29 | pml;.X.|X.(void)|
|000054e0| 73 76 63 5f 72 65 67 69 | 73 74 65 72 28 78 70 72 |svc_regi|ster(xpr|
|000054f0| 74 2c 20 50 4d 41 50 50 | 52 4f 47 2c 20 50 4d 41 |t, PMAPP|ROG, PMA|
|00005500| 50 56 45 52 53 2c 20 72 | 65 67 5f 73 65 72 76 69 |PVERS, r|eg_servi|
|00005510| 63 65 2c 20 46 41 4c 53 | 45 29 3b 0a 58 0a 58 09 |ce, FALS|E);.X.X.|
|00005520| 2f 2a 20 61 64 64 69 74 | 69 6f 6e 61 6c 20 69 6e |/* addit|ional in|
|00005530| 69 74 69 61 6c 69 7a 61 | 74 69 6f 6e 73 20 2a 2f |itializa|tions */|
|00005540| 0a 58 09 63 68 65 63 6b | 5f 73 74 61 72 74 75 70 |.X.check|_startup|
|00005550| 28 29 3b 0a 58 23 69 66 | 64 65 66 20 49 47 4e 4f |();.X#if|def IGNO|
|00005560| 52 45 5f 53 49 47 43 48 | 4c 44 09 09 09 2f 2a 20 |RE_SIGCH|LD.../* |
|00005570| 4c 69 6f 6e 65 6c 20 43 | 6f 6e 73 20 3c 63 6f 6e |Lionel C|ons <con|
|00005580| 73 40 64 78 63 65 72 6e | 2e 63 65 72 6e 2e 63 68 |s@dxcern|.cern.ch|
|00005590| 3e 20 2a 2f 0a 58 09 28 | 76 6f 69 64 29 73 69 67 |> */.X.(|void)sig|
|000055a0| 6e 61 6c 28 53 49 47 43 | 48 4c 44 2c 20 53 49 47 |nal(SIGC|HLD, SIG|
|000055b0| 5f 49 47 4e 29 3b 0a 58 | 23 65 6c 73 65 0a 58 09 |_IGN);.X|#else.X.|
|000055c0| 28 76 6f 69 64 29 73 69 | 67 6e 61 6c 28 53 49 47 |(void)si|gnal(SIG|
|000055d0| 43 48 4c 44 2c 20 72 65 | 61 70 29 3b 0a 58 23 65 |CHLD, re|ap);.X#e|
|000055e0| 6e 64 69 66 0a 58 09 73 | 76 63 5f 72 75 6e 28 29 |ndif.X.s|vc_run()|
|000055f0| 3b 0a 58 09 73 79 73 6c | 6f 67 28 4c 4f 47 5f 45 |;.X.sysl|og(LOG_E|
|00005600| 52 52 2c 20 22 72 75 6e | 5f 73 76 63 20 72 65 74 |RR, "run|_svc ret|
|00005610| 75 72 6e 65 64 20 75 6e | 65 78 70 65 63 74 65 64 |urned un|expected|
|00005620| 6c 79 22 29 3b 0a 58 09 | 61 62 6f 72 74 28 29 3b |ly");.X.|abort();|
|00005630| 0a 58 7d 0a 58 0a 58 23 | 69 66 6e 64 65 66 20 6c |.X}.X.X#|ifndef l|
|00005640| 69 6e 74 0a 58 2f 2a 20 | 6e 65 65 64 20 74 6f 20 |int.X/* |need to |
|00005650| 6f 76 65 72 72 69 64 65 | 20 70 65 72 72 6f 72 20 |override| perror |
|00005660| 63 61 6c 6c 73 20 69 6e | 20 72 70 63 20 6c 69 62 |calls in| rpc lib|
|00005670| 72 61 72 79 20 2a 2f 0a | 58 76 6f 69 64 0a 58 70 |rary */.|Xvoid.Xp|
|00005680| 65 72 72 6f 72 28 77 68 | 61 74 29 0a 58 09 63 6f |error(wh|at).X.co|
|00005690| 6e 73 74 20 63 68 61 72 | 20 2a 77 68 61 74 3b 0a |nst char| *what;.|
|000056a0| 58 7b 0a 58 0a 58 09 73 | 79 73 6c 6f 67 28 4c 4f |X{.X.X.s|yslog(LO|
|000056b0| 47 5f 45 52 52 2c 20 22 | 25 73 3a 20 25 6d 22 2c |G_ERR, "|%s: %m",|
|000056c0| 20 77 68 61 74 29 3b 0a | 58 7d 0a 58 23 65 6e 64 | what);.|X}.X#end|
|000056d0| 69 66 0a 58 0a 58 73 74 | 61 74 69 63 20 73 74 72 |if.X.Xst|atic str|
|000056e0| 75 63 74 20 70 6d 61 70 | 6c 69 73 74 20 2a 0a 58 |uct pmap|list *.X|
|000056f0| 66 69 6e 64 5f 73 65 72 | 76 69 63 65 28 70 72 6f |find_ser|vice(pro|
|00005700| 67 2c 20 76 65 72 73 2c | 20 70 72 6f 74 29 0a 58 |g, vers,| prot).X|
|00005710| 09 75 5f 6c 6f 6e 67 20 | 70 72 6f 67 2c 20 76 65 |.u_long |prog, ve|
|00005720| 72 73 2c 20 70 72 6f 74 | 3b 0a 58 7b 0a 58 09 72 |rs, prot|;.X{.X.r|
|00005730| 65 67 69 73 74 65 72 20 | 73 74 72 75 63 74 20 70 |egister |struct p|
|00005740| 6d 61 70 6c 69 73 74 20 | 2a 68 69 74 20 3d 20 4e |maplist |*hit = N|
|00005750| 55 4c 4c 3b 0a 58 09 72 | 65 67 69 73 74 65 72 20 |ULL;.X.r|egister |
|00005760| 73 74 72 75 63 74 20 70 | 6d 61 70 6c 69 73 74 20 |struct p|maplist |
|00005770| 2a 70 6d 6c 3b 0a 58 0a | 58 09 66 6f 72 20 28 70 |*pml;.X.|X.for (p|
|00005780| 6d 6c 20 3d 20 70 6d 61 | 70 6c 69 73 74 3b 20 70 |ml = pma|plist; p|
|00005790| 6d 6c 20 21 3d 20 4e 55 | 4c 4c 3b 20 70 6d 6c 20 |ml != NU|LL; pml |
|000057a0| 3d 20 70 6d 6c 2d 3e 70 | 6d 6c 5f 6e 65 78 74 29 |= pml->p|ml_next)|
|000057b0| 20 7b 0a 58 09 09 69 66 | 20 28 28 70 6d 6c 2d 3e | {.X..if| ((pml->|
|000057c0| 70 6d 6c 5f 6d 61 70 2e | 70 6d 5f 70 72 6f 67 20 |pml_map.|pm_prog |
|000057d0| 21 3d 20 70 72 6f 67 29 | 20 7c 7c 0a 58 09 09 09 |!= prog)| ||.X...|
|000057e0| 28 70 6d 6c 2d 3e 70 6d | 6c 5f 6d 61 70 2e 70 6d |(pml->pm|l_map.pm|
|000057f0| 5f 70 72 6f 74 20 21 3d | 20 70 72 6f 74 29 29 0a |_prot !=| prot)).|
|00005800| 58 09 09 09 63 6f 6e 74 | 69 6e 75 65 3b 0a 58 09 |X...cont|inue;.X.|
|00005810| 09 68 69 74 20 3d 20 70 | 6d 6c 3b 0a 58 09 09 69 |.hit = p|ml;.X..i|
|00005820| 66 20 28 70 6d 6c 2d 3e | 70 6d 6c 5f 6d 61 70 2e |f (pml->|pml_map.|
|00005830| 70 6d 5f 76 65 72 73 20 | 3d 3d 20 76 65 72 73 29 |pm_vers |== vers)|
|00005840| 0a 58 09 09 20 20 20 20 | 62 72 65 61 6b 3b 0a 58 |.X.. |break;.X|
|00005850| 09 7d 0a 58 09 72 65 74 | 75 72 6e 20 28 68 69 74 |.}.X.ret|urn (hit|
|00005860| 29 3b 0a 58 7d 0a 58 0a | 58 2f 2a 20 0a 58 20 2a |);.X}.X.|X/* .X *|
|00005870| 20 31 20 4f 4b 2c 20 30 | 20 6e 6f 74 0a 58 20 2a | 1 OK, 0| not.X *|
|00005880| 2f 0a 58 76 6f 69 64 0a | 58 72 65 67 5f 73 65 72 |/.Xvoid.|Xreg_ser|
|00005890| 76 69 63 65 28 72 71 73 | 74 70 2c 20 78 70 72 74 |vice(rqs|tp, xprt|
|000058a0| 29 0a 58 09 73 74 72 75 | 63 74 20 73 76 63 5f 72 |).X.stru|ct svc_r|
|000058b0| 65 71 20 2a 72 71 73 74 | 70 3b 0a 58 09 53 56 43 |eq *rqst|p;.X.SVC|
|000058c0| 58 50 52 54 20 2a 78 70 | 72 74 3b 0a 58 7b 0a 58 |XPRT *xp|rt;.X{.X|
|000058d0| 09 73 74 72 75 63 74 20 | 70 6d 61 70 20 72 65 67 |.struct |pmap reg|
|000058e0| 3b 0a 58 09 73 74 72 75 | 63 74 20 70 6d 61 70 6c |;.X.stru|ct pmapl|
|000058f0| 69 73 74 20 2a 70 6d 6c | 2c 20 2a 70 72 65 76 70 |ist *pml|, *prevp|
|00005900| 6d 6c 2c 20 2a 66 6e 64 | 3b 0a 58 09 69 6e 74 20 |ml, *fnd|;.X.int |
|00005910| 61 6e 73 2c 20 70 6f 72 | 74 3b 0a 58 09 63 61 64 |ans, por|t;.X.cad|
|00005920| 64 72 5f 74 20 74 3b 0a | 58 09 0a 58 09 2f 2a 0a |dr_t t;.|X..X./*.|
|00005930| 58 09 20 2a 20 4c 61 74 | 65 72 20 77 72 61 70 70 |X. * Lat|er wrapp|
|00005940| 65 72 73 20 63 68 61 6e | 67 65 20 74 68 65 20 6c |ers chan|ge the l|
|00005950| 6f 67 67 69 6e 67 20 73 | 65 76 65 72 69 74 79 20 |ogging s|everity |
|00005960| 6f 6e 20 74 68 65 20 66 | 6c 79 2e 20 52 65 73 65 |on the f|ly. Rese|
|00005970| 74 20 74 6f 0a 58 09 20 | 2a 20 64 65 66 61 75 6c |t to.X. |* defaul|
|00005980| 74 73 20 62 65 66 6f 72 | 65 20 68 61 6e 64 6c 69 |ts befor|e handli|
|00005990| 6e 67 20 74 68 65 20 6e | 65 78 74 20 72 65 71 75 |ng the n|ext requ|
|000059a0| 65 73 74 2e 0a 58 09 20 | 2a 2f 0a 58 09 61 6c 6c |est..X. |*/.X.all|
|000059b0| 6f 77 5f 73 65 76 65 72 | 69 74 79 20 3d 20 4c 4f |ow_sever|ity = LO|
|000059c0| 47 5f 49 4e 46 4f 3b 0a | 58 09 64 65 6e 79 5f 73 |G_INFO;.|X.deny_s|
|000059d0| 65 76 65 72 69 74 79 20 | 3d 20 4c 4f 47 5f 57 41 |everity |= LOG_WA|
|000059e0| 52 4e 49 4e 47 3b 0a 58 | 0a 58 09 69 66 20 28 64 |RNING;.X|.X.if (d|
|000059f0| 65 62 75 67 67 69 6e 67 | 29 0a 58 09 09 28 76 6f |ebugging|).X..(vo|
|00005a00| 69 64 29 20 66 70 72 69 | 6e 74 66 28 73 74 64 65 |id) fpri|ntf(stde|
|00005a10| 72 72 2c 20 22 73 65 72 | 76 65 72 3a 20 61 62 6f |rr, "ser|ver: abo|
|00005a20| 75 74 20 64 6f 20 61 20 | 73 77 69 74 63 68 5c 6e |ut do a |switch\n|
|00005a30| 22 29 3b 0a 58 09 73 77 | 69 74 63 68 20 28 72 71 |");.X.sw|itch (rq|
|00005a40| 73 74 70 2d 3e 72 71 5f | 70 72 6f 63 29 20 7b 0a |stp->rq_|proc) {.|
|00005a50| 58 0a 58 09 63 61 73 65 | 20 50 4d 41 50 50 52 4f |X.X.case| PMAPPRO|
|00005a60| 43 5f 4e 55 4c 4c 3a 0a | 58 09 09 2f 2a 0a 58 09 |C_NULL:.|X../*.X.|
|00005a70| 09 20 2a 20 4e 75 6c 6c | 20 70 72 6f 63 20 63 61 |. * Null| proc ca|
|00005a80| 6c 6c 0a 58 09 09 20 2a | 2f 0a 58 09 09 2f 2a 20 |ll.X.. *|/.X../* |
|00005a90| 72 65 6d 6f 74 65 20 68 | 6f 73 74 20 61 75 74 68 |remote h|ost auth|
|00005aa0| 6f 72 69 7a 61 74 69 6f | 6e 20 63 68 65 63 6b 20 |orizatio|n check |
|00005ab0| 2a 2f 0a 58 09 09 63 68 | 65 63 6b 5f 64 65 66 61 |*/.X..ch|eck_defa|
|00005ac0| 75 6c 74 28 73 76 63 5f | 67 65 74 63 61 6c 6c 65 |ult(svc_|getcalle|
|00005ad0| 72 28 78 70 72 74 29 2c | 20 72 71 73 74 70 2d 3e |r(xprt),| rqstp->|
|00005ae0| 72 71 5f 70 72 6f 63 2c | 20 28 75 5f 6c 6f 6e 67 |rq_proc,| (u_long|
|00005af0| 29 20 30 29 3b 0a 58 09 | 09 69 66 20 28 21 73 76 |) 0);.X.|.if (!sv|
|00005b00| 63 5f 73 65 6e 64 72 65 | 70 6c 79 28 78 70 72 74 |c_sendre|ply(xprt|
|00005b10| 2c 20 78 64 72 5f 76 6f | 69 64 2c 20 28 63 61 64 |, xdr_vo|id, (cad|
|00005b20| 64 72 5f 74 29 30 29 20 | 26 26 20 64 65 62 75 67 |dr_t)0) |&& debug|
|00005b30| 67 69 6e 67 29 20 7b 0a | 58 09 09 09 61 62 6f 72 |ging) {.|X...abor|
|00005b40| 74 28 29 3b 0a 58 09 09 | 7d 0a 58 09 09 62 72 65 |t();.X..|}.X..bre|
|00005b50| 61 6b 3b 0a 58 0a 58 09 | 63 61 73 65 20 50 4d 41 |ak;.X.X.|case PMA|
|00005b60| 50 50 52 4f 43 5f 53 45 | 54 3a 0a 58 09 09 2f 2a |PPROC_SE|T:.X../*|
|00005b70| 0a 58 09 09 20 2a 20 53 | 65 74 20 61 20 70 72 6f |.X.. * S|et a pro|
|00005b80| 67 72 61 6d 2c 76 65 72 | 73 69 6f 6e 20 74 6f 20 |gram,ver|sion to |
|00005b90| 70 6f 72 74 20 6d 61 70 | 70 69 6e 67 0a 58 09 09 |port map|ping.X..|
|00005ba0| 20 2a 2f 0a 58 09 09 69 | 66 20 28 21 73 76 63 5f | */.X..i|f (!svc_|
|00005bb0| 67 65 74 61 72 67 73 28 | 78 70 72 74 2c 20 78 64 |getargs(|xprt, xd|
|00005bc0| 72 5f 70 6d 61 70 2c 20 | 26 72 65 67 29 29 0a 58 |r_pmap, |®)).X|
|00005bd0| 09 09 09 73 76 63 65 72 | 72 5f 64 65 63 6f 64 65 |...svcer|r_decode|
|00005be0| 28 78 70 72 74 29 3b 0a | 58 09 09 65 6c 73 65 20 |(xprt);.|X..else |
|00005bf0| 7b 0a 58 09 09 09 2f 2a | 20 72 65 6a 65 63 74 20 |{.X.../*| reject |
|00005c00| 6e 6f 6e 2d 6c 6f 63 61 | 6c 20 72 65 71 75 65 73 |non-loca|l reques|
|00005c10| 74 73 2c 20 70 72 6f 74 | 65 63 74 20 70 72 69 76 |ts, prot|ect priv|
|00005c20| 2e 20 70 6f 72 74 73 20 | 2a 2f 0a 58 09 09 09 69 |. ports |*/.X...i|
|00005c30| 66 20 28 21 63 68 65 63 | 6b 5f 73 65 74 75 6e 73 |f (!chec|k_setuns|
|00005c40| 65 74 28 73 76 63 5f 67 | 65 74 63 61 6c 6c 65 72 |et(svc_g|etcaller|
|00005c50| 28 78 70 72 74 29 2c 20 | 0a 58 09 09 09 20 20 20 |(xprt), |.X... |
|00005c60| 20 72 71 73 74 70 2d 3e | 72 71 5f 70 72 6f 63 2c | rqstp->|rq_proc,|
|00005c70| 20 72 65 67 2e 70 6d 5f | 70 72 6f 67 2c 20 72 65 | reg.pm_|prog, re|
|00005c80| 67 2e 70 6d 5f 70 6f 72 | 74 29 29 20 7b 0a 58 09 |g.pm_por|t)) {.X.|
|00005c90| 09 09 09 61 6e 73 20 3d | 20 30 3b 0a 58 09 09 09 |...ans =| 0;.X...|
|00005ca0| 09 67 6f 74 6f 20 64 6f | 6e 65 3b 0a 58 09 09 09 |.goto do|ne;.X...|
|00005cb0| 7d 20 0a 58 09 09 09 2f | 2a 0a 58 09 09 09 20 2a |} .X.../|*.X... *|
|00005cc0| 20 63 68 65 63 6b 20 74 | 6f 20 73 65 65 20 69 66 | check t|o see if|
|00005cd0| 20 61 6c 72 65 61 64 79 | 20 75 73 65 64 0a 58 09 | already| used.X.|
|00005ce0| 09 09 20 2a 20 66 69 6e | 64 5f 73 65 72 76 69 63 |.. * fin|d_servic|
|00005cf0| 65 20 72 65 74 75 72 6e | 73 20 61 20 68 69 74 20 |e return|s a hit |
|00005d00| 65 76 65 6e 20 69 66 0a | 58 09 09 09 20 2a 20 74 |even if.|X... * t|
|00005d10| 68 65 20 76 65 72 73 69 | 6f 6e 73 20 64 6f 6e 27 |he versi|ons don'|
|00005d20| 74 20 6d 61 74 63 68 2c | 20 73 6f 20 63 68 65 63 |t match,| so chec|
|00005d30| 6b 20 66 6f 72 20 69 74 | 0a 58 09 09 09 20 2a 2f |k for it|.X... */|
|00005d40| 0a 58 09 09 09 66 6e 64 | 20 3d 20 66 69 6e 64 5f |.X...fnd| = find_|
|00005d50| 73 65 72 76 69 63 65 28 | 72 65 67 2e 70 6d 5f 70 |service(|reg.pm_p|
|00005d60| 72 6f 67 2c 20 72 65 67 | 2e 70 6d 5f 76 65 72 73 |rog, reg|.pm_vers|
|00005d70| 2c 20 72 65 67 2e 70 6d | 5f 70 72 6f 74 29 3b 0a |, reg.pm|_prot);.|
|00005d80| 58 09 09 09 69 66 20 28 | 66 6e 64 20 26 26 20 66 |X...if (|fnd && f|
|00005d90| 6e 64 2d 3e 70 6d 6c 5f | 6d 61 70 2e 70 6d 5f 76 |nd->pml_|map.pm_v|
|00005da0| 65 72 73 20 3d 3d 20 72 | 65 67 2e 70 6d 5f 76 65 |ers == r|eg.pm_ve|
|00005db0| 72 73 29 20 7b 0a 58 09 | 09 09 09 69 66 20 28 66 |rs) {.X.|...if (f|
|00005dc0| 6e 64 2d 3e 70 6d 6c 5f | 6d 61 70 2e 70 6d 5f 70 |nd->pml_|map.pm_p|
|00005dd0| 6f 72 74 20 3d 3d 20 72 | 65 67 2e 70 6d 5f 70 6f |ort == r|eg.pm_po|
|00005de0| 72 74 29 20 7b 0a 58 09 | 09 09 09 09 61 6e 73 20 |rt) {.X.|....ans |
|00005df0| 3d 20 31 3b 0a 58 09 09 | 09 09 09 67 6f 74 6f 20 |= 1;.X..|...goto |
|00005e00| 64 6f 6e 65 3b 0a 58 09 | 09 09 09 7d 0a 58 09 09 |done;.X.|...}.X..|
|00005e10| 09 09 65 6c 73 65 20 7b | 0a 58 09 09 09 09 09 61 |..else {|.X.....a|
|00005e20| 6e 73 20 3d 20 30 3b 0a | 58 09 09 09 09 09 67 6f |ns = 0;.|X.....go|
|00005e30| 74 6f 20 64 6f 6e 65 3b | 0a 58 09 09 09 09 7d 0a |to done;|.X....}.|
|00005e40| 58 09 09 09 7d 20 65 6c | 73 65 20 7b 0a 58 09 09 |X...} el|se {.X..|
|00005e50| 09 09 2f 2a 20 0a 58 09 | 09 09 09 20 2a 20 61 64 |../* .X.|... * ad|
|00005e60| 64 20 74 6f 20 45 4e 44 | 20 6f 66 20 6c 69 73 74 |d to END| of list|
|00005e70| 0a 58 09 09 09 09 20 2a | 2f 0a 58 09 09 09 09 70 |.X.... *|/.X....p|
|00005e80| 6d 6c 20 3d 20 28 73 74 | 72 75 63 74 20 70 6d 61 |ml = (st|ruct pma|
|00005e90| 70 6c 69 73 74 20 2a 29 | 0a 58 09 09 09 09 20 20 |plist *)|.X.... |
|00005ea0| 20 20 6d 61 6c 6c 6f 63 | 28 28 75 5f 69 6e 74 29 | malloc|((u_int)|
|00005eb0| 73 69 7a 65 6f 66 28 73 | 74 72 75 63 74 20 70 6d |sizeof(s|truct pm|
|00005ec0| 61 70 6c 69 73 74 29 29 | 3b 0a 58 09 09 09 09 70 |aplist))|;.X....p|
|00005ed0| 6d 6c 2d 3e 70 6d 6c 5f | 6d 61 70 20 3d 20 72 65 |ml->pml_|map = re|
|00005ee0| 67 3b 0a 58 09 09 09 09 | 70 6d 6c 2d 3e 70 6d 6c |g;.X....|pml->pml|
|00005ef0| 5f 6e 65 78 74 20 3d 20 | 30 3b 0a 58 09 09 09 09 |_next = |0;.X....|
|00005f00| 69 66 20 28 70 6d 61 70 | 6c 69 73 74 20 3d 3d 20 |if (pmap|list == |
|00005f10| 30 29 20 7b 0a 58 09 09 | 09 09 09 70 6d 61 70 6c |0) {.X..|...pmapl|
|00005f20| 69 73 74 20 3d 20 70 6d | 6c 3b 0a 58 09 09 09 09 |ist = pm|l;.X....|
|00005f30| 7d 20 65 6c 73 65 20 7b | 0a 58 09 09 09 09 09 66 |} else {|.X.....f|
|00005f40| 6f 72 20 28 66 6e 64 3d | 20 70 6d 61 70 6c 69 73 |or (fnd=| pmaplis|
|00005f50| 74 3b 20 66 6e 64 2d 3e | 70 6d 6c 5f 6e 65 78 74 |t; fnd->|pml_next|
|00005f60| 20 21 3d 20 30 3b 0a 58 | 09 09 09 09 09 20 20 20 | != 0;.X|..... |
|00005f70| 20 66 6e 64 20 3d 20 66 | 6e 64 2d 3e 70 6d 6c 5f | fnd = f|nd->pml_|
|00005f80| 6e 65 78 74 29 3b 0a 58 | 09 09 09 09 09 66 6e 64 |next);.X|.....fnd|
|00005f90| 2d 3e 70 6d 6c 5f 6e 65 | 78 74 20 3d 20 70 6d 6c |->pml_ne|xt = pml|
|00005fa0| 3b 0a 58 09 09 09 09 7d | 0a 58 09 09 09 09 61 6e |;.X....}|.X....an|
|00005fb0| 73 20 3d 20 31 3b 0a 58 | 09 09 09 7d 0a 58 09 09 |s = 1;.X|...}.X..|
|00005fc0| 64 6f 6e 65 3a 0a 58 09 | 09 09 69 66 20 28 28 21 |done:.X.|..if ((!|
|00005fd0| 73 76 63 5f 73 65 6e 64 | 72 65 70 6c 79 28 78 70 |svc_send|reply(xp|
|00005fe0| 72 74 2c 20 78 64 72 5f | 6c 6f 6e 67 2c 20 28 63 |rt, xdr_|long, (c|
|00005ff0| 61 64 64 72 5f 74 29 26 | 61 6e 73 29 29 20 26 26 |addr_t)&|ans)) &&|
|00006000| 0a 58 09 09 09 20 20 20 | 20 64 65 62 75 67 67 69 |.X... | debuggi|
|00006010| 6e 67 29 20 7b 0a 58 09 | 09 09 09 28 76 6f 69 64 |ng) {.X.|...(void|
|00006020| 29 20 66 70 72 69 6e 74 | 66 28 73 74 64 65 72 72 |) fprint|f(stderr|
|00006030| 2c 20 22 73 76 63 5f 73 | 65 6e 64 72 65 70 6c 79 |, "svc_s|endreply|
|00006040| 5c 6e 22 29 3b 0a 58 09 | 09 09 09 61 62 6f 72 74 |\n");.X.|...abort|
|00006050| 28 29 3b 0a 58 09 09 09 | 7d 0a 58 09 09 7d 0a 58 |();.X...|}.X..}.X|
|00006060| 09 09 62 72 65 61 6b 3b | 0a 58 0a 58 09 63 61 73 |..break;|.X.X.cas|
|00006070| 65 20 50 4d 41 50 50 52 | 4f 43 5f 55 4e 53 45 54 |e PMAPPR|OC_UNSET|
|00006080| 3a 0a 58 09 09 2f 2a 0a | 58 09 09 20 2a 20 52 65 |:.X../*.|X.. * Re|
|00006090| 6d 6f 76 65 20 61 20 70 | 72 6f 67 72 61 6d 2c 76 |move a p|rogram,v|
|000060a0| 65 72 73 69 6f 6e 20 74 | 6f 20 70 6f 72 74 20 6d |ersion t|o port m|
|000060b0| 61 70 70 69 6e 67 2e 0a | 58 09 09 20 2a 2f 0a 58 |apping..|X.. */.X|
|000060c0| 09 09 69 66 20 28 21 73 | 76 63 5f 67 65 74 61 72 |..if (!s|vc_getar|
|000060d0| 67 73 28 78 70 72 74 2c | 20 78 64 72 5f 70 6d 61 |gs(xprt,| xdr_pma|
|000060e0| 70 2c 20 26 72 65 67 29 | 29 0a 58 09 09 09 73 76 |p, ®)|).X...sv|
|000060f0| 63 65 72 72 5f 64 65 63 | 6f 64 65 28 78 70 72 74 |cerr_dec|ode(xprt|
|00006100| 29 3b 0a 58 09 09 65 6c | 73 65 20 7b 0a 58 09 09 |);.X..el|se {.X..|
|00006110| 09 61 6e 73 20 3d 20 30 | 3b 0a 58 09 09 09 2f 2a |.ans = 0|;.X.../*|
|00006120| 20 72 65 6a 65 63 74 20 | 6e 6f 6e 2d 6c 6f 63 61 | reject |non-loca|
|00006130| 6c 20 72 65 71 75 65 73 | 74 73 20 2a 2f 0a 58 09 |l reques|ts */.X.|
|00006140| 09 09 69 66 20 28 21 63 | 68 65 63 6b 5f 73 65 74 |..if (!c|heck_set|
|00006150| 75 6e 73 65 74 28 73 76 | 63 5f 67 65 74 63 61 6c |unset(sv|c_getcal|
|00006160| 6c 65 72 28 78 70 72 74 | 29 2c 20 0a 58 09 09 09 |ler(xprt|), .X...|
|00006170| 20 20 20 20 72 71 73 74 | 70 2d 3e 72 71 5f 70 72 | rqst|p->rq_pr|
|00006180| 6f 63 2c 20 72 65 67 2e | 70 6d 5f 70 72 6f 67 2c |oc, reg.|pm_prog,|
|00006190| 20 28 75 5f 6c 6f 6e 67 | 29 20 30 29 29 0a 58 09 | (u_long|) 0)).X.|
|000061a0| 09 09 09 67 6f 74 6f 20 | 64 6f 6e 65 3b 0a 58 09 |...goto |done;.X.|
|000061b0| 09 09 66 6f 72 20 28 70 | 72 65 76 70 6d 6c 20 3d |..for (p|revpml =|
|000061c0| 20 4e 55 4c 4c 2c 20 70 | 6d 6c 20 3d 20 70 6d 61 | NULL, p|ml = pma|
|000061d0| 70 6c 69 73 74 3b 20 70 | 6d 6c 20 21 3d 20 4e 55 |plist; p|ml != NU|
|000061e0| 4c 4c 3b 20 29 20 7b 0a | 58 09 09 09 09 69 66 20 |LL; ) {.|X....if |
|000061f0| 28 28 70 6d 6c 2d 3e 70 | 6d 6c 5f 6d 61 70 2e 70 |((pml->p|ml_map.p|
|00006200| 6d 5f 70 72 6f 67 20 21 | 3d 20 72 65 67 2e 70 6d |m_prog !|= reg.pm|
|00006210| 5f 70 72 6f 67 29 20 7c | 7c 0a 58 09 09 09 09 09 |_prog) |||.X.....|
|00006220| 28 70 6d 6c 2d 3e 70 6d | 6c 5f 6d 61 70 2e 70 6d |(pml->pm|l_map.pm|
|00006230| 5f 76 65 72 73 20 21 3d | 20 72 65 67 2e 70 6d 5f |_vers !=| reg.pm_|
|00006240| 76 65 72 73 29 29 20 7b | 0a 58 09 09 09 09 09 2f |vers)) {|.X...../|
|00006250| 2a 20 62 6f 74 68 20 70 | 6d 6c 20 26 20 70 72 65 |* both p|ml & pre|
|00006260| 76 70 6d 6c 20 6d 6f 76 | 65 20 66 6f 72 77 61 72 |vpml mov|e forwar|
|00006270| 64 73 20 2a 2f 0a 58 09 | 09 09 09 09 70 72 65 76 |ds */.X.|....prev|
|00006280| 70 6d 6c 20 3d 20 70 6d | 6c 3b 0a 58 09 09 09 09 |pml = pm|l;.X....|
|00006290| 09 70 6d 6c 20 3d 20 70 | 6d 6c 2d 3e 70 6d 6c 5f |.pml = p|ml->pml_|
|000062a0| 6e 65 78 74 3b 0a 58 09 | 09 09 09 09 63 6f 6e 74 |next;.X.|....cont|
|000062b0| 69 6e 75 65 3b 0a 58 09 | 09 09 09 7d 0a 58 09 09 |inue;.X.|...}.X..|
|000062c0| 09 09 2f 2a 20 66 6f 75 | 6e 64 20 69 74 3b 20 70 |../* fou|nd it; p|
|000062d0| 6d 6c 20 6d 6f 76 65 73 | 20 66 6f 72 77 61 72 64 |ml moves| forward|
|000062e0| 2c 20 70 72 65 76 70 6d | 6c 20 73 74 61 79 73 20 |, prevpm|l stays |
|000062f0| 2a 2f 0a 58 09 09 09 09 | 2f 2a 20 70 72 69 76 69 |*/.X....|/* privi|
|00006300| 6c 65 67 65 64 20 70 6f | 72 74 20 63 68 65 63 6b |leged po|rt check|
|00006310| 20 2a 2f 0a 58 09 09 09 | 09 69 66 20 28 21 63 68 | */.X...|.if (!ch|
|00006320| 65 63 6b 5f 70 72 69 76 | 69 6c 65 67 65 64 5f 70 |eck_priv|ileged_p|
|00006330| 6f 72 74 28 73 76 63 5f | 67 65 74 63 61 6c 6c 65 |ort(svc_|getcalle|
|00006340| 72 28 78 70 72 74 29 2c | 20 0a 58 09 09 09 09 20 |r(xprt),| .X.... |
|00006350| 20 20 20 72 71 73 74 70 | 2d 3e 72 71 5f 70 72 6f | rqstp|->rq_pro|
|00006360| 63 2c 20 0a 58 09 09 09 | 09 20 20 20 20 72 65 67 |c, .X...|. reg|
|00006370| 2e 70 6d 5f 70 72 6f 67 | 2c 20 0a 58 09 09 09 09 |.pm_prog|, .X....|
|00006380| 20 20 20 20 70 6d 6c 2d | 3e 70 6d 6c 5f 6d 61 70 | pml-|>pml_map|
|00006390| 2e 70 6d 5f 70 6f 72 74 | 29 29 20 7b 0a 58 09 09 |.pm_port|)) {.X..|
|000063a0| 09 09 09 61 6e 73 20 3d | 20 30 3b 0a 58 09 09 09 |...ans =| 0;.X...|
|000063b0| 09 09 62 72 65 61 6b 3b | 0a 58 09 09 09 09 7d 0a |..break;|.X....}.|
|000063c0| 58 09 09 09 09 61 6e 73 | 20 3d 20 31 3b 0a 58 09 |X....ans| = 1;.X.|
|000063d0| 09 09 09 74 20 3d 20 28 | 63 61 64 64 72 5f 74 29 |...t = (|caddr_t)|
|000063e0| 70 6d 6c 3b 0a 58 09 09 | 09 09 70 6d 6c 20 3d 20 |pml;.X..|..pml = |
|000063f0| 70 6d 6c 2d 3e 70 6d 6c | 5f 6e 65 78 74 3b 0a 58 |pml->pml|_next;.X|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.