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