chiark / gitweb /
more ignore
[userv.git] / spec.ps
1 %!PS-Adobe-2.0
2 %%Creator: dvips(k) 5.92b Copyright 2002 Radical Eye Software
3 %%Title: spec.dvi
4 %%Pages: 30
5 %%PageOrder: Ascend
6 %%BoundingBox: 0 0 596 842
7 %%DocumentFonts: Palatino-Roman Courier Palatino-Bold Palatino-Italic
8 %%+ Courier-Oblique Courier-Bold Courier-BoldOblique Palatino-BoldItalic
9 %%EndComments
10 %DVIPSWebPage: (www.radicaleye.com)
11 %DVIPSCommandLine: dvips -o spec.ps spec
12 %DVIPSParameters: dpi=600, compressed
13 %DVIPSSource:  TeX output 2007.07.11:1758
14 %%BeginProcSet: texc.pro
15 %!
16 /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
17 N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72
18 mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0
19 0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{
20 landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize
21 mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[
22 matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round
23 exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{
24 statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0]
25 N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin
26 /FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array
27 /BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2
28 array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N
29 df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A
30 definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get
31 }B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub}
32 B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr
33 1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3
34 1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx
35 0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx
36 sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{
37 rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp
38 gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B
39 /chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{
40 /cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{
41 A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy
42 get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse}
43 ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp
44 fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17
45 {2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add
46 chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{
47 1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop}
48 forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn
49 /BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put
50 }if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{
51 bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A
52 mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{
53 SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{
54 userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X
55 1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4
56 index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N
57 /p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{
58 /Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT)
59 (LaserWriter 16/600)]{A length product length le{A length product exch 0
60 exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse
61 end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask
62 grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot}
63 imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round
64 exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto
65 fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p
66 delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M}
67 B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{
68 p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S
69 rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end
70
71 %%EndProcSet
72 %%BeginProcSet: 8r.enc
73 % File  8r.enc as of 2002-03-12 for PSNFSS 9
74 %
75 % This is the encoding vector for Type1 and TrueType fonts to be used
76 % with TeX.  This file is part of the PSNFSS bundle, version 9
77
78 % Authors: S. Rahtz, P. MacKay, Alan Jeffrey, B. Horn, K. Berry, W. Schmidt
79 %
80 % Idea is to have all the characters normally included in Type 1 fonts
81 % available for typesetting. This is effectively the characters in Adobe
82 % Standard Encoding + ISO Latin 1 + extra characters from Lucida + Euro.
83
84 % Character code assignments were made as follows:
85
86 % (1) the Windows ANSI characters are almost all in their Windows ANSI
87 % positions, because some Windows users cannot easily reencode the
88 % fonts, and it makes no difference on other systems. The only Windows
89 % ANSI characters not available are those that make no sense for
90 % typesetting -- rubout (127 decimal), nobreakspace (160), softhyphen
91 % (173). quotesingle and grave are moved just because it's such an
92 % irritation not having them in TeX positions.
93
94 % (2) Remaining characters are assigned arbitrarily to the lower part
95 % of the range, avoiding 0, 10 and 13 in case we meet dumb software.
96
97 % (3) Y&Y Lucida Bright includes some extra text characters; in the
98 % hopes that other PostScript fonts, perhaps created for public
99 % consumption, will include them, they are included starting at 0x12.
100
101 % (4) Remaining positions left undefined are for use in (hopefully)
102 % upward-compatible revisions, if someday more characters are generally
103 % available.
104
105 % (5) hyphen appears twice for compatibility with both ASCII and Windows.
106 %
107 % (6) /Euro is assigned to 128, as in Windows ANSI
108
109 /TeXBase1Encoding [
110 % 0x00 (encoded characters from Adobe Standard not in Windows 3.1)
111   /.notdef /dotaccent /fi /fl
112   /fraction /hungarumlaut /Lslash /lslash
113   /ogonek /ring /.notdef
114   /breve /minus /.notdef 
115 % These are the only two remaining unencoded characters, so may as
116 % well include them.
117   /Zcaron /zcaron 
118 % 0x10
119  /caron /dotlessi 
120 % (unusual TeX characters available in, e.g., Lucida Bright)
121  /dotlessj /ff /ffi /ffl 
122  /.notdef /.notdef /.notdef /.notdef
123  /.notdef /.notdef /.notdef /.notdef
124  % very contentious; it's so painful not having quoteleft and quoteright
125  % at 96 and 145 that we move the things normally found there down to here.
126  /grave /quotesingle 
127 % 0x20 (ASCII begins)
128  /space /exclam /quotedbl /numbersign
129  /dollar /percent /ampersand /quoteright
130  /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash
131 % 0x30
132  /zero /one /two /three /four /five /six /seven
133  /eight /nine /colon /semicolon /less /equal /greater /question
134 % 0x40
135  /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O
136 % 0x50
137  /P /Q /R /S /T /U /V /W
138  /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore
139 % 0x60
140  /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o
141 % 0x70
142  /p /q /r /s /t /u /v /w
143  /x /y /z /braceleft /bar /braceright /asciitilde
144  /.notdef % rubout; ASCII ends
145 % 0x80
146  /Euro /.notdef /quotesinglbase /florin
147  /quotedblbase /ellipsis /dagger /daggerdbl
148  /circumflex /perthousand /Scaron /guilsinglleft
149  /OE /.notdef /.notdef /.notdef
150 % 0x90
151  /.notdef /.notdef /.notdef /quotedblleft
152  /quotedblright /bullet /endash /emdash
153  /tilde /trademark /scaron /guilsinglright
154  /oe /.notdef /.notdef /Ydieresis
155 % 0xA0
156  /.notdef % nobreakspace
157  /exclamdown /cent /sterling
158  /currency /yen /brokenbar /section
159  /dieresis /copyright /ordfeminine /guillemotleft
160  /logicalnot
161  /hyphen % Y&Y (also at 45); Windows' softhyphen
162  /registered
163  /macron
164 % 0xD0
165  /degree /plusminus /twosuperior /threesuperior
166  /acute /mu /paragraph /periodcentered
167  /cedilla /onesuperior /ordmasculine /guillemotright
168  /onequarter /onehalf /threequarters /questiondown
169 % 0xC0
170  /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla
171  /Egrave /Eacute /Ecircumflex /Edieresis
172  /Igrave /Iacute /Icircumflex /Idieresis
173 % 0xD0
174  /Eth /Ntilde /Ograve /Oacute
175  /Ocircumflex /Otilde /Odieresis /multiply
176  /Oslash /Ugrave /Uacute /Ucircumflex
177  /Udieresis /Yacute /Thorn /germandbls
178 % 0xE0
179  /agrave /aacute /acircumflex /atilde
180  /adieresis /aring /ae /ccedilla
181  /egrave /eacute /ecircumflex /edieresis
182  /igrave /iacute /icircumflex /idieresis
183 % 0xF0
184  /eth /ntilde /ograve /oacute
185  /ocircumflex /otilde /odieresis /divide
186  /oslash /ugrave /uacute /ucircumflex
187  /udieresis /yacute /thorn /ydieresis
188 ] def
189
190 %%EndProcSet
191 %%BeginProcSet: texps.pro
192 %!
193 TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2
194 index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll
195 exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]FontType 0
196 ne{/Metrics exch def dict begin Encoding{exch dup type/integertype ne{
197 pop pop 1 sub dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get
198 div def}ifelse}forall Metrics/Metrics currentdict end def}{{1 index type
199 /nametype eq{exit}if exch pop}loop}ifelse[2 index currentdict end
200 definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{dup
201 sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1 roll
202 mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def dup[
203 exch{dup CharStrings exch known not{pop/.notdef/Encoding true def}if}
204 forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def}def
205 end
206
207 %%EndProcSet
208 %%BeginProcSet: special.pro
209 %!
210 TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N
211 /vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N
212 /rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N
213 /@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{
214 /hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho
215 X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B
216 /@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{
217 /urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known
218 {userdict/md get type/dicttype eq{userdict begin md length 10 add md
219 maxlength ge{/md md dup length 20 add dict copy def}if end md begin
220 /letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S
221 atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{
222 itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll
223 transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll
224 curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf
225 pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}
226 if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1
227 -1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3
228 get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip
229 yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub
230 neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{
231 noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop
232 90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get
233 neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr
234 1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr
235 2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4
236 -1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S
237 TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{
238 Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale
239 }if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState
240 save N userdict maxlength dict begin/magscale true def normalscale
241 currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts
242 /psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x
243 psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx
244 psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub
245 TR/showpage{}N/erasepage{}N/setpagedevice{pop}N/copypage{}N/p 3 def
246 @MacSetUp}N/doclip{psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll
247 newpath 4 copy 4 2 roll moveto 6 -1 roll S lineto S lineto S lineto
248 closepath clip newpath moveto}N/endTexFig{end psf$SavedState restore}N
249 /@beginspecial{SDict begin/SpecialSave save N gsave normalscale
250 currentpoint TR @SpecialDefaults count/ocount X/dcount countdictstack N}
251 N/@setspecial{CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs
252 neg 0 rlineto closepath clip}if ho vo TR hsc vsc scale ang rotate
253 rwiSeen{rwi urx llx sub div rhiSeen{rhi ury lly sub div}{dup}ifelse
254 scale llx neg lly neg TR}{rhiSeen{rhi ury lly sub div dup scale llx neg
255 lly neg TR}if}ifelse CLIP 2 eq{newpath llx lly moveto urx lly lineto urx
256 ury lineto llx ury lineto closepath clip}if/showpage{}N/erasepage{}N
257 /setpagedevice{pop}N/copypage{}N newpath}N/@endspecial{count ocount sub{
258 pop}repeat countdictstack dcount sub{end}repeat grestore SpecialSave
259 restore end}N/@defspecial{SDict begin}N/@fedspecial{end}B/li{lineto}B
260 /rl{rlineto}B/rc{rcurveto}B/np{/SaveX currentpoint/SaveY X N 1
261 setlinecap newpath}N/st{stroke SaveX SaveY moveto}N/fil{fill SaveX SaveY
262 moveto}N/ellipse{/endangle X/startangle X/yrad X/xrad X/savematrix
263 matrix currentmatrix N TR xrad yrad scale 0 0 1 startangle endangle arc
264 savematrix setmatrix}N end
265
266 %%EndProcSet
267 %%BeginProcSet: color.pro
268 %!
269 TeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop
270 setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll
271 }repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def
272 /TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{
273 setgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{
274 /currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch
275 known{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC
276 /Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC
277 /Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0
278 setcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0
279 setcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61
280 0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC
281 /Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0
282 setcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87
283 0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{
284 0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{
285 0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC
286 /Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0
287 setcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0
288 setcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90
289 0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC
290 /Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0
291 setcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0
292 0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{
293 0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{
294 0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC
295 /BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0
296 setcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC
297 /CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0
298 0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1
299 0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11
300 0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0
301 setcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0
302 0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC
303 /Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0
304 setcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0
305 0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0
306 1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC
307 /PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0
308 setcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{
309 0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor}
310 DC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70
311 setcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0
312 setcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1
313 setcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end
314
315 %%EndProcSet
316 TeXDict begin 39158280 55380996 1000 600 600 (spec.dvi)
317 @start /Fa 134[72 2[72 72 1[72 72 2[72 2[72 6[72 72 2[72
318 97[{ TeXBase1Encoding ReEncodeFont }10 119.552 /Courier-Bold
319 rf /Fb 134[55 50 83 55 61 33 44 39 2[55 61 89 33 2[33
320 61 55 39 50 61 44 1[50 23[39 4[83 72 14[50 50 50 50 2[25
321 46[{ TeXBase1Encoding ReEncodeFont }28 99.6264 /Palatino-Bold
322 rf /Fc 134[51 2[51 51 35 40 3[51 51 76 30 2[30 51 1[30
323 40 51 40 1[51 94[56 2[{ TeXBase1Encoding ReEncodeFont }17
324 90.9091 /Palatino-BoldItalic rf /Fd 134[55 55 55 55 55
325 55 55 55 1[55 55 55 55 55 2[55 55 55 55 55 55 55 55 55
326 8[55 8[55 32[55 55 45[{ TeXBase1Encoding ReEncodeFont }26
327 90.9091 /Courier-BoldOblique rf /Fe 134[42 39 62 42 45
328 24 32 30 1[45 41 43 66 22 2[22 43 42 25 36 46 33 41 37
329 21 49[19 25 19 4[21 36[45 2[{ TeXBase1Encoding ReEncodeFont }28
330 74.7198 /Palatino-Roman rf /Ff 137[45 45 1[45 45 2[45
331 9[45 45 100[{ TeXBase1Encoding ReEncodeFont }7 74.7198
332 /Courier rf /Fg 206[25 49[{ TeXBase1Encoding ReEncodeFont }1
333 49.8132 /Palatino-Roman rf /Fh 131[55 2[55 55 55 55 55
334 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
335 55 55 1[55 1[55 55 55 3[55 55 55 1[55 55 1[55 55 5[55
336 55 55 1[55 55 55 55 4[55 14[55 55 6[55 4[55 33[{
337  TeXBase1Encoding ReEncodeFont }49 90.9091 /Courier-Bold
338 rf /Fi 206[33 49[{ TeXBase1Encoding ReEncodeFont }1 66.4176
339 /Palatino-Roman rf /Fj 134[55 2[55 55 55 55 55 1[55 55
340 55 55 55 2[55 1[55 55 55 55 55 55 55 51[55 45[{
341  TeXBase1Encoding ReEncodeFont }20 90.9091 /Courier-Oblique
342 rf /Fk 139[57 1[67 1[105 7[105 2[86 3[86 29[124 12[86
343 86 86 86 86 86 49[{ TeXBase1Encoding ReEncodeFont }13
344 172.188 /Palatino-Bold rf /Fl 135[45 1[51 56 30 40 35
345 1[56 51 56 81 30 56 30 30 56 51 35 45 56 40 56 45 5[30
346 7[56 9[35 3[56 1[66 1[71 6[23 45 2[45 45 45 45 45 45
347 1[27 1[30 23 2[30 30 37[56 2[{ TeXBase1Encoding ReEncodeFont }42
348 90.9091 /Palatino-Bold rf /Fm 135[103 1[115 126 69 92
349 80 1[126 115 126 184 69 2[69 126 115 80 103 126 92 126
350 103 13[126 9[80 3[126 1[149 1[161 17[61 1[69 42[126 2[{
351  TeXBase1Encoding ReEncodeFont }28 206.559 /Palatino-Bold
352 rf /Fn 134[45 45 66 45 51 30 35 35 1[45 40 51 71 25 2[25
353 45 45 25 35 45 37 42 40 8[66 8[71 10[71 22[30 5[25 36[48
354 2[{ TeXBase1Encoding ReEncodeFont }28 90.9091 /Palatino-Italic
355 rf /Fo 108[55 20[55 1[55 2[55 55 55 55 55 55 55 55 55
356 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 1[55
357 1[55 55 55 1[55 55 55 55 55 55 55 55 1[55 55 55 55 55
358 2[55 55 55 55 55 55 55 55 55 55 2[55 1[55 55 6[55 55
359 55 55 55 55 55 55 2[55 55 55 55 1[55 55 55 34[{
360  TeXBase1Encoding ReEncodeFont }73 90.9091 /Courier rf
361 /Fp 134[66 60 100 66 73 40 53 47 1[73 66 73 106 40 2[40
362 73 66 47 60 73 53 73 60 13[73 86 2[100 100 7[66 73 100
363 86 1[93 9[60 60 60 60 60 60 60 2[30 40 30 2[40 40 33
364 36[73 2[{ TeXBase1Encoding ReEncodeFont }45 119.552 /Palatino-Bold
365 rf /Fq 106[55 26[45 51 47 76 51 55 30 39 36 51 55 50
366 53 80 26 51 21 26 53 51 30 44 56 40 50 45 25 2[30 3[61
367 1[91 1[71 56 48 61 1[55 71 76 86 56 1[30 31 76 69 51
368 56 70 64 56 71 5[23 23 45 45 45 45 45 45 45 45 45 45
369 55 23 30 23 2[30 30 25 35[55 55 2[{ TeXBase1Encoding ReEncodeFont }71
370 90.9091 /Palatino-Roman rf /Fr 137[60 60 60 1[60 2[60
371 60 2[60 1[60 1[60 1[60 60 2[60 32[60 1[60 1[60 13[60
372 46[{ TeXBase1Encoding ReEncodeFont }16 99.6264 /Courier
373 rf /Fs 140[42 3[54 58 2[55 7[44 1[50 22[33 34 73[{
374  TeXBase1Encoding ReEncodeFont }8 99.6264 /Palatino-Roman
375 rf /Ft 137[117 1[67 88 82 1[124 113 120 182 60 2[60 3[99
376 126 92 1[103 11[161 82[125 2[{ TeXBase1Encoding ReEncodeFont }16
377 206.559 /Palatino-Roman rf end
378 %%EndProlog
379 %%BeginSetup
380 %%Feature: *Resolution 600dpi
381 TeXDict begin
382 %%PaperSize: A4
383  end
384 %%EndSetup
385 %%Page: 1 1
386 TeXDict begin 1 0 bop Black 0 TeXcolorgray Black Black
387 Black Black 452 875 a Ft(User)50 b(service)g(daemon)j(and)f(client)1312
388 1037 y(speci\002cation)p Black Black 718 1275 a Fs(Ian)24
389 b(Jackson)i Fr(<)t(ian@davenant.greenend.org.uk>)p Black
390 Black Black Black 1792 1955 a Fq(1.0.6)p Black Black
391 1654 2453 a Fp(Abstract)0 2722 y Fq(This)d(is)h(a)f(speci\002cation)h
392 (for)f(a)h(Unix)f(system)f(facility)j(to)e(allow)h(one)f(pr)n(ogram)g
393 (to)f(invoke)h(another)g(when)0 2835 y(only)f(limited)h(tr)o(ust)f
394 (exists)f(between)g(them.)p Black Black eop end
395 %%Page: 2 2
396 TeXDict begin 2 1 bop Black 0 TeXcolorgray Black Black
397 0 4108 a Fp(Copyright)31 b(Notice)0 4375 y Fo(userv)20
398 b Fq(is)j(Copyright)f(1996-2003,2006)28 b(Ian)23 b(Jackson;)f
399 (Copyright)f(2000)k(Ben)c(Harris.)0 4545 y Fo(userv)j
400 Fq(is)j(fr)n(ee)f(softwar)n(e;)h(you)f(can)h(r)n(edistribute)e(it)i
401 (and/or)f(modify)g(it)h(under)e(the)h(terms)f(of)i(the)e(GNU)0
402 4658 y(General)i(Public)h(License)e(as)h(published)g(by)f(the)g(Fr)n
403 (ee)g(Softwar)n(e)h(Foundation;)g(either)f(version)g(2)i(of)f(the)0
404 4771 y(License,)21 b(or)i(\(at)g(your)e(option\))h(any)h(later)g
405 (version.)0 4940 y(This)e(pr)n(ogram)h(is)f(distributed)f(in)i(the)f
406 (hope)f(that)h(it)h(will)h(be)e(useful,)g(but)h Fn(without)g(any)g
407 (warranty)p Fq(;)h(without)0 5053 y(even)33 b(the)f(implied)i(warranty)
408 e(of)i Fn(mer)n(chantability)i Fq(or)d Fn(\002tness)h(for)g(a)g
409 (particular)i(purpose)p Fq(.)61 b(See)32 b(the)g(GNU)0
410 5166 y(General)23 b(Public)h(License)e(for)g(mor)n(e)h(details.)0
411 5335 y(Y)-8 b(ou)21 b(should)f(have)i(r)n(eceived)g(a)g(copy)f(of)h
412 (the)e(GNU)i(General)g(Public)h(License)e(along)g(with)h
413 Fo(userv)p Fq(;)e(if)i(not,)0 5448 y(write)29 b(to)g(the)g(Fr)n(ee)g
414 (Softwar)n(e)h(Foundation,)g(59)g(T)-8 b(emple)29 b(Place)i(-)f(Suite)f
415 (330,)k(Boston,)c(MA)h(02111-1307,)0 5561 y(USA.)p Black
416 Black eop end
417 %%Page: 1 3
418 TeXDict begin 1 2 bop Black 0 TeXcolorgray Black 3739
419 91 a Fq(i)p 0 128 3766 4 v Black 0 1193 a Fm(Contents)p
420 1 0 0 TeXcolorrgb 0 1783 a Fl(1)91 b(Introduction)p Black
421 3058 w(1)p 1 0 0 TeXcolorrgb 0 2040 a(2)g(Client)24 b(program)e(usage)p
422 Black 2690 w(3)p 1 0 0 TeXcolorrgb 136 2206 a Fq(2.1)96
423 b(Options)p Black 36 w(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
424 (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
425 f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)p
426 Black 129 w(3)p Black 1 0 0 TeXcolorrgb 136 2372 a(2.2)96
427 b(Security-overriding)22 b(options)p Black 64 w(.)45
428 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
429 (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)p
430 Black 129 w(6)p Black 1 0 0 TeXcolorrgb 0 2630 a Fl(3)91
431 b(Execution)23 b(environment)f(of)h(the)g(service)h(program)p
432 Black 1667 w(9)p 1 0 0 TeXcolorrgb 136 2796 a Fq(3.1)96
433 b(File)23 b(descriptors)p Black 79 w(.)46 b(.)f(.)g(.)g(.)g(.)h(.)f(.)g
434 (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
435 g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)p Black
436 129 w(9)p Black 1 0 0 TeXcolorrgb 136 2962 a(3.2)96 b(Envir)n(onment)p
437 Black 34 w(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
438 (.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
439 f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)p Black 84 w(10)p Black
440 1 0 0 TeXcolorrgb 0 3219 a Fl(4)91 b(Service-side)25
441 b(con\002guration)p Black 2454 w(11)p 1 0 0 TeXcolorrgb
442 136 3386 a Fq(4.1)96 b(Con\002guration)23 b(\002le)f(syntax)p
443 Black 38 w(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g
444 (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)
445 g(.)p Black 84 w(11)p Black 1 0 0 TeXcolorrgb 136 3552
446 a(4.2)96 b(Con\002guration)23 b(\002le)f(dir)n(ectives)p
447 Black 50 w(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
448 (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)p
449 Black 84 w(12)p Black 1 0 0 TeXcolorrgb 345 3718 a(4.2.1)110
450 b(Immediate)22 b(dir)n(ectives)p Black 39 w(.)45 b(.)g(.)g(.)g(.)h(.)f
451 (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
452 g(.)g(.)g(.)h(.)f(.)g(.)g(.)p Black 84 w(12)p Black 1 0 0
453 TeXcolorrgb 345 3885 a(4.2.2)110 b(Dir)n(ectives)24 b(with)e(delayed)g
454 (ef)n(fect)p Black 33 w(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
455 (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)p
456 Black 84 w(13)p Black 1 0 0 TeXcolorrgb 345 4051 a(4.2.3)110
457 b(Contr)n(ol)23 b(str)o(uctur)n(e)f(dir)n(ectives)p Black
458 55 w(.)46 b(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
459 (.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)p Black 84
460 w(13)p Black 1 0 0 TeXcolorrgb 345 4217 a(4.2.4)110 b(Dir)n(ectives)24
461 b(for)e(changing)h(execution)f(settings)p Black 21 w(.)45
462 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
463 (.)p Black 84 w(15)p Black 1 0 0 TeXcolorrgb 136 4383
464 a(4.3)96 b(Err)n(ors)22 b(in)h(the)f(con\002guration)g(\002le)p
465 Black 31 w(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
466 (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)p
467 Black 84 w(18)p Black 1 0 0 TeXcolorrgb 136 4550 a(4.4)96
468 b(Defaults)p Black 89 w(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
469 (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
470 g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)p
471 Black 84 w(18)p Black 1 0 0 TeXcolorrgb 0 4807 a Fl(5)91
472 b(Information)23 b(passed)h(through)d(the)i(client/daemon)g
473 (combination)p Black 1054 w(21)p 1 0 0 TeXcolorrgb 0
474 5064 a(6)91 b(Applications)23 b(and)g(notes)f(on)g(use)p
475 Black 2287 w(23)p 1 0 0 TeXcolorrgb 136 5230 a Fq(6.1)96
476 b(Examples)p Black 36 w(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
477 (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
478 g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)p
479 Black 84 w(23)p Black 1 0 0 TeXcolorrgb 136 5397 a(6.2)96
480 b(Standar)n(d)23 b(services)f(and)g(dir)n(ectory)g(management)p
481 Black 39 w(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
482 (.)g(.)g(.)h(.)f(.)g(.)g(.)p Black 84 w(23)p Black 1 0 0
483 TeXcolorrgb 136 5563 a(6.3)96 b(Reducing)22 b(the)g(number)g(of)h
484 (absolutely)f(privileged)g(subsystems)p Black 64 w(.)45
485 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)p Black
486 84 w(23)p Black Black Black eop end
487 %%Page: 2 4
488 TeXDict begin 2 3 bop Black 0 TeXcolorgray Black 0 91
489 a Fq(CONTENTS)3210 b(ii)p 0 128 3766 4 v Black 1 0 0
490 TeXcolorrgb 136 476 a(6.4)96 b(Do)23 b(not)f(give)h(away)g(excessive)e
491 (privilege)i(to)f Fo(userv)p Fq(-using)e(facilities)p
492 Black 48 w(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)p
493 Black 84 w(24)p Black 1 0 0 TeXcolorrgb 136 645 a(6.5)96
494 b Fo(userv)21 b Fq(can)i(often)f(r)n(eplace)h Fo(sudo)p
495 Fq(,)e(but)h(not)g Fo(really)p Black 25 w Fq(.)45 b(.)g(.)g(.)g(.)h(.)f
496 (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)p
497 Black 84 w(25)p Black 1 0 0 TeXcolorrgb 136 814 a(6.6)96
498 b(Err)n(or)22 b(handling)h(and)g(input)f(str)n(eams)g(\(eg)g(stdin\))p
499 Black 39 w(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f
500 (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)p Black 84 w(25)p Black
501 1 0 0 TeXcolorrgb 136 984 a(6.7)96 b(Don't)23 b(give)g(access)f(to)g
502 (general-purpose)e(utilities)p Black 58 w(.)45 b(.)g(.)g(.)g(.)g(.)h(.)
503 f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)p
504 Black 84 w(25)p Black Black Black eop end
505 %%Page: 1 5
506 TeXDict begin 1 4 bop Black 0 TeXcolorgray Black 3720
507 91 a Fq(1)p 0 128 3766 4 v Black 0 1155 a Fk(Chapter)44
508 b(1)0 1626 y Fm(Introduction)0 2128 y Fq(Ther)n(e)32
509 b(is)h(a)h(daemon)f(which)g(invokes)g(user)f(service)h(pr)n(ograms)f
510 (\(henceforth)g(`services'\))i(in)f(r)n(esponse)0 2241
511 y(to)e(r)n(equests)e(by)j(callers)g(of)f(a)h(companion)g(client)g(pr)n
512 (ogram)f(\(henceforth)g(the)f(`client'\))j(and)e(accor)n(ding)0
513 2354 y(to)e(r)o(ules)h(set)e(forth)h(in)i(system-wide)c(and)j(user)n
514 (-speci\002c)f(con\002guration)g(\002les.)49 b(The)29
515 b(companion)i(client)0 2467 y(pr)n(ogram)c(is)h(setuid)e(r)n(oot,)i
516 (and)g(negotiates)d(with)j(the)e(daemon)h(thr)n(ough)g(an)h
517 Fo(AF_UNIX)c Fq(socket)i(and)i(as-)0 2579 y(sociated)i(objects)g(in)h
518 (a)g(system-wide)e(private)i(dir)n(ectory)e(set)h(aside)g(for)h(the)e
519 (purpose.)50 b(The)30 b(user)g(who)0 2692 y(wishes)c(the)f(service)i
520 (to)f(be)g(performed)f(and)i(calls)h(the)e(client)h(is)f(called)i(the)e
521 (`calling)i(user)7 b(';)28 b(the)d(pr)n(ocess)0 2805
522 y(which)e(calls)h(the)e(client)h(is)g(called)g(the)f(`calling)j(pr)n
523 (ocess'.)0 2975 y(The)18 b(daemon)h(and)g(the)f(client)h(ar)n(e)g(r)n
524 (esponsible)f(for)h(ensuring)f(that)g(information)i(is)f(safely)g
525 (carried)g(acr)n(oss)0 3088 y(the)33 b(security)g(boundary)h(between)e
526 (the)h(two)h(users,)h(and)f(that)g(the)f(pr)n(ocesses)f(on)i(either)f
527 (side)g(cannot)0 3200 y(interact)23 b(with)f(each)h(other)f(in)h(any)f
528 (unexpected)e(ways.)p Black Black eop end
529 %%Page: 2 6
530 TeXDict begin 2 5 bop Black 0 TeXcolorgray Black 0 91
531 a Fq(Chapter)22 b(1.)h(Intr)n(oduction)2772 b(2)p 0 128
532 3766 4 v Black Black Black eop end
533 %%Page: 3 7
534 TeXDict begin 3 6 bop Black 0 TeXcolorgray Black 3720
535 91 a Fq(3)p 0 128 3766 4 v Black 0 1158 a Fk(Chapter)44
536 b(2)0 1633 y Fm(Client)52 b(program)g(usage)p Black Black
537 164 2137 a Fo(userv)g Fj(options)f Fo([--])i Fj(service-user)f
538 (service-name)d Fo([)p Fj(argument)i Fo(...])164 2250
539 y(userv)h Fj(options)f Fo(-B|--builtin)e([--])k Fj(builtin-service)48
540 b Fo([)p Fj(info-argument)g Fo(...])0 2532 y Fn(service-user)30
541 b Fq(speci\002es)c(which)i(user)e(is)i(to)e(pr)n(ovide)h(the)g
542 (service.)41 b(The)27 b(user)f(may)i(be)f(a)h(login)f(name)h(or)e(a)0
543 2645 y(numeric)d(uid,)f(or)h Fo(-)f Fq(to)g(indicate)h(that)f(the)g
544 (service)h(user)e(is)i(to)f(be)g(the)g(same)h(as)f(the)g(calling)j
545 (user)-7 b(.)0 2817 y(The)18 b(service)h(name)h(is)f(interpr)n(eted)e
546 (by)i(the)f(userv)p 1 0 0 TeXcolorrgb -33 x Fi(1)p Black
547 1811 2817 a Fq(daemon)g(on)h(behalf)h(of)f(the)f(service)h(user)-7
548 b(.)26 b(It)19 b(will)h(often)0 2930 y(be)j(the)e(name)i(of)g(a)g(pr)n
549 (ogram.)0 3301 y Fp(2.1)119 b(Options)0 3574 y Fq(Single-letter)21
550 b(options)h(may)h(be)f(combined)h(as)g(is)g(usual)g(with)f(Unix)h(pr)n
551 (ograms,)f(and)g(the)g(value)i(for)e(such)0 3687 y(an)h(option)f(may)h
552 (appear)f(in)h(the)f(same)h(ar)n(gument)f(or)g(in)h(the)f(next.)p
553 Black 0 3968 a Fh(-B)p Black Black 0 4165 a(--builtin)p
554 Black 41 w Fq(Requests)39 b(that)i(a)h(builtin)g(service)f(be)h(pr)n
555 (ovided.)83 b(This)41 b(is)g(equivalent)h(to)e(using)h(the)227
556 4278 y Fo(-override)19 b Fq(option)j(to)g(specify)h(a)g(string)f
557 (consisting)g(of)h Fo(execute-builtin)17 b Fq(followed)22
558 b(by)h(the)227 4391 y Fn(builtin-service)j Fq(r)n(equested,)20
559 b(and)i(r)n(equesting)f(a)i(service)g(user)e(of)i Fo(-)f
560 Fq(\(indicating)i(the)e(calling)i(user\).)227 4546 y(If)29
561 b(the)f(builtin)i(service)f(being)g(r)n(equested)d(r)n(equir)n(es)i(a)i
562 Fn(service-ar)n(gument)i Fq(then)c(this)h(must)f(be)h(sup-)227
563 4659 y(plied)20 b(to)f(the)h(client)g(in)g(the)g(same)g(ar)n(gument)f
564 (as)h(the)f Fn(builtin-service)p Fq(.)30 b(See)19 b(`Dir)n(ectives)i
565 (for)f(changing)227 4772 y(execution)25 b(settings')e(on)i(page)p
566 0 1 0 0 TeXcolorcmyk 25 w(15)p Black 27 w(for)g(details)g(of)h(the)f
567 (builtin)h(services)f(available,)k(and)c(`Security-)227
568 4885 y(overriding)d(options')g(on)g(page)p 0 1 0 0 TeXcolorcmyk
569 22 w(6)p Black 23 w(for)h(details)f(of)h(the)e Fo(-override)e
570 Fq(options.)227 5040 y(The)33 b(actual)h(service)f(name)g(passed)f
571 (will)i(be)f(the)f Fn(builtin-service)p Fq(;)41 b(note)32
572 b(that)h(this)g(actual)h(service)227 5153 y(name)27 b(\(as)f(opposed)d
573 (to)i(the)h(override)e(data\))j(and)f(the)f Fn(info-ar)n(gument)p
574 Fq(s)i(supplied)e(will)i(be)f(ignor)n(ed)227 5266 y(by)g(most)g
575 (builtin)h(services;)g(the)e(override)g(mechanism)i(and)f
576 Fo(execute-builti)o(n)20 b Fq(will)28 b(be)d(used)227
577 5379 y(to)d(ensur)n(e)g(that)g(the)g(right)g(builtin)i(service)e(is)h
578 (called)g(with)g(the)f(right)g Fn(service-ar)n(gument)p
579 Fq(s.)p Black 0 5475 1507 4 v 134 5531 a Fg(1)p 0 TeXcolorgray
580 Black 163 5563 a Ff(userv)c Fe(is)g(short)g(for)g(`user)g(services',)e
581 (and)j(is)g(pr)o(onounced)f(`you-serve'.)p Black Black
582 Black eop end
583 %%Page: 4 8
584 TeXDict begin 4 7 bop Black 0 TeXcolorgray Black 0 91
585 a Fq(Chapter)22 b(2.)h(Client)g(pr)n(ogram)g(usage)2406
586 b(4)p 0 128 3766 4 v Black Black 0 476 a Fh(--file)52
587 b Fd(fd)t Fh([)p Fd(modifiers)q Fh(]=)o Fd(fi)o(le)o(na)o(me)p
588 Black 39 w Fq(Requests)20 b(that)i(data)g(be)g(copied)g(in)g(and)g(out)
589 g(of)g(the)f(service)227 589 y(using)27 b(pipes.)42 b(For)27
590 b(each)h(\002le)g(or)f(descriptor)f(this)h(will)i(be)e(done)g(by)g(cr)n
591 (eating)h(a)h(pipe,)e(one)g(end)g(of)227 702 y(which)c(is)f(passed)f
592 (to)g(the)g(service)h(pr)n(ogram)g(and)h(the)e(other)g(end)g(of)h
593 (which)h(is)f(passed)e(to)i(a)h(copy)e(of)227 814 y Fo(cat)27
594 b Fq(invoked)g(by)h(the)f(client;)j(the)d(other)g(\002le)h(descriptor)e
595 (passed)g(to)h Fo(cat)g Fq(will)i(be)f(one)f(inherited)227
596 927 y(by)h(the)f(client)h(pr)n(ogram)f(fr)n(om)h(the)f(caller)i(or)e
597 (one)g(opened)e(by)j(the)f(client)h(pr)n(ogram)f(on)g(behalf)i(of)227
598 1040 y(the)22 b(caller)-7 b(.)227 1203 y(The)26 b(descriptor)f(in)h
599 (the)g(service)g(pr)n(ogram)g(that)g(should)g(be)g(connected)f(must)h
600 (be)g(speci\002ed)f(as)h Fn(fd)p Fq(,)227 1316 y(either)33
601 b(as)h(a)g(decimal)h(number)e(or)h(as)f(one)g(of)h(the)f(strings)f
602 Fo(stdin)p Fq(,)i Fo(stdout)d Fq(or)i Fo(stderr)p Fq(.)59
603 b(The)227 1429 y(next)22 b(ar)n(gument)g(is)g(a)h(\002lename)f(which)h
604 (will)h(be)e(opened)e(by)j(the)e(client)i(with)f(the)g(privileges)g(of)
605 g(the)227 1542 y(calling)j(user)-7 b(.)227 1705 y Fn(modi\002ers)21
606 b Fq(is)e(used)e(to)h(specify)h(whether)e(the)h(\002le)h(or)f
607 (descriptor)f(is)i(to)f(be)h(r)n(ead)f(fr)n(om)i(or)e(written)g(to.)26
608 b(It)227 1818 y(consists)d(of)h(a)h(series)d(of)i(wor)n(ds)f(separated)
609 g(by)h(commas.)33 b(A)23 b(comma)j(may)e(separate)f(the)g
610 Fn(modi\002ers)227 1931 y Fq(fr)n(om)g(the)f Fn(fd)i
611 Fq(and)e(is)h(r)n(equir)n(ed)f(if)i Fn(fd)f Fq(is)g(not)f(numeric.)227
612 2093 y(The)g(modi\002er)g(wor)n(ds)g(ar)n(e:)p Black
613 227 2206 a Fh(read)p Black 44 w Fo(O_RDONLY)p Fq(:)15
614 b(Allow)k(r)n(eading)g(and)g(not)g(writing.)26 b(May)19
615 b(not)g(be)g(used)e(with)i Fo(write)e Fq(or)i(things)427
616 2319 y(that)k(imply)g(it.)p Black 227 2432 a Fh(write)p
617 Black 43 w Fo(O_WRONLY)p Fq(:)33 b(Allow)j(writing)g(and)h(not)e(r)n
618 (eading.)69 b Fn(Doesn')m(t)36 b(truncate)i(or)f(cr)n(eate)h
619 Fq(without)427 2545 y Fo(truncate)19 b Fq(or)k Fo(create)p
620 Fq(.)i Fo(write)20 b Fq(or)j(things)e(that)i(imply)g(it)g(may)g(not)e
621 (be)i(used)e(with)i Fo(read)p Fq(.)p Black 227 2658 a
622 Fh(overwrite)p Black 42 w Fq(Equivalent)f(to)g Fo(write,create,tru)o
623 (nc)o(at)o(e)p Fq(.)p Black 227 2771 a Fh(create)p Black
624 Black 227 2884 a(creat)p Black 43 w Fo(O_CREAT)p Fq(:)e(Cr)n(eates)i
625 (the)g(\002le)g(if)i(necessary)-10 b(.)26 b(Implies)c
626 Fo(write)p Fq(.)p Black 227 2997 a Fh(exclusive)p Black
627 Black 227 3110 a(excl)p Black 44 w Fo(O_EXCL)p Fq(:)j(Fails)j(if)h(the)
628 e(\002le)h(alr)n(eady)h(exists.)42 b(Implies)28 b Fo(write)e
629 Fq(and)i Fo(create)p Fq(.)41 b(May)28 b(not)f(be)427
630 3223 y(used)21 b(with)i Fo(truncate)p Fq(.)p Black 227
631 3335 a Fh(truncate)p Black Black 227 3448 a(trunc)p Black
632 43 w Fo(O_TRUNC)p Fq(:)34 b(T)-8 b(r)o(uncate)36 b(any)h(existing)f
633 (\002le.)70 b(Implies)37 b Fo(write)p Fq(.)68 b(May)37
634 b(not)f(be)h(used)e(with)427 3561 y Fo(exclusive)p Fq(.)p
635 Black 227 3674 a Fh(append)p Black 43 w Fo(O_APPEND)p
636 Fq(:)18 b(All)k(writes)f(will)i(append)e(to)g(the)f(\002le.)28
637 b(Implies)21 b Fo(write)f Fq(\(but)i(not)f Fo(create)p
638 Fq(\).)p Black 227 3787 a Fh(sync)p Black 44 w Fo(O_SYNC)p
639 Fq(:)f(Do)i(writes)g(synchr)n(onously)-10 b(.)26 b(Implies)c
640 Fo(write)p Fq(.)p Black 227 3900 a Fh(wait)p Black Black
641 227 4013 a(nowait)p Black Black 227 4126 a(close)p Black
642 43 w Fq(These)f(modi\002ers)g(contr)n(ol)i(the)e(behaviour)i(of)f(the)g
643 (client,)g(with)g(r)n(espect)f(to)h(the)f(pipes)h(car)n(-)427
644 4239 y(rying)g(data)h(to)f(and)h(fr)n(om)g(the)f(service,)g(when)g(the)
645 g(service)g(terminates.)27 b(See)22 b(below)-8 b(.)p
646 Black 227 4352 a Fh(fd)p Black 45 w Fq(The)22 b Fn(\002lename)j
647 Fq(is)e(not)g(a)h(\002lename)f(but)h(a)g(numeric)f(\002le)h(descriptor)
648 -7 b(.)29 b(One)23 b(or)g(both)g(of)g Fo(read)f Fq(and)427
649 4465 y Fo(write)e Fq(must)h(be)g(speci\002ed,)f(and)i(no)f(other)f(wor)
650 n(ds)h(ar)n(e)h(allowed.)27 b(The)21 b Fn(\002lename)h
651 Fq(may)g(also)g(be)427 4578 y Fo(stdin)p Fq(,)e Fo(stdout)g
652 Fq(or)j Fo(stderr)d Fq(for)i(\002le)h(descriptor)e(0,)i(1)g(or)f(2)h(r)
653 n(espectively)-10 b(.)227 4755 y(If)24 b(no)f Fn(modi\002ers)i
654 Fq(which)f(imply)g Fo(read)e Fq(or)h Fo(write)f Fq(ar)n(e)i(used)e(it)h
655 (is)h(as)g(if)g Fo(write)d Fq(had)j(been)f(speci\002ed,)227
656 4868 y(except)g(that)h(if)h(the)f(\002ledescriptor)e(0)j(of)f(the)g
657 (service)g(is)g(being)g(opened)e(\(either)i(speci\002ed)f(numeri-)227
658 4981 y(cally)k(or)d(with)h Fo(stdin)p Fq(\))f(it)h(is)g(as)g(if)h
659 Fo(overwrite)21 b Fq(had)k(been)g(speci\002ed)e(\(or)i
660 Fo(write)e Fq(if)j(only)f Fo(fd)f Fq(was)227 5094 y(speci\002ed\).)227
661 5272 y(The)30 b(client)h(will)h(also)f(use)f Fo(O_NOCTTY)d
662 Fq(when)j(opening)f(\002les)i(speci\002ed)e(by)i(the)e(caller)-7
663 b(,)34 b(to)c(avoid)227 5385 y(changing)23 b(its)f(contr)n(olling)h
664 (terminal.)227 5563 y(By)g(default)h(stdin,)f(stdout)f(and)i(stderr)e
665 (of)i(the)f(service)h(will)h(be)f(connected)f(to)g(the)g(corr)n
666 (esponding)p Black Black eop end
667 %%Page: 5 9
668 TeXDict begin 5 8 bop Black 0 TeXcolorgray Black 0 91
669 a Fq(Chapter)22 b(2.)h(Client)g(pr)n(ogram)g(usage)2406
670 b(5)p 0 128 3766 4 v Black 227 476 a(descriptors)29 b(on)i(the)g
671 (client.)54 b(Diagnostics)32 b(fr)n(om)g(the)e(client)i(and)f(daemon)g
672 (will)i(also)e(appear)g(on)227 589 y(stderr)-7 b(.)227
673 753 y(If)25 b Fo(wait)f Fq(is)h(speci\002ed,)f(the)g(client)h(will)i
674 (wait)e(for)g(the)f(pipe)g(to)h(be)g(closed,)f(and)h(only)g(exit)f
675 (after)h(this)227 866 y(has)19 b(happened.)24 b(This)18
676 b(means)h(that)f(either)f(the)h(r)n(eceiving)h(end)e(of)h(the)g(pipe)g
677 (connection)g(was)g(closed)227 978 y(while)h(data)h(was)e(still)i
678 (available)i(at)d(the)f(sending)f(end,)i(or)f(that)h(the)f(end)g(of)h
679 (\002le)g(was)g(r)n(eached)f(on)h(the)227 1091 y(r)n(eading)28
680 b(\002le)g(descriptor)-7 b(.)43 b(Err)n(ors)26 b(encounter)n(ed)g(r)n
681 (eading)i(or)g(writing)f(in)i(the)e(client)h(at)h(this)e(stage)227
682 1204 y(will)c(be)f(consider)n(ed)e(a)j(system)d(err)n(or)h(and)h(cause)
683 g(the)f(client)h(to)f(exit)h(with)f(status)g(255,)i(but)f(will)h(not)
684 227 1317 y(cause)g(disconnection)e(at)i(the)f(service)g(side)g(since)h
685 (the)f(service)g(has)h(alr)n(eady)g(exited.)227 1481
686 y(If)i Fo(close)d Fq(is)j(speci\002ed)e(the)h(client)h(will)g
687 (immediately)g(close)f(the)g(pipe)g(connection)g(by)g(killing)i(the)227
688 1594 y(r)n(elevant)20 b(copy)f(of)g Fo(cat)p Fq(.)26
689 b(If)19 b(the)g(service)g(uses)f(the)h(descriptor)e(it)j(will)h(get)d
690 Fo(SIGPIPE)e Fq(\(or)k Fo(EPIPE)p Fq(\))d(for)227 1707
691 y(a)26 b(writing)f(descriptor)e(or)i(end)f(of)i(\002le)f(for)g(a)h(r)n
692 (eading)f(one;)g(the)f(descriptor)g(opened)f(by)i(or)g(passed)227
693 1820 y(to)d(the)g(client)h(will)h(also)f(be)f(closed.)227
694 1984 y(If)k Fo(nowait)c Fq(is)k(speci\002ed)e(then)g(the)h(client)h
695 (will)g(not)f(wait)h(and)f(the)f(connection)h(will)i(r)n(emain)f(open)
696 227 2097 y(after)d(the)f(client)i(terminates.)k(Data)c(may)f(continue)g
697 (to)f(be)h(passed)e(between)h(the)g(inheritors)g(of)h(the)227
698 2210 y(r)n(elevant)32 b(descriptor)e(on)i(the)f(service)g(side)g(and)h
699 (the)f(corr)n(esponding)f(\002le)i(or)f(descriptor)f(on)i(the)227
700 2323 y(client)d(side)e(until)i(either)e(side)h(closes)f(their)h
701 (descriptor)-7 b(.)43 b(This)28 b(should)f(not)h(usually)g(be)g
702 (speci\002ed)227 2436 y(for)g(stderr)e(\(or)i(stdout)e(if)j
703 Fo(--signals)50 b(stdout)26 b Fq(is)i(used\))f(since)g(diagnostics)h
704 (fr)n(om)g(the)f(service)227 2549 y(side)22 b(may)h(arrive)g(after)g
705 (the)f(client)h(has)g(exited)e(and)i(be)f(confused)f(with)i(expected)d
706 (output.)227 2713 y(The)i(default)h(is)f Fo(wait)f Fq(for)i(writing)f
707 (\002le)h(descriptors)d(and)j Fo(close)e Fq(for)h(r)n(eading)h(ones.)p
708 Black 0 2910 a Fh(-w)p Fd(fd)t Fh(=)p Fd(action)p Black
709 Black 0 3108 a Fh(--fdwait)p Fd(fd)t Fh(=)p Fd(acti)o(on)p
710 Black 40 w Fq(Sets)k(the)h(action)h(on)f(termination)g(of)h(the)e
711 (service)i(for)f(the)g(speci\002ed)f(\002le)i(de-)227
712 3221 y(scriptor;)c Fn(action)h Fq(must)e(be)g Fo(wait)p
713 Fq(,)f Fo(nowait)f Fq(or)j Fo(close)d Fq(as)j(described)f(above.)34
714 b(The)24 b(\002le)h(descriptor)227 3333 y(must)f(be)h(speci\002ed)e(as)
715 i(open)f(when)g(this)g(option)g(is)h(encounter)n(ed;)e(this)h(option)g
716 (is)h(overridden)e(by)227 3446 y(any)g(later)g Fo(-file)e
717 Fq(or)i Fo(-fdwait)d Fq(option)i(-)h(even)g(by)g(a)g
718 Fo(-file)e Fq(which)j(does)d(not)i(specify)f(an)h(action)227
719 3559 y(on)g(termination)f(\(in)h(this)g(case)f(the)g(default)h(will)h
720 (be)e(used,)f(as)i(described)e(above\).)p Black 0 3757
721 a Fh(-D)p Fd(name)p Fh(=)p Fd(value)p Black Black 0 3954
722 a Fh(--defvar)51 b Fd(name)p Fh(=)p Fd(value)p Black
723 42 w Fq(Set)25 b(a)j(user)n(-de\002ned)d(variable)j Fn(name)g
724 Fq(to)e Fn(value)p Fq(.)42 b(These)25 b(user)n(-de\002ned)f(vari-)227
725 4067 y(ables)31 b(ar)n(e)f(made)g(available)j(in)e(the)e
726 (con\002guration)h(language)g(as)g(the)f(parameters)h
727 Fo(u-)p Fj(name)d Fq(and)227 4180 y(ar)n(e)j(passed)e(to)h(the)g
728 (service)g(in)h(envir)n(onment)f(variables)j Fo(USERV_U_)p
729 Fj(name)p Fq(.)43 b Fn(name)30 b Fq(may)g(contain)227
730 4293 y(only)c(alphanumerics)h(and)f(underscor)n(es,)f(and)h(must)g
731 (start)f(with)h(a)h(letter)-7 b(.)38 b(If)26 b(several)g(de\002nitions)
732 227 4406 y(ar)n(e)d(given)g(for)f(the)g(same)h Fn(name)f
733 Fq(then)g(only)g(the)g(last)h(is)g(ef)n(fective.)p Black
734 0 4603 a Fh(-t)54 b Fd(seconds)p Black Black 0 4801 a
735 Fh(--timeout)c Fd(seconds)p Black 43 w Fq(T)-5 b(ime)25
736 b(out)f(the)g(service)g(if)i(it)e(takes)g(longer)g(than)g
737 Fn(seconds)i Fq(seconds)d(\(a)j(positive)227 4914 y(integer)-7
738 b(,)31 b(in)g(decimal\).)52 b(T)-5 b(imeout)30 b(will)h(pr)n(oduce)f(a)
739 g(diagnostic)g(on)g(stderr)f(and)h(an)h(exit)f(status)f(of)227
740 5027 y(255.)h(If)22 b Fn(seconds)i Fq(is)f(zer)n(o)g(then)e(no)i
741 (timeout)e(will)j(be)f(implemented)e(\(this)i(is)g(the)f(default\).)p
742 Black 0 5224 a Fh(--signals)d Fc(method)p Black 44 w
743 Fq(Af)n(fects)i(the)f(handling)i(of)f(the)f(exit)g(status)g(when)h(the)
744 f(service)h(terminates)f(due)g(to)227 5337 y(a)25 b(signal.)33
745 b(\(The)24 b(client)h(will)h(always)e(\002nish)g(by)h(calling)h
746 Fo(_exit)p Fq(,)c(so)h(that)h(only)g(numbers)g(fr)n(om)h(0)g(to)227
747 5450 y(255)i(can)f(be)f(r)n(eturned)e(and)j(not)e(the)g(full)j(range)d
748 (of)i(numbers)e(and)h(signal)h(indications)f(which)h(can)227
749 5563 y(be)d(r)n(eturned)e(by)h(the)g Fo(wait)f Fq(family)j(of)f(system)
750 e(calls.\))p Black Black eop end
751 %%Page: 6 10
752 TeXDict begin 6 9 bop Black 0 TeXcolorgray Black 0 91
753 a Fq(Chapter)22 b(2.)h(Client)g(pr)n(ogram)g(usage)2406
754 b(6)p 0 128 3766 4 v Black 227 476 a(The)22 b Fn(method)j
755 Fq(may)e(be)f(one)g(of)h(the)e(following:)p Black 227
756 589 a Fc(status)p Black 46 w Fq(The)31 b(client's)h(exit)f(status)f
757 (will)j(be)f Fn(status)p Fq(.)55 b(This)32 b(will)g(not)f(be)h
758 (distinguishable)f(fr)n(om)h(the)427 702 y(service)i(r)n(eally)h
759 (having)f(exited)f(with)h(code)f Fn(status)p Fq(.)63
760 b(This)34 b(method)e(is)i(the)f(default,)k(with)c(a)427
761 814 y Fn(status)24 b Fq(of)f(254.)p Black 227 927 a Fh(number)p
762 Black Black 227 1040 a(number-nocore)p Black 40 w Fq(The)h(client's)h
763 (exit)g(status)e(will)j(be)f(the)f(number)h(of)g(the)f(signal)h(which)h
764 (caused)427 1153 y(the)c(termination)g(of)g(the)f(service.)28
765 b(If)22 b Fo(number)e Fq(is)i(used)f(rather)g(than)i
766 Fo(number-nocore)16 b Fq(then)427 1266 y(128)34 b(will)g(be)f(added)f
767 (if)h(the)f(service)h(dumped)e(cor)n(e.)58 b Fo(number)30
768 b Fq(is)j(very)f(like)h(the)e(exit)i(code)427 1379 y(mangling)24
769 b(done)d(by)h(the)g(Bourne)f(shell.)p Black 227 1492
770 a Fh(highbit)p Black 43 w Fq(The)i(client's)h(exit)f(status)g(will)i
771 (be)f(the)f(number)g(of)h(the)f(signal)i(with)e(128)j(added.)k(If)24
772 b(the)427 1605 y(service)18 b(exits)f(normally)i(with)f(an)g(exit)f
773 (code)h(of)f(gr)n(eater)g(than)h(127)i(then)d(127)i(will)g(be)f(r)n
774 (eturned.)p Black 227 1718 a Fh(stdout)p Black 43 w Fq(The)k(service's)
775 h(numeric)h(wait)f(status)f(as)h(two)f(decimal)j(numbers)d(\(high)h
776 (byte)f(\002rst\))h(and)427 1831 y(a)e(textual)e(description)g(of)h
777 (its)f(meaning)h(will)h(be)f(printed)f(to)g(the)g(client's)h(standar)n
778 (d)g(output.)25 b(It)427 1944 y(will)i(be)e(pr)n(eceded)f(by)h(a)h
779 (newline)f(and)h(followed)f(by)g(an)h(extra)f(newline,)h(and)f(the)g
780 (numbers)427 2056 y(ar)n(e)20 b(separated)d(fr)n(om)i(each)h(other)d
781 (and)i(fr)n(om)h(the)e(textual)g(description)g(by)h(single)f(spaces.)26
782 b(The)427 2169 y(exit)i(status)e(of)i(the)f(client)h(will)h(be)f(zer)n
783 (o,)h(unless)d(a)j(system)c(err)n(or)j(occurs)f(in)h(which)h(case)e(no)
784 427 2282 y(exit)h(status)f(and)i(description)e(will)i(be)g(printed)e
785 (to)g(stdout,)h(and)g(an)h(err)n(or)f(message)f(will)i(be)427
786 2395 y(printed)22 b(to)g(stderr)e(as)j(usual.)227 2559
787 y(Pr)n(oblems)32 b(such)g(as)f(client)i(usage)d(err)n(ors,)j(the)e
788 (service)g(not)g(being)h(found)f(or)g(permission)g(being)227
789 2672 y(denied)h(or)h(failur)n(e)i(of)e(a)h(system)d(call)36
790 b(ar)n(e)d(system)f(err)n(ors.)58 b(An)33 b(err)n(or)g(message)f
791 (describing)h(the)227 2785 y(pr)n(oblem)c(will)g(be)f(printed)f(on)h
792 (the)f(client's)h(stderr)-7 b(,)28 b(and)g(the)g(client's)g(exit)g
793 (status)f(will)i(be)f(255.)46 b(If)227 2898 y(the)22
794 b(client)h(dies)f(due)g(to)g(a)h(signal)g(this)f(should)g(be)g(tr)n
795 (eated)g(as)g(a)i(serious)d(system)g(err)n(or)-7 b(.)p
796 Black 0 3095 a Fh(-H)p Black Black 0 3292 a(--hidecwd)p
797 Black 41 w Fq(Pr)n(events)30 b(the)h(calling)h(pr)n(ocess's)e(curr)n
798 (ent)h(dir)n(ectory)f(name)h(fr)n(om)h(being)f(passed)e(to)i(the)227
799 3405 y(service;)22 b(the)g(null)i(string)d(will)j(be)f(passed)e
800 (instead.)p Black 0 3602 a Fh(-P)p Black Black 0 3799
801 a(--sigpipe)p Black 41 w Fq(If)g(the)f(service)g(pr)n(ogram)g(is)h
802 (terminated)e(due)h(to)g(a)h Fo(SIGPIPE)c Fq(the)j(exit)g(status)f(of)i
803 (the)f(client)227 3912 y(will)40 b(be)f(zer)n(o,)j(even)c(if)h(it)g
804 (would)f(have)h(been)f(something)f(else)g(accor)n(ding)j(to)d(the)h
805 (exit)g(status)227 4025 y(method)29 b(speci\002ed.)50
806 b(This)30 b(option)g(has)g(no)g(ef)n(fect)h(on)f(the)f(code)h(and)g
807 (description)f(printed)h(if)h(the)227 4138 y(exit)23
808 b(status)e(method)g Fo(stdout)f Fq(is)j(in)g(use.)p Black
809 0 4335 a Fh(-h)p Black Black 0 4533 a(--help)p Black
810 Black 0 4730 a(--copyright)p Black 40 w Fo(-h)38 b Fq(or)g
811 Fo(--help)d Fq(prints)j(the)f(client's)i(usage)e(message;)44
812 b Fo(--copyright)33 b Fq(prints)38 b(the)227 4843 y(copyright)22
813 b(and)g(lack)i(of)e(warranty)h(notice.)0 5188 y Fp(2.2)119
814 b(Security-overriding)29 b(options)0 5450 y Fq(Ther)n(e)19
815 b(ar)n(e)h(also)g(some)f(options)g(which)h(ar)n(e)h(available)i(for)d
816 (debugging)e(and)i(to)f(allow)i(the)e(system)f(admin-)0
817 5563 y(istrator)29 b(to)g(override)g(a)i(user)7 b('s)28
818 b(policy)-10 b(.)49 b(These)29 b(options)f(ar)n(e)i(available)j(only)c
819 (if)i(the)e(client)h(is)g(called)h(by)p Black Black eop
820 end
821 %%Page: 7 11
822 TeXDict begin 7 10 bop Black 0 TeXcolorgray Black 0 91
823 a Fq(Chapter)22 b(2.)h(Client)g(pr)n(ogram)g(usage)2406
824 b(7)p 0 128 3766 4 v Black 0 476 a(r)n(oot)22 b(or)g(if)i(the)d
825 (calling)k(user)c(is)i(the)f(same)g(as)h(the)f(service)g(user)-7
826 b(.)p Black 0 745 a Fh(--override)50 b Fd(configuration-d)o(at)o(a)p
827 Black Black 0 932 a Fh(--override-file)e Fd(filename)p
828 Black 42 w Fq(Do)25 b(not)g(r)n(ead)g(the)g(usual)g(con\002guration)g
829 (\002les.)35 b(Instead,)24 b(the)h(client)227 1045 y(sends)37
830 b Fn(con\002guration-data)42 b Fq(\(followed)c(by)h(a)g(newline\))f(or)
831 h(the)f(contents)e(of)j Fn(\002lename)g Fq(\(which)h(is)227
832 1158 y(opened)31 b(in)i(the)f(context)g(of)h(the)f(client\))h(to)f(the)
833 g(daemon)g(and)h(the)f(daemon)g(uses)g(that)g(data)h(in-)227
834 1271 y(stead.)42 b(The)27 b Fn(con\002guration-data)k
835 Fq(must)c(all)i(be)f(in)g(one)f(ar)n(gument.)43 b(It)27
836 b(will)i(have)f(a)g(single)f(newline)227 1384 y(appended)c(so)h(that)h
837 (a)g(single)f(dir)n(ective)h(can)h(easily)f(be)f(given,)h(but)g(if)h
838 (mor)n(e)e(than)h(one)f(dir)n(ective)h(is)227 1497 y(r)n(equir)n(ed)d
839 (it)h(will)h(have)f(to)f(contain)h(one)f(or)g(mor)n(e)h(r)n(eal)g
840 (newlines.)p Black 0 1685 a Fh(--spoof-user)49 b Fd(user)p
841 Black 49 w Fq(Pr)n(etend)26 b(to)i(the)f(service)h(that)g(it)h(is)f
842 (being)g(called)h(by)g Fn(user)g Fq(\(which)g(may)f(be)g(a)227
843 1797 y(username)d(or)g(a)h(uid\).)37 b(This)25 b(will)i(also)e(af)n
844 (fect)i(the)e(gr)n(oup)f(and)i(supplementary)d(gr)n(oups)h(supplied)227
845 1910 y(to)i(the)f(service;)j(they)d(will)i(be)g(the)e(standar)n(d)h(gr)
846 n(oup)f(and)h(supplementary)e(gr)n(oups)h(for)h Fn(user)p
847 Fq(.)40 b(The)227 2023 y Fo(--spoof-user)17 b Fq(option)j(will)j
848 Fn(not)f Fq(af)n(fect)h(which)f(user)f(is)g(chosen)g(if)i(the)d
849 (service)i(user)f(is)g(speci\002ed)227 2136 y(as)i(just)f
850 Fo(-)p Fq(;)g(in)h(this)f(case)h(the)f(service)g(user)g(will)i(be)e
851 (the)g(r)n(eal)i(calling)g(user)-7 b(.)p Black Black
852 eop end
853 %%Page: 8 12
854 TeXDict begin 8 11 bop Black 0 TeXcolorgray Black 0 91
855 a Fq(Chapter)22 b(2.)h(Client)g(pr)n(ogram)g(usage)2406
856 b(8)p 0 128 3766 4 v Black Black Black eop end
857 %%Page: 9 13
858 TeXDict begin 9 12 bop Black 0 TeXcolorgray Black 3720
859 91 a Fq(9)p 0 128 3766 4 v Black 0 1145 a Fk(Chapter)44
860 b(3)0 1607 y Fm(Execution)52 b(environment)g(of)g(the)g(service)0
861 1856 y(program)0 2362 y Fq(The)27 b(daemon)g(which)h(is)g(handling)g
862 (the)f(service)g(user)g(side)g(of)g(things)g(will)i(r)n(ead)e
863 (con\002guration)g(\002les)h(to)0 2475 y(decide)23 b(what)h(to)g(do.)32
864 b(If)24 b(it)h(decides)d(to)i(allow)h(the)f(service)g(to)f(be)h(pr)n
865 (ovided)g(it)g(will)i(fork)d(a)i(subpr)n(ocess)e(to)0
866 2588 y(execute)e(the)h(service.)0 2747 y(The)g(service)g(will)i(have)f
867 (no)g(contr)n(olling)g(terminal,)g(but)f(it)h(will)h(be)e(a)i(pr)n
868 (ocess)d(gr)n(oup)g(leader)-7 b(.)0 2907 y(If)34 b(the)f(client)i(is)f
869 (killed)g(or)f(times)h(out)f(or)h(a)g(\002le)g(or)g(descriptor)e(being)
870 i(r)n(ead)g(or)g(written)f(by)g(the)h(client)0 3020 y(pr)n(ocess)g
871 (gets)f(an)i(err)n(or)f(then)g(the)g(service)h(will)h(be)f
872 (disconnected)e(fr)n(om)i(the)f(client.)65 b(The)34 b(client)i(will)0
873 3133 y(r)n(eturn)26 b(an)h(exit)g(status)f(of)g(255)j(and)e(some)f(the)
874 g(service's)g(pipes)g(may)h(be)g(closed)f(at)h(the)f(other)g(end.)40
875 b(The)0 3246 y(service)19 b(will)i(become)e(a)h(child)h(of)e
876 Fo(init)p Fq(.)25 b(The)19 b(service)g(may)h(well)g(not)f(notice)g(the)
877 g(disconnection,)f(though)0 3359 y(writing)27 b(to)g(a)i(pipe)e(after)g
878 (this)g(may)h(pr)n(oduce)f(a)h Fo(SIGPIPE)c Fq(and)k(the)f(facility)i
879 (exists)e(to)g(have)h(a)g Fo(SIGHUP)0 3472 y Fq(sent)21
880 b(to)h(the)g(service)h(on)f(disconnection.)0 3810 y Fp(3.1)119
881 b(File)30 b(descriptors)0 4068 y Fq(The)20 b(service)g(pr)n(ogram's)g
882 (standar)n(d)g(\002ledescriptors,)e(and)i(possibly)g(other)f(\002le)h
883 (descriptors,)f(will)i(be)g(con-)0 4181 y(nected)31 b(to)g(pipes)g(or)g
884 (to)g Fo(/dev/null)p Fq(.)52 b(The)31 b Fo(userv)f Fq(client/daemon)i
885 (pair)g(will)h(arrange)f(that)g(data)g(is)0 4294 y(copied)h(between)f
886 (the)h(\002les)g(or)g(\002le)h(descriptors)d(speci\002ed)h(to)h(to)g
887 (the)g(client)h(by)g(the)e(caller)j(and)f(these)0 4406
888 y(these)21 b(pipes.)0 4566 y(Pipes)d(which)h(may)g(be)f(written)g(to)g
889 (will)i(be)e(closed)g(if)h(a)g(write)g(err)n(or)e(occurs)i(on)f(the)g
890 (corr)n(esponding)e(client-)0 4679 y(side)25 b(\002le)g(or)h
891 (descriptor)-7 b(,)24 b(which)j(may)f(r)n(esult)e(in)j(a)f
892 Fo(SIGPIPE)c Fq(in)k(the)f(service)h(pr)n(ogram;)g(pipes)f(open)f(for)0
893 4792 y(r)n(eading)e(will)i(get)e Fo(EOF)f Fq(if)j(the)d(client-side)i
894 (\002le)g(descriptor)e(gets)g Fo(EOF)g Fq(or)h(an)h(err)n(or)-7
895 b(.)0 4952 y(If)33 b(the)f(service)g(closes)g(one)g(of)h(its)f(r)n
896 (eading)h(\002le)g(descriptors)d(the)i(writing)h(end)e(of)i(the)f(corr)
897 n(esponding)0 5065 y(pipe)g(will)h(generate)e(a)h Fo(SIGPIPE)d
898 Fq(when)j(attempts)f(ar)n(e)h(made)g(by)h(the)e(client/daemon)h(pair)h
899 (to)f(write)0 5177 y(to)26 b(it.)41 b(This)27 b(will)h(not)e(be)h
900 (consider)n(ed)e(an)j(err)n(or;)g(rather)-7 b(,)27 b(the)f(r)n(elevant)
901 h(pipe)g(will)h(be)f(discar)n(ded)f(and)h(the)0 5290
902 y(corr)n(esponding)21 b(\002le)h(or)h(\002le)f(descriptor)f(held)h(by)h
903 (the)f(client)h(will)h(be)e(closed.)0 5450 y(Likewise,)32
904 b(if)g(one)e(of)h(the)g(\002le)g(descriptors)e(held)i(by)g(the)f
905 (client)i(for)f(writing)g(by)g(the)g(service)g(is)g(a)h(pipe)0
906 5563 y(whose)e(other)g(end)h(is)g(closed)g(by)g(the)g(caller)i(then)d
907 (the)h(client/daemon)g(pair)h(will)h(see)d(an)i(err)n(or)f(when)p
908 Black Black eop end
909 %%Page: 10 14
910 TeXDict begin 10 13 bop Black 0 TeXcolorgray Black 0
911 91 a Fq(Chapter)22 b(3.)h(Execution)f(envir)n(onment)g(of)h(the)e
912 (service)i(pr)n(ogram)1367 b(10)p 0 128 3766 4 v Black
913 0 476 a(trying)27 b(to)g(copy)g(data)h(pr)n(ovided)f(by)h(the)f
914 (service.)43 b(This)28 b(too)f(will)i(not)e(be)g(consider)n(ed)g(an)h
915 (err)n(or;)i(rather)-7 b(,)0 589 y(the)23 b(pipe)h(corr)n(espondong)d
916 (to)i(that)h(descriptor)f(will)i(be)f(closed)f(and)h(any)g(further)g
917 (writes)f(will)i(cause)f(the)0 702 y(service)e(to)g(get)g(a)h
918 Fo(SIGPIPE)p Fq(.)0 871 y(Note)h(that)g(not)h(all)h(write)f(err)n(ors)f
919 (or)h(br)n(oken)f(pipes)g(on)h(\002le)g(descriptors)e(may)i(be)g
920 (visible)i(to)d(the)g(service,)0 984 y(since)19 b(buf)n(fer)n(ed)h
921 (data)g(may)f(be)h(discar)n(ded)f(by)g(the)g(operating)f(system)g(and)h
922 (ther)n(e)g(will)i(be)e(a)h(\002nite)f(interval)0 1097
923 y(between)29 b(the)h(err)n(or)g(happening)g(and)g(the)g(service)h
924 (being)f(disconnected)f(fr)n(om)i(the)f(client)h(or)f(the)g(next)0
925 1210 y(write)22 b(causing)h(a)g Fo(SIGPIPE)p Fq(.)0 1379
926 y(Read)i(err)n(ors)g(on)h(\002le)g(descriptors)e(\(and)i
927 (disconnection\))g(will)h(only)f(be)f(visible)j(to)d(the)g(service)h
928 (and)g(dis-)0 1492 y(tinguishable)d(fr)n(om)g(normal)g(end)f(of)h
929 (\002le)f(if)i Fo(disconnect-hup)16 b Fq(is)23 b(in)g(ef)n(fect.)0
930 1661 y(Read)j(and)g(write)f(err)n(ors)g(\(other)h(than)g(br)n(oken)f
931 (pipes,)h(as)g(described)f(above\))i(will)h(always)e(be)g(visible)i(to)
932 0 1774 y(the)c(caller;)j(they)d(ar)n(e)h(system)e(err)n(ors,)h(and)h
933 (will)h(ther)n(efor)n(e)e(cause)h(the)f(client)h(to)f(print)h(an)g(err)
934 n(or)f(message)0 1887 y(to)e(stderr)f(and)h(r)n(eturn)g(with)h(an)g
935 (exit)f(status)g(of)g(255.)0 2056 y(If)f(the)f(main)i(service)e(pr)n
936 (ogram)h(pr)n(ocess)e(exits)h(while)h(it)g(still)g(has)g(r)o(unning)f
937 (childr)n(en)i(any)e(\002le)h(descriptors)0 2169 y(held)32
938 b(by)g(those)e(childr)n(en)j(can)g(r)n(emain)g(open,)g(depending)c(on)j
939 (the)f(use)h(of)g Fo(wait)p Fq(,)g Fo(nowait)e Fq(or)h
940 Fo(close)0 2282 y Fq(for)k(the)g(r)n(elevant)h(\002le)f(descriptor)f
941 (in)i(the)e(client's)i(ar)n(guments.)65 b(By)35 b(default)g(writing)g
942 (\002ledescriptors)0 2395 y(r)n(emain)26 b(open)e(and)i(the)e(client)i
943 (will)h(wait)e(for)h(them)e(to)h(be)g(closed)g(at)g(the)g(service)g
944 (end,)g(and)g(r)n(eading)g(\002le)0 2508 y(descriptors)f(ar)n(e)j
945 (closed)f(immediately)-10 b(.)39 b(These)25 b(leftover)h(child)h(pr)n
946 (ocesses)d(will)k(not)e(get)f(a)i(any)g Fo(SIGHUP)0 2621
947 y Fq(even)22 b(if)i(a)f(r)n(ead)f(or)h(write)f(err)n(or)g(occurs)g(or)g
948 (the)g(client)h(disconnects)e(befor)n(e)i(then.)0 2976
949 y Fp(3.2)119 b(Environment)0 3244 y Fq(The)22 b(service)g(will)i(have)f
950 (some)f(information)h(in)g(envir)n(onment)g(variables:)p
951 Black 0 3356 a Fh(USERV_USER)p Black 41 w Fq(The)j(login)h(name)h(of)f
952 (the)f(calling)j(user)-7 b(.)40 b(If)27 b(the)f Fo(LOGNAME)e
953 Fq(variable)29 b(is)e(set)f(\(or)-7 b(,)28 b(if)g(that)f(is)227
954 3469 y(unset,)k(if)h(the)e Fo(USER)f Fq(variable)j(is)f(set\))f(in)h
955 (the)f(envir)n(onment)g(passed)f(to)h(the)g(client)h(by)g(the)f(caller)
956 227 3582 y(then)25 b(the)g(passwor)n(d)f(entry)g(for)i(that)f(login)h
957 (name)g(will)h(be)e(looked)f(up;)j(if)f(that)f(passwor)n(d)g(entry's)
958 227 3695 y(uid)c(is)h(the)e(same)h(as)g(that)g(of)h(the)e(calling)j(pr)
959 n(ocess)d(then)g(that)h(login)g(name)h(will)g(be)f(used,)f(otherwise)
960 227 3808 y(\(or)33 b(if)h(neither)e Fo(LOGNAME)d Fq(nor)k
961 Fo(USER)e Fq(is)i(set\))f(the)g(calling)j(pr)n(ocess's)c(uid)i(will)h
962 (be)f(looked)e(up)i(to)227 3921 y(determine)20 b(their)h(login)g(name)h
963 (\(and)f(if)h(this)f(lookup)f(fails)j(then)d(the)h(service)g(will)h
964 (not)f(be)g(invoked\).)p Black 0 4034 a Fh(USERV_UID)p
965 Black 41 w Fq(The)h(uid)h(of)f(the)g(calling)j(pr)n(ocess.)p
966 Black 0 4147 a Fh(USERV_GID)p Black 41 w Fq(The)30 b(gid)g(and)g
967 (supplementary)f(gr)n(oup)g(list)i(of)f(the)g(calling)i(pr)n(ocess:)42
968 b(\002rst)30 b(the)f(gr)n(oup)h(in)227 4260 y(gid)23
969 b(and)f(then)g(those)f(in)i(the)f(supplementary)e(gr)n(oup)i(list,)h
970 (in)g(decimal,)g(separated)e(by)i(spaces.)p Black 0 4373
971 a Fh(USERV_GROUP)p Black 40 w Fq(The)k(gr)n(oup)f(names)h(of)g(the)f
972 (calling)j(pr)n(ocess,)d(listed)g(in)i(the)e(same)h(way)g(as)g(the)f
973 (ids)h(ar)n(e)227 4486 y(in)21 b Fo(USERV_GID)p Fq(.)c(If)k(no)f(name)h
974 (can)h(be)e(found)g(for)h(any)g(of)g(the)e(calling)k(pr)n(ocess's)c(gr)
975 n(oup\(s\))h(then)g(the)227 4598 y(service)j(will)h(not)e(be)g
976 (invoked.)p Black 0 4711 a Fh(USERV_CWD)p Black 41 w
977 Fq(The)f(client's)g(curr)n(ent)g(working)f(dir)n(ectory)g(name)h
978 (\(this)g(dir)n(ectory)f(may)i(not)e(be)h(accessible)227
979 4824 y(to)29 b(the)f(service\).)47 b(If)30 b(it)f(could)g(not)f(be)h
980 (determined)e(or)i(the)f Fo(-hidecwd)e Fq(\003ag)k(was)f(used)e(then)h
981 (this)227 4937 y(variable)d(will)f(be)e(set)g(to)g(an)h(empty)e(string)
982 h(\(this)h(is)f(not)g(consider)n(ed)f(an)i(err)n(or\).)p
983 Black 0 5050 a Fh(USERV_SERVICE)p Black 40 w Fq(The)e(service)i(name)g
984 (r)n(equested)d(by)i(the)g(caller)-7 b(.)p Black 0 5163
985 a Fh(USERV_U_)p Fd(name)p Black 40 w Fq(The)22 b(value)i(supplied)d(to)
986 h(the)g(client)h(by)f(the)g(caller)i(using)e(-D)p Fn(name)p
987 Fq(.)0 5276 y Fo(HOME)p Fq(,)h Fo(PATH)p Fq(,)f Fo(SHELL)p
988 Fq(,)g Fo(LOGNAME)g Fq(and)j Fo(USER)d Fq(will)k(be)f(set)e(appr)n
989 (opriately)h(\(accor)n(ding)i(to)e(the)g(details)g(of)0
990 5389 y(the)e(service)g(user\).)p Black Black eop end
991 %%Page: 11 15
992 TeXDict begin 11 14 bop Black 0 TeXcolorgray Black 3675
993 91 a Fq(11)p 0 128 3766 4 v Black 0 1152 a Fk(Chapter)44
994 b(4)0 1621 y Fm(Service-side)52 b(con\002guration)0 2134
995 y Fq(Which)20 b(services)f(may)g(be)h(r)o(un)f(by)g(whom)g(and)g(under)
996 g(what)g(conditions)f(is)i(contr)n(olled)e(by)i(con\002guration)0
997 2247 y(\002les.)0 2414 y(The)25 b(daemon)g(will)i(r)n(ead)f(these)e
998 (\002les)h(in)i(or)n(der)-7 b(.)36 b(Certain)26 b(dir)n(ectives)g(in)g
999 (the)f(\002les)g(modify)h(the)f(daemon's)0 2527 y(execution)f(settings)
1000 g(for)h(invoking)g(the)g(service,)g(for)h(example)f(allowing)h(certain)
1001 g(\002le)f(descriptors)e(to)i(be)0 2640 y(speci\002ed)c(by)i(the)f
1002 (client)h(or)f(specifying)g(which)h(pr)n(ogram)g(to)f(execute)f(to)h
1003 (pr)n(ovide)g(the)g(service.)0 2807 y(The)i Fn(last)i
1004 Fq(instance)e(of)g(each)h(such)f(setting)f(will)j(take)e(ef)n(fect.)33
1005 b(The)24 b(dir)n(ectives)g(which)h(specify)f(which)h(pr)n(o-)0
1006 2920 y(gram)f(to)g(execute)e(will)k(not)d(stop)g(the)g(con\002guration)
1007 g(\002le)i(fr)n(om)f(being)g(r)n(ead;)h(they)d(will)k(be)e(r)n(emember)
1008 n(ed)0 3033 y(and)f(will)h(only)e(take)g(ef)n(fect)g(if)i(they)d(ar)n
1009 (e)i(not)f(overridden)f(by)i(a)g(later)g(dir)n(ective.)0
1010 3200 y(The)c(daemon)g(will)i(\002rst)d(r)n(ead)i Fo(/etc/userv/sys)o
1011 (te)o(m.d)o(ef)o(au)o(lt)o Fq(.)h(Then,)e(by)h(default)f(\(this)h
1012 (behaviour)0 3313 y(may)26 b(be)g(modi\002ed\),)g(it)g(will)h(r)n(ead)f
1013 (a)h(per)n(-user)d(\002le)i Fo(~/.userv/rc)p Fq(,)c(if)27
1014 b(it)f(exists)f(and)h(the)f(service)h(user)7 b('s)0 3425
1015 y(shell)23 b(is)f(in)h Fo(/etc/shells)p Fq(.)g(Finally)h(it)f(will)h(r)
1016 n(ead)e Fo(/etc/userv/syst)o(em)o(.ov)o(er)o(ri)o(de)o
1017 Fq(.)0 3592 y(When)d(it)h(has)f(r)n(ead)h(all)h(of)e(these)f(\002les)i
1018 (it)f(will)i(act)f(accor)n(ding)g(to)f(the)g(curr)n(ently)g(values)h
1019 (of)g(of)f(the)g(execution)0 3705 y(settings.)0 4056
1020 y Fp(4.1)119 b(Con\002guration)31 b(\002le)e(syntax)0
1021 4321 y Fq(The)19 b(con\002guration)h(\002le)g(is)h(a)f(series)f(of)h
1022 (dir)n(ectives,)h(usually)f(one)f(per)h(line.)27 b(The)20
1023 b(portion)f(of)h(a)h(line)f(follow-)0 4434 y(ing)27 b(a)h(hash)g
1024 (character)g Fo(#)f Fq(is)g(taken)g(as)g(a)h(comment)f(and)h(ignor)n
1025 (ed.)41 b(Each)27 b(dir)n(ective)h(consists)e(of)h(a)h(series)0
1026 4547 y(of)22 b(tokens)e(separated)g(by)i(linear)h(whitespace)e
1027 (\(spaces)h(and)g(tabs\);)g(tokens)e(may)i(be)g(wor)n(ds)f(consisting)g
1028 (of)0 4660 y(non-space)j(characters,)g(or)-7 b(,)24 b(wher)n(e)g(a)h
1029 (string)e(is)h(r)n(equir)n(ed,)g(a)h(string)e(in)i(double)f(quotes.)30
1030 b(Double-quoted)0 4773 y(strings)21 b(may)i(contain)g(the)f(following)h
1031 (backslash)g(escapes:)p Black 0 4886 a Fh(\\n)p Black
1032 45 w Fq(newline)p Black 0 4998 a Fh(\\t)p Black 45 w
1033 Fq(tab)p Black 0 5111 a Fh(\\r)p Black 45 w Fq(carriage)g(r)n(eturn)p
1034 Black 0 5224 a Fh(\\)p Fd(OOO)p Black 48 w Fq(character)g(whose)e
1035 (octal)i(code)f(is)h Fn(OOO)p Black 0 5337 a Fh(\\x)p
1036 Fd(XX)p Black 52 w Fq(character)g(whose)e(hex)h(code)g(is)h
1037 Fn(XX)p Black 0 5450 a Fh(\\)p Fd(punctuation)p Black
1038 41 w Fq(literal)h(punctuation)e(character)h(\(eg)f Fo(\\\\)p
1039 Fq(,)g Fo(\\\223)p Fq(\))p Black 0 5563 a Fh(\\)p Fd(newline)d
1040 Fl(\(ie,)24 b(backslash)g(at)f(end)f(of)h(line\))p Black
1041 46 w Fq(string)f(continues)f(on)i(next)e(line)p Black
1042 Black eop end
1043 %%Page: 12 16
1044 TeXDict begin 12 15 bop Black 0 TeXcolorgray Black 0
1045 91 a Fq(Chapter)22 b(4.)h(Service-side)f(con\002guration)2185
1046 b(12)p 0 128 3766 4 v Black 0 476 a(Relative)18 b(pathnames)g(in)g(dir)
1047 n(ectives)g(ar)n(e)h(r)n(elative)g(to)e(the)g(service)h(pr)n(ogram's)g
1048 (curr)n(ent)g(dir)n(ectory)f(\(usually)0 589 y(the)k(service)g(user)7
1049 b('s)21 b(home)g(dir)n(ectory\).)26 b(Pathnames)c(starting)f(with)g
1050 (the)g(two)g(characters)h Fo(~/)f Fq(ar)n(e)h(taken)f(to)0
1051 702 y(be)i(r)n(elative)g(to)f(the)g(service)g(user)7
1052 b('s)21 b(home)h(dir)n(ectory)-10 b(.)0 1058 y Fp(4.2)119
1053 b(Con\002guration)31 b(\002le)e(directives)0 1330 y Fb(4.2.1)99
1054 b(Immediate)23 b(directives)0 1563 y Fq(The)f(following)h(dir)n
1055 (ectives)f(take)g(ef)n(fect)h(immediately:)p Black 0
1056 1834 a Fh(cd)54 b Fd(pathname)p Black 42 w Fq(Change)22
1057 b(dir)n(ectory)g(in)h(the)f(service)h(pr)n(ogram.)k Fo(cd)22
1058 b Fq(is)h(cumulative.)29 b(It)22 b(is)h(an)g(err)n(or)f(if)i(the)227
1059 1947 y(dir)n(ectory)e(cannot)h(be)f(changed)g(to.)227
1060 2097 y Fo(cd)j Fq(should)g(not)g(be)g(used)f(between)g
1061 Fo(execute-from-dir)o(ec)o(to)o(ry)19 b Fq(and)26 b(the)f(invocation)h
1062 (of)g(the)227 2210 y(service)32 b(pr)n(ogram,)h(as)f(the)f(test)f(for)i
1063 (the)f(availability)k(of)d(the)f(service)g(pr)n(ogram)h(would)f(be)g
1064 (done)227 2323 y(with)c(the)e(old)h(curr)n(ent)g(dir)n(ectory)g(and)g
1065 (the)g(actual)h(execution)f(with)g(the)g(new)g(\(pr)n(obably)h(causing)
1066 227 2436 y(an)c(err)n(or\).)p Black 0 2625 a Fh(eof)p
1067 Black 44 w Fq(Stop)17 b(r)n(eading)g(the)g(con\002guration)g(\002le)h
1068 (in)h(question,)e(as)h(if)g(end)f(of)h(\002le)g(had)g(been)f(r)n
1069 (eached.)26 b(Any)17 b(con-)227 2738 y(tr)n(ol)27 b(constr)o(ucts)f(\()
1070 p Fo(if)p Fq(,)h Fo(catch-quit)22 b Fq(or)27 b Fo(errors-push)p
1071 Fq(\))22 b(which)28 b(wer)n(e)e(started)f(in)i(that)g(\002le)g(will)227
1072 2851 y(be)d(consider)n(ed)d(\002nished.)29 b(Parsing)23
1073 b(will)i(continue)e(in)g(the)g(\002le)g(which)h(caused)f(the)f(\002le)i
1074 (containing)227 2964 y(the)e Fo(eof)f Fq(to)h(be)h(r)n(ead.)p
1075 Black 0 3152 a Fh(quit)p Black 44 w Fq(Stop)30 b(r)n(eading)h
1076 (con\002guration)f(\002les)h(and)g(act)h(immediately)g(on)f(the)f(curr)
1077 n(ent)h(settings.)51 b(The)31 b(be-)227 3265 y(haviour)24
1078 b(of)e Fo(quit)f Fq(is)i(subject)f(to)g(the)g Fo(catch-quit)c
1079 Fq(contr)n(ol)23 b(constr)o(uct.)p Black 0 3454 a Fh(include)51
1080 b Fd(filename)p Black Black 0 3642 a Fh(include-ifexist)d
1081 Fd(filename)p Black 42 w Fq(Read)29 b(the)g(con\002guration)h(\002le)g
1082 Fn(\002lename)p Fq(,)i(and)e(then)f(r)n(eturn)g(to)g(this)227
1083 3755 y(\002le)34 b(and)f(continue)g(parsing)g(it)g(with)h(the)e(next)h
1084 (dir)n(ective.)60 b(It)33 b(is)g(an)h(err)n(or)f(if)h(the)e(\002le)i
1085 (cannot)f(be)227 3868 y(opened)19 b(and)i(r)n(ead,)g(unless)e
1086 Fo(include-ifexist)14 b Fq(is)21 b(used)e(and)i(the)f(\002le)h(does)e
1087 (not)h(exist,)g(in)h(which)227 3981 y(case)i(the)f(dir)n(ective)h(is)f
1088 (silently)h(ignor)n(ed.)p Black 0 4170 a Fh(include-lookup)48
1089 b Fd(parameter)56 b(directory)p Black Black 0 4358 a
1090 Fh(include-lookup-)o(al)o(l)48 b Fd(parameter)56 b(directory)p
1091 Black 50 w Fq(Read)44 b(the)h(con\002guration)f(\002le)i(in)g
1092 Fn(dir)n(ectory)227 4471 y Fq(whose)41 b(name)h(is)h(the)e(value)i(of)f
1093 Fn(parameter)j Fq(\(see)c(the)h(description)e(of)j Fo(if)p
1094 Fq(,)j(`Contr)n(ol)c(str)o(uctur)n(e)227 4584 y(dir)n(ectives')48
1095 b(on)f(the)g(facing)h(page\).)102 b(If)48 b Fn(parameter)i
1096 Fq(has)d(several)h(values)f(they)g(will)h(be)g(tried)227
1097 4697 y(in)39 b(or)n(der;)46 b(with)39 b Fo(include-lookup)32
1098 b Fq(this)39 b(sear)n(ch)g(will)h(stop)d(when)h(one)g(is)h(found,)j
1099 (but)c(with)227 4810 y Fo(include-lookup-)o(all)19 b
1100 Fq(the)25 b(sear)n(ch)h(will)h(continue)e(and)h(any)g(\002les)f(appr)n
1101 (opriate)h(to)f(other)f(val-)227 4923 y(ues)e(will)i(be)e(r)n(ead)h
1102 (too.)227 5074 y(If)d(none)g(of)g(the)f(parameter)7 b('s)19
1103 b(values)h(had)h(a)f(corr)n(esponding)e(\002le)j(then)e(the)g(\002le)h
1104 Fo(:default)d Fq(will)k(be)227 5186 y(r)n(ead,)27 b(if)g(it)g(exists.)
1105 37 b(If)26 b Fn(parameter)p Fq('s)j(list)e(of)f(values)h(was)f(empty)f
1106 (then)g(the)h(\002le)g Fo(:none)e Fq(will)k(be)e(tried)227
1107 5299 y(\002rst)c(and)h(r)n(ead)f(if)i(it)f(exists,)e(otherwise)f
1108 Fo(:default)f Fq(will)24 b(be)f(tried.)227 5450 y(It)e(is)h(not)f(an)h
1109 (err)n(or)f(for)h(any)g(of)g(the)e(\002les)i(\(including)g
1110 Fo(:default)p Fq(\))d(not)i(to)g(exist,)g(but)g(it)h(is)g(an)g(err)n
1111 (or)f(if)227 5563 y(a)i(\002le)g(exists)f(and)g(cannot)h(be)f(r)n(ead)h
1112 (or)f(if)i(the)d(dir)n(ectory)h(cannot)h(be)f(accessed.)p
1113 Black Black eop end
1114 %%Page: 13 17
1115 TeXDict begin 13 16 bop Black 0 TeXcolorgray Black 0
1116 91 a Fq(Chapter)22 b(4.)h(Service-side)f(con\002guration)2185
1117 b(13)p 0 128 3766 4 v Black 227 476 a(A)29 b(translation)h(will)g(be)f
1118 (applied)g(to)g(values)h(befor)n(e)f(they)f(ar)n(e)h(used)f(to)h
1119 (constr)o(uct)f(a)i(\002lename,)h(so)227 589 y(that)19
1120 b(the)f(lookup)g(cannot)h(access)g(dot\002les)e(or)i(\002les)g(in)g
1121 (other)f(dir)n(ectories:)25 b(values)19 b(starting)f(with)h(full)227
1122 702 y(stops)25 b(will)j(have)f(a)g(colon)f(pr)n(epended)e(\(making)j
1123 Fo(:.)p Fq(\),)g(colons)f(will)i(be)e(doubled,)h(and)f(each)h(slash)227
1124 814 y(will)f(be)f(r)n(eplaced)g(with)f(a)i(colon)e(followed)h(by)f(a)i
1125 (hyphen)d Fo(:-)p Fq(.)33 b(A)25 b(parameter)f(value)i(which)f(is)g
1126 (the)227 927 y(empty)g(string)g(will)i(be)f(r)n(eplaced)g(with)g
1127 Fo(:empty)e Fq(\(note)h(that)h(this)f(is)h(dif)n(fer)n(ent)g(fr)n(om)h
1128 (a)g(parameter)227 1040 y(not)22 b(having)i(any)e(values\).)p
1129 Black 0 1212 a Fh(include-directo)o(ry)48 b Fd(directory)p
1130 Black 50 w Fq(Read)36 b(con\002guration)h(fr)n(om)g(all)i(\002les)e(in)
1131 h(dir)n(ectory)e Fn(dir)n(ectory)227 1324 y Fq(which)25
1132 b(ar)n(e)f(plain)g(\002les)g(whose)e(names)i(consist)f(only)g(of)h
1133 (alphanumerics)g(and)g(hyphens)e(and)i(start)227 1437
1134 y(with)i(an)h(alphanumeric.)39 b(They)25 b(will)i(be)f(r)n(ead)g(in)g
1135 (lexical)i(or)n(der)-7 b(.)37 b(It)26 b(is)g(an)g(err)n(or)g(for)g(the)
1136 f(dir)n(ectory)227 1550 y(not)g(to)h(exist)f(or)g(for)h(it)g(or)g(any)g
1137 (of)g(the)f(\002les)g(found)g(not)h(to)f(be)h(r)n(ead)g(successfully)
1138 -10 b(,)25 b(or)h(for)g(anything)227 1663 y(with)d(an)g(appr)n(opriate)
1139 f(name)h(not)f(to)g(be)g(a)h(plain)h(\002le)f(or)f(a)h(symbolic)h(link)
1140 f(to)f(a)h(plain)g(\002le.)p Black 0 1834 a Fh(error)52
1141 b Fd(text)h(...)p Black 44 w Fq(Causes)30 b(an)g(err)n(or)g(whose)e
1142 (message)h(includes)h(the)f(descriptive)h(string)f Fn(text)p
1143 Fq(.)52 b Fn(text)227 1947 y Fq(may)30 b(consist)e(of)h(several)h
1144 (tokens)d(with)i(intervening)f(whitespace.)47 b(The)28
1145 b(whitespace)h(will)h(be)f(in-)227 2060 y(cluded)c(in)h(the)f(message)f
1146 (as)h(found)g(in)h(the)f(con\002guration)g(\002le:)33
1147 b(all)27 b(the)e(characters)g(until)h(the)f(end)227 2173
1148 y(of)j(the)e(line)i(will)h(be)f(included)f(verbatim,)i(unless)e(they)f
1149 (ar)n(e)i(part)f(of)h(a)g(double-quoted)d(string,)j(in)227
1150 2286 y(which)20 b(case)f(the)f(usual)h(meaning)g(of)g(the)f(string)g
1151 (\(i.e.,)i(after)e(backslash)i(escape)e(pr)n(ocessing\))g(will)i(be)227
1152 2399 y(used.)25 b(Comments)19 b(and)g(linear)h(whitespace)e(at)h(the)g
1153 (end)f(of)h(the)f(line)i(\(or)f(just)f(befor)n(e)h(the)f(comment\))227
1154 2512 y(will)24 b(still)f(be)g(ignor)n(ed.)p Black 0 2683
1155 a Fh(message)51 b Fd(text)i(...)p Black 44 w Fq(Causes)28
1156 b(a)i(message)d(including)j(the)e(descriptive)g(string)f
1157 Fn(text)k Fq(to)d(be)h(deliver)n(ed)227 2796 y(as)23
1158 b(if)g(it)g(wer)n(e)f(an)h(err)n(or)f(message,)f(but)i(does)e(not)h
1159 (actually)h(cause)g(an)g(err)n(or)-7 b(.)0 3088 y Fb(4.2.2)99
1160 b(Directives)26 b(with)f(delayed)f(ef)n(fect)0 3310 y
1161 Fq(The)f(following)i(dir)n(ectives)f(have)g(no)g(immediate)g(ef)n
1162 (fect,)g(but)g(ar)n(e)h(r)n(emember)n(ed)e(and)h(have)h(an)f(ef)n(fect)
1163 g(on)0 3423 y(later)f(pr)n(ocessing)e(of)i(the)e(con\002guration)h
1164 (\002les.)p Black 0 3632 a Fh(user-rcfile)50 b Fd(filename)p
1165 Black 42 w Fq(Speci\002es)23 b(that)i(the)f(\002le)h
1166 Fn(\002lename)g Fq(should)f(be)g(r)n(ead)h(instead)f(of)h(the)f(user)7
1167 b('s)227 3745 y Fo(~/.userv/rc)p Fq(.)42 b(This)29 b(does)e
1168 Fn(not)i Fq(happen)f(immediately;)k(instead,)e(the)e(setting)f(is)i(r)n
1169 (emember)n(ed)227 3858 y(and)34 b(used)e(after)h(the)g
1170 Fo(system.default)27 b Fq(con\002guration)33 b(\002le)g(has)h(been)e(r)
1171 n(ead.)61 b(This)33 b(dir)n(ective)227 3971 y(has)23
1172 b(no)f(ef)n(fect)g(in)h(a)g(user)7 b('s)20 b(con\002guration)i(\002le)h
1173 (or)f(in)g(the)g Fo(system.overrid)o(e)16 b Fq(\002le,)23
1174 b(as)f(the)g(user)7 b('s)227 4084 y(con\002guration)22
1175 b(\002le)h(has)g(alr)n(eady)g(been)f(found)g(and)g(r)n(ead)h(by)f(then)
1176 g(and)h(will)h(not)d(be)i(r)n(e-r)n(ead.)p Black 0 4255
1177 a Fh(errors-to-stder)o(r)p Black 39 w Fq(Causes)f(err)n(or)g(messages)f
1178 (to)h(be)h(deliver)n(ed)f(to)g(the)f(client's)i(stderr)-7
1179 b(.)p Black 0 4426 a Fh(errors-to-file)16 b Fc(\002lename)p
1180 Black 45 w Fq(Err)n(or)25 b(messages)e(will)j(be)f(written)f(to)h
1181 Fn(\002lename)p Fq(,)h(which)g(will)g(be)f(opened)227
1182 4539 y(in)e(the)f(context)g(of)g(and)h(with)f(the)g(privileges)g(of)h
1183 (the)f(service)g(user)-7 b(.)p Black 0 4710 a Fh(errors-to-syslo)o(g)16
1184 b Fl([)p Fc(facility)24 b Fl([)p Fc(level)p Black 47
1185 w Fq(]])29 b(Err)n(or)f(messages)f(will)i(be)g(deliver)n(ed)f(using)g
1186 Fo(syslog)p Fq(.)43 b(The)227 4823 y(default)23 b Fn(facility)i
1187 Fq(is)d Fo(user)p Fq(;)f(the)h(default)g Fn(level)j Fq(is)d
1188 Fo(error)p Fq(.)0 5115 y Fb(4.2.3)99 b(Control)25 b(structure)g
1189 (directives)0 5337 y Fq(The)h(following)h(dir)n(ectives)f(ar)n(e)h
1190 (used)e(to)h(cr)n(eate)g(contr)n(ol)h(str)o(uctur)n(es.)38
1191 b(If)27 b(the)e(end)h(of)g(the)g(\002le)h(is)f(encoun-)0
1192 5450 y(ter)n(ed)19 b(befor)n(e)g(the)h(end)f(of)h(any)g(contr)n(ol)g
1193 (str)o(uctur)n(e)f(which)i(was)f(started)e(inside)i(it)g(then)f(that)h
1194 (contr)n(ol)g(str)o(uc-)0 5563 y(tur)n(e)i(is)h(consider)n(ed)e
1195 (\002nished.)27 b(This)22 b(is)h(not)f(an)h(err)n(or)-7
1196 b(.)p Black Black eop end
1197 %%Page: 14 18
1198 TeXDict begin 14 17 bop Black 0 TeXcolorgray Black 0
1199 91 a Fq(Chapter)22 b(4.)h(Service-side)f(con\002guration)2185
1200 b(14)p 0 128 3766 4 v Black Black 0 476 a Fh(fi)p Black
1201 45 w Fq(Lines)21 b(following)i Fo(if)f Fq(ar)n(e)h(interpr)n(eted)d
1202 (only)j(if)g(the)f(condition)g(is)h(tr)o(ue.)k(Many)c(conditions)e(ar)n
1203 (e)i(pr)n(op-)227 589 y(erties)30 b(of)h(parameter)g(values.)54
1204 b(Most)30 b(parameters)g(have)i(a)f(single)g(string)f(as)i(a)f(value;)
1205 36 b(however)-7 b(,)227 702 y(some)25 b(may)g(yield)g(zer)n(o)g(or)g
1206 (several)g(strings,)f(in)i(which)f(case)g(the)g(condition)f(is)i(tr)o
1207 (ue)e(if)i(it)f(is)h(tr)o(ue)e(of)227 814 y(any)f(of)g(the)e(strings)h
1208 (individually)-10 b(.)29 b(Parameters)22 b(ar)n(e)h(described)e(below)
1209 -8 b(.)227 978 y(The)22 b(conditions)g(ar)n(e:)p Black
1210 227 1091 a Fh(glob)53 b Fd(parameter)i(glob-pattern)c
1211 Fh(...)p Black 44 w Fq(The)35 b(value)i(of)g(the)e(parameter)h(whose)e
1212 (name)j(is)427 1204 y(given)26 b(matches)h(one)e(of)h(the)g(glob)g
1213 (patterns)f(\(anchor)n(ed)h(at)h(both)e(ends;)i(backslashes)f(can)h(be)
1214 427 1317 y(used)21 b(to)h(escape)g(metacharacters\).)p
1215 Black 227 1430 a Fh(range)53 b Fd(parameter)i(min)f(max)p
1216 Black 51 w Fq(The)20 b(value)h(of)g(the)e(parameter)h(is)h(a)g
1217 (nonnegative)f(integer)f(and)427 1543 y(lies)26 b(within)h(the)e(range)
1218 g(speci\002ed.)37 b Fn(min)25 b Fq(or)h Fn(max)g Fq(may)h(be)f
1219 Fo($)f Fq(to)g(indicate)i(no)e(lower)h(or)f(upper)427
1220 1655 y(limit,)f(r)n(espectively)-10 b(.)p Black 227 1768
1221 a Fh(grep)53 b Fd(parameter)i(filename)p Black 43 w Fq(The)16
1222 b Fn(\002lename)j Fq(r)n(efers)e(to)g(a)h(\002le)g(one)e(of)i(whose)e
1223 (lines)i(is)f(the)g(value)427 1881 y(of)23 b(the)f(parameter)g
1224 (\(leading)g(or)g(trailing)i(whitespace)d(on)i(each)g(line)g(and)f
1225 (empty)f(lines)i(in)g(the)427 1994 y(\002le)g(ar)n(e)g(ignor)n(ed\).)k
1226 (It)22 b(is)h(an)g(err)n(or)f(for)g(the)g(\002le)h(not)f(to)g(be)g
1227 (opened)f(and)i(r)n(ead.)p Black 227 2107 a Fh(!)109
1228 b Fd(condition)p Black 43 w Fq(The)21 b Fn(condition)j
1229 Fq(is)f Fn(not)g Fq(tr)o(ue.)p Black 227 2220 a Fl(Conjunctions:)k
1230 Fh(&)22 b Fl(and)g Fh(|)p Black Black Black 427 w Fo(\()54
1231 b Fj(condition)809 2333 y Fo(&)g Fj(condition)809 2446
1232 y Fo(&)g Fj(condition)809 2559 y Fo(...)809 2672 y(\))427
1233 2785 y Fq(is)29 b(tr)o(ue)e(if)i(all)h(the)d(listed)g(conditions)h(ar)n
1234 (e)g(tr)o(ue;)i(wher)n(e)d Fo(|)h Fq(is)h(used)d(it)j(is)f(tr)o(ue)f
1235 (if)i(any)f(of)h(them)427 2897 y(is)d(tr)o(ue.)37 b(Newlines)25
1236 b(must)g(be)h(used)f(to)g(separate)g(one)g(condition)g(fr)n(om)i(the)e
1237 (next,)g(as)h(shown,)427 3010 y(and)d(the)f(par)n(entheses)e(ar)n(e)j
1238 (mandatory)-10 b(.)27 b(These)21 b(conjunctions)h(do)g(not)g(do)g(lazy)
1239 i(evaluation.)227 3189 y(The)e(parameters)g(ar)n(e:)p
1240 Black 227 3302 a Fh(service)p Black 43 w Fq(The)f(service)i(name)g
1241 (speci\002ed)e(when)h(the)g(client)h(was)g(called.)p
1242 Black 227 3415 a Fh(calling-user)p Black 40 w Fq(T)-8
1243 b(wo)40 b(strings:)63 b(the)39 b(login)i(name)g(of)g(the)f(calling)i
1244 (user)d(\(determined)g(as)i(for)427 3527 y Fo(USERV_USER)p
1245 Fq(,)18 b(above\))23 b(and)g(the)f(calling)i(uid)f(\(r)n(epr)n(esented)
1246 d(in)j(decimal\).)p Black 227 3640 a Fh(calling-group)p
1247 Black 40 w Fq(Several)37 b(strings:)55 b(the)36 b(primary)h(and)g
1248 (supplementary)e(gr)n(oup)h(names)h(and)427 3753 y(gids)29
1249 b(\(in)h(decimal\))g(of)f(the)g(calling)i(pr)n(ocess.)46
1250 b(All)29 b(the)g(gr)n(oup)f(names)h(come)g(\002rst,)h(and)f(then)427
1251 3866 y(the)c(gids.)37 b(If)26 b(the)f(\002rst)g(supplementary)f(gr)n
1252 (oup)g(is)i(the)f(same)h(as)g(the)f(primary)h(gr)n(oup)f(then)g(it)427
1253 3979 y(is)e(elided.)p Black 227 4092 a Fh(calling-user-sh)o(ell)p
1254 Black 39 w Fq(The)h(calling)j(user)7 b('s)24 b(shell,)i(as)f(listed)g
1255 (in)g(the)g(passwor)n(d)f(entry)g(for)h(the)427 4205
1256 y(calling)g(login)d(name)h(\(as)g(determined)e(for)h
1257 Fo(USERV_USER)p Fq(,)c(above\).)p Black 227 4318 a Fh(service-user)p
1258 Black 40 w Fq(T)-8 b(wo)21 b(strings:)k(the)c(name)g(of)g(the)g
1259 (service)g(user)f(\(as)h(speci\002ed)f(to)h(the)f(client\))i(and)427
1260 4431 y(their)g(uid)h(\(r)n(epr)n(esented)d(in)j(decimal\).)p
1261 Black 227 4544 a Fh(service-group)p Black 40 w Fq(Several)37
1262 b(strings:)55 b(the)36 b(primary)h(and)g(supplementary)e(gr)n(oup)h
1263 (names)h(and)427 4657 y(gids)22 b(\(in)h(decimal\))i(of)d(the)g
1264 (service)g(user)-7 b(.)p Black 227 4769 a Fh(service-user-sh)o(ell)p
1265 Black 39 w Fq(The)21 b(service)i(user)7 b('s)21 b(shell,)h(as)h(listed)
1266 f(in)h(their)f(passwor)n(d)f(entry)-10 b(.)p Black 227
1267 4882 a Fh(u-)p Fd(name)p Black 43 w Fq(The)40 b(value)h(of)f(the)g
1268 (user)n(-de\002ned)e(variable)k Fn(name)f Fq(passed)e(by)h(the)f
1269 (caller)j(using)e(the)427 4995 y Fo(-defvar)27 b Fq(command-line)j
1270 (option)f(to)f(the)h(client.)49 b(If)29 b(the)g(variable)i(was)f(not)e
1271 (de\002ned)g(then)427 5108 y(this)h(parameter)g(is)h(an)g(empty)e(list)
1272 i(of)f(strings;)i(in)f(this)f(case)h(any)f(condition)g(which)h(tests)e
1273 (it)427 5221 y(will)e(be)f(false,)g(and)g Fo(include-lookup)18
1274 b Fq(on)24 b(it)h(will)h(r)n(ead)f(the)e Fo(:none)g Fq(\002le,)i(or)f
1275 Fo(:default)d Fq(if)427 5334 y Fo(:none)g Fq(is)h(not)g(found.)p
1276 Black 0 5563 a Fh(errors-push)c Fc(\002lename)p Black
1277 Black Black eop end
1278 %%Page: 15 19
1279 TeXDict begin 15 18 bop Black 0 TeXcolorgray Black 0
1280 91 a Fq(Chapter)22 b(4.)h(Service-side)f(con\002guration)2185
1281 b(15)p 0 128 3766 4 v Black Black 0 476 a Fh(srorre)p
1282 Black 43 w Fq(Stacks)30 b(the)h(err)n(or)f(handling)h(behaviour)h(curr)
1283 n(ently)f(in)g(ef)n(fect.)54 b(Any)30 b(changes)g(to)h(err)n(or)f(han-)
1284 227 589 y(dling)23 b(will)h(take)e(ef)n(fect)g(only)h(between)e
1285 Fo(errors-push)c Fq(and)23 b Fo(srorre)p Fq(.)p Black
1286 0 791 a Fh(catch-quit)p Black Black 0 993 a(hctac)p Black
1287 43 w Fq(Any)35 b(use)f(of)h Fo(quit)e Fq(inside)i Fo(catch-quit)c
1288 Fq(will)36 b(mer)n(ely)f(cause)g(the)f(parsing)h(to)f(continue)h(at)227
1289 1106 y Fo(hctac)20 b Fq(instead.)26 b(Any)21 b(contr)n(ol)g(constr)o
1290 (ucts)g(started)e(since)j(the)e Fo(catch-quit)d Fq(will)23
1291 b(be)f(consider)n(ed)227 1219 y(\002nished)g(if)h(a)h
1292 Fo(quit)c Fq(is)j(found.)227 1385 y(If)32 b(an)f(err)n(or)g(occurs)g
1293 (inside)g Fo(catch-quit)c Fq(the)j(execution)h(settings)e(will)k(be)e
1294 (r)n(eset)f(\(as)h(if)i(by)e(the)227 1498 y Fo(reset)21
1295 b Fq(dir)n(ective\))i(and)g(parsing)f(will)i(likewise)e(continue)g(at)h
1296 Fo(hctac)p Fq(.)227 1665 y(If)h(a)h(lexical)h(or)d(syntax)g(err)n(or)h
1297 (is)g(detected)d(in)k(the)e(same)h(con\002guration)f(\002le)h(as)h(the)
1298 e Fo(catch-quit)p Fq(,)227 1778 y(while)g(looking)f(for)h(the)e
1299 Fo(hctac)g Fq(after)h(an)i(err)n(or)e(or)g Fo(quit)p
1300 Fq(,)e(that)j(new)f(err)n(or)g(will)i(not)e(be)g(caught.)0
1301 2085 y Fb(4.2.4)99 b(Directives)26 b(for)e(changing)i(execution)f
1302 (settings)0 2315 y Fq(The)f(following)h(dir)n(ectives)g(modify)g(the)f
1303 (execution)f(settings;)h(the)g(server)g(will)i(r)n(emember)f(the)f
1304 (fact)h(that)0 2428 y(the)k(dir)n(ective)h(was)f(encounter)n(ed)e(and)j
1305 (act)g(on)f(it)h(only)f(after)h(all)h(the)d(con\002guration)h(has)h
1306 (been)f(parsed.)0 2541 y(The)22 b Fn(last)i Fq(dir)n(ective)f(which)g
1307 (modi\002es)f(any)g(particuar)i(setting)d(will)j(take)e(ef)n(fect.)p
1308 Black 0 2796 a Fh(reject)p Black 43 w Fq(Reject)136 b(the)h(r)n
1309 (equest.)371 b Fo(execute)p Fq(,)162 b Fo(execute-from-dir)o(ec)o(to)o
1310 (ry)131 b Fq(and)227 2909 y Fo(execute-from-pa)o(th)16
1311 b Fq(will)24 b(change)f(this)f(setting.)p Black 0 3092
1312 a Fh(execute)51 b Fd(program)56 b Fh([)p Fd(argument)51
1313 b Fh(...])p Black 43 w Fq(Execute)17 b(the)g(pr)n(ogram)h
1314 Fn(pr)n(ogram)p Fq(,)k(with)c(the)g(ar)n(guments)f(as)227
1315 3205 y(speci\002ed,)k(followed)h(by)h(any)f(ar)n(guments)g(given)g(to)g
1316 (the)g(client)h(if)g Fo(no-suppress-arg)o(s)16 b Fq(is)23
1317 b(in)g(ef-)227 3318 y(fect.)28 b(It)20 b(is)i(an)f(err)n(or)g(for)g
1318 (the)g(execution)f(to)h(fail)i(when)e(it)g(is)h(attempted)d(\(after)i
1319 (all)i(the)e(con\002guration)227 3431 y(has)g(been)g(parsed\).)26
1320 b(If)21 b Fn(pr)n(ogram)i Fq(does)d(not)g(contain)h(a)h(slash)f(it)g
1321 (will)h(be)f(sear)n(ched)g(for)f(on)h(the)f(service)227
1322 3544 y(user)7 b('s)21 b(path.)p Black 0 3728 a Fh(execute-from-di)o(re)
1323 o(ct)o(or)o(y)49 b Fd(pathname)i Fh([)p Fd(argument)f
1324 Fh(...])p Black 44 w Fq(T)-8 b(ake)51 b(all)i(the)d(characters)i(after)
1325 227 3841 y(the)26 b(last)h(slash)f(of)h(the)e(service)i(name)g
1326 (speci\002ed)e(when)h(the)f(client)i(was)g(called,)h(and)e(execute)f
1327 (that)227 3954 y(pr)n(ogram)i(in)h(the)e(dir)n(ectory)g(named)h(by)g
1328 Fn(pathname)h Fq(as)f(if)h(it)f(had)g(been)g(speci\002ed)e(for)i
1329 Fn(execute)p Fq(.)43 b(The)227 4066 y(part)28 b(of)g(the)f(service)h
1330 (name)g(used)f(may)h(contain)g(only)g(alphanumerics)h(and)f(hyphens)e
1331 (and)i(must)227 4179 y(start)22 b(with)h(an)g(alphanumeric)h(\(and)f
1332 (it)f(must)g(be)h(non-empty\),)e(otherwise)g(it)i(is)f(an)h(err)n(or)-7
1333 b(.)227 4328 y(This)23 b(dir)n(ective)g(is)f(ignor)n(ed)g(if)i(the)e(r)
1334 n(elevant)g(pr)n(ogram)h(does)e(not)h(exist)g(in)h(the)f(dir)n(ectory)g
1335 (speci\002ed;)227 4441 y(in)h(this)f(case)g(the)f(pr)n(ogram)h(to)f
1336 (execute)g(is)h(left)g(at)g(its)g(pr)n(evious)g(setting)e(\(or)i
1337 (unset,)f(if)i(it)f(was)g(not)f(set)227 4553 y(befor)n(e\).)227
1338 4702 y(It)g(is)g(an)g(err)n(or)g(for)g(the)f(test)g(for)h(the)f
1339 (existence)f(of)i(the)g(pr)n(ogram)g(to)f(fail)j(other)d(than)h(with)g
1340 (a)g(`no)g(such)227 4815 y(\002le)29 b(or)f(dir)n(ectory')g
1341 (indication.)46 b(It)28 b(is)g(also)h(an)g(err)n(or)f(for)g(the)g
1342 (execution)f(to)h(fail)i(if)f(and)g(when)e(it)i(is)227
1343 4928 y(attempted)21 b(\(after)i(all)h(the)e(con\002guration)g(has)g
1344 (been)g(parsed\).)p Black 0 5111 a Fh(execute-from-pa)o(th)p
1345 Black 39 w Fn(service)29 b Fq(is)f(interpr)n(eted)d(as)j(a)g(pr)n
1346 (ogram)f(on)g(the)g(default)g Fo(PATH)f Fq(\(or)h(as)h(a)g(path-)227
1347 5224 y(name)k(of)g(an)h(executable,)g(if)g(it)f(contains)g(a)g
1348 Fo(/)p Fq(\).)55 b(This)32 b(dir)n(ective)g(is)g Fn(very)h(danger)n
1349 (ous)p Fq(,)k(and)31 b(is)h(only)227 5337 y(pr)n(ovided)21
1350 b(to)g(make)h(the)f Fo(-override)d Fq(options)i(ef)n(fective.)28
1351 b(It)21 b(should)g(not)g(normally)h(be)g(used.)k(It)21
1352 b(is)227 5450 y(an)h(err)n(or)e(for)h(the)f(execution)f(to)i(fail)h
1353 (when)e(it)h(is)g(attempted)e(\(after)i(all)i(the)d(con\002guration)g
1354 (has)h(been)227 5563 y(parsed\).)p Black Black eop end
1355 %%Page: 16 20
1356 TeXDict begin 16 19 bop Black 0 TeXcolorgray Black 0
1357 91 a Fq(Chapter)22 b(4.)h(Service-side)f(con\002guration)2185
1358 b(16)p 0 128 3766 4 v Black Black 0 476 a Fh(execute-builtin)48
1359 b Fd(service-name)h(service-argumen)o(ts)p Black 40 w
1360 Fq(Executes)59 b(the)i(builtin)h(service)227 589 y Fn(service-name)p
1361 Fq(.)43 b(These)25 b(builtin)j(services)e(display)h(information)g
1362 (about)g(the)f(server)f(and/or)i(the)f(r)n(e-)227 702
1363 y(quest,)31 b(and)f(ignor)n(e)f(any)i(ar)n(guments)e(passed)f(fr)n(om)j
1364 (the)e(service)h(side)g(except)f(possibly)g(to)g(print)227
1365 814 y(them)22 b(as)h(part)f(of)h(their)f(output.)k(They)c(write)g
1366 (their)g(r)n(esults)g(to)g(their)g(standar)n(d)g(output)f(\(i.e.,)h
1367 (wher)n(-)227 927 y(ever)g(\002le)h(descriptor)e(1)i(is)g(dir)n
1368 (ected\).)k(The)22 b(builtin)i(services)e(ar)n(e:)p Black
1369 227 1040 a Fh(execute)p Black 43 w Fq(Displays)f(the)f(execution)h
1370 (settings,)e(de\002ned)g(variables,)k(ar)n(guments,)d(etc.)27
1371 b(with)21 b(which)427 1153 y(the)h(builtin)i(service)e(was)h(invoked.)p
1372 Black 227 1266 a Fh(environment)p Black 41 w Fq(Displays)17
1373 b(the)g(envir)n(onment)g(variable)i(settings)d(with)h(which)h(the)f
1374 (builtin)h(service)427 1379 y(was)23 b(invoked.)p Black
1375 227 1492 a Fh(parameter)51 b Fd(parameter)p Black 46
1376 w Fq(Displays)23 b(the)f(values)i(of)f(the)f(service)h(con\002guration)
1377 g(language)g(pa-)427 1605 y(rameter)f(speci\002ed.)p
1378 Black 227 1718 a Fh(version)p Black 43 w Fq(Displays)27
1379 b(the)f(version)g(string)g(and)h(compilation)h(details)f(of)f(the)h
1380 (uservd)e(server)h(pr)n(o-)427 1831 y(gram.)p Black 227
1381 1944 a Fh(reset)p Black 43 w Fq(Displays)34 b(the)e(default)i(r)n(eset)
1382 e(con\002guration)g(\(evaluated)i(when)e Fo(reset)g Fq(is)h(found)g(in)
1383 g(a)427 2056 y(con\002guration)22 b(\002le,)h(or)f(when)g(an)h(err)n
1384 (or)f(is)h(caught)f(by)h Fo(catch-quit)p Fq(\).)p Black
1385 227 2169 a Fh(toplevel)p Black 42 w Fq(Displays)30 b(the)g(top-level)g
1386 (default)g(con\002guration)g(\(the)f(con\002guration)h(data,)i(evalu-)
1387 427 2282 y(ated)22 b(by)h(the)f(server)-7 b(,)21 b(which)i(calls)h(all)
1388 g(the)e(other)g(con\002guration)g(\002les\).)p Black
1389 227 2395 a Fh(override)p Black 42 w Fq(Displays)i(the)e(top-level)h
1390 (override)g(con\002guration)g(\(the)g(con\002guration)f(data,)i(evalu-)
1391 427 2508 y(ated)e(by)h(the)f(server)-7 b(,)21 b(which)i(causes)f(all)i
1392 (the)e(other)g(con\002guration)g(data)g(to)g(be)h(parsed\).)p
1393 Black 227 2621 a Fh(help)p Black 44 w Fq(Displays)g(a)g(list)g(of)f
1394 (the)g(understood)e(builtin)j(service)g(names)f(and)h(ar)n(guments.)227
1395 2734 y(In)j(the)g(futur)n(e)g(other)f(builtin)j(services)e(may)h(be)f
1396 (de\002ned)f(which)i(do)e(mor)n(e)i(than)f(just)g(print)g(infor)n(-)227
1397 2847 y(mation.)p Black 0 3049 a Fh(set-environment)p
1398 Black Black 0 3252 a(no-set-environm)o(en)o(t)p Black
1399 39 w Fq(Runs)39 b Fo(/etc/environmen)o(t)34 b Fq(to)39
1400 b(set)f(the)h(service)h(user)7 b('s)38 b(envir)n(onment.)227
1401 3365 y(This)33 b(adds)g(the)f(over)n(head)h(of)g(invoking)g(a)h(shell,)
1402 i(but)d(doesn't)e(cause)i(any)h(shell)f(\(de\)mangling)227
1403 3478 y(of)23 b(the)f(service's)g(ar)n(guments.)27 b(This)22
1404 b(is)h(achieved)g(by)f(invoking)p Black Black 500 3734
1405 a Fo(.../program)50 b(arg)j(arg)g(arg)g(...)227 3991
1406 y Fq(as)p Black Black 500 4247 a Fo(/bin/sh)e(-c)j('.)g(/etc/environme)
1407 o(nt)o(;)48 b(exec)53 b("$@"')f(-)j(.../program)49 b(arg)k(arg)g(arg)h
1408 (...)227 4503 y(no-set-environm)o(ent)16 b Fq(cancels)23
1409 b(the)f(ef)n(fect)h(of)f Fo(set-environment)p Fq(.)p
1410 Black 0 4706 a Fh(no-suppress-arg)o(s)p Black Black 0
1411 4909 a(suppress-args)p Black 40 w Fq(Include)75 b(any)h(ar)n(guments)f
1412 (given)g(to)g(the)g(client)i(as)f(ar)n(guments)f(to)g(the)227
1413 5022 y(pr)n(ogram)88 b(invoked)f(as)g(a)i(r)n(esult)e(of)g(an)h
1414 Fo(execute)p Fq(,)101 b Fo(execute-from-di)o(re)o(ct)o(or)o(y)227
1415 5135 y Fq(or)85 b Fo(execute-from-pa)o(th)78 b Fq(dir)n(ective.)215
1416 b Fo(suppress-args)80 b Fq(undoes)j(the)h(ef)n(fect)h(of)227
1417 5247 y Fo(no-suppress-arg)o(s)p Fq(.)p Black 0 5450 a
1418 Fh(require-fd)50 b Fd(fd-range)h Fh(read|write)p Black
1419 41 w Fq(Insist)32 b(that)g(the)g(\002ledescriptor\(s\))g(be)g(opened)f
1420 (for)i(r)n(ead-)227 5563 y(ing)d(r)n(esp.)48 b(writing.)h(It)29
1421 b(is)h(an)g(err)n(or)f(if)i(any)e(descriptor)f(marked)h(as)h(r)n(equir)
1422 n(ed)f(when)g(the)g(service)p Black Black eop end
1423 %%Page: 17 21
1424 TeXDict begin 17 20 bop Black 0 TeXcolorgray Black 0
1425 91 a Fq(Chapter)22 b(4.)h(Service-side)f(con\002guration)2185
1426 b(17)p 0 128 3766 4 v Black 227 476 a(is)25 b(about)g(to)f(be)h
1427 (invoked)f(\(after)h(the)g(con\002guration)f(has)h(been)f(parsed\))g
1428 (was)h(not)f(speci\002ed)g(when)227 589 y(the)31 b(client)g(was)g
1429 (invoked.)52 b(Each)32 b(\002le)f(descriptor)e(has)i(a)h(separate)e
1430 (setting,)h(and)g(the)g(last)g(one)f(of)227 702 y Fo(require-fd)p
1431 Fq(,)c Fo(allow-fd)p Fq(,)g Fo(ignore-fd)p Fq(,)g Fo(null-fd)g
1432 Fq(or)i Fo(reject-fd)d Fq(which)k(af)n(fected)g(a)g(par)n(-)227
1433 814 y(ticular)24 b(\002le)f(descriptor)e(will)j(take)e(ef)n(fect.)227
1434 985 y Fn(fd-range)32 b Fq(may)d(be)g(a)h(single)f(number)-7
1435 b(,)30 b(two)f(numbers)f(separated)g(by)h(a)h(hyphen,)f(or)g(one)f
1436 (number)227 1098 y(followed)33 b(by)h(a)g(hyphen)e(\(indicating)j(all)g
1437 (descriptors)c(fr)n(om)k(that)e(number)g(onwar)n(ds\).)61
1438 b(It)33 b(may)227 1211 y(also)21 b(be)g(one)f(of)h(the)f(wor)n(ds)f
1439 Fo(stdin)p Fq(,)g Fo(stdout)f Fq(or)j Fo(stderr)p Fq(.)j(Open-ended)19
1440 b(\002le)i(descriptor)e(rangers)227 1324 y(ar)n(e)31
1441 b(allowed)f(only)f(with)h Fo(reject-fd)c Fq(and)k Fo(ignore-fd)p
1442 Fq(,)e(as)i(otherwise)e(the)h(service)h(pr)n(ogram)227
1443 1437 y(would)22 b(\002nd)g(itself)h(with)g(a)g(very)f(lar)n(ge)h
1444 (number)f(of)h(\002le)g(descriptors)d(open.)227 1608
1445 y(When)k(the)g(con\002guration)g(has)g(been)g(parsed,)g(and)g(befor)n
1446 (e)h(the)e(service)i(is)f(about)h(to)f(be)g(executed,)227
1447 1721 y(stderr)h(\(fd)i(2\))g(must)f(be)g(r)n(equir)n(ed)g(or)g(allowed)
1448 h(\()p Fo(require-fd)22 b Fq(or)k Fo(allow-fd)p Fq(\))d(for)j(writing;)
1449 i(this)227 1834 y(is)j(so)e(that)i(the)e(err)n(or)h(message)f(printed)g
1450 (by)h(the)g(server)7 b('s)29 b(child)i(pr)n(ocess)e(if)i(it)g(cannot)f
1451 Fo(exec)f Fq(the)227 1947 y(service)23 b(pr)n(ogram)f(is)h(not)f(lost.)
1452 p Black 0 2158 a Fh(allow-fd)51 b Fd(fd-range)g Fh([read|write])p
1453 Black 40 w Fq(Allow)43 b(the)g(descriptor\(s\))e(to)h(be)h(opened)e
1454 (for)i(r)n(eading)227 2271 y(r)n(esp.)49 b(writing,)32
1455 b(or)d(either)h(if)g(neither)f Fo(read)g Fq(nor)g Fo(write)f
1456 Fq(is)i(speci\002ed.)49 b(If)30 b(a)g(particular)i(descrip-)227
1457 2384 y(tor)22 b(not)f(speci\002ed)g(by)h(the)f(client)h(then)f(it)i
1458 (will)g(be)f(open)f(onto)g Fo(/dev/null)d Fq(\(for)k(r)n(eading,)f
1459 (writing,)227 2496 y(or)i(both,)e(depending)g(on)h(whether)f
1460 Fo(read)p Fq(,)g Fo(write)f Fq(or)i(neither)g(was)h(speci\002ed\).)p
1461 Black 0 2707 a Fh(null-fd)51 b Fd(fd-range)h Fh([read|write])p
1462 Black 40 w Fq(Specify)79 b(that)g(the)f(descriptor\(s\))g(be)h(opened)e
1463 (onto)227 2820 y Fo(/dev/null)27 b Fq(for)k(r)n(eading)f(r)n(esp.)52
1464 b(writing,)32 b(or)e(both)h(if)g(neither)f Fo(read)f
1465 Fq(nor)h Fo(write)f Fq(is)i(speci\002ed.)227 2933 y(Any)23
1466 b(speci\002cation)g(of)h(these)d(\002le)j(descriptors)d(by)i(the)g
1467 (client)h(will)g(be)g(silently)f(ignor)n(ed;)f(the)h(client)227
1468 3046 y(will)h(see)e(its)g(ends)f(of)i(the)f(descriptors)e(being)j
1469 (closed)e(immediately)-10 b(.)p Black 0 3257 a Fh(reject-fd)50
1470 b Fd(fd-range)p Black 43 w Fq(Do)29 b(not)g(allow)h(the)f
1471 (descriptor\(s\))f(to)h(be)g(speci\002ed)f(by)i(the)e(client.)49
1472 b(It)29 b(is)h(an)227 3370 y(err)n(or)c(if)h(any)f(descriptor\(s\))f
1473 (marked)h(for)g(r)n(ejection)g(ar)n(e)h(speci\002ed)e(when)g(the)h
1474 (service)g(is)g(about)h(to)227 3483 y(be)c(invoked)f(\(after)g(the)g
1475 (con\002guration)g(has)h(been)f(parsed\).)p Black 0 3694
1476 a Fh(ignore-fd)50 b Fd(fd-range)p Black 43 w Fq(Silently)27
1477 b(ignor)n(e)h(any)g(speci\002cation)g(by)g(the)f(client)i(of)f(those)e
1478 (descriptor\(s\).)227 3806 y(The)g(pipes)f(corr)n(esponding)f(to)i
1479 (these)e(descriptors)g(will)k(be)e(closed)f(just)h(befor)n(e)g(the)f
1480 (service)h(is)g(in-)227 3919 y(voked.)p Black 0 4130
1481 a Fh(disconnect-hup)p Black Black 0 4341 a(no-disconnect-h)o(up)p
1482 Black 39 w Fq(Causes)k(the)f(service's)h(pr)n(ocess)f(gr)n(oup)h(to)f
1483 (get)h(a)h Fo(SIGHUP)c Fq(if)32 b(the)d(client)i(dis-)227
1484 4454 y(connects)40 b(befor)n(e)g(the)f(main)j(service)e(pr)n(ocess)f
1485 (terminates.)81 b Fo(no-disconnect-)o(hu)o(p)34 b Fq(cancels)227
1486 4567 y Fo(disconnect-hup)p Fq(.)227 4738 y(If)28 b(one)f(of)h(the)f(r)n
1487 (eading)h(descriptors)e(speci\002ed)h(when)g(the)g(client)h(is)g
1488 (called)h(gets)d(a)j(r)n(ead)f(err)n(or)-7 b(,)28 b(or)227
1489 4851 y(if)h(the)e(service)h(is)g(disconnected)e(for)i(some)f(other)g(r)
1490 n(eason,)h(then)f(the)g Fo(SIGHUP)f Fq(will)j(be)f(deliver)n(ed)227
1491 4964 y Fn(befor)n(e)g Fq(the)d(writing)g(end\(s\))g(of)g(the)g
1492 (service's)g(r)n(eading)h(pipe\(s\))e(ar)n(e)i(closed,)g(so)e(that)i
1493 (the)e(client)i(can)227 5077 y(distinguish)c(disconnection)f(fr)n(om)j
1494 (r)n(eading)e(EOF)g(on)h(a)g(pipe.)p Black 0 5287 a Fh(reset)p
1495 Black 43 w Fq(Resets)d(the)i(execution)g(settings)e(to)i(the)g
1496 (default.)28 b(This)22 b(is)h(equivalent)g(to:)p Black
1497 Black 500 5563 a Fo(cd)54 b(~/)p Black Black eop end
1498 %%Page: 18 22
1499 TeXDict begin 18 21 bop Black 0 TeXcolorgray Black 0
1500 91 a Fq(Chapter)22 b(4.)h(Service-side)f(con\002guration)2185
1501 b(18)p 0 128 3766 4 v Black 500 476 a Fo(reject)500 589
1502 y(no-set-environm)o(en)o(t)500 702 y(suppress-args)500
1503 814 y(allow-fd)51 b(0)j(read)500 927 y(allow-fd)d(1-2)i(write)500
1504 1040 y(reject-fd)d(3-)500 1153 y(disconnect-hup)0 1406
1505 y Fq(If)36 b(no)g Fo(execute)p Fq(,)h Fo(execute-from-p)o(ath)o
1506 Fq(,)d Fo(execute-from-d)o(ir)o(ec)o(tor)o(y)c Fq(or)36
1507 b Fo(builtin)d Fq(is)k(inter)n(-)0 1518 y(pr)n(eted)21
1508 b(befor)n(e)h(all)i(the)e(\002les)g(ar)n(e)h(r)n(ead)g(then)f(the)f(r)n
1509 (equest)g(is)i(r)n(ejected.)0 1868 y Fp(4.3)119 b(Errors)29
1510 b(in)h(the)f(con\002guration)i(\002le)0 2133 y Fq(If)19
1511 b(a)h(syntax)f(err)n(or)g(or)g(other)f(pr)n(oblem)h(occurs)g(when)g(pr)
1512 n(ocessing)f(a)i(con\002guration)f(\002le)g(then)f(a)i(diagnostic)0
1513 2245 y(will)f(be)f(issued,)f(to)g(wher)n(ever)g(the)g(err)n(or)g
1514 (messages)f(ar)n(e)i(curr)n(ently)f(being)h(sent)e(\(see)h(the)g
1515 Fo(errors-)d Fq(family)0 2358 y(of)23 b(dir)n(ectives,)f(above\).)0
1516 2525 y(The)f(err)n(or)h(will)h(cause)f(pr)n(ocessing)f(of)h(the)f
1517 (con\002guration)g(\002les)h(to)g(cease)f(at)h(that)g(point,)f(unless)g
1518 (the)h(err)n(or)0 2638 y(was)h(inside)f(a)h Fo(catch-quit)c
1519 Fq(constr)o(uct.)27 b(In)c(this)f(case)h(the)f(settings)f(contr)n
1520 (olling)i(the)f(pr)n(ogram's)g(execu-)0 2750 y(tion)f(will)h(be)f(r)n
1521 (eset)e(to)h(the)h(defaults)f(as)h(if)h(a)f Fo(reset)e
1522 Fq(dir)n(ective)i(had)g(been)f(issued,)g(and)h(parsing)f(continues)0
1523 2863 y(after)j Fo(hctac)p Fq(.)0 3213 y Fp(4.4)119 b(Defaults)0
1524 3477 y Fq(The)20 b(default)h(con\002guration)f(pr)n(ocessing)g(is)h(as)
1525 g(if)h(the)e(daemon)h(wer)n(e)f(parsing)g(an)i(overall)g
1526 (con\002guration)0 3590 y(\002le)h(whose)e(contents)g(wer)n(e)h(as)g
1527 (follows:)p Black Black 164 3843 a Fo(reset)164 3956
1528 y(user-rcfile)49 b(~/.userv/rc)164 4069 y(errors-to-stde)o(rr)164
1529 4182 y(include)i(/etc/userv/syst)o(em)o(.d)o(ef)o(aul)o(t)164
1530 4294 y(if)i(grep)g(service-user-sh)o(el)o(l)48 b(/etc/shells)327
1531 4407 y(errors-push)436 4520 y(catch-quit)545 4633 y(include-ifexist)g
1532 Fj(file)53 b(specified)d(by)k(most)f(recent)f(user-rcfile)d(directive)
1533 436 4746 y Fo(hctac)327 4859 y(srorre)164 4972 y(fi)164
1534 5085 y(include)i(/etc/userv/syst)o(em)o(.o)o(ve)o(rri)o(de)164
1535 5198 y(quit)0 5450 y Fq(If)27 b(one)e(of)i(the)f Fo(-override)d
1536 Fq(options)i(to)h(the)g(client)h(is)f(used)g(then)f(it)i(will)h
1537 (instead)e(be)h(as)f(if)i(the)e(daemon)0 5563 y(wer)n(e)c(parsing)g(an)
1538 h(overall)h(con\002guration)e(as)g(follows:)p Black Black
1539 eop end
1540 %%Page: 19 23
1541 TeXDict begin 19 22 bop Black 0 TeXcolorgray Black 0
1542 91 a Fq(Chapter)22 b(4.)h(Service-side)f(con\002guration)2185
1543 b(19)p 0 128 3766 4 v Black Black Black 164 476 a Fo(reset)164
1544 589 y(errors-to-stde)o(rr)164 702 y(include)51 b Fj(file)i(containing)d
1545 (configuration)e(data)53 b(sent)g(by)g(client)164 814
1546 y Fo(quit)p Black Black eop end
1547 %%Page: 20 24
1548 TeXDict begin 20 23 bop Black 0 TeXcolorgray Black 0
1549 91 a Fq(Chapter)22 b(4.)h(Service-side)f(con\002guration)2185
1550 b(20)p 0 128 3766 4 v Black Black Black eop end
1551 %%Page: 21 25
1552 TeXDict begin 21 24 bop Black 0 TeXcolorgray Black 3675
1553 91 a Fq(21)p 0 128 3766 4 v Black 0 1151 a Fk(Chapter)44
1554 b(5)0 1618 y Fm(Information)52 b(passed)g(through)g(the)0
1555 1867 y(client/daemon)g(combination)0 2365 y Fq(The)23
1556 b(information)g(described)f(below)i(is)f(the)f(only)h(information)h
1557 (which)g(passes)d(between)h(the)h(caller)h(and)0 2478
1558 y(the)e(service.)p Black 127 2725 a(\225)p Black 45 w(The)32
1559 b(service)h(name)f(supplied)g(by)g(the)g(caller)i(is)e(available)k(in)d
1560 (the)f(con\002guration)g(language)g(for)227 2838 y(deciding)22
1561 b(whether)f(and)i(which)g(service)f(pr)n(ogram)h(to)f(invoke,)g(in)h
1562 (the)e Fo(service)f Fq(parameter)-7 b(,)22 b(and)227
1563 2951 y(is)33 b(used)e(by)i(the)f Fo(execute-from-di)o(re)o(ct)o(or)o(y)
1564 27 b Fq(and)33 b Fo(execute-from-p)o(at)o(h)27 b Fq(con\002guration)227
1565 3064 y(dir)n(ectives.)34 b(It)25 b(is)f(usually)h(used)f(to)g(select)g
1566 (which)h(service)g(pr)n(ogram)g(to)f(invoke.)34 b(It)24
1567 b(is)h(also)g(passed)227 3177 y(to)d(the)g(service)h(pr)n(ogram)f(in)h
1568 (the)f Fo(USERV_SERVICE)17 b Fq(envir)n(onment)22 b(variable.)p
1569 Black 127 3359 a(\225)p Black 45 w(File)31 b(descriptors)c(speci\002ed)
1570 i(by)h(the)g(client)g(and)h(allowed)f(accor)n(ding)g(to)g(the)f
1571 (con\002guration)h(lan-)227 3471 y(guage)23 b(will)i(be)f(connected.)31
1572 b(Each)24 b(\002le)g(descriptor)e(is)i(opened)e(for)i(r)n(eading)g(or)g
1573 (writing.)31 b(Commu-)227 3584 y(nication)c(is)e(via)i(pipes,)e(one)f
1574 (end)h(of)g(each)h(pipe)f(being)g(open)g(on)g(the)f(appr)n(opriate)h
1575 (\002le)h(descriptor)227 3697 y(in)k(the)f(service)g(pr)n(ogram)h
1576 (\(when)f(it)g(is)h(invoked\))f(and)g(the)g(other)f(end)h(being)g(held)
1577 g(by)h(the)f(client)227 3810 y(pr)n(ocess,)c(which)g(will)i(r)n(ead)e
1578 (and)g(write)g(\002les)g(it)g(opens)f(on)h(behalf)h(of)f(its)g(caller)i
1579 (or)e(\002le)g(descriptors)227 3923 y(it)e(is)g(passed)e(by)h(its)h
1580 (caller)-7 b(.)227 4070 y(Data)24 b(may)f(be)f(passed)f(into)h(the)g
1581 (service)g(thr)n(ough)g(r)n(eading)g(pipes)f(and)i(out)f(of)g(it)h(thr)
1582 n(ough)e(writing)227 4183 y(pipes.)50 b(These)29 b(pipes)g(can)i(r)n
1583 (emain)g(open)e(only)h(until)h(the)e(service)i(and)f(client)h(have)f
1584 (terminated,)227 4296 y(or)e(can)g(be)g(made)f(to)g(stay)g(open)g
1585 (after)g(the)g(client)h(has)g(terminated)e(and)i(\(if)h(the)e(service)g
1586 (pr)n(ogram)227 4409 y(forks\))22 b(the)h(main)h(service)e(pr)n(ocess)g
1587 (has)h(exited;)e(the)i(behaviour)g(is)g(contr)n(olled)f(by)h(options)f
1588 (passed)227 4522 y(to)g(the)g(client)h(by)g(its)f(caller)-7
1589 b(.)227 4669 y(The)29 b(caller)j(can)e(arrange)g(that)g(a)g(writing)g
1590 (pipe)f(be)h(connected)e(to)i(a)g(pipe)f(or)h(similar)h(object)f(and)
1591 227 4782 y(cause)19 b(attempts)e(to)h(write)g(to)g(that)g(descriptor)f
1592 (by)h(the)g(service)g(to)g(generate)f(a)i Fo(SIGPIPE)d
1593 Fq(\(or)i Fo(EPIPE)227 4895 y Fq(if)24 b Fo(SIGPIPE)19
1594 b Fq(is)k(caught)f(or)h(ignor)n(ed\))f(in)h(the)f(service.)227
1595 5043 y(Likewise,)g(the)h(service)g(can)h(close)f(\002ledescriptors)e
1596 (speci\002ed)h(for)h(r)n(eading,)g(which)h(will)h(cause)e(the)227
1597 5155 y(corr)n(esponding)h(\002ledescriptors)f(passed)h(by)h(the)f
1598 (caller)j(to)e(be)g(closed,)g(so)g(that)g(if)h(these)d(ar)n(e)j(pipes)
1599 227 5268 y(pr)n(ocesses)21 b(which)i(write)f(to)g(them)g(will)i(r)n
1600 (eceive)f Fo(SIGPIPE)c Fq(or)k Fo(EPIPE)p Fq(.)p Black
1601 127 5450 a(\225)p Black 45 w(If)33 b Fo(no-suppress-ar)o(gs)26
1602 b Fq(is)33 b(set)e(then)g(ar)n(guments)h(passed)f(to)h(the)f(client)i
1603 (by)f(its)h(caller)g(will)h(be)227 5563 y(passed)21 b(on,)h(verbatim,)i
1604 (to)e(the)f(service.)p Black Black eop end
1605 %%Page: 22 26
1606 TeXDict begin 22 25 bop Black 0 TeXcolorgray Black 0
1607 91 a Fq(Chapter)22 b(5.)h(Information)g(passed)e(thr)n(ough)g(the)h
1608 (client/daemon)g(combination)806 b(22)p 0 128 3766 4
1609 v Black Black 127 476 a(\225)p Black 45 w(Fatal)28 b(signals)e(and)h
1610 (system)e(call)j(failur)n(es)f(experienced)e(by)i(the)e(client)i(will)h
1611 (r)n(esult)e(in)h(the)f(discon-)227 589 y(nection)k(of)h(the)e(service)
1612 h(fr)n(om)h(the)f(client)h(and)f(possibly)g(some)f(of)i(the)e
1613 (communication)j(\002le)f(de-)227 702 y(scriptors)23
1614 b(described)f(above;)j(if)g Fo(disconnect-hup)17 b Fq(is)24
1615 b(set)f(then)g(the)g(service)g(will)i(also)f(be)g(sent)e(a)227
1616 814 y Fo(SIGHUP)p Fq(.)p Black 127 1002 a(\225)p Black
1617 45 w(The)g(value)h(of)f(the)g Fo(LOGNAME)d Fq(\(or)j
1618 Fo(USER)p Fq(\))f(envir)n(onment)h(variable)i(as)f(passed)e(to)g(the)h
1619 (client)h(will)g(be)227 1115 y(used)29 b(as)h(the)f(login)h(name)g(of)g
1620 (the)f(calling)j(user)c(if)j(the)e(uid)h(of)g(the)f(calling)j(pr)n
1621 (ocess)c(matches)i(the)227 1228 y(uid)e(corr)n(esponding)f(to)g(that)h
1622 (login)g(name.)45 b(Otherwise)27 b(the)g(calling)j(uid's)e(passwor)n(d)
1623 f(entry)g(will)227 1341 y(be)c(used)e(to)h(determine)f(the)h(calling)i
1624 (user)7 b('s)21 b(login)i(name.)227 1491 y(This)32 b(login)f(name)h
1625 (and)g(the)e(calling)k(uid)d(ar)n(e)h(available)j(in)d(the)f
1626 (con\002guration)f(language)i(in)g(the)227 1604 y Fo(calling-user)22
1627 b Fq(parameter)k(and)g(ar)n(e)h(passed)e(to)h(the)g(service)h(pr)n
1628 (ogram)f(in)h(envir)n(onment)f(vari-)227 1717 y(ables)d
1629 Fo(USERV_USER)18 b Fq(and)23 b Fo(USERV_UID)p Fq(.)227
1630 1867 y(The)c(shell)h(corr)n(esponding)d(to)i(that)h(login)f(name)h
1631 (\(accor)n(ding)h(to)e(the)g(passwor)n(d)f(entry\))g(is)i(available)227
1632 1980 y(as)j(in)g(the)f(con\002guration)g(language's)g
1633 Fo(calling-user-sh)o(el)o(l)17 b Fq(parameter)-7 b(.)227
1634 2130 y(If)23 b(no)f(r)n(elevant)h(passwor)n(d)e(entry)h(can)h(be)g
1635 (found)e(then)h(no)g(service)h(will)h(be)e(invoked.)p
1636 Black 127 2318 a(\225)p Black 45 w(The)37 b(numeric)h(values)g(and)g
1637 (textual)f(names)h(for)g(calling)h(gid)f(and)f(supplementary)f(gr)n
1638 (oup)h(list)227 2431 y(ar)n(e)31 b(available)h(in)f(the)e
1639 (con\002guration)g(language)h(in)g(the)f Fo(calling-group)24
1640 b Fq(parameter)30 b(and)g(ar)n(e)227 2544 y(passed)21
1641 b(to)h(the)g(service)h(in)g(envir)n(onment)f(variables.)227
1642 2694 y(If)27 b(no)f(name)h(can)g(be)f(found)g(for)g(a)h(numeric)g(gr)n
1643 (oup)f(to)g(which)h(the)e(calling)j(pr)n(ocess)d(belongs)h(then)227
1644 2807 y(no)d(service)f(will)i(be)e(invoked.)p Black 127
1645 2995 a(\225)p Black 45 w(The)30 b(name)h(of)g(the)f(curr)n(ent)g
1646 (working)g(dir)n(ectory)g(in)h(which)g(the)f(client)i(was)e(invoked)g
1647 (is)h(passed,)227 3107 y(if)c(available)h(and)e(not)e(hidden)h(using)g
1648 Fo(-hidecwd)p Fq(,)d(to)j(the)g(service)g(pr)n(ogram)g(in)h(the)f
1649 Fo(USERV_CWD)227 3220 y Fq(variable.)54 b(This)30 b(grants)g(no)g
1650 (special)h(access)f(to)g(that)g(dir)n(ectory)g(unless)f(it)i(is)g(a)g
1651 (subdir)n(ectory)e(of)h(a)227 3333 y(dir)n(ectory)22
1652 b(which)h(is)g(executable)f(\(sear)n(chable\))i(but)f(not)f(r)n
1653 (eadable)h(by)f(the)g(service)h(user)-7 b(.)p Black 127
1654 3521 a(\225)p Black 45 w(Settings)17 b(speci\002ed)g(by)h(the)f(caller)
1655 j(using)d(the)h Fo(--defvar)51 b Fj(name)p Fo(=)p Fj(value)14
1656 b Fq(option)j(to)h(the)f(client)i(ar)n(e)227 3634 y(available)j(in)d
1657 (the)f(con\002guration)g(language)h(as)g(the)e(corr)n(esponding)g
1658 Fo(u-)p Fj(name)f Fq(parameters)i(and)h(ar)n(e)227 3747
1659 y(passed)i(to)h(the)g(service)h(pr)n(ogram)f(in)h(envir)n(onment)f
1660 (variables)i Fo(USERV_U_)p Fj(name)p Fq(.)p Black 127
1661 3934 a(\225)p Black 45 w(If)e(the)f(calling)j(user)d(is)h(r)n(oot)f(or)
1662 h(the)f(same)h(as)g(the)f(service)h(user)f(then)g(options)f(may)j(be)f
1663 (given)g(to)f(the)227 4047 y(client)27 b(which)g(bypass)e(the)h(usual)g
1664 (security)f(featur)n(es;)i(in)g(this)f(case)g(other)f(information)i
1665 (may)g(pass)227 4160 y(between)21 b(the)h(caller)i(and)f(the)e
1666 (service.)p Black Black eop end
1667 %%Page: 23 27
1668 TeXDict begin 23 26 bop Black 0 TeXcolorgray Black 3675
1669 91 a Fq(23)p 0 128 3766 4 v Black 0 1152 a Fk(Chapter)44
1670 b(6)0 1621 y Fm(Applications)51 b(and)h(notes)f(on)h(use)0
1671 2157 y Fp(6.1)119 b(Examples)0 2422 y Fq(The)35 b(companion)g(package,)
1672 j Fo(userv-utils)p Fq(,)c(contains)h(a)h(selection)e(of)i(example)f
1673 (services,)j(some)c(of)0 2535 y(which)23 b(ar)n(e)g(useful)f(tools)g
1674 (in)h(their)f(own)g(right.)28 b(See)21 b(the)h Fo(README)e
1675 Fq(in)j(its)g(top-level)f(dir)n(ectory)f(for)i(details.)0
1676 2886 y Fp(6.2)119 b(Standard)29 b(services)g(and)h(directory)g
1677 (management)0 3151 y Fq(In)f(later)g(versions)f(of)h(this)g
1678 (speci\002cation)g(standar)n(d)g(service)g(names)g(and)g(interfaces)g
1679 (for)g(common)g(ser)n(-)0 3263 y(vices)23 b(such)f(as)h(mail)h
1680 (delivery)f(and)f(WWW)h(CGI)g(scripts)f(may)h(be)f(speci\002ed.)0
1681 3430 y Fo(userv)p Fq(-using)c(applications)j(and)g(system)e(services)h
1682 (which)h(hide)f Fo(userv)f Fq(behind)h(wrapper)g(scripts)g(may)0
1683 3543 y(need)29 b(to)h(stor)n(e)f(information)j(in)f(the)e(user)7
1684 b('s)29 b(\002lespace)i(to)f(pr)n(eserve)f(the)g(corr)n(ect)i
1685 (placement)f(of)h(the)f(se-)0 3656 y(curity)35 b(perimiters.)63
1686 b(Such)35 b(applications)h(should)e(usually)h(do)f(so)g(in)i(a)f(dir)n
1687 (ectory)f(\(cr)n(eated)g(by)h(them\))0 3769 y Fo(~/.userv/)p
1688 Fj(servic)o(e)p Fq(,)16 b(wher)n(e)22 b Fn(service)j
1689 Fq(is)e(the)e(service)i(name)g(or)f(application)i(in)f(question.)0
1690 3936 y(If)e(desir)n(ed,)f(a)i(dot-dir)n(ectory)d(inside)i
1691 Fo(~/.userv)d Fq(may)k(be)f(used)f(to)g(avoid)i(the)f(user)f(becoming)h
1692 (confused)0 4049 y(by)j(\002nding)f(parts)g(of)g(a)i(semi-privileged)e
1693 (application's)i(internal)f(state)e(in)i(their)g(\002lespace,)f(and/or)
1694 g(dis-)0 4162 y(courage)f(them)g(fr)n(om)h(\002ddling)f(with)h(and)g
1695 (thus)e(corr)o(upting)h(it.)0 4329 y(However)-7 b(,)25
1696 b Fo(userv)e Fq(applications)j(should)e(of)h(course)g(not)f(r)n(ely)h
1697 (for)h(their)f(global)h(integrity)e(and)h(security)0
1698 4442 y(on)d(the)g(integrity)f(of)i(the)f(data)h(on)f(the)g(user)7
1699 b('s)21 b(side)h(of)g(the)g(security)g(boundary)-10 b(.)0
1700 4792 y Fp(6.3)119 b(Reducing)30 b(the)g(number)g(of)f(absolutely)h
1701 (privileged)g(subsystems)0 5057 y Fq(Curr)n(ently)23
1702 b(most)f(Unix)i(systems)c(have)k(many)f(components)f(which)i(need)d(to)
1703 i(r)o(un)g(as)g(r)n(oot,)g(even)f(though)0 5170 y(most)f(of)h(their)f
1704 (activity)i(does)d(not)h(strictly)h(r)n(equir)n(e)g(it.)27
1705 b(This)22 b(gives)f(rise)h(to)f(a)h(lar)n(ge)h(and)e(complex)h(body)f
1706 (of)0 5283 y(code)h(which)h(must)f(be)h(tr)o(usted)d(with)j(the)f
1707 (security)f(of)i(the)f(system.)0 5450 y(If)36 b(they)e(wer)n(e)i(to)f
1708 (use)g Fo(userv)p Fq(,)i(many)f(of)g(these)e(subsystems)f(would)i(no)h
1709 (longer)f(need)f(any)i(unusual)0 5563 y(privilege.)p
1710 Black Black eop end
1711 %%Page: 24 28
1712 TeXDict begin 24 27 bop Black 0 TeXcolorgray Black 0
1713 91 a Fq(Chapter)22 b(6.)h(Applications)g(and)f(notes)f(on)i(use)2019
1714 b(24)p 0 128 3766 4 v Black 0 476 a Fo(cron)23 b Fq(and)h
1715 Fo(at)p Fq(,)g Fo(lpr)f Fq(and)h(the)g(system's)e(mail)k(transfer)e
1716 (agent)g(\()p Fo(sendmail)p Fq(,)d Fo(smail)p Fq(,)h
1717 Fo(exim)h Fq(or)h(the)g(like\))0 589 y(all)33 b(fall)g(into)e(this)g
1718 (category)-10 b(,)31 b(though)f Fo(userv)p Fq(-based)f(versions)h(of)h
1719 (these)f(pr)n(ograms)g(ar)n(e)i(not)e(curr)n(ently)0
1720 702 y(available.)0 1058 y Fp(6.4)119 b(Do)30 b(not)g(give)h(away)e
1721 (excessive)h(privilege)f(to)h Fa(userv)p Fp(-using)f(facilities)0
1722 1326 y Fq(Ther)n(e)24 b(is)h(a)g(danger)f(that)h(people)e(r)n
1723 (eimplementing)h(the)g(facilities)j(I)d(mention)h(above)g(using)f
1724 Fo(userv)f Fq(will)0 1439 y(discar)n(d)34 b(much)g(of)f(the)g(security)
1725 f(bene\002t)g(by)i(using)f(a)h(naive)g(implementation)f(technique.)60
1726 b(This)33 b(will)0 1552 y(become)22 b(clear)n(er)i(with)e(an)h
1727 (example:)0 1722 y(Consider)32 b(the)h Fo(lpr)e Fq(pr)n(ogram.)60
1728 b(In)32 b(curr)n(ent)h(systems)e(this)i(needs)e(to)i(have)g(an)h
1729 (absolutely)e(privileged)0 1835 y(component)21 b(in)i(or)n(der)e(to)h
1730 (support)e(delayed)h(printing)h(without)f(copying:)27
1731 b(when)22 b(the)f(user)g(queues)g(a)i(\002le)0 1948 y(to)g(be)g
1732 (printed)f(the)h(\002lename)g(is)h(stor)n(ed)e(in)h(the)g(print)g
1733 (queue,)f(rather)h(than)g(a)h(copy)f(of)g(it,)h(and)f(the)g(printer)0
1734 2061 y(daemon)28 b(accesses)f(the)h(\002le)g(dir)n(ectly)h(when)e(it)i
1735 (is)f(r)n(eady)g(to)g(print)g(the)f(job.)46 b(In)28 b(or)n(der)f(that)h
1736 (the)g(user)f(can)0 2174 y(print)c(\002les)g(which)h(ar)n(e)f(not)g
1737 (world-r)n(eadable)g(the)g(daemon)g(is)g(given)g(r)n(oot)g(privilege)g
1738 (so)g(that)g(it)g(can)h(open)0 2286 y(the)e(\002le)h(in)g(the)e
1739 (context)h(of)g(the)g(user)-7 b(,)22 b(rather)g(than)h(its)f(own.)0
1740 2456 y(A)j(simple-minded)g(appr)n(oach)h(to)e(converting)h(this)g
1741 (scheme)f(to)h(use)f Fo(userv)f Fq(might)i(involve)h(giving)g(the)0
1742 2569 y(printer)32 b(daemon)g(\(the)g Fo(lp)g Fq(user\))g(the)g(ability)
1743 j(to)d(r)n(ead)h(the)f(\002le)h(by)f(allowing)i(them)e(to)g(r)o(un)h
1744 Fo(cat)f Fq(\(or)g(a)0 2682 y(special-purpose)23 b(\002le-r)n(eading)i
1745 (pr)n(ogram\))g(as)f(any)h(user)-7 b(.)33 b(The)24 b
1746 Fo(lpr)f Fq(pr)n(ogram)i(would)f(use)g(a)h Fo(userv)d
1747 Fq(ser)n(-)0 2795 y(vice)i(to)e(stor)n(e)g(the)h(\002lename)g(in)h(the)
1748 e(printer)g(daemon's)h(queues,)e(and)i(the)f(daemon)h(would)g(r)n(ead)g
1749 (the)f(\002le)0 2908 y(later)h(when)f(it)g(felt)h(like)g(it.)0
1750 3078 y(However)-7 b(,)23 b(this)h(would)g(allow)h(the)f(printer)f
1751 (daemon)h(to)g(r)n(ead)g(any)g(\002le)h(on)f(the)f(system,)g(whether)g
1752 (or)h(not)0 3190 y(someone)30 b(had)i(asked)e(for)i(it)g(to)f(be)g
1753 (printed.)54 b(Since)32 b(many)g(\002les)g(will)h(contain)f(passwor)n
1754 (ds)e(and)h(other)0 3303 y(security-critical)c(information)g(this)f(is)
1755 g(nearly)g(as)g(bad)g(as)h(giving)f(the)f(daemon)h(r)n(oot)f(access)h
1756 (in)h(the)e(\002rst)0 3416 y(place.)42 b(Any)26 b(security)g(holes)g
1757 (in)i(the)e(print)h(server)f(which)h(allow)h(a)g(user)e(to)g(execute)g
1758 (commands)h(as)g(the)0 3529 y Fo(lp)22 b Fq(user)f(will)j(give)f(the)f
1759 (user)f(the)h(ability)i(to)e(r)n(ead)h(any)f(\002le)h(on)f(the)g
1760 (system.)0 3699 y(Instead,)35 b(it)e(is)h(necessary)e(to)h(keep)f(a)j
1761 (r)n(ecor)n(d)e(of)h(which)g(\002les)f(the)g(daemon)g(has)h(been)f
1762 (asked)f(to)h(print)0 3812 y Fn(outside)f Fq(the)e(contr)n(ol)h(of)f
1763 (the)g(print)g(daemon.)52 b(This)30 b(r)n(ecor)n(d)g(could)h(be)f(kept)
1764 f(by)i(a)g(new)f(r)n(oot-privileged)0 3925 y(component,)c(but)g(this)g
1765 (is)h(not)f(necessary:)33 b(the)26 b(r)n(ecor)n(d)g(of)h(which)g
1766 (\002les)f(a)h(user)e(has)i(asked)e(to)h(be)g(printed)0
1767 4038 y(can)e(be)f(kept)f(under)g(the)g(contr)n(ol)h(of)g(the)f(user)g
1768 (in)i(question.)k(The)22 b(submission)h(pr)n(ogram)g
1769 Fo(lpr)f Fq(will)i(make)0 4151 y(a)k(r)n(ecor)n(d)f(in)g(an)h(ar)n(ea)g
1770 (under)e(the)g(user)7 b('s)26 b(contr)n(ol)h(befor)n(e)g(communicating)
1771 h(with)g(the)e(print)h(server)-7 b(,)27 b(and)0 4263
1772 y(the)c(print)h(server)f(would)g(be)h(given)g(the)f(ability)i(to)e(r)o
1773 (un)h(a)h(special)f(\002le-r)n(eading)g(pr)n(ogram)g(which)h(would)0
1774 4376 y(only)d(allow)i(\002les)e(to)g(be)h(r)n(ead)f(which)h(wer)n(e)f
1775 (listed)g(in)h(the)f(user)7 b('s)21 b(\002le)i(of)g(things)e(they'd)g
1776 (asked)h(to)g(print.)0 4546 y(Now)29 b(security)g(holes)h(in)g(most)g
1777 (of)g(the)f(printing)h(system)f(do)g(not)h(critically)i(af)n(fect)f
1778 (the)f(security)f(of)h(the)0 4659 y(entir)n(e)e(system:)37
1779 b(they)27 b(only)h(allow)h(the)e(attacker)h(to)g(r)n(ead)g(and)g
1780 (interfer)n(e)g(with)g(print)g(jobs.)44 b(Bugs)27 b(in)i(the)0
1781 4772 y(pr)n(ograms)20 b(r)o(un)h(by)g(the)f(print)h(server)f(to)g(r)n
1782 (ead)h(users')e(\002les)i(\(and)g(to)g(r)n(emove)f(entries)g(fr)n(om)h
1783 (the)f(list)h(of)g(\002les)0 4885 y(when)h(it)h(has)f(done)g(with)g
1784 (them\))h(will)h(still)f(be)f(serious,)f(but)i(this)f(pr)n(ogram)g(can)
1785 i(be)e(quite)h(simple.)0 5055 y(Similar)29 b(considerations)e(apply)g
1786 (to)g(many)h Fo(userv)p Fq(-based)d(versions)i(of)g(facilities)j(which)
1787 e(curr)n(ently)f(r)o(un)0 5167 y(as)c(r)n(oot.)0 5337
1788 y(It)h(is)h(debatable)g(whether)e(the)h(user)n(-contr)n(olled)g(state)f
1789 (should)h(be)h(kept)e(in)i(the)f(user)7 b('s)23 b(\002lespace)h(\(in)i
1790 (dot-)0 5450 y(\002les,)e(say\))g(or)g(kept)f(in)h(a)h(separate)e(ar)n
1791 (ea)i(set)e(aside)h(for)g(the)g(purpose;)e(however)-7
1792 b(,)24 b(using)f(the)h(user)7 b('s)23 b(home)0 5563 y(dir)n(ectory)g
1793 (\(and)i(possibly)e(cr)n(eating)h(a)h(separate)e(subdir)n(ectory)g(of)h
1794 (it)g(as)g(a)h(dot\002le)e(to)h(contain)g(subsystem)p
1795 Black Black eop end
1796 %%Page: 25 29
1797 TeXDict begin 25 28 bop Black 0 TeXcolorgray Black 0
1798 91 a Fq(Chapter)22 b(6.)h(Applications)g(and)f(notes)f(on)i(use)2019
1799 b(25)p 0 128 3766 4 v Black 0 476 a(state\))28 b(has)h(fewer)g
1800 (implications)h(for)f(the)f(r)n(est)h(of)g(the)f(system)f(and)i(makes)g
1801 (it)g(entir)n(ely)g(clear)h(wher)n(e)e(the)0 589 y(security)22
1802 b(boundaries)f(lie.)0 938 y Fp(6.5)119 b Fa(userv)29
1803 b Fp(can)g(often)h(replace)e Fa(sudo)p Fp(,)h(but)h(not)g
1804 Fa(really)0 1203 y Fo(userv)h Fq(is)i(not)g(intended)e(as)j(a)f
1805 (general-purpose)e(system)h(administration)h(tool)g(with)g(which)h
1806 (system)0 1316 y(administrators)24 b(can)h(execute)d(arbitrary)j(pr)n
1807 (ograms)f(like)g(text)f(editors)g(as)h(r)n(oot)g(\(or)g(other)f(system)
1808 f(users\))0 1429 y(when)34 b(they)g(need)g(to.)65 b(It)34
1809 b(is)h(unsuitable)g(for)g(this)g(purpose)e(pr)n(ecisely)h(because)h(it)
1810 g(enfor)n(ces)g(a)g(str)n(ong)0 1542 y(separation)22
1811 b(between)f(the)h(calling)i(and)f(the)f(called)h(pr)n(ogram,)f(which)h
1812 (is)g(undesirable)f(in)h(this)g(context.)0 1708 y(However)-7
1813 b(,)33 b(its)f(use)f(when)g(r)n(estricted)g(to)g(r)o(unning)h
1814 (particular)h(pr)n(ograms)e(in)i(particular)g(ways)e(is)i(very)0
1815 1821 y(similar)24 b(to)d(many)i(common)f(uses)f(of)h
1816 Fo(sudo)p 1 0 0 TeXcolorrgb -33 x Fi(1)p Black 1586 1821
1817 a Fq(.)28 b Fo(userv)20 b Fq(is)i(generally)g(much)g(better)f(than)h(r)
1818 n(estricted)f Fo(sudo)p Fq(,)0 1934 y(because)e(it)g(pr)n(otects)f(the)
1819 h(called)h(pr)n(ogram)f(much)h(mor)n(e)f(str)n(ongly)f(fr)n(om)h(bad)h
1820 (envir)n(onmental)g(conditions)0 2047 y(set)25 b(up)g(by)h(the)f
1821 (caller)-7 b(.)39 b(Most)25 b(pr)n(ograms)g(that)h(one)f(might)g(want)h
1822 (to)f(r)o(un)h(via)h(r)n(estricted)e Fo(sudo)p Fq(,)g(have)h(not)0
1823 2159 y(been)h(designed)f(to)h(r)o(un)h(in)g(a)h(partially)g(hostile)e
1824 (envir)n(onment.)43 b Fo(userv)26 b Fq(allows)i(these)f(pr)n(ograms)g
1825 (to)g(be)0 2272 y(r)o(un)c(in)g(a)g(safer)f(envir)n(onment)h(and)f
1826 (should)g(be)g(used)g(instead.)0 2622 y Fp(6.6)119 b(Error)29
1827 b(handling)h(and)g(input)f(streams)g(\(eg)h(stdin\))0
1828 2887 y Fq(When)e(the)f(service)h(pr)n(ogram)g(is)g(r)n(eading)g(fr)n
1829 (om)h(a)f(\002le)h(descriptor)d(connected)h(to)g(the)h(calling)h(side,)
1830 g(the)0 2999 y(fd)23 b(that)g(the)f(service)h(pr)n(ogram)g(r)n(efers)f
1831 (to)h(a)g(pipe)g(set)e(up)i(by)g Fo(userv)e Fq(and)i(not)f(to)h(the)f
1832 (same)h(object)g(as)g(was)0 3112 y(pr)n(esented)d(by)i(the)g(caller)-7
1833 b(.)0 3279 y(Ther)n(efor)n(e)25 b(if)j(ther)n(e)d(is)i(some)f(kind)g
1834 (of)g(err)n(or)g(it)h(is)g(possible)f(for)g(the)g(service-side)f(fd)i
1835 (to)f(give)g(pr)n(ematur)n(e)0 3392 y(end)g(of)h(\002le.)41
1836 b(If)27 b(it)g(is)g(important)f(to)g(tell)h(whether)f(all)i(of)f(the)f
1837 (intended)f(data)i(has)g(been)f(r)n(eceived)h(by)g(the)0
1838 3505 y(service)22 b(pr)n(ogram,)h(the)e(datastr)n(eam)i(must)f(contain)
1839 h(an)g(explicit)g(end-of-\002le)g(indication)g(of)g(some)e(kind.)0
1840 3671 y(For)j(example,)h(consider)f(a)h Fo(userv)e Fq(service)h(for)h
1841 (submitting)f(a)i(mail)g(message,)e(wher)n(e)g(message)f(is)i(sup-)0
1842 3784 y(plied)e(on)f(the)h(service's)f(stdin.)29 b(However)-7
1843 b(,)21 b(if)j(the)e(calling)j(pr)n(ocess)d(is)h(interr)o(upted)e(befor)
1844 n(e)i(it)g(has)g(written)0 3897 y(all)j(of)f(the)e(message,)h(the)f
1845 (service)i(pr)n(ogram)f(will)i(get)d(EOF)h(on)h(the)e(message)h(data.)
1846 33 b(In)24 b(a)i(naive)f(arrange-)0 4010 y(ment)i(this)g(would)g(cause)
1847 h(a)g(half-complete)g(message)e(to)h(be)h(sent.)41 b(T)-8
1848 b(o)27 b(pr)n(event)g(this,)h(it)g(is)g(necessary)e(to)0
1849 4122 y(adopt)e(some)h(kind)g(of)g(explicit)h(end)e(indication;)j(for)f
1850 (example,)f(the)g(end)f(of)h(the)g(message)f(could)h(be)g(sig-)0
1851 4235 y(nalled)31 b(by)f(a)h(dot)e(on)h(a)h(line)g(by)f(itself,)j(and)d
1852 (dots)f(doubled,)i(as)f(in)h(SMTP)-12 b(.)30 b(Then)f(the)h(service)g
1853 (pr)n(ogram)0 4348 y(would)e(know)g(when)h(the)f(entir)n(e)h(message)e
1854 (had)i(been)g(r)n(eceived,)h(and)f(could)g(avoid)g(queueing)f(incom-)0
1855 4461 y(plete)22 b(messages.)0 4811 y Fp(6.7)119 b(Don')n(t)30
1856 b(give)g(access)g(to)g(general-purpose)f(utilities)0
1857 5075 y Fq(Do)20 b(not)g(specify)g(general)g(purpose)e(pr)n(ograms)i
1858 (like)g Fo(mv)g Fq(or)g Fo(cat)f Fq(in)i Fo(execute-)16
1859 b Fq(dir)n(ectives)21 b(without)e(car)n(e-)0 5188 y(ful)31
1860 b(thought)e(about)h(their)g(ar)n(guments,)i(and)e(certainly)h(not)f(if)
1861 h Fo(no-suppress-arg)o(s)24 b Fq(is)31 b(speci\002ed.)50
1862 b(If)0 5301 y(you)22 b(do)g(so)g(it)g(will)i(give)f(the)f(caller)i
1863 (much)f(mor)n(e)f(privilige)i(than)e(you)g(pr)n(obably)h(intend.)p
1864 Black 0 5384 1507 4 v 134 5440 a Fg(1)p 0 TeXcolorgray
1865 Black 163 5472 a Ff(sudo)h Fe(is)g(a)h(pr)o(ogram)f(which)i(allows)e
1866 (users)g(to)h(execute)f(certain)h(pr)o(ograms)e(as)i(r)o(oot,)g(accor)o
1867 (ding)f(to)h(con\002guration)h(\002les)0 5563 y(speci\002ed)18
1868 b(by)g(the)h(system)f(administrator)-6 b(.)p Black Black
1869 Black eop end
1870 %%Page: 26 30
1871 TeXDict begin 26 29 bop Black 0 TeXcolorgray Black 0
1872 91 a Fq(Chapter)22 b(6.)h(Applications)g(and)f(notes)f(on)i(use)2019
1873 b(26)p 0 128 3766 4 v Black 0 476 a(It)25 b(is)g(a)h(shame)f(that)g(I)g
1874 (have)g(to)g(say)g(this)f(her)n(e,)h(but)g(inexperienced)f
1875 (administrators)h(have)g(made)g(similar)0 589 y(mistakes)d(with)g(pr)n
1876 (ograms)g(like)h Fo(sudo)p Fq(.)p Black Black eop end
1877 %%Trailer
1878
1879 userdict /end-hook known{end-hook}if
1880 %%EOF