File: body.tmp

package info (click to toggle)
userv 1.0.5-0.2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 900 kB
  • ctags: 1,002
  • sloc: ansic: 4,188; lex: 281; makefile: 201; sh: 201
file content (1473 lines) | stat: -rw-r--r-- 91,953 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
%%Page: 1 1
TeXDict begin HPSdict begin 1 0 bop 519 875 a Ft(User)50
b(service)g(daemon)j(and)f(client)1379 1037 y(speci\002cation)785
1275 y Fs(Ian)24 b(Jackson)i Fr(<)t(ian@davenant.greenend.org.uk>)1787
1955 y Fq(1.0.5-0.1)1721 2453 y Fp(Abstract)0 2722 y
Fq(This)19 b(is)g(a)h(speci\002cation)g(for)f(a)h(Unix)f(system)f
(facility)j(to)d(allow)i(one)f(pr)n(ogram)g(to)g(invoke)g(another)f
(when)g(only)0 2835 y(limited)23 b(tr)o(ust)f(exists)f(between)g(them.)
p eop end end
%%Page: 2 2
TeXDict begin HPSdict begin 2 1 bop 0 3774 a Fp(Copyright)31
b(Notice)0 4042 y Fo(userv)20 b Fq(is)j(Copyright)f(1996-2003,2006)28
b(Ian)23 b(Jackson;)f(Copyright)f(2000)k(Ben)c(Harris.)0
4211 y Fo(userv)32 b Fq(is)j(fr)n(ee)f(softwar)n(e;)40
b(you)34 b(can)h(r)n(edistribute)e(it)i(and/or)f(modify)h(it)f(under)g
(the)f(terms)h(of)h(the)e(GNU)0 4324 y(General)j(Public)i(License)d(as)
h(published)g(by)g(the)f(Fr)n(ee)g(Softwar)n(e)h(Foundation;)41
b(either)35 b(version)h(2)h(of)f(the)0 4437 y(License,)21
b(or)i(\(at)g(your)e(option\))h(any)h(later)g(version.)0
4606 y(This)29 b(pr)n(ogram)h(is)f(distributed)f(in)j(the)d(hope)h
(that)g(it)h(will)h(be)e(useful,)i(but)e Fn(without)i(any)f(warranty)p
Fq(;)k(without)0 4719 y(even)19 b(the)h(implied)g(warranty)g(of)g
Fn(mer)n(chantability)j Fq(or)d Fn(\002tness)h(for)g(a)g(particular)h
(purpose)p Fq(.)29 b(See)19 b(the)g(GNU)h(General)0 4832
y(Public)k(License)e(for)g(mor)n(e)h(details.)0 5002
y(Y)-8 b(ou)29 b(should)g(have)h(r)n(eceived)f(a)i(copy)e(of)h(the)f
(GNU)g(General)i(Public)g(License)e(along)h(with)f Fo(userv)p
Fq(;)i(if)g(not,)0 5115 y(write)22 b(to)g(the)g(Fr)n(ee)g(Softwar)n(e)g
(Foundation,)f(59)i(T)-8 b(emple)22 b(Place)h(-)g(Suite)f(330,)i
(Boston,)c(MA)j(02111-1307,)k(USA.)p eop end end
%%Page: 1 3
TeXDict begin HPSdict begin 1 2 bop 3874 91 a Fq(i)p
0 128 3901 4 v 0 1208 a Fm(Contents)0 1821 y Fl(1)91
b(Introduction)p
 (#chapter.1) [[72 548 151 560] [1 1 1 [3 3]] [0 0 1]] pdfm 
3193 w(1)0 2102 y(2)g(Client)24 b(program)e(usage)p
 (#chapter.2) [[72 515 196 527] [1 1 1 [3 3]] [0 0 1]] pdfm 
2825 w(3)136 2285 y Fq(2.1)96 b(Options)p
 (#section.2.1) [[88 493 152 505] [1 1 1 [3 3]] [0 0 1]] pdfm 
36 w(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)128 b(3)136
2468 y(2.2)96 b(Security-overriding)22 b(options)p
 (#section.2.2) [[88 471 247 483] [1 1 1 [3 3]] [0 0 1]] pdfm 
64 w(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)128
b(7)0 2749 y Fl(3)91 b(Execution)23 b(environment)f(of)h(the)g(service)
h(program)p  (#chapter.3) [[72 437 318 449] [1 1 1 [3 3]] [0 0 1]] pdfm 
1802 w(9)136 2932 y Fq(3.1)96 b(File)23 b(descriptors)p
 (#section.3.1) [[88 415 188 427] [1 1 1 [3 3]] [0 0 1]] pdfm 
79 w(.)46 b(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
h(.)f(.)g(.)g(.)g(.)g(.)128 b(9)136 3115 y(3.2)96 b(Envir)n(onment)p
 (#section.3.2) [[88 393 177 405] [1 1 1 [3 3]] [0 0 1]] pdfm 
34 w(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(10)0 3396 y Fl(4)91
b(Service-side)25 b(con\002guration)p
 (#chapter.4) [[72 359 219 371] [1 1 1 [3 3]] [0 0 1]] pdfm 
2588 w(13)136 3579 y Fq(4.1)96 b(Con\002guration)23 b(\002le)f(syntax)p
 (#section.4.1) [[88 338 234 350] [1 1 1 [3 3]] [0 0 1]] pdfm 
38 w(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
g(.)82 b(13)136 3761 y(4.2)96 b(Con\002guration)23 b(\002le)f(dir)n
(ectives)p
 (#section.4.2) [[88 316 249 328] [1 1 1 [3 3]] [0 0 1]] pdfm 
50 w(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
b(14)345 3944 y(4.2.1)110 b(Immediate)22 b(dir)n(ectives)p
 (#subsection.4.2.1) [[113 294 250 306] [1 1 1 [3 3]] [0 0 1]] pdfm 
39 w(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
b(14)345 4127 y(4.2.2)110 b(Dir)n(ectives)24 b(with)e(delayed)g(ef)n
(fect)p
 (#subsection.4.2.2) [[113 272 292 284] [1 1 1 [3 3]] [0 0 1]] pdfm 
33 w(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(15)345
4310 y(4.2.3)110 b(Contr)n(ol)23 b(str)o(uctur)n(e)f(dir)n(ectives)p
 (#subsection.4.2.3) [[113 250 281 262] [1 1 1 [3 3]] [0 0 1]] pdfm 
55 w(.)46 b(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
b(16)345 4493 y(4.2.4)110 b(Dir)n(ectives)24 b(for)e(changing)h
(execution)f(settings)p
 (#subsection.4.2.4) [[113 228 350 240] [1 1 1 [3 3]] [0 0 1]] pdfm 
21 w(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
(.)g(.)g(.)g(.)g(.)82 b(17)136 4676 y(4.3)96 b(Err)n(ors)22
b(in)h(the)f(con\002guration)g(\002le)p
 (#section.4.3) [[88 206 259 218] [1 1 1 [3 3]] [0 0 1]] pdfm 
31 w(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f
(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
b(20)136 4859 y(4.4)96 b(Defaults)p
 (#section.4.4) [[88 184 154 196] [1 1 1 [3 3]] [0 0 1]] pdfm 
89 w(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(21)0 5140
y Fl(5)91 b(Information)23 b(passed)h(through)d(the)i(client/daemon)g
(combination)p
 (#chapter.5) [[72 150 387 162] [1 1 1 [3 3]] [0 0 1]] pdfm 
1188 w(23)p eop end end
%%Page: 2 4
TeXDict begin HPSdict begin 2 3 bop 0 91 a Fq(CONTENTS)3344
b(ii)p 0 128 3901 4 v 0 476 a Fl(6)91 b(Applications)23
b(and)g(notes)f(on)g(use)p
 (#chapter.6) [[72 710 239 722] [1 1 1 [3 3]] [0 0 1]] pdfm 
2421 w(25)136 645 y Fq(6.1)96 b(Examples)p
 (#section.6.1) [[88 690 160 702] [1 1 1 [3 3]] [0 0 1]] pdfm 
36 w(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(25)136 814
y(6.2)96 b(Standar)n(d)23 b(services)f(and)g(dir)n(ectory)g(management)
p  (#section.6.2) [[88 669 332 681] [1 1 1 [3 3]] [0 0 1]] pdfm 
39 w(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(25)136 984 y(6.3)96 b(Reducing)22
b(the)g(number)g(of)h(absolutely)f(privileged)g(subsystems)p
 (#section.6.3) [[88 649 394 661] [1 1 1 [3 3]] [0 0 1]] pdfm 
64 w(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
b(25)136 1153 y(6.4)96 b(Do)23 b(not)f(give)h(away)g(excessive)e
(privilege)i(to)f Fo(userv)p Fq(-using)e(facilities)p
 (#section.6.4) [[88 629 413 641] [1 1 1 [3 3]] [0 0 1]] pdfm 
48 w(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
b(26)136 1323 y(6.5)96 b Fo(userv)21 b Fq(can)i(often)f(r)n(eplace)h
Fo(sudo)p Fq(,)e(but)h(not)g Fo(really)p
 (#section.6.5) [[88 608 342 620] [1 1 1 [3 3]] [0 0 1]] pdfm 
25 w Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(27)136 1492 y(6.6)96
b(Err)n(or)22 b(handling)h(and)g(input)f(str)n(eams)g(\(eg)g(stdin\))p
 (#section.6.6) [[88 588 324 600] [1 1 1 [3 3]] [0 0 1]] pdfm 
39 w(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(27)136 1661 y(6.7)96
b(Don't)23 b(give)g(access)f(to)g(general-purpose)e(utilities)p
 (#section.6.7) [[88 568 330 580] [1 1 1 [3 3]] [0 0 1]] pdfm 
58 w(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(28)p eop end end
%%Page: 1 5
TeXDict begin HPSdict begin 1 4 bop 3855 91 a Fq(1)p
0 128 3901 4 v 0 1155 a Fk(Chapter)44 b(1)0 1626 y Fm(Introduction)0
2128 y Fq(Ther)n(e)34 b(is)h(a)g(daemon)f(which)i(invokes)e(user)f
(service)i(pr)n(ograms)f(\(henceforth)g(`services'\))h(in)g(r)n
(esponse)e(to)0 2241 y(r)n(equests)22 b(by)j(callers)g(of)g(a)g
(companion)g(client)g(pr)n(ogram)f(\(henceforth)g(the)g(`client'\))i
(and)e(accor)n(ding)i(to)d(r)o(ules)0 2354 y(set)28 b(forth)h(in)h
(system-wide)e(and)h(user)n(-speci\002c)g(con\002guration)g(\002les.)48
b(The)29 b(companion)h(client)g(pr)n(ogram)f(is)0 2467
y(setuid)e(r)n(oot,)h(and)g(negotiates)e(with)i(the)f(daemon)g(thr)n
(ough)g(an)h Fo(AF_UNIX)d Fq(socket)i(and)h(associated)f(objects)0
2579 y(in)f(a)h(system-wide)c(private)j(dir)n(ectory)f(set)g(aside)h
(for)f(the)g(purpose.)36 b(The)25 b(user)g(who)g(wishes)g(the)g
(service)h(to)0 2692 y(be)i(performed)f(and)i(calls)g(the)f(client)h
(is)g(called)g(the)f(`calling)i(user)7 b(';)30 b(the)e(pr)n(ocess)f
(which)i(calls)g(the)f(client)h(is)0 2805 y(called)24
b(the)d(`calling)k(pr)n(ocess'.)0 2975 y(The)j(daemon)g(and)g(the)g
(client)h(ar)n(e)g(r)n(esponsible)e(for)i(ensuring)e(that)h
(information)h(is)g(safely)f(carried)h(acr)n(oss)0 3088
y(the)20 b(security)f(boundary)h(between)f(the)h(two)g(users,)f(and)i
(that)f(the)g(pr)n(ocesses)f(on)h(either)g(side)f(cannot)i(interact)0
3200 y(with)i(each)g(other)e(in)i(any)g(unexpected)d(ways.)p
eop end end
%%Page: 2 6
TeXDict begin HPSdict begin 2 5 bop 0 91 a Fq(Chapter)22
b(1.)h(Intr)n(oduction)2907 b(2)p 0 128 3901 4 v eop
end end
%%Page: 3 7
TeXDict begin HPSdict begin 3 6 bop 3855 91 a Fq(3)p
0 128 3901 4 v 0 1150 a Fk(Chapter)44 b(2)0 1616 y Fm(Client)52
b(program)g(usage)164 2113 y Fo(userv)g Fj(options)f
Fo([--])i Fj(service-user)f(service-name)d Fo([)p Fj(argument)i
Fo(...])164 2226 y(userv)h Fj(options)f Fo(-B|--builtin)e([--])k
Fj(builtin-service)48 b Fo([)p Fj(info-argument)g Fo(...])0
2468 y Fn(service-user)38 b Fq(speci\002es)33 b(which)h(user)g(is)g(to)
g(pr)n(ovide)g(the)f(service.)63 b(The)34 b(user)f(may)h(be)h(a)g
(login)f(name)h(or)f(a)0 2581 y(numeric)23 b(uid,)f(or)h
Fo(-)f Fq(to)g(indicate)h(that)f(the)g(service)h(user)e(is)i(to)f(be)g
(the)g(same)h(as)f(the)g(calling)j(user)-7 b(.)0 2745
y(The)26 b(service)g(name)h(is)g(interpr)n(eted)d(by)j(the)f(userv)1808
2712 y Fi(1)p
 (#Hfootnote.1) [[289 438 293 450] [1 1 1 [3 3]] [0 0 1]] pdfm 
1871 2745 a Fq(daemon)g(on)g(behalf)i(of)f(the)f(service)g(user)-7
b(.)39 b(It)26 b(will)i(often)0 2858 y(be)23 b(the)e(name)i(of)g(a)g
(pr)n(ogram.)0 3204 y Fp(2.1)119 b(Options)0 3467 y Fq(Single-letter)22
b(options)g(may)i(be)f(combined)h(as)g(is)f(usual)h(with)f(Unix)h(pr)n
(ograms,)f(and)g(the)g(value)h(for)f(such)h(an)0 3580
y(option)e(may)h(appear)f(in)h(the)f(same)g(ar)n(gument)h(or)f(in)h
(the)f(next.)0 3822 y Fh(-B)0 4002 y(--builtin)41 b Fq(Requests)49
b(that)h(a)i(builtin)g(service)e(be)h(pr)n(ovided.)112
b(This)50 b(is)h(equivalent)g(to)g(using)f(the)227 4115
y Fo(-override)31 b Fq(option)k(to)f(specify)h(a)g(string)g(consisting)
f(of)h Fo(execute-builtin)28 b Fq(followed)35 b(by)g(the)227
4228 y Fn(builtin-service)26 b Fq(r)n(equested,)20 b(and)i(r)n
(equesting)f(a)i(service)g(user)e(of)i Fo(-)f Fq(\(indicating)i(the)e
(calling)i(user\).)227 4374 y(If)18 b(the)g(builtin)h(service)f(being)g
(r)n(equested)d(r)n(equir)n(es)j(a)h Fn(service-ar)n(gument)i
Fq(then)d(this)f(must)h(be)g(supplied)f(to)227 4487 y(the)23
b(client)i(in)f(the)f(same)h(ar)n(gument)g(as)g(the)f
Fn(builtin-service)p Fq(.)34 b(See)23 b(`Dir)n(ectives)i(for)f
(changing)g(execution)227 4600 y(settings')34 b(on)h(page)f(17)p
 (#subsection.4.2.4) [[188 215 199 227] [1 1 1 [3 3]] [0 0 1]] pdfm 
36 w(for)h(details)g(of)h(the)e(builtin)i(services)f(available,)41
b(and)35 b(`Security-overriding)227 4713 y(options')22
b(on)g(page)g(7)p
 (#section.2.2) [[182 201 188 213] [1 1 1 [3 3]] [0 0 1]] pdfm 
23 w(for)h(details)f(of)h(the)e Fo(-override)e Fq(options.)227
4860 y(The)24 b(actual)i(service)f(name)g(passed)e(will)j(be)f(the)f
Fn(builtin-service)p Fq(;)k(note)23 b(that)i(this)f(actual)i(service)f
(name)227 4973 y(\(as)k(opposed)c(to)j(the)f(override)g(data\))i(and)f
(the)g Fn(info-ar)n(gument)p Fq(s)h(supplied)e(will)j(be)e(ignor)n(ed)f
(by)h(most)p 0 5052 1560 4 v 134 5108 a Fg(1)163 5140
y Ff(userv)18 b Fe(is)g(short)g(for)g(`user)g(services',)e(and)j(is)g
(pr)o(onounced)f(`you-serve'.)p eop end end
%%Page: 4 8
TeXDict begin HPSdict begin 4 7 bop 0 91 a Fq(Chapter)22
b(2.)h(Client)g(pr)n(ogram)g(usage)2541 b(4)p 0 128 3901
4 v 227 476 a(builtin)35 b(services;)j(the)33 b(override)f(mechanism)j
(and)e Fo(execute-builtin)27 b Fq(will)35 b(be)e(used)f(to)h(ensur)n(e)
227 589 y(that)23 b(the)e(right)i(builtin)g(service)g(is)g(called)g
(with)g(the)e(right)i Fn(service-ar)n(gument)p Fq(s.)0
763 y Fh(-f)p Fd(fd)t Fh([)p Fd(modifiers)p Fh(]=)o Fd(fi)o(len)o(am)o
(e)0 937 y Fh(--file)52 b Fd(fd)t Fh([)p Fd(modifiers)q
Fh(]=)o Fd(fi)o(le)o(na)o(me)39 b Fq(Requests)33 b(that)j(data)f(be)h
(copied)f(in)h(and)f(out)g(of)h(the)e(service)227 1050
y(using)20 b(pipes.)26 b(For)19 b(each)i(\002le)f(or)g(descriptor)f
(this)h(will)h(be)f(done)f(by)h(cr)n(eating)h(a)g(pipe,)f(one)f(end)g
(of)i(which)227 1162 y(is)35 b(passed)d(to)i(the)f(service)i(pr)n
(ogram)f(and)g(the)f(other)g(end)h(of)g(which)h(is)f(passed)f(to)h(a)h
(copy)e(of)h Fo(cat)227 1275 y Fq(invoked)c(by)g(the)g(client;)k(the)c
(other)f(\002le)i(descriptor)d(passed)h(to)h Fo(cat)f
Fq(will)j(be)e(one)g(inherited)g(by)g(the)227 1388 y(client)23
b(pr)n(ogram)g(fr)n(om)g(the)f(caller)i(or)e(one)g(opened)e(by)j(the)f
(client)h(pr)n(ogram)f(on)h(behalf)g(of)g(the)f(caller)-7
b(.)227 1532 y(The)18 b(descriptor)e(in)i(the)f(service)h(pr)n(ogram)g
(that)g(should)f(be)h(connected)e(must)i(be)g(speci\002ed)e(as)j
Fn(fd)p Fq(,)g(either)227 1645 y(as)i(a)g(decimal)h(number)e(or)h(as)f
(one)g(of)h(the)e(strings)h Fo(stdin)p Fq(,)e Fo(stdout)g
Fq(or)i Fo(stderr)p Fq(.)25 b(The)20 b(next)g(ar)n(gument)227
1758 y(is)j(a)g(\002lename)g(which)g(will)h(be)f(opened)d(by)j(the)f
(client)h(with)f(the)g(privileges)g(of)h(the)f(calling)i(user)-7
b(.)227 1901 y Fn(modi\002ers)34 b Fq(is)e(used)e(to)h(specify)h
(whether)e(the)h(\002le)h(or)f(descriptor)f(is)i(to)f(be)h(r)n(ead)f
(fr)n(om)i(or)e(written)g(to.)227 2014 y(It)c(consists)e(of)i(a)h
(series)d(of)i(wor)n(ds)f(separated)g(by)g(commas.)42
b(A)27 b(comma)h(may)f(separate)f(the)g Fn(modi\002ers)227
2127 y Fq(fr)n(om)d(the)f Fn(fd)i Fq(and)e(is)h(r)n(equir)n(ed)f(if)i
Fn(fd)f Fq(is)g(not)f(numeric.)227 2270 y(The)g(modi\002er)g(wor)n(ds)g
(ar)n(e:)227 2383 y Fh(read)44 b Fo(O_RDONLY)p Fq(:)25
b(Allow)k(r)n(eading)f(and)h(not)f(writing.)45 b(May)29
b(not)f(be)g(used)g(with)g Fo(write)f Fq(or)h(things)427
2496 y(that)23 b(imply)g(it.)227 2609 y Fh(write)43 b
Fo(O_WRONLY)p Fq(:)h(Allow)k(writing)f(and)g(not)g(r)n(eading.)102
b Fn(Doesn')m(t)48 b(truncate)g(or)g(cr)n(eate)i Fq(without)427
2722 y Fo(truncate)19 b Fq(or)k Fo(create)p Fq(.)i Fo(write)20
b Fq(or)j(things)e(that)i(imply)g(it)g(may)g(not)e(be)i(used)e(with)i
Fo(read)p Fq(.)227 2835 y Fh(overwrite)42 b Fq(Equivalent)22
b(to)g Fo(write,create,tru)o(nc)o(at)o(e)p Fq(.)227 2948
y Fh(create)227 3061 y(creat)43 b Fo(O_CREAT)p Fq(:)20
b(Cr)n(eates)i(the)g(\002le)g(if)i(necessary)-10 b(.)26
b(Implies)c Fo(write)p Fq(.)227 3174 y Fh(exclusive)227
3286 y(excl)44 b Fo(O_EXCL)p Fq(:)20 b(Fails)k(if)g(the)e(\002le)h(alr)
n(eady)h(exists.)k(Implies)23 b Fo(write)e Fq(and)i Fo(create)p
Fq(.)k(May)c(not)f(be)i(used)427 3399 y(with)f Fo(truncate)p
Fq(.)227 3512 y Fh(truncate)227 3625 y(trunc)43 b Fo(O_TRUNC)p
Fq(:)g(T)-8 b(r)o(uncate)45 b(any)h(existing)f(\002le.)97
b(Implies)45 b Fo(write)p Fq(.)95 b(May)46 b(not)f(be)h(used)e(with)427
3738 y Fo(exclusive)p Fq(.)227 3851 y Fh(append)f Fo(O_APPEND)p
Fq(:)19 b(All)k(writes)f(will)i(append)d(to)h(the)g(\002le.)28
b(Implies)22 b Fo(write)f Fq(\(but)h(not)g Fo(create)p
Fq(\).)227 3964 y Fh(sync)44 b Fo(O_SYNC)p Fq(:)20 b(Do)i(writes)g
(synchr)n(onously)-10 b(.)26 b(Implies)c Fo(write)p Fq(.)227
4077 y Fh(wait)227 4190 y(nowait)227 4303 y(close)43
b Fq(These)17 b(modi\002ers)g(contr)n(ol)h(the)f(behaviour)i(of)f(the)f
(client,)i(with)f(r)n(espect)f(to)h(the)f(pipes)g(carrying)427
4416 y(data)23 b(to)f(and)h(fr)n(om)g(the)f(service,)g(when)g(the)g
(service)g(terminates.)27 b(See)21 b(below)-8 b(.)227
4528 y Fh(fd)45 b Fq(The)30 b Fn(\002lename)i Fq(is)e(not)h(a)g
(\002lename)g(but)g(a)g(numeric)g(\002le)g(descriptor)-7
b(.)51 b(One)31 b(or)g(both)f(of)h Fo(read)e Fq(and)427
4641 y Fo(write)f Fq(must)i(be)f(speci\002ed,)i(and)f(no)f(other)g(wor)
n(ds)g(ar)n(e)i(allowed.)50 b(The)29 b Fn(\002lename)i
Fq(may)f(also)g(be)427 4754 y Fo(stdin)p Fq(,)20 b Fo(stdout)g
Fq(or)j Fo(stderr)d Fq(for)i(\002le)h(descriptor)e(0,)i(1)g(or)f(2)h(r)
n(espectively)-10 b(.)227 4914 y(If)32 b(no)f Fn(modi\002ers)i
Fq(which)f(imply)g Fo(read)e Fq(or)h Fo(write)e Fq(ar)n(e)j(used)e(it)h
(is)h(as)f(if)h Fo(write)d Fq(had)j(been)f(speci\002ed,)227
5027 y(except)21 b(that)i(if)g(the)f(\002ledescriptor)e(0)j(of)g(the)e
(service)i(is)f(being)g(opened)f(\(either)h(speci\002ed)f(numerically)
227 5140 y(or)f(with)g Fo(stdin)p Fq(\))e(it)i(is)g(as)g(if)h
Fo(overwrite)16 b Fq(had)k(been)f(speci\002ed)f(\(or)i
Fo(write)e Fq(if)j(only)e Fo(fd)h Fq(was)f(speci\002ed\).)p
eop end end
%%Page: 5 9
TeXDict begin HPSdict begin 5 8 bop 0 91 a Fq(Chapter)22
b(2.)h(Client)g(pr)n(ogram)g(usage)2541 b(5)p 0 128 3901
4 v 227 476 a(The)19 b(client)h(will)h(also)e(use)g Fo(O_NOCTTY)d
Fq(when)j(opening)f(\002les)h(speci\002ed)f(by)i(the)e(caller)-7
b(,)22 b(to)d(avoid)h(chang-)227 589 y(ing)j(its)f(contr)n(olling)h
(terminal.)227 769 y(By)33 b(default)g(stdin,)i(stdout)c(and)j(stderr)d
(of)i(the)g(service)g(will)i(be)e(connected)f(to)h(the)f(corr)n
(esponding)227 882 y(descriptors)20 b(on)h(the)g(client.)28
b(Diagnostics)21 b(fr)n(om)i(the)e(client)h(and)f(daemon)g(will)i(also)
f(appear)g(on)f(stderr)-7 b(.)227 1062 y(If)33 b Fo(wait)d
Fq(is)i(speci\002ed,)h(the)f(client)h(will)g(wait)g(for)f(the)f(pipe)h
(to)g(be)g(closed,)h(and)g(only)e(exit)h(after)g(this)227
1175 y(has)c(happened.)40 b(This)27 b(means)h(that)f(either)g(the)f(r)n
(eceiving)i(end)f(of)g(the)g(pipe)g(connection)g(was)g(closed)227
1288 y(while)g(data)f(was)h(still)g(available)i(at)d(the)g(sending)f
(end,)h(or)g(that)g(the)f(end)h(of)g(\002le)h(was)f(r)n(eached)g(on)g
(the)227 1401 y(r)n(eading)f(\002le)g(descriptor)-7 b(.)33
b(Err)n(ors)24 b(encounter)n(ed)f(r)n(eading)h(or)h(writing)g(in)g(the)
f(client)h(at)h(this)e(stage)g(will)227 1513 y(be)i(consider)n(ed)e(a)i
(system)e(err)n(or)h(and)h(cause)g(the)e(client)j(to)e(exit)g(with)h
(status)e(255,)k(but)d(will)i(not)e(cause)227 1626 y(disconnection)d
(at)h(the)f(service)g(side)g(since)g(the)g(service)h(has)f(alr)n(eady)h
(exited.)227 1807 y(If)34 b Fo(close)e Fq(is)i(speci\002ed)f(the)h
(client)g(will)i(immediately)e(close)g(the)f(pipe)g(connection)h(by)g
(killing)h(the)227 1919 y(r)n(elevant)24 b(copy)f(of)g
Fo(cat)p Fq(.)30 b(If)23 b(the)g(service)g(uses)f(the)h(descriptor)f
(it)h(will)i(get)e Fo(SIGPIPE)d Fq(\(or)j Fo(EPIPE)p
Fq(\))f(for)i(a)227 2032 y(writing)e(descriptor)f(or)h(end)f(of)h
(\002le)h(for)f(a)g(r)n(eading)g(one;)g(the)f(descriptor)g(opened)f(by)
i(or)g(passed)e(to)i(the)227 2145 y(client)h(will)h(also)f(be)g
(closed.)227 2325 y(If)e Fo(nowait)d Fq(is)i(speci\002ed)g(then)f(the)h
(client)h(will)h(not)e(wait)h(and)g(the)e(connection)h(will)i(r)n
(emain)g(open)d(after)227 2438 y(the)j(client)h(terminates.)k(Data)c
(may)g(continue)f(to)g(be)g(passed)f(between)g(the)g(inheritors)h(of)g
(the)g(r)n(elevant)227 2551 y(descriptor)d(on)g(the)h(service)f(side)h
(and)g(the)f(corr)n(esponding)f(\002le)i(or)g(descriptor)e(on)i(the)f
(client)i(side)e(until)227 2664 y(either)25 b(side)f(closes)g(their)h
(descriptor)-7 b(.)34 b(This)25 b(should)f(not)g(usually)i(be)f
(speci\002ed)f(for)h(stderr)e(\(or)i(stdout)227 2777
y(if)g Fo(--signals)50 b(stdout)21 b Fq(is)j(used\))f(since)g
(diagnostics)g(fr)n(om)h(the)f(service)h(side)f(may)h(arrive)g(after)g
(the)227 2890 y(client)f(has)g(exited)e(and)i(be)g(confused)e(with)h
(expected)f(output.)227 3070 y(The)h(default)h(is)f Fo(wait)f
Fq(for)i(writing)f(\002le)h(descriptors)d(and)j Fo(close)e
Fq(for)h(r)n(eading)h(ones.)0 3303 y Fh(-w)p Fd(fd)t
Fh(=)p Fd(action)0 3537 y Fh(--fdwait)p Fd(fd)t Fh(=)p
Fd(acti)o(on)40 b Fq(Sets)22 b(the)g(action)i(on)f(termination)g(of)h
(the)e(service)h(for)h(the)e(speci\002ed)g(\002le)i(descrip-)227
3650 y(tor;)34 b Fn(action)e Fq(must)e(be)h Fo(wait)p
Fq(,)f Fo(nowait)f Fq(or)h Fo(close)f Fq(as)i(described)e(above.)53
b(The)30 b(\002le)h(descriptor)e(must)227 3763 y(be)24
b(speci\002ed)e(as)i(open)e(when)h(this)g(option)g(is)h(encounter)n
(ed;)d(this)j(option)e(is)i(overridden)e(by)h(any)h(later)227
3876 y Fo(-file)e Fq(or)i Fo(-fdwait)d Fq(option)i(-)h(even)g(by)g(a)h
Fo(-file)d Fq(which)i(does)f(not)g(specify)h(an)g(action)h(on)f
(termina-)227 3988 y(tion)f(\(in)g(this)f(case)h(the)f(default)g(will)i
(be)f(used,)e(as)h(described)g(above\).)0 4222 y Fh(-D)p
Fd(name)p Fh(=)p Fd(value)0 4455 y Fh(--defvar)51 b Fd(name)p
Fh(=)p Fd(value)42 b Fq(Set)22 b(a)i(user)n(-de\002ned)d(variable)k
Fn(name)e Fq(to)g Fn(value)p Fq(.)31 b(These)22 b(user)n(-de\002ned)f
(variables)227 4568 y(ar)n(e)j(made)f(available)j(in)d(the)g
(con\002guration)f(language)h(as)g(the)g(parameters)f
Fo(u-)p Fj(name)e Fq(and)j(ar)n(e)h(passed)227 4681 y(to)29
b(the)f(service)g(in)i(envir)n(onment)e(variables)j Fo(USERV_U_)p
Fj(name)p Fq(.)41 b Fn(name)29 b Fq(may)g(contain)h(only)e(alphanu-)227
4794 y(merics)d(and)g(underscor)n(es,)e(and)i(must)f(start)h(with)f(a)i
(letter)-7 b(.)34 b(If)25 b(several)f(de\002nitions)g(ar)n(e)h(given)g
(for)g(the)227 4907 y(same)e Fn(name)g Fq(then)e(only)i(the)e(last)i
(is)g(ef)n(fective.)0 5140 y Fh(-t)54 b Fd(seconds)p
eop end end
%%Page: 6 10
TeXDict begin HPSdict begin 6 9 bop 0 91 a Fq(Chapter)22
b(2.)h(Client)g(pr)n(ogram)g(usage)2541 b(6)p 0 128 3901
4 v 0 476 a Fh(--timeout)50 b Fd(seconds)43 b Fq(T)-5
b(ime)36 b(out)f(the)g(service)h(if)g(it)g(takes)f(longer)g(than)h
Fn(seconds)h Fq(seconds)d(\(a)j(positive)227 589 y(integer)-7
b(,)21 b(in)h(decimal\).)29 b(T)-5 b(imeout)21 b(will)i(pr)n(oduce)e(a)
h(diagnostic)g(on)f(stderr)f(and)i(an)g(exit)g(status)e(of)i(255.)29
b(If)227 702 y Fn(seconds)24 b Fq(is)f(zer)n(o)g(then)f(no)g(timeout)g
(will)h(be)g(implemented)f(\(this)g(is)h(the)f(default\).)0
898 y Fh(-S)g Fc(method)0 1094 y Fh(--signals)d Fc(method)44
b Fq(Af)n(fects)32 b(the)g(handling)g(of)g(the)g(exit)g(status)e(when)i
(the)f(service)h(terminates)g(due)f(to)227 1207 y(a)h(signal.)56
b(\(The)31 b(client)h(will)h(always)f(\002nish)f(by)h(calling)h
Fo(_exit)p Fq(,)f(so)f(that)g(only)g(numbers)g(fr)n(om)i(0)f(to)227
1320 y(255)c(can)f(be)f(r)n(eturned)e(and)i(not)g(the)f(full)i(range)f
(of)g(numbers)f(and)h(signal)h(indications)g(which)f(can)h(be)227
1432 y(r)n(eturned)21 b(by)i(the)f Fo(wait)e Fq(family)25
b(of)d(system)f(calls.\))227 1596 y(The)h Fn(method)j
Fq(may)e(be)f(one)g(of)h(the)e(following:)227 1709 y
Fc(status)46 b Fq(The)20 b(client's)g(exit)f(status)g(will)j(be)d
Fn(status)p Fq(.)29 b(This)19 b(will)j(not)d(be)h(distinguishable)g(fr)
n(om)g(the)f(service)427 1821 y(r)n(eally)24 b(having)f(exited)e(with)i
(code)f Fn(status)p Fq(.)29 b(This)22 b(method)g(is)g(the)g(default,)g
(with)h(a)g Fn(status)h Fq(of)f(254.)227 1934 y Fh(number)227
2047 y(number-nocore)40 b Fq(The)23 b(client's)h(exit)f(status)f(will)j
(be)e(the)g(number)g(of)h(the)f(signal)h(which)g(caused)f(the)427
2160 y(termination)31 b(of)g(the)g(service.)53 b(If)31
b Fo(number)d Fq(is)k(used)d(rather)i(than)g Fo(number-nocore)25
b Fq(then)31 b(128)427 2273 y(will)c(be)f(added)f(if)i(the)e(service)h
(dumped)e(cor)n(e.)38 b Fo(number)23 b Fq(is)j(very)g(like)g(the)f
(exit)g(code)g(mangling)427 2386 y(done)d(by)g(the)g(Bourne)f(shell.)
227 2499 y Fh(highbit)43 b Fq(The)31 b(client's)h(exit)f(status)f(will)
j(be)f(the)f(number)h(of)f(the)g(signal)h(with)g(128)h(added.)54
b(If)32 b(the)427 2612 y(service)23 b(exits)f(normally)h(with)f(an)i
(exit)e(code)g(of)g(gr)n(eater)g(than)h(127)h(then)d(127)j(will)g(be)f
(r)n(eturned.)227 2725 y Fh(stdout)43 b Fq(The)27 b(service's)h
(numeric)h(wait)f(status)f(as)h(two)g(decimal)h(numbers)e(\(high)i
(byte)e(\002rst\))g(and)i(a)427 2838 y(textual)k(description)g(of)h
(its)f(meaning)h(will)h(be)e(printed)g(to)g(the)g(client's)g(standar)n
(d)h(output.)59 b(It)427 2951 y(will)26 b(be)e(pr)n(eceded)f(by)h(a)h
(newline)g(and)f(followed)g(by)g(an)h(extra)f(newline,)h(and)f(the)g
(numbers)g(ar)n(e)427 3063 y(separated)i(fr)n(om)h(each)g(other)f(and)h
(fr)n(om)h(the)e(textual)g(description)g(by)h(single)f(spaces.)40
b(The)26 b(exit)427 3176 y(status)19 b(of)h(the)g(client)g(will)i(be)e
(zer)n(o,)g(unless)f(a)i(system)d(err)n(or)i(occurs)f(in)i(which)g
(case)f(no)g(exit)f(status)427 3289 y(and)h(description)f(will)i(be)f
(printed)e(to)h(stdout,)f(and)i(an)h(err)n(or)e(message)f(will)j(be)f
(printed)f(to)g(stderr)427 3402 y(as)k(usual.)227 3565
y(Pr)n(oblems)d(such)f(as)g(client)h(usage)e(err)n(ors,)h(the)f
(service)i(not)e(being)h(found)g(or)g(permission)f(being)h(denied)227
3678 y(or)26 b(failur)n(e)i(of)f(a)g(system)d(call)29
b(ar)n(e)d(system)f(err)n(ors.)38 b(An)27 b(err)n(or)e(message)g
(describing)i(the)e(pr)n(oblem)i(will)227 3791 y(be)d(printed)e(on)h
(the)g(client's)h(stderr)-7 b(,)22 b(and)i(the)f(client's)g(exit)h
(status)e(will)j(be)f(255.)32 b(If)23 b(the)g(client)h(dies)f(due)227
3904 y(to)f(a)h(signal)h(this)e(should)f(be)i(tr)n(eated)e(as)i(a)g
(serious)e(system)g(err)n(or)-7 b(.)0 4100 y Fh(-H)0
4296 y(--hidecwd)41 b Fq(Pr)n(events)27 b(the)f(calling)k(pr)n(ocess's)
25 b(curr)n(ent)i(dir)n(ectory)g(name)h(fr)n(om)g(being)f(passed)f(to)h
(the)f(ser)n(-)227 4409 y(vice;)d(the)f(null)i(string)d(will)j(be)f
(passed)e(instead.)0 4605 y Fh(-P)0 4801 y(--sigpipe)41
b Fq(If)30 b(the)e(service)i(pr)n(ogram)f(is)h(terminated)e(due)g(to)h
(a)h Fo(SIGPIPE)d Fq(the)h(exit)h(status)g(of)g(the)g(client)227
4914 y(will)e(be)e(zer)n(o,)h(even)e(if)i(it)g(would)e(have)i(been)f
(something)e(else)i(accor)n(ding)h(to)e(the)h(exit)f(status)g(method)
227 5027 y(speci\002ed.)56 b(This)32 b(option)f(has)h(no)g(ef)n(fect)h
(on)f(the)f(code)h(and)g(description)f(printed)g(if)i(the)e(exit)h
(status)227 5140 y(method)22 b Fo(stdout)e Fq(is)i(in)h(use.)p
eop end end
%%Page: 7 11
TeXDict begin HPSdict begin 7 10 bop 0 91 a Fq(Chapter)22
b(2.)h(Client)g(pr)n(ogram)g(usage)2541 b(7)p 0 128 3901
4 v 0 476 a Fh(-h)0 682 y(--help)0 889 y(--copyright)40
b Fo(-h)27 b Fq(or)f Fo(--help)e Fq(prints)j(the)f(client's)h(usage)f
(message;)h Fo(--copyright)22 b Fq(prints)k(the)h(copy-)227
1002 y(right)22 b(and)h(lack)h(of)e(warranty)h(notice.)0
1357 y Fp(2.2)119 b(Security-overriding)29 b(options)0
1625 y Fq(Ther)n(e)24 b(ar)n(e)h(also)f(some)g(options)f(which)i(ar)n
(e)g(available)i(for)e(debugging)e(and)h(to)g(allow)i(the)d(system)g
(adminis-)0 1738 y(trator)h(to)f(override)h(a)h(user)7
b('s)22 b(policy)-10 b(.)34 b(These)22 b(options)h(ar)n(e)i(available)i
(only)d(if)h(the)f(client)h(is)f(called)i(by)e(r)n(oot)f(or)0
1850 y(if)g(the)f(calling)j(user)c(is)i(the)f(same)g(as)h(the)f
(service)g(user)-7 b(.)0 2119 y Fh(--override)50 b Fd(configuration-d)o
(at)o(a)0 2307 y Fh(--override-file)e Fd(filename)42
b Fq(Do)37 b(not)g(r)n(ead)g(the)f(usual)i(con\002guration)e(\002les.)
71 b(Instead,)39 b(the)e(client)227 2420 y(sends)21 b
Fn(con\002guration-data)26 b Fq(\(followed)d(by)g(a)g(newline\))g(or)g
(the)f(contents)f(of)i Fn(\002lename)g Fq(\(which)h(is)f(opened)227
2533 y(in)36 b(the)f(context)f(of)i(the)f(client\))h(to)f(the)g(daemon)
g(and)h(the)f(daemon)g(uses)f(that)h(data)h(instead.)66
b(The)227 2646 y Fn(con\002guration-data)34 b Fq(must)29
b(all)j(be)f(in)g(one)e(ar)n(gument.)51 b(It)30 b(will)i(have)e(a)h
(single)f(newline)g(appended)f(so)227 2759 y(that)f(a)g(single)f(dir)n
(ective)h(can)g(easily)g(be)f(given,)i(but)e(if)i(mor)n(e)e(than)h(one)
e(dir)n(ective)i(is)g(r)n(equir)n(ed)f(it)h(will)227
2872 y(have)23 b(to)f(contain)h(one)f(or)g(mor)n(e)h(r)n(eal)g
(newlines.)0 3059 y Fh(--spoof-user)49 b Fd(user)g Fq(Pr)n(etend)36
b(to)h(the)g(service)h(that)f(it)h(is)g(being)g(called)h(by)e
Fn(user)i Fq(\(which)g(may)f(be)g(a)227 3172 y(username)c(or)g(a)h
(uid\).)63 b(This)35 b(will)g(also)g(af)n(fect)g(the)f(gr)n(oup)f(and)i
(supplementary)d(gr)n(oups)h(supplied)227 3285 y(to)h(the)g(service;)39
b(they)33 b(will)j(be)e(the)g(standar)n(d)g(gr)n(oup)f(and)h
(supplementary)f(gr)n(oups)g(for)h Fn(user)p Fq(.)64
b(The)227 3398 y Fo(--spoof-user)18 b Fq(option)23 b(will)i
Fn(not)f Fq(af)n(fect)g(which)g(user)f(is)h(chosen)e(if)i(the)f
(service)h(user)e(is)i(speci\002ed)e(as)227 3511 y(just)g
Fo(-)p Fq(;)g(in)h(this)g(case)f(the)g(service)h(user)e(will)j(be)f
(the)e(r)n(eal)j(calling)g(user)-7 b(.)p eop end end
%%Page: 8 12
TeXDict begin HPSdict begin 8 11 bop 0 91 a Fq(Chapter)22
b(2.)h(Client)g(pr)n(ogram)g(usage)2541 b(8)p 0 128 3901
4 v eop end end
%%Page: 9 13
TeXDict begin HPSdict begin 9 12 bop 3855 91 a Fq(9)p
0 128 3901 4 v 0 1162 a Fk(Chapter)44 b(3)0 1640 y Fm(Execution)52
b(environment)g(of)g(the)g(service)0 1889 y(program)0
2412 y Fq(The)17 b(daemon)g(which)h(is)g(handling)g(the)f(service)h
(user)e(side)h(of)h(things)f(will)i(r)n(ead)e(con\002guration)h
(\002les)f(to)g(decide)0 2525 y(what)22 b(to)f(do.)26
b(If)c(it)g(decides)e(to)h(allow)i(the)e(service)g(to)g(be)h(pr)n
(ovided)f(it)g(will)i(fork)f(a)g(subpr)n(ocess)e(to)h(execute)f(the)0
2638 y(service.)0 2814 y(The)i(service)g(will)i(have)f(no)g(contr)n
(olling)g(terminal,)g(but)f(it)h(will)h(be)e(a)i(pr)n(ocess)d(gr)n(oup)
g(leader)-7 b(.)0 2990 y(If)24 b(the)f(client)i(is)f(killed)g(or)g
(times)f(out)g(or)h(a)g(\002le)h(or)e(descriptor)f(being)i(r)n(ead)g
(or)g(written)f(by)h(the)f(client)h(pr)n(ocess)0 3103
y(gets)i(an)j(err)n(or)e(then)g(the)g(service)h(will)h(be)f
(disconnected)e(fr)n(om)i(the)f(client.)44 b(The)27 b(client)i(will)g
(r)n(eturn)e(an)h(exit)0 3216 y(status)20 b(of)h(255)h(and)f(some)g
(the)f(service's)h(pipes)f(may)h(be)g(closed)f(at)h(the)g(other)e(end.)
27 b(The)20 b(service)h(will)h(become)0 3329 y(a)35 b(child)f(of)g
Fo(init)p Fq(.)61 b(The)33 b(service)h(may)g(well)h(not)e(notice)h(the)
f(disconnection,)i(though)e(writing)h(to)f(a)i(pipe)0
3442 y(after)25 b(this)g(may)g(pr)n(oduce)f(a)i Fo(SIGPIPE)c
Fq(and)j(the)g(facility)i(exists)c(to)i(have)h(a)f Fo(SIGHUP)e
Fq(sent)h(to)g(the)g(service)h(on)0 3555 y(disconnection.)0
3943 y Fp(3.1)119 b(File)30 b(descriptors)0 4223 y Fq(The)h(service)g
(pr)n(ogram's)f(standar)n(d)h(\002ledescriptors,)g(and)g(possibly)g
(other)f(\002le)h(descriptors,)g(will)i(be)e(con-)0 4336
y(nected)21 b(to)g(pipes)g(or)g(to)g Fo(/dev/null)p Fq(.)j(The)d
Fo(userv)f Fq(client/daemon)i(pair)g(will)h(arrange)f(that)g(data)g(is)
g(copied)0 4449 y(between)f(the)h(\002les)g(or)g(\002le)h(descriptors)e
(speci\002ed)g(to)h(to)g(the)g(client)h(by)f(the)g(caller)i(and)f
(these)e(these)f(pipes.)0 4625 y(Pipes)26 b(which)h(may)f(be)h(written)
e(to)h(will)i(be)e(closed)g(if)h(a)g(write)f(err)n(or)g(occurs)g(on)g
(the)g(corr)n(esponding)e(client-)0 4738 y(side)33 b(\002le)h(or)f
(descriptor)-7 b(,)34 b(which)h(may)f(r)n(esult)f(in)h(a)g
Fo(SIGPIPE)c Fq(in)k(the)f(service)h(pr)n(ogram;)k(pipes)33
b(open)f(for)0 4851 y(r)n(eading)22 b(will)i(get)e Fo(EOF)f
Fq(if)j(the)d(client-side)i(\002le)g(descriptor)e(gets)g
Fo(EOF)g Fq(or)h(an)h(err)n(or)-7 b(.)0 5027 y(If)28
b(the)f(service)h(closes)f(one)g(of)g(its)h(r)n(eading)g(\002le)g
(descriptors)d(the)i(writing)h(end)f(of)h(the)f(corr)n(esponding)f
(pipe)0 5140 y(will)i(generate)c(a)j Fo(SIGPIPE)c Fq(when)i(attempts)g
(ar)n(e)i(made)f(by)g(the)g(client/daemon)g(pair)h(to)e(write)h(to)f
(it.)39 b(This)p eop end end
%%Page: 10 14
TeXDict begin HPSdict begin 10 13 bop 0 91 a Fq(Chapter)22
b(3.)h(Execution)f(envir)n(onment)g(of)h(the)e(service)i(pr)n(ogram)
1501 b(10)p 0 128 3901 4 v 0 476 a(will)25 b(not)e(be)g(consider)n(ed)g
(an)h(err)n(or;)f(rather)-7 b(,)23 b(the)g(r)n(elevant)h(pipe)f(will)i
(be)f(discar)n(ded)f(and)g(the)g(corr)n(esponding)0 589
y(\002le)g(or)f(\002le)h(descriptor)e(held)h(by)g(the)g(client)h(will)h
(be)f(closed.)0 761 y(Likewise,)e(if)j(one)e(of)h(the)g(\002le)g
(descriptors)e(held)h(by)h(the)f(client)i(for)f(writing)g(by)f(the)h
(service)f(is)i(a)f(pipe)g(whose)0 874 y(other)32 b(end)h(is)h(closed)f
(by)g(the)g(caller)i(then)e(the)g(client/daemon)g(pair)i(will)f(see)f
(an)h(err)n(or)f(when)g(trying)g(to)0 987 y(copy)i(data)h(pr)n(ovided)f
(by)h(the)g(service.)67 b(This)36 b(too)f(will)i(not)e(be)h(consider)n
(ed)f(an)h(err)n(or;)42 b(rather)-7 b(,)39 b(the)c(pipe)0
1100 y(corr)n(espondong)27 b(to)h(that)i(descriptor)d(will)k(be)e
(closed)g(and)g(any)h(further)e(writes)h(will)i(cause)e(the)f(service)i
(to)0 1213 y(get)21 b(a)j Fo(SIGPIPE)p Fq(.)0 1385 y(Note)18
b(that)i(not)f(all)j(write)d(err)n(ors)g(or)g(br)n(oken)g(pipes)g(on)h
(\002le)g(descriptors)e(may)i(be)g(visible)h(to)e(the)g(service,)h
(since)0 1498 y(buf)n(fer)n(ed)f(data)h(may)f(be)h(discar)n(ded)e(by)h
(the)g(operating)f(system)g(and)h(ther)n(e)f(will)j(be)e(a)h(\002nite)f
(interval)h(between)0 1611 y(the)25 b(err)n(or)f(happening)h(and)g(the)
g(service)g(being)h(disconnected)d(fr)n(om)j(the)f(client)h(or)f(the)f
(next)h(write)g(causing)0 1724 y(a)e Fo(SIGPIPE)p Fq(.)0
1896 y(Read)k(err)n(ors)g(on)g(\002le)h(descriptors)d(\(and)j
(disconnection\))f(will)i(only)f(be)f(visible)i(to)e(the)g(service)g
(and)h(distin-)0 2009 y(guishable)23 b(fr)n(om)g(normal)g(end)f(of)h
(\002le)f(if)i Fo(disconnect-hup)16 b Fq(is)23 b(in)g(ef)n(fect.)0
2181 y(Read)h(and)h(write)g(err)n(ors)f(\(other)g(than)h(br)n(oken)f
(pipes,)h(as)g(described)f(above\))h(will)i(always)e(be)g(visible)h(to)
f(the)0 2294 y(caller;)d(they)d(ar)n(e)h(system)e(err)n(ors,)h(and)h
(will)i(ther)n(efor)n(e)d(cause)g(the)h(client)g(to)f(print)h(an)h(err)
n(or)e(message)g(to)g(stderr)0 2407 y(and)k(r)n(eturn)e(with)i(an)g
(exit)f(status)g(of)g(255.)0 2579 y(If)30 b(the)f(main)h(service)g(pr)n
(ogram)f(pr)n(ocess)g(exits)f(while)i(it)g(still)h(has)e(r)o(unning)h
(childr)n(en)g(any)g(\002le)f(descriptors)0 2692 y(held)22
b(by)g(those)e(childr)n(en)j(can)g(r)n(emain)h(open,)c(depending)g(on)i
(the)g(use)f(of)h Fo(wait)p Fq(,)e Fo(nowait)g Fq(or)i
Fo(close)e Fq(for)i(the)0 2805 y(r)n(elevant)28 b(\002le)g(descriptor)e
(in)i(the)f(client's)h(ar)n(guments.)42 b(By)27 b(default)g(writing)h
(\002ledescriptors)e(r)n(emain)i(open)0 2918 y(and)g(the)f(client)h
(will)h(wait)f(for)g(them)f(to)h(be)f(closed)g(at)h(the)f(service)h
(end,)g(and)g(r)n(eading)f(\002le)h(descriptors)e(ar)n(e)0
3031 y(closed)j(immediately)-10 b(.)51 b(These)29 b(leftover)h(child)h
(pr)n(ocesses)d(will)j(not)f(get)f(a)i(any)f Fo(SIGHUP)e
Fq(even)h(if)i(a)g(r)n(ead)f(or)0 3144 y(write)22 b(err)n(or)g(occurs)g
(or)h(the)f(client)h(disconnects)e(befor)n(e)h(then.)0
3513 y Fp(3.2)119 b(Environment)0 3785 y Fq(The)22 b(service)g(will)i
(have)f(some)f(information)h(in)g(envir)n(onment)g(variables:)0
3898 y Fh(USERV_USER)41 b Fq(The)34 b(login)g(name)h(of)f(the)g
(calling)i(user)-7 b(.)62 b(If)34 b(the)g Fo(LOGNAME)d
Fq(variable)37 b(is)d(set)f(\(or)-7 b(,)38 b(if)d(that)f(is)227
4011 y(unset,)26 b(if)h(the)e Fo(USER)g Fq(variable)j(is)f(set\))e(in)i
(the)e(envir)n(onment)h(passed)f(to)g(the)h(client)h(by)f(the)f(caller)
j(then)227 4124 y(the)21 b(passwor)n(d)g(entry)f(for)i(that)f(login)h
(name)g(will)h(be)f(looked)e(up;)i(if)g(that)g(passwor)n(d)e(entry's)g
(uid)i(is)g(the)227 4237 y(same)g(as)f(that)g(of)h(the)e(calling)k(pr)n
(ocess)c(then)g(that)i(login)f(name)h(will)h(be)e(used,)f(otherwise)f
(\(or)j(if)g(neither)227 4350 y Fo(LOGNAME)17 b Fq(nor)i
Fo(USER)f Fq(is)h(set\))g(the)f(calling)k(pr)n(ocess's)c(uid)h(will)i
(be)e(looked)f(up)h(to)g(determine)f(their)h(login)227
4463 y(name)k(\(and)g(if)h(this)e(lookup)f(fails)j(then)e(the)g
(service)g(will)i(not)e(be)h(invoked\).)0 4576 y Fh(USERV_UID)41
b Fq(The)22 b(uid)h(of)f(the)g(calling)j(pr)n(ocess.)0
4689 y Fh(USERV_GID)41 b Fq(The)28 b(gid)g(and)h(supplementary)d(gr)n
(oup)i(list)g(of)h(the)e(calling)k(pr)n(ocess:)38 b(\002rst)27
b(the)h(gr)n(oup)g(in)g(gid)227 4801 y(and)23 b(then)f(those)f(in)i
(the)f(supplementary)e(gr)n(oup)i(list,)g(in)h(decimal,)h(separated)d
(by)i(spaces.)0 4914 y Fh(USERV_GROUP)40 b Fq(The)c(gr)n(oup)e(names)i
(of)g(the)f(calling)i(pr)n(ocess,)h(listed)d(in)h(the)f(same)h(way)f
(as)h(the)f(ids)h(ar)n(e)227 5027 y(in)30 b Fo(USERV_GID)p
Fq(.)25 b(If)k(no)g(name)g(can)h(be)f(found)f(for)h(any)h(of)f(the)f
(calling)j(pr)n(ocess's)c(gr)n(oup\(s\))i(then)f(the)227
5140 y(service)23 b(will)h(not)e(be)g(invoked.)p eop
end end
%%Page: 11 15
TeXDict begin HPSdict begin 11 14 bop 0 91 a Fq(Chapter)22
b(3.)h(Execution)f(envir)n(onment)g(of)h(the)e(service)i(pr)n(ogram)
1501 b(11)p 0 128 3901 4 v 0 476 a Fh(USERV_CWD)41 b
Fq(The)24 b(client's)g(curr)n(ent)f(working)g(dir)n(ectory)g(name)h
(\(this)g(dir)n(ectory)f(may)h(not)f(be)h(accessible)h(to)227
589 y(the)d(service\).)29 b(If)23 b(it)g(could)g(not)f(be)h(determined)
e(or)h(the)h Fo(-hidecwd)c Fq(\003ag)k(was)g(used)f(then)g(this)g
(variable)227 702 y(will)i(be)f(set)e(to)h(an)h(empty)f(string)f
(\(this)i(is)g(not)f(consider)n(ed)f(an)i(err)n(or\).)0
814 y Fh(USERV_SERVICE)40 b Fq(The)21 b(service)i(name)g(r)n(equested)d
(by)i(the)g(caller)-7 b(.)0 927 y Fh(USERV_U_)p Fd(name)40
b Fq(The)22 b(value)i(supplied)d(to)h(the)g(client)h(by)f(the)g(caller)
i(using)e(-D)p Fn(name)p Fq(.)0 1040 y Fo(HOME)p Fq(,)g
Fo(PATH)p Fq(,)f Fo(SHELL)p Fq(,)g Fo(LOGNAME)f Fq(and)k
Fo(USER)e Fq(will)j(be)e(set)f(appr)n(opriately)h(\(accor)n(ding)i(to)d
(the)h(details)g(of)h(the)0 1153 y(service)e(user\).)p
eop end end
%%Page: 12 16
TeXDict begin HPSdict begin 12 15 bop 0 91 a Fq(Chapter)22
b(3.)h(Execution)f(envir)n(onment)g(of)h(the)e(service)i(pr)n(ogram)
1501 b(12)p 0 128 3901 4 v eop end end
%%Page: 13 17
TeXDict begin HPSdict begin 13 16 bop 3809 91 a Fq(13)p
0 128 3901 4 v 0 1155 a Fk(Chapter)44 b(4)0 1627 y Fm(Service-side)52
b(con\002guration)0 2143 y Fq(Which)30 b(services)e(may)h(be)g(r)o(un)g
(by)f(whom)h(and)g(under)f(what)g(conditions)h(is)g(contr)n(olled)f(by)
h(con\002guration)0 2256 y(\002les.)0 2426 y(The)k(daemon)g(will)i(r)n
(ead)e(these)f(\002les)i(in)g(or)n(der)-7 b(.)60 b(Certain)34
b(dir)n(ectives)f(in)h(the)f(\002les)h(modify)f(the)g(daemon's)0
2538 y(execution)h(settings)g(for)h(invoking)h(the)e(service,)k(for)e
(example)f(allowing)i(certain)e(\002le)h(descriptors)d(to)i(be)0
2651 y(speci\002ed)21 b(by)i(the)f(client)h(or)f(specifying)g(which)h
(pr)n(ogram)g(to)f(execute)f(to)h(pr)n(ovide)g(the)g(service.)0
2821 y(The)f Fn(last)i Fq(instance)e(of)g(each)h(such)f(setting)f(will)
j(take)e(ef)n(fect.)27 b(The)21 b(dir)n(ectives)g(which)h(specify)f
(which)h(pr)n(ogram)0 2934 y(to)i(execute)g(will)i(not)e(stop)f(the)h
(con\002guration)h(\002le)g(fr)n(om)g(being)g(r)n(ead;)g(they)f(will)i
(be)f(r)n(emember)n(ed)f(and)h(will)0 3047 y(only)d(take)g(ef)n(fect)h
(if)g(they)f(ar)n(e)h(not)f(overridden)f(by)h(a)h(later)g(dir)n
(ective.)0 3217 y(The)31 b(daemon)f(will)j(\002rst)d(r)n(ead)h
Fo(/etc/userv/syste)o(m.)o(de)o(fa)o(ult)o Fq(.)48 b(Then,)32
b(by)f(default)g(\(this)h(behaviour)0 3329 y(may)22 b(be)f
(modi\002ed\),)g(it)g(will)i(r)n(ead)e(a)h(per)n(-user)e(\002le)h
Fo(~/.userv/rc)p Fq(,)c(if)22 b(it)f(exists)f(and)i(the)e(service)h
(user)7 b('s)20 b(shell)0 3442 y(is)j(in)g Fo(/etc/shells)p
Fq(.)g(Finally)g(it)g(will)h(r)n(ead)f Fo(/etc/userv/sys)o(te)o(m.)o
(ov)o(err)o(id)o(e)p Fq(.)0 3612 y(When)j(it)h(has)f(r)n(ead)h(all)h
(of)f(these)e(\002les)h(it)h(will)h(act)f(accor)n(ding)g(to)f(the)g
(curr)n(ently)g(values)h(of)g(of)f(the)g(execution)0
3725 y(settings.)0 4082 y Fp(4.1)119 b(Con\002guration)31
b(\002le)e(syntax)0 4350 y Fq(The)22 b(con\002guration)f(\002le)i(is)f
(a)h(series)e(of)h(dir)n(ectives,)g(usually)h(one)e(per)h(line.)28
b(The)22 b(portion)f(of)h(a)h(line)g(following)0 4463
y(a)f(hash)g(character)h Fo(#)e Fq(is)h(taken)f(as)h(a)h(comment)e(and)
h(ignor)n(ed.)27 b(Each)22 b(dir)n(ective)g(consists)f(of)g(a)i(series)
d(of)i(tokens)0 4576 y(separated)27 b(by)i(linear)h(whitespace)e
(\(spaces)g(and)h(tabs\);)j(tokens)27 b(may)i(be)g(wor)n(ds)f
(consisting)g(of)h(non-space)0 4689 y(characters,)h(or)-7
b(,)29 b(wher)n(e)f(a)h(string)e(is)i(r)n(equir)n(ed,)g(a)g(string)e
(in)i(double)f(quotes.)43 b(Double-quoted)27 b(strings)g(may)0
4801 y(contain)c(the)f(following)h(backslash)g(escapes:)0
4914 y Fh(\\n)45 b Fq(newline)0 5027 y Fh(\\t)g Fq(tab)0
5140 y Fh(\\r)g Fq(carriage)23 b(r)n(eturn)p eop end
end
%%Page: 14 18
TeXDict begin HPSdict begin 14 17 bop 0 91 a Fq(Chapter)22
b(4.)h(Service-side)f(con\002guration)2319 b(14)p 0 128
3901 4 v 0 476 a Fh(\\)p Fd(OOO)48 b Fq(character)23
b(whose)e(octal)i(code)f(is)h Fn(OOO)0 589 y Fh(\\x)p
Fd(XX)52 b Fq(character)23 b(whose)e(hex)h(code)g(is)h
Fn(XX)0 702 y Fh(\\)p Fd(punctuation)41 b Fq(literal)24
b(punctuation)e(character)h(\(eg)f Fo(\\\\)p Fq(,)g Fo(\\\223)p
Fq(\))0 814 y Fh(\\)p Fd(newline)d Fl(\(ie,)24 b(backslash)g(at)f(end)f
(of)h(line\))46 b Fq(string)22 b(continues)f(on)i(next)e(line)0
986 y(Relative)30 b(pathnames)e(in)i(dir)n(ectives)f(ar)n(e)h(r)n
(elative)g(to)e(the)h(service)g(pr)n(ogram's)g(curr)n(ent)f(dir)n
(ectory)h(\(usually)0 1099 y(the)22 b(service)h(user)7
b('s)21 b(home)i(dir)n(ectory\).)28 b(Pathnames)22 b(starting)g(with)h
(the)f(two)g(characters)h Fo(~/)g Fq(ar)n(e)g(taken)f(to)g(be)0
1211 y(r)n(elative)h(to)f(the)g(service)h(user)7 b('s)21
b(home)h(dir)n(ectory)-10 b(.)0 1575 y Fp(4.2)119 b(Con\002guration)31
b(\002le)e(directives)0 1849 y Fb(4.2.1)99 b(Immediate)23
b(directives)0 2086 y Fq(The)f(following)h(dir)n(ectives)f(take)g(ef)n
(fect)h(immediately:)0 2362 y Fh(cd)54 b Fd(pathname)42
b Fq(Change)30 b(dir)n(ectory)f(in)i(the)e(service)h(pr)n(ogram.)50
b Fo(cd)29 b Fq(is)i(cumulative.)51 b(It)30 b(is)g(an)g(err)n(or)g(if)h
(the)227 2475 y(dir)n(ectory)22 b(cannot)h(be)f(changed)g(to.)227
2628 y Fo(cd)g Fq(should)f(not)h(be)g(used)f(between)g
Fo(execute-from-di)o(rec)o(to)o(ry)16 b Fq(and)22 b(the)g(invocation)h
(of)g(the)e(ser)n(-)227 2740 y(vice)k(pr)n(ogram,)f(as)h(the)e(test)g
(for)h(the)f(availability)28 b(of)c(the)f(service)h(pr)n(ogram)g(would)
g(be)g(done)f(with)h(the)227 2853 y(old)f(curr)n(ent)f(dir)n(ectory)f
(and)i(the)f(actual)i(execution)d(with)i(the)f(new)g(\(pr)n(obably)h
(causing)g(an)g(err)n(or\).)0 3046 y Fh(eof)44 b Fq(Stop)25
b(r)n(eading)h(the)f(con\002guration)g(\002le)h(in)h(question,)e(as)h
(if)h(end)e(of)h(\002le)g(had)g(been)f(r)n(eached.)38
b(Any)25 b(con-)227 3159 y(tr)n(ol)j(constr)o(ucts)f(\()p
Fo(if)p Fq(,)h Fo(catch-quit)c Fq(or)j Fo(errors-push)p
Fq(\))c(which)29 b(wer)n(e)e(started)f(in)i(that)g(\002le)g(will)h(be)
227 3272 y(consider)n(ed)g(\002nished.)49 b(Parsing)30
b(will)h(continue)f(in)g(the)g(\002le)g(which)h(caused)e(the)g(\002le)h
(containing)h(the)227 3385 y Fo(eof)22 b Fq(to)g(be)g(r)n(ead.)0
3578 y Fh(quit)44 b Fq(Stop)18 b(r)n(eading)i(con\002guration)f
(\002les)h(and)f(act)i(immediately)f(on)f(the)g(curr)n(ent)h(settings.)
25 b(The)19 b(behaviour)227 3691 y(of)k Fo(quit)e Fq(is)i(subject)f(to)
g(the)g Fo(catch-quit)c Fq(contr)n(ol)k(constr)o(uct.)0
3884 y Fh(include)51 b Fd(filename)0 4077 y Fh(include-ifexist)d
Fd(filename)42 b Fq(Read)27 b(the)g(con\002guration)h(\002le)g
Fn(\002lename)p Fq(,)h(and)f(then)f(r)n(eturn)g(to)g(this)h(\002le)227
4190 y(and)j(continue)g(parsing)g(it)g(with)g(the)g(next)f(dir)n
(ective.)54 b(It)31 b(is)g(an)h(err)n(or)e(if)i(the)f(\002le)g(cannot)g
(be)g(opened)227 4303 y(and)e(r)n(ead,)h(unless)d Fo(include-ifexist)22
b Fq(is)28 b(used)g(and)g(the)g(\002le)h(does)d(not)i(exist,)h(in)g
(which)g(case)g(the)227 4416 y(dir)n(ective)23 b(is)g(silently)f(ignor)
n(ed.)0 4608 y Fh(include-lookup)48 b Fd(parameter)56
b(directory)0 4801 y Fh(include-lookup-)o(al)o(l)48 b
Fd(parameter)56 b(directory)50 b Fq(Read)71 b(the)g(con\002guration)h
(\002le)g(in)h Fn(dir)n(ectory)227 4914 y Fq(whose)61
b(name)i(is)f(the)f(value)i(of)g Fn(parameter)i Fq(\(see)c(the)g
(description)g(of)i Fo(if)p Fq(,)71 b(`Contr)n(ol)62
b(str)o(uc-)227 5027 y(tur)n(e)55 b(dir)n(ectives')g(on)g(page)g(16)p
 (#subsection.4.2.3) [[231 164 242 176] [1 1 1 [3 3]] [0 0 1]] pdfm 
(\).)127 b(If)56 b Fn(parameter)i Fq(has)d(several)g(values)h(they)e
(will)j(be)e(tried)g(in)227 5140 y(or)n(der;)76 b(with)58
b Fo(include-lookup)52 b Fq(this)58 b(sear)n(ch)h(will)h(stop)d(when)h
(one)g(is)g(found,)67 b(but)58 b(with)p eop end end
%%Page: 15 19
TeXDict begin HPSdict begin 15 18 bop 0 91 a Fq(Chapter)22
b(4.)h(Service-side)f(con\002guration)2319 b(15)p 0 128
3901 4 v 227 476 a Fo(include-lookup-)o(all)22 b Fq(the)27
b(sear)n(ch)i(will)g(continue)f(and)g(any)g(\002les)g(appr)n(opriate)g
(to)g(other)f(values)227 589 y(will)d(be)f(r)n(ead)f(too.)227
736 y(If)29 b(none)f(of)h(the)g(parameter)7 b('s)28 b(values)h(had)g(a)
h(corr)n(esponding)d(\002le)i(then)f(the)g(\002le)h Fo(:default)d
Fq(will)k(be)227 849 y(r)n(ead,)24 b(if)g(it)g(exists.)30
b(If)24 b Fn(parameter)p Fq('s)i(list)e(of)g(values)g(was)g(empty)e
(then)h(the)g(\002le)h Fo(:none)d Fq(will)k(be)f(tried)f(\002rst)227
962 y(and)g(r)n(ead)f(if)i(it)f(exists,)e(otherwise)g
Fo(:default)e Fq(will)24 b(be)e(tried.)227 1110 y(It)j(is)g(not)f(an)h
(err)n(or)f(for)h(any)g(of)g(the)f(\002les)g(\(including)i
Fo(:default)p Fq(\))c(not)i(to)g(exist,)g(but)h(it)g(is)g(an)h(err)n
(or)e(if)i(a)227 1222 y(\002le)d(exists)e(and)i(cannot)g(be)f(r)n(ead)h
(or)f(if)h(the)f(dir)n(ectory)g(cannot)h(be)f(accessed.)227
1370 y(A)k(translation)g(will)h(be)f(applied)g(to)g(values)g(befor)n(e)
f(they)g(ar)n(e)i(used)d(to)i(constr)o(uct)f(a)h(\002lename,)h(so)e
(that)227 1483 y(the)f(lookup)g(cannot)g(access)h(dot\002les)e(or)i
(\002les)f(in)h(other)f(dir)n(ectories:)31 b(values)25
b(starting)f(with)g(full)i(stops)227 1596 y(will)33 b(have)e(a)h(colon)
f(pr)n(epended)d(\(making)k Fo(:.)p Fq(\),)g(colons)e(will)j(be)e
(doubled,)g(and)g(each)h(slash)f(will)h(be)227 1709 y(r)n(eplaced)i
(with)f(a)h(colon)g(followed)f(by)g(a)h(hyphen)f Fo(:-)p
Fq(.)59 b(A)34 b(parameter)f(value)h(which)g(is)g(the)e(empty)227
1822 y(string)22 b(will)j(be)e(r)n(eplaced)g(with)f Fo(:empty)f
Fq(\(note)h(that)h(this)f(is)i(dif)n(fer)n(ent)e(fr)n(om)i(a)g
(parameter)e(not)g(having)227 1935 y(any)h(values\).)0
2117 y Fh(include-directo)o(ry)48 b Fd(directory)i Fq(Read)17
b(con\002guration)h(fr)n(om)h(all)g(\002les)f(in)h(dir)n(ectory)e
Fn(dir)n(ectory)22 b Fq(which)227 2230 y(ar)n(e)30 b(plain)g(\002les)f
(whose)e(names)i(consist)g(only)g(of)g(alphanumerics)h(and)f(hyphens)e
(and)i(start)g(with)g(an)227 2343 y(alphanumeric.)g(They)18
b(will)k(be)e(r)n(ead)g(in)g(lexical)i(or)n(der)-7 b(.)26
b(It)20 b(is)g(an)h(err)n(or)e(for)h(the)f(dir)n(ectory)g(not)h(to)f
(exist)g(or)227 2455 y(for)h(it)f(or)h(any)f(of)h(the)e(\002les)h
(found)g(not)g(to)g(be)g(r)n(ead)h(successfully)-10 b(,)19
b(or)g(for)g(anything)g(with)h(an)g(appr)n(opriate)227
2568 y(name)j(not)f(to)g(be)h(a)g(plain)g(\002le)g(or)f(a)i(symbolic)f
(link)g(to)f(a)h(plain)h(\002le.)0 2751 y Fh(error)52
b Fd(text)h(...)44 b Fq(Causes)24 b(an)h(err)n(or)f(whose)f(message)g
(includes)i(the)e(descriptive)h(string)g Fn(text)p Fq(.)35
b Fn(text)26 b Fq(may)227 2863 y(consist)i(of)g(several)g(tokens)e
(with)i(intervening)f(whitespace.)44 b(The)27 b(whitespace)g(will)j(be)
e(included)g(in)227 2976 y(the)21 b(message)f(as)h(found)g(in)h(the)e
(con\002guration)h(\002le:)27 b(all)c(the)e(characters)g(until)h(the)f
(end)f(of)h(the)g(line)h(will)227 3089 y(be)e(included)f(verbatim,)i
(unless)e(they)g(ar)n(e)h(part)f(of)h(a)g(double-quoted)e(string,)h(in)
h(which)g(case)g(the)f(usual)227 3202 y(meaning)27 b(of)f(the)f(string)
h(\(i.e.,)g(after)g(backslash)h(escape)f(pr)n(ocessing\))f(will)i(be)f
(used.)38 b(Comments)25 b(and)227 3315 y(linear)f(whitespace)d(at)i
(the)f(end)g(of)g(the)g(line)h(\(or)g(just)f(befor)n(e)g(the)g
(comment\))h(will)g(still)h(be)e(ignor)n(ed.)0 3497 y
Fh(message)51 b Fd(text)i(...)44 b Fq(Causes)23 b(a)h(message)e
(including)i(the)f(descriptive)f(string)h Fn(text)i Fq(to)e(be)g
(deliver)n(ed)g(as)g(if)227 3610 y(it)g(wer)n(e)f(an)h(err)n(or)f
(message,)f(but)h(does)f(not)h(actually)i(cause)f(an)g(err)n(or)-7
b(.)0 3915 y Fb(4.2.2)99 b(Directives)26 b(with)f(delayed)f(ef)n(fect)0
4145 y Fq(The)19 b(following)g(dir)n(ectives)g(have)h(no)f(immediate)h
(ef)n(fect,)f(but)h(ar)n(e)f(r)n(emember)n(ed)g(and)g(have)h(an)g(ef)n
(fect)f(on)g(later)0 4257 y(pr)n(ocessing)i(of)i(the)f(con\002guration)
g(\002les.)0 4506 y Fh(user-rcfile)50 b Fd(filename)42
b Fq(Speci\002es)36 b(that)g(the)g(\002le)h Fn(\002lename)h
Fq(should)e(be)h(r)n(ead)g(instead)f(of)h(the)f(user)7
b('s)227 4619 y Fo(~/.userv/rc)p Fq(.)31 b(This)25 b(does)f
Fn(not)i Fq(happen)e(immediately;)j(instead,)e(the)f(setting)g(is)i(r)n
(emember)n(ed)e(and)227 4732 y(used)33 b(after)i(the)e
Fo(system.default)c Fq(con\002guration)34 b(\002le)g(has)h(been)f(r)n
(ead.)63 b(This)34 b(dir)n(ective)h(has)f(no)227 4845
y(ef)n(fect)21 b(in)h(a)f(user)7 b('s)20 b(con\002guration)g(\002le)h
(or)g(in)g(the)f Fo(system.override)14 b Fq(\002le,)21
b(as)h(the)e(user)7 b('s)19 b(con\002gura-)227 4958 y(tion)k(\002le)f
(has)h(alr)n(eady)g(been)f(found)g(and)h(r)n(ead)f(by)h(then)e(and)i
(will)h(not)e(be)g(r)n(e-r)n(ead.)0 5140 y Fh(errors-to-stder)o(r)39
b Fq(Causes)22 b(err)n(or)g(messages)f(to)h(be)h(deliver)n(ed)f(to)g
(the)f(client's)i(stderr)-7 b(.)p eop end end
%%Page: 16 20
TeXDict begin HPSdict begin 16 19 bop 0 91 a Fq(Chapter)22
b(4.)h(Service-side)f(con\002guration)2319 b(16)p 0 128
3901 4 v 0 476 a Fh(errors-to-file)16 b Fc(\002lename)45
b Fq(Err)n(or)27 b(messages)f(will)j(be)f(written)e(to)i
Fn(\002lename)p Fq(,)h(which)f(will)h(be)f(opened)e(in)227
589 y(the)c(context)f(of)i(and)g(with)f(the)g(privileges)g(of)h(the)f
(service)g(user)-7 b(.)0 772 y Fh(errors-to-syslo)o(g)16
b Fl([)p Fc(facility)24 b Fl([)p Fc(level)47 b Fq(]])27
b(Err)n(or)f(messages)e(will)k(be)e(deliver)n(ed)g(using)g
Fo(syslog)p Fq(.)36 b(The)26 b(de-)227 885 y(fault)e
Fn(facility)h Fq(is)d Fo(user)p Fq(;)f(the)h(default)g
Fn(level)j Fq(is)d Fo(error)p Fq(.)0 1192 y Fb(4.2.3)99
b(Control)25 b(structure)g(directives)0 1422 y Fq(The)e(following)i
(dir)n(ectives)f(ar)n(e)h(used)d(to)i(cr)n(eate)g(contr)n(ol)g(str)o
(uctur)n(es.)31 b(If)24 b(the)g(end)f(of)h(the)g(\002le)g(is)g
(encounter)n(ed)0 1535 y(befor)n(e)29 b(the)f(end)g(of)h(any)g(contr)n
(ol)g(str)o(uctur)n(e)f(which)i(was)f(started)e(inside)i(it)g(then)f
(that)h(contr)n(ol)g(str)o(uctur)n(e)f(is)0 1648 y(consider)n(ed)21
b(\002nished.)27 b(This)22 b(is)h(not)f(an)h(err)n(or)-7
b(.)0 1903 y Fh(if)54 b Fd(condition)0 2087 y Fh(elif)f
Fd(condition)0 2270 y Fh(else)0 2454 y(fi)45 b Fq(Lines)17
b(following)i Fo(if)f Fq(ar)n(e)h(interpr)n(eted)d(only)j(if)g(the)f
(condition)g(is)h(tr)o(ue.)26 b(Many)18 b(conditions)g(ar)n(e)h(pr)n
(operties)227 2567 y(of)27 b(parameter)g(values.)41 b(Most)26
b(parameters)g(have)h(a)h(single)e(string)g(as)i(a)f(value;)j(however)
-7 b(,)27 b(some)f(may)227 2680 y(yield)32 b(zer)n(o)h(or)f(several)h
(strings,)g(in)g(which)g(case)g(the)e(condition)h(is)h(tr)o(ue)f(if)h
(it)g(is)g(tr)o(ue)e(of)i(any)f(of)h(the)227 2793 y(strings)22
b(individually)-10 b(.)29 b(Parameters)22 b(ar)n(e)h(described)e(below)
-8 b(.)227 2941 y(The)22 b(conditions)g(ar)n(e:)227 3054
y Fh(glob)53 b Fd(parameter)i(glob-pattern)c Fh(...)44
b Fq(The)19 b(value)j(of)e(the)f(parameter)h(whose)f(name)i(is)f(given)
427 3167 y(matches)31 b(one)e(of)i(the)e(glob)i(patterns)e(\(anchor)n
(ed)h(at)h(both)f(ends;)j(backslashes)d(can)h(be)g(used)e(to)427
3280 y(escape)22 b(metacharacters\).)227 3393 y Fh(range)53
b Fd(parameter)i(min)f(max)d Fq(The)18 b(value)h(of)f(the)g(parameter)g
(is)g(a)h(nonnegative)f(integer)f(and)h(lies)427 3506
y(within)30 b(the)e(range)h(speci\002ed.)46 b Fn(min)28
b Fq(or)h Fn(max)h Fq(may)f(be)g Fo($)g Fq(to)g(indicate)g(no)g(lower)f
(or)h(upper)f(limit,)427 3619 y(r)n(espectively)-10 b(.)227
3731 y Fh(grep)53 b Fd(parameter)i(filename)43 b Fq(The)28
b Fn(\002lename)h Fq(r)n(efers)f(to)g(a)i(\002le)f(one)f(of)g(whose)g
(lines)g(is)h(the)f(value)427 3844 y(of)22 b(the)f(parameter)g
(\(leading)h(or)f(trailing)i(whitespace)d(on)h(each)h(line)g(and)g
(empty)e(lines)i(in)g(the)f(\002le)427 3957 y(ar)n(e)i(ignor)n(ed\).)k
(It)22 b(is)h(an)g(err)n(or)f(for)h(the)f(\002le)g(not)g(to)g(be)h
(opened)d(and)j(r)n(ead.)227 4070 y Fh(!)109 b Fd(condition)43
b Fq(The)21 b Fn(condition)j Fq(is)f Fn(not)g Fq(tr)o(ue.)227
4183 y Fl(Conjunctions:)k Fh(&)22 b Fl(and)g Fh(|)427
b Fo(\()54 b Fj(condition)809 4296 y Fo(&)g Fj(condition)809
4409 y Fo(&)g Fj(condition)809 4522 y Fo(...)809 4635
y(\))427 4748 y Fq(is)31 b(tr)o(ue)e(if)i(all)h(the)d(listed)g
(conditions)h(ar)n(e)g(tr)o(ue;)j(wher)n(e)c Fo(|)h Fq(is)g(used)f(it)h
(is)h(tr)o(ue)e(if)i(any)f(of)g(them)g(is)427 4861 y(tr)o(ue.)45
b(Newlines)28 b(must)g(be)g(used)f(to)h(separate)g(one)g(condition)g
(fr)n(om)h(the)f(next,)h(as)f(shown,)h(and)427 4973 y(the)22
b(par)n(entheses)e(ar)n(e)j(mandatory)-10 b(.)28 b(These)21
b(conjunctions)h(do)g(not)g(do)f(lazy)j(evaluation.)227
5140 y(The)e(parameters)g(ar)n(e:)p eop end end
%%Page: 17 21
TeXDict begin HPSdict begin 17 20 bop 0 91 a Fq(Chapter)22
b(4.)h(Service-side)f(con\002guration)2319 b(17)p 0 128
3901 4 v 227 476 a Fh(service)43 b Fq(The)21 b(service)i(name)g
(speci\002ed)e(when)h(the)g(client)h(was)g(called.)227
589 y Fh(calling-user)40 b Fq(T)-8 b(wo)51 b(strings:)85
b(the)51 b(login)h(name)g(of)g(the)f(calling)i(user)e(\(determined)f
(as)i(for)427 702 y Fo(USERV_USER)p Fq(,)18 b(above\))23
b(and)g(the)f(calling)i(uid)f(\(r)n(epr)n(esented)d(in)j(decimal\).)227
814 y Fh(calling-group)40 b Fq(Several)29 b(strings:)41
b(the)28 b(primary)i(and)g(supplementary)d(gr)n(oup)i(names)g(and)h
(gids)427 927 y(\(in)22 b(decimal\))h(of)e(the)g(calling)h(pr)n(ocess.)
k(All)c(the)f(gr)n(oup)f(names)h(come)g(\002rst,)g(and)g(then)f(the)h
(gids.)26 b(If)427 1040 y(the)c(\002rst)g(supplementary)f(gr)n(oup)g
(is)i(the)f(same)g(as)h(the)f(primary)h(gr)n(oup)e(then)h(it)h(is)g
(elided.)227 1153 y Fh(calling-user-sh)o(ell)39 b Fq(The)19
b(calling)j(user)7 b('s)19 b(shell,)h(as)h(listed)e(in)i(the)f(passwor)
n(d)e(entry)h(for)i(the)e(call-)427 1266 y(ing)k(login)g(name)g(\(as)g
(determined)d(for)j Fo(USERV_USER)p Fq(,)18 b(above\).)227
1379 y Fh(service-user)40 b Fq(T)-8 b(wo)30 b(strings:)43
b(the)30 b(name)i(of)e(the)h(service)f(user)g(\(as)h(speci\002ed)f(to)g
(the)g(client\))i(and)427 1492 y(their)22 b(uid)h(\(r)n(epr)n(esented)d
(in)j(decimal\).)227 1605 y Fh(service-group)40 b Fq(Several)29
b(strings:)41 b(the)28 b(primary)i(and)g(supplementary)d(gr)n(oup)i
(names)g(and)h(gids)427 1718 y(\(in)24 b(decimal\))g(of)e(the)g
(service)h(user)-7 b(.)227 1831 y Fh(service-user-sh)o(ell)39
b Fq(The)21 b(service)i(user)7 b('s)21 b(shell,)h(as)h(listed)f(in)h
(their)f(passwor)n(d)f(entry)-10 b(.)227 1944 y Fh(u-)p
Fd(name)43 b Fq(The)18 b(value)h(of)f(the)f(user)n(-de\002ned)f
(variable)k Fn(name)f Fq(passed)d(by)i(the)g(caller)h(using)f(the)f
Fo(-defvar)427 2056 y Fq(command-line)26 b(option)d(to)h(the)g(client.)
33 b(If)25 b(the)e(variable)k(was)d(not)g(de\002ned)e(then)i(this)g
(parameter)427 2169 y(is)31 b(an)h(empty)d(list)i(of)g(strings;)j(in)d
(this)f(case)h(any)g(condition)g(which)g(tests)e(it)i(will)h(be)f
(false,)i(and)427 2282 y Fo(include-lookup)17 b Fq(on)22
b(it)h(will)h(r)n(ead)e(the)g Fo(:none)e Fq(\002le,)j(or)f
Fo(:default)d Fq(if)24 b Fo(:none)c Fq(is)j(not)f(found.)0
2486 y Fh(errors-push)c Fc(\002lename)0 2691 y Fh(srorre)43
b Fq(Stacks)27 b(the)g(err)n(or)g(handling)h(behaviour)g(curr)n(ently)f
(in)h(ef)n(fect.)44 b(Any)27 b(changes)g(to)g(err)n(or)g(handling)227
2804 y(will)d(take)e(ef)n(fect)h(only)f(between)f Fo(errors-push)d
Fq(and)k Fo(srorre)p Fq(.)0 3008 y Fh(catch-quit)0 3212
y(hctac)43 b Fq(Any)22 b(use)g(of)h Fo(quit)e Fq(inside)h
Fo(catch-quit)c Fq(will)24 b(mer)n(ely)f(cause)f(the)g(parsing)g(to)g
(continue)g(at)h Fo(hctac)227 3325 y Fq(instead.)k(Any)21
b(contr)n(ol)h(constr)o(ucts)e(started)g(since)i(the)f
Fo(catch-quit)c Fq(will)24 b(be)d(consider)n(ed)f(\002nished)h(if)227
3438 y(a)i Fo(quit)e Fq(is)i(found.)227 3606 y(If)e(an)g(err)n(or)f
(occurs)h(inside)f Fo(catch-quit)c Fq(the)k(execution)g(settings)e
(will)k(be)f(r)n(eset)e(\(as)i(if)h(by)e(the)g Fo(reset)227
3719 y Fq(dir)n(ective\))j(and)g(parsing)f(will)i(likewise)e(continue)g
(at)h Fo(hctac)p Fq(.)227 3887 y(If)33 b(a)h(lexical)g(or)f(syntax)f
(err)n(or)g(is)h(detected)e(in)i(the)f(same)h(con\002guration)g(\002le)
g(as)g(the)f Fo(catch-quit)p Fq(,)227 4000 y(while)23
b(looking)f(for)h(the)e Fo(hctac)g Fq(after)h(an)i(err)n(or)e(or)g
Fo(quit)p Fq(,)e(that)j(new)f(err)n(or)g(will)i(not)e(be)g(caught.)0
4308 y Fb(4.2.4)99 b(Directives)26 b(for)e(changing)i(execution)f
(settings)0 4540 y Fq(The)e(following)h(dir)n(ectives)f(modify)h(the)f
(execution)f(settings;)g(the)h(server)g(will)i(r)n(emember)e(the)g
(fact)h(that)g(the)0 4653 y(dir)n(ective)i(was)f(encounter)n(ed)f(and)h
(act)h(on)f(it)h(only)f(after)h(all)h(the)d(con\002guration)h(has)h
(been)f(parsed.)35 b(The)25 b Fn(last)0 4766 y Fq(dir)n(ective)e(which)
g(modi\002es)f(any)g(particuar)i(setting)d(will)j(take)e(ef)n(fect.)0
5027 y Fh(reject)43 b Fq(Reject)24 b(the)f(r)n(equest.)33
b Fo(execute)p Fq(,)21 b Fo(execute-from-dir)o(ec)o(to)o(ry)d
Fq(and)25 b Fo(execute-from-p)o(at)o(h)227 5140 y Fq(will)f(change)f
(this)f(setting.)p eop end end
%%Page: 18 22
TeXDict begin HPSdict begin 18 21 bop 0 91 a Fq(Chapter)22
b(4.)h(Service-side)f(con\002guration)2319 b(18)p 0 128
3901 4 v 0 476 a Fh(execute)51 b Fd(program)56 b Fh([)p
Fd(argument)51 b Fh(...])43 b Fq(Execute)36 b(the)g(pr)n(ogram)h
Fn(pr)n(ogram)p Fq(,)43 b(with)37 b(the)f(ar)n(guments)g(as)227
589 y(speci\002ed,)e(followed)e(by)g(any)h(ar)n(guments)f(given)g(to)g
(the)g(client)h(if)h Fo(no-suppress-ar)o(gs)26 b Fq(is)33
b(in)g(ef-)227 702 y(fect.)27 b(It)19 b(is)h(an)h(err)n(or)e(for)h(the)
f(execution)g(to)g(fail)j(when)d(it)h(is)g(attempted)e(\(after)i(all)i
(the)d(con\002guration)g(has)227 814 y(been)j(parsed\).)27
b(If)c Fn(pr)n(ogram)i Fq(does)c(not)h(contain)h(a)g(slash)g(it)g(will)
h(be)e(sear)n(ched)g(for)h(on)f(the)g(service)h(user)7
b('s)227 927 y(path.)0 1134 y Fh(execute-from-di)o(re)o(ct)o(or)o(y)49
b Fd(pathname)i Fh([)p Fd(argument)f Fh(...])44 b Fq(T)-8
b(ake)42 b(all)i(the)e(characters)h(after)g(the)227 1247
y(last)33 b(slash)f(of)h(the)f(service)g(name)h(speci\002ed)e(when)h
(the)f(client)i(was)g(called,)i(and)e(execute)e(that)h(pr)n(o-)227
1360 y(gram)26 b(in)g(the)f(dir)n(ectory)g(named)g(by)g
Fn(pathname)j Fq(as)d(if)i(it)e(had)h(been)f(speci\002ed)f(for)i
Fn(execute)p Fq(.)38 b(The)25 b(part)g(of)227 1472 y(the)20
b(service)f(name)i(used)d(may)j(contain)f(only)g(alphanumerics)h(and)f
(hyphens)e(and)i(must)f(start)h(with)g(an)227 1585 y(alphanumeric)k
(\(and)f(it)g(must)f(be)g(non-empty\),)g(otherwise)e(it)j(is)g(an)g
(err)n(or)-7 b(.)227 1745 y(This)32 b(dir)n(ective)h(is)f(ignor)n(ed)f
(if)j(the)d(r)n(elevant)i(pr)n(ogram)f(does)e(not)i(exist)f(in)i(the)e
(dir)n(ectory)h(speci\002ed;)227 1858 y(in)e(this)f(case)g(the)f(pr)n
(ogram)h(to)f(execute)g(is)h(left)g(at)g(its)g(pr)n(evious)f(setting)g
(\(or)h(unset,)g(if)h(it)f(was)g(not)f(set)227 1971 y(befor)n(e\).)227
2130 y(It)20 b(is)h(an)g(err)n(or)f(for)g(the)g(test)f(for)h(the)g
(existence)f(of)h(the)g(pr)n(ogram)g(to)g(fail)i(other)d(than)i(with)f
(a)h(`no)g(such)f(\002le)227 2243 y(or)g(dir)n(ectory')g(indication.)28
b(It)20 b(is)h(also)f(an)h(err)n(or)f(for)h(the)f(execution)f(to)h
(fail)i(if)f(and)g(when)f(it)g(is)h(attempted)227 2356
y(\(after)i(all)h(the)e(con\002guration)g(has)h(been)f(parsed\).)0
2563 y Fh(execute-from-pa)o(th)39 b Fn(service)25 b Fq(is)e(interpr)n
(eted)e(as)i(a)h(pr)n(ogram)e(on)h(the)f(default)h Fo(PATH)f
Fq(\(or)g(as)i(a)f(pathname)227 2676 y(of)j(an)f(executable,)h(if)g(it)
g(contains)f(a)h Fo(/)p Fq(\).)36 b(This)25 b(dir)n(ective)h(is)f
Fn(very)i(danger)n(ous)p Fq(,)h(and)e(is)f(only)g(pr)n(ovided)g(to)227
2788 y(make)d(the)f Fo(-override)d Fq(options)i(ef)n(fective.)28
b(It)21 b(should)g(not)g(normally)i(be)f(used.)k(It)21
b(is)h(an)g(err)n(or)f(for)h(the)227 2901 y(execution)g(to)g(fail)i
(when)e(it)h(is)g(attempted)d(\(after)j(all)h(the)e(con\002guration)g
(has)h(been)f(parsed\).)0 3108 y Fh(execute-builtin)48
b Fd(service-name)h(service-argumen)o(ts)40 b Fq(Executes)104
b(the)h(builtin)i(service)227 3221 y Fn(service-name)p
Fq(.)30 b(These)19 b(builtin)i(services)f(display)g(information)i
(about)e(the)g(server)f(and/or)h(the)g(r)n(equest,)227
3334 y(and)34 b(ignor)n(e)g(any)g(ar)n(guments)f(passed)g(fr)n(om)h
(the)g(service)g(side)f(except)g(possibly)g(to)h(print)f(them)h(as)227
3447 y(part)g(of)f(their)g(output.)59 b(They)33 b(write)g(their)g(r)n
(esults)f(to)h(their)h(standar)n(d)f(output)f(\(i.e.,)j(wher)n(ever)e
(\002le)227 3559 y(descriptor)21 b(1)i(is)g(dir)n(ected\).)k(The)22
b(builtin)i(services)e(ar)n(e:)227 3672 y Fh(execute)43
b Fq(Displays)19 b(the)g(execution)g(settings,)f(de\002ned)g
(variables,)j(ar)n(guments,)f(etc.)26 b(with)20 b(which)g(the)427
3785 y(builtin)k(service)e(was)h(invoked.)227 3898 y
Fh(environment)41 b Fq(Displays)32 b(the)g(envir)n(onment)g(variable)i
(settings)c(with)i(which)h(the)f(builtin)h(service)427
4011 y(was)23 b(invoked.)227 4124 y Fh(parameter)51 b
Fd(parameter)46 b Fq(Displays)20 b(the)f(values)h(of)f(the)g(service)h
(con\002guration)f(language)g(param-)427 4237 y(eter)j(speci\002ed.)227
4350 y Fh(version)43 b Fq(Displays)20 b(the)g(version)g(string)f(and)i
(compilation)g(details)g(of)f(the)g(uservd)f(server)h(pr)n(ogram.)227
4463 y Fh(reset)43 b Fq(Displays)28 b(the)e(default)h(r)n(eset)f
(con\002guration)h(\(evaluated)h(when)e Fo(reset)f Fq(is)j(found)e(in)i
(a)g(con-)427 4576 y(\002guration)22 b(\002le,)h(or)f(when)g(an)h(err)n
(or)f(is)h(caught)f(by)h Fo(catch-quit)p Fq(\).)227 4689
y Fh(toplevel)42 b Fq(Displays)29 b(the)g(top-level)f(default)h
(con\002guration)g(\(the)f(con\002guration)h(data,)h(evaluated)427
4801 y(by)23 b(the)f(server)-7 b(,)21 b(which)i(calls)h(all)g(the)e
(other)g(con\002guration)g(\002les\).)227 4914 y Fh(override)42
b Fq(Displays)22 b(the)g(top-level)g(override)f(con\002guration)h
(\(the)f(con\002guration)h(data,)g(evaluated)427 5027
y(by)h(the)f(server)-7 b(,)21 b(which)i(causes)f(all)i(the)e(other)g
(con\002guration)g(data)g(to)g(be)h(parsed\).)227 5140
y Fh(help)44 b Fq(Displays)23 b(a)g(list)g(of)f(the)g(understood)e
(builtin)j(service)g(names)f(and)h(ar)n(guments.)p eop
end end
%%Page: 19 23
TeXDict begin HPSdict begin 19 22 bop 0 91 a Fq(Chapter)22
b(4.)h(Service-side)f(con\002guration)2319 b(19)p 0 128
3901 4 v 227 476 a(In)27 b(the)f(futur)n(e)g(other)g(builtin)i
(services)e(may)i(be)e(de\002ned)g(which)h(do)f(mor)n(e)h(than)g(just)f
(print)h(informa-)227 589 y(tion.)0 783 y Fh(set-environment)0
977 y(no-set-environm)o(en)o(t)39 b Fq(Runs)27 b Fo(/etc/environmen)o
(t)22 b Fq(to)27 b(set)g(the)g(service)g(user)7 b('s)26
b(envir)n(onment.)43 b(This)227 1090 y(adds)25 b(the)h(over)n(head)f
(of)h(invoking)g(a)g(shell,)h(but)e(doesn't)f(cause)i(any)g(shell)g
(\(de\)mangling)g(of)g(the)f(ser)n(-)227 1203 y(vice's)f(ar)n(guments.)
i(This)d(is)g(achieved)f(by)h(invoking)500 1432 y Fo(.../program)50
b(arg)j(arg)g(arg)g(...)227 1661 y Fq(as)500 1891 y Fo(/bin/sh)e(-c)j
('.)g(/etc/environme)o(nt)o(;)48 b(exec)53 b("$@"')f(-)j(.../program)49
b(arg)k(arg)g(arg)h(...)227 2120 y(no-set-environm)o(ent)16
b Fq(cancels)23 b(the)f(ef)n(fect)h(of)f Fo(set-environment)p
Fq(.)0 2314 y Fh(no-suppress-arg)o(s)0 2508 y(suppress-args)40
b Fq(Include)35 b(any)h(ar)n(guments)f(given)h(to)f(the)g(client)i(as)f
(ar)n(guments)f(to)g(the)h(pr)n(ogram)f(in-)227 2621
y(voked)29 b(as)g(a)i(r)n(esult)e(of)g(an)i Fo(execute)p
Fq(,)d Fo(execute-from-d)o(ir)o(ec)o(tor)o(y)23 b Fq(or)30
b Fo(execute-from-p)o(at)o(h)227 2734 y Fq(dir)n(ective.)e
Fo(suppress-args)17 b Fq(undoes)k(the)h(ef)n(fect)g(of)h
Fo(no-suppress-arg)o(s)p Fq(.)0 2928 y Fh(require-fd)50
b Fd(fd-range)h Fh(read|write)41 b Fq(Insist)c(that)g(the)g
(\002ledescriptor\(s\))f(be)i(opened)e(for)h(r)n(eading)227
3041 y(r)n(esp.)i(writing.)h(It)26 b(is)h(an)g(err)n(or)f(if)i(any)e
(descriptor)f(marked)h(as)h(r)n(equir)n(ed)f(when)g(the)g(service)g(is)
h(about)227 3154 y(to)k(be)f(invoked)g(\(after)h(the)f(con\002guration)
h(has)g(been)f(parsed\))g(was)h(not)f(speci\002ed)f(when)i(the)f
(client)227 3267 y(was)e(invoked.)41 b(Each)28 b(\002le)g(descriptor)e
(has)h(a)h(separate)f(setting,)g(and)g(the)g(last)h(one)e(of)i
Fo(require-fd)p Fq(,)227 3380 y Fo(allow-fd)p Fq(,)17
b Fo(ignore-fd)p Fq(,)f Fo(null-fd)h Fq(or)i Fo(reject-fd)d
Fq(which)21 b(af)n(fected)e(a)i(particular)g(\002le)f(descriptor)227
3493 y(will)k(take)e(ef)n(fect.)227 3655 y Fn(fd-range)30
b Fq(may)d(be)g(a)h(single)f(number)-7 b(,)28 b(two)e(numbers)g
(separated)g(by)h(a)h(hyphen,)e(or)h(one)f(number)h(fol-)227
3768 y(lowed)17 b(by)g(a)h(hyphen)e(\(indicating)j(all)g(descriptors)c
(fr)n(om)j(that)f(number)h(onwar)n(ds\).)25 b(It)17 b(may)h(also)g(be)f
(one)227 3881 y(of)29 b(the)f(wor)n(ds)g Fo(stdin)p Fq(,)g
Fo(stdout)e Fq(or)i Fo(stderr)p Fq(.)44 b(Open-ended)27
b(\002le)i(descriptor)e(rangers)h(ar)n(e)h(allowed)227
3994 y(only)24 b(with)g Fo(reject-fd)d Fq(and)j Fo(ignore-fd)p
Fq(,)c(as)25 b(otherwise)d(the)h(service)i(pr)n(ogram)f(would)f(\002nd)
h(itself)227 4107 y(with)f(a)g(very)f(lar)n(ge)h(number)g(of)f(\002le)h
(descriptors)d(open.)227 4269 y(When)34 b(the)f(con\002guration)g(has)h
(been)f(parsed,)j(and)e(befor)n(e)f(the)g(service)h(is)g(about)g(to)f
(be)h(executed,)227 4382 y(stderr)28 b(\(fd)h(2\))i(must)d(be)i(r)n
(equir)n(ed)f(or)g(allowed)g(\()p Fo(require-fd)c Fq(or)k
Fo(allow-fd)p Fq(\))d(for)k(writing;)i(this)d(is)227
4494 y(so)c(that)g(the)g(err)n(or)f(message)g(printed)g(by)i(the)e
(server)7 b('s)24 b(child)i(pr)n(ocess)e(if)i(it)g(cannot)f
Fo(exec)f Fq(the)g(service)227 4607 y(pr)n(ogram)f(is)f(not)g(lost.)0
4801 y Fh(allow-fd)51 b Fd(fd-range)g Fh([read|write])40
b Fq(Allow)31 b(the)e(descriptor\(s\))f(to)i(be)g(opened)e(for)i(r)n
(eading)g(r)n(esp.)227 4914 y(writing,)24 b(or)f(either)g(if)i(neither)
e Fo(read)f Fq(nor)h Fo(write)f Fq(is)i(speci\002ed.)30
b(If)24 b(a)g(particular)h(descriptor)e(not)g(spec-)227
5027 y(i\002ed)29 b(by)g(the)f(client)h(then)g(it)g(will)h(be)f(open)f
(onto)g Fo(/dev/null)d Fq(\(for)k(r)n(eading,)h(writing,)g(or)f(both,)h
(de-)227 5140 y(pending)22 b(on)g(whether)f Fo(read)p
Fq(,)f Fo(write)h Fq(or)h(neither)g(was)g(speci\002ed\).)p
eop end end
%%Page: 20 24
TeXDict begin HPSdict begin 20 23 bop 0 91 a Fq(Chapter)22
b(4.)h(Service-side)f(con\002guration)2319 b(20)p 0 128
3901 4 v 0 476 a Fh(null-fd)51 b Fd(fd-range)h Fh([read|write])40
b Fq(Specify)101 b(that)g(the)g(descriptor\(s\))f(be)i(opened)d(onto)
227 589 y Fo(/dev/null)36 b Fq(for)j(r)n(eading)h(r)n(esp.)77
b(writing,)44 b(or)39 b(both)g(if)h(neither)f Fo(read)f
Fq(nor)h Fo(write)e Fq(is)j(speci\002ed.)227 702 y(Any)32
b(speci\002cation)h(of)f(these)f(\002le)i(descriptors)d(by)j(the)f
(client)h(will)h(be)e(silently)h(ignor)n(ed;)j(the)c(client)227
814 y(will)24 b(see)e(its)g(ends)f(of)i(the)f(descriptors)e(being)j
(closed)e(immediately)-10 b(.)0 1016 y Fh(reject-fd)50
b Fd(fd-range)43 b Fq(Do)23 b(not)g(allow)i(the)d(descriptor\(s\))g(to)
h(be)h(speci\002ed)e(by)h(the)g(client.)31 b(It)23 b(is)h(an)g(err)n
(or)227 1129 y(if)c(any)e(descriptor\(s\))f(marked)h(for)g(r)n
(ejection)h(ar)n(e)g(speci\002ed)e(when)h(the)f(service)i(is)f(about)h
(to)f(be)g(invoked)227 1242 y(\(after)23 b(the)f(con\002guration)g(has)
h(been)f(parsed\).)0 1443 y Fh(ignore-fd)50 b Fd(fd-range)43
b Fq(Silently)22 b(ignor)n(e)h(any)f(speci\002cation)h(by)g(the)f
(client)h(of)g(those)e(descriptor\(s\).)27 b(The)227
1556 y(pipes)22 b(corr)n(esponding)e(to)i(these)f(descriptors)g(will)j
(be)e(closed)g(just)g(befor)n(e)g(the)g(service)h(is)f(invoked.)0
1758 y Fh(disconnect-hup)0 1959 y(no-disconnect-h)o(up)39
b Fq(Causes)i(the)g(service's)g(pr)n(ocess)f(gr)n(oup)h(to)g(get)f(a)i
Fo(SIGHUP)d Fq(if)j(the)f(client)h(dis-)227 2072 y(connects)53
b(befor)n(e)h(the)f(main)i(service)e(pr)n(ocess)g(terminates.)120
b Fo(no-disconnect-h)o(up)47 b Fq(cancels)227 2185 y
Fo(disconnect-hup)p Fq(.)227 2351 y(If)22 b(one)g(of)g(the)f(r)n
(eading)h(descriptors)e(speci\002ed)h(when)h(the)f(client)i(is)f
(called)h(gets)e(a)h(r)n(ead)g(err)n(or)-7 b(,)22 b(or)g(if)h(the)227
2464 y(service)k(is)f(disconnected)f(for)h(some)g(other)f(r)n(eason,)h
(then)g(the)f Fo(SIGHUP)f Fq(will)k(be)e(deliver)n(ed)g
Fn(befor)n(e)j Fq(the)227 2577 y(writing)g(end\(s\))f(of)g(the)g
(service's)h(r)n(eading)f(pipe\(s\))g(ar)n(e)h(closed,)g(so)f(that)h
(the)f(client)h(can)g(distinguish)227 2690 y(disconnection)22
b(fr)n(om)h(r)n(eading)g(EOF)f(on)g(a)h(pipe.)0 2892
y Fh(reset)43 b Fq(Resets)20 b(the)i(execution)g(settings)e(to)i(the)g
(default.)28 b(This)22 b(is)h(equivalent)g(to:)500 3144
y Fo(cd)54 b(~/)500 3257 y(reject)500 3370 y(no-set-environm)o(en)o(t)
500 3483 y(suppress-args)500 3596 y(allow-fd)d(0)j(read)500
3709 y(allow-fd)d(1-2)i(write)500 3822 y(reject-fd)d(3-)500
3935 y(disconnect-hup)0 4187 y Fq(If)25 b(no)f Fo(execute)p
Fq(,)e Fo(execute-from-pa)o(th)o Fq(,)e Fo(execute-from-d)o(ir)o(ec)o
(to)o(ry)e Fq(or)25 b Fo(builtin)d Fq(is)i(interpr)n(eted)0
4300 y(befor)n(e)e(all)i(the)e(\002les)g(ar)n(e)h(r)n(ead)g(then)f(the)
g(r)n(equest)f(is)h(r)n(ejected.)0 4650 y Fp(4.3)119
b(Errors)29 b(in)h(the)f(con\002guration)i(\002le)0 4914
y Fq(If)d(a)h(syntax)f(err)n(or)f(or)h(other)f(pr)n(oblem)i(occurs)f
(when)f(pr)n(ocessing)g(a)i(con\002guration)f(\002le)g(then)g(a)g
(diagnostic)0 5027 y(will)g(be)f(issued,)f(to)g(wher)n(ever)f(the)h
(err)n(or)g(messages)f(ar)n(e)i(curr)n(ently)f(being)h(sent)e(\(see)h
(the)g Fo(errors-)e Fq(family)0 5140 y(of)f(dir)n(ectives,)f(above\).)p
eop end end
%%Page: 21 25
TeXDict begin HPSdict begin 21 24 bop 0 91 a Fq(Chapter)22
b(4.)h(Service-side)f(con\002guration)2319 b(21)p 0 128
3901 4 v 0 476 a(The)30 b(err)n(or)f(will)j(cause)e(pr)n(ocessing)f(of)
h(the)g(con\002guration)f(\002les)h(to)g(cease)g(at)h(that)f(point,)h
(unless)e(the)h(err)n(or)0 589 y(was)23 b(inside)g(a)h
Fo(catch-quit)18 b Fq(constr)o(uct.)29 b(In)23 b(this)g(case)g(the)f
(settings)f(contr)n(olling)j(the)e(pr)n(ogram's)h(execution)0
702 y(will)28 b(be)g(r)n(eset)d(to)i(the)f(defaults)h(as)g(if)h(a)g
Fo(reset)d Fq(dir)n(ective)j(had)f(been)f(issued,)h(and)g(parsing)g
(continues)f(after)0 814 y Fo(hctac)p Fq(.)0 1170 y Fp(4.4)119
b(Defaults)0 1437 y Fq(The)19 b(default)h(con\002guration)g(pr)n
(ocessing)f(is)h(as)g(if)h(the)e(daemon)h(wer)n(e)f(parsing)h(an)g
(overall)i(con\002guration)d(\002le)0 1550 y(whose)i(contents)g(wer)n
(e)h(as)h(follows:)164 1819 y Fo(reset)164 1932 y(user-rcfile)49
b(~/.userv/rc)164 2045 y(errors-to-stde)o(rr)164 2158
y(include)i(/etc/userv/syst)o(em)o(.d)o(ef)o(aul)o(t)164
2271 y(if)i(grep)g(service-user-sh)o(el)o(l)48 b(/etc/shells)327
2383 y(errors-push)436 2496 y(catch-quit)545 2609 y(include-ifexist)g
Fj(file)53 b(specified)d(by)k(most)f(recent)f(user-rcfile)d(directive)
436 2722 y Fo(hctac)327 2835 y(srorre)164 2948 y(fi)164
3061 y(include)i(/etc/userv/syst)o(em)o(.o)o(ve)o(rri)o(de)164
3174 y(quit)0 3443 y Fq(If)22 b(one)f(of)i(the)e Fo(-override)d
Fq(options)j(to)g(the)h(client)g(is)h(used)d(then)h(it)i(will)g
(instead)f(be)g(as)g(if)h(the)e(daemon)h(wer)n(e)0 3556
y(parsing)g(an)h(overall)h(con\002guration)e(as)h(follows:)164
3825 y Fo(reset)164 3938 y(errors-to-stde)o(rr)164 4051
y(include)51 b Fj(file)i(containing)d(configuration)e(data)53
b(sent)g(by)g(client)164 4163 y Fo(quit)p eop end end
%%Page: 22 26
TeXDict begin HPSdict begin 22 25 bop 0 91 a Fq(Chapter)22
b(4.)h(Service-side)f(con\002guration)2319 b(22)p 0 128
3901 4 v eop end end
%%Page: 23 27
TeXDict begin HPSdict begin 23 26 bop 3809 91 a Fq(23)p
0 128 3901 4 v 0 1150 a Fk(Chapter)44 b(5)0 1616 y Fm(Information)52
b(passed)g(through)g(the)0 1865 y(client/daemon)g(combination)0
2361 y Fq(The)21 b(information)i(described)e(below)h(is)g(the)g(only)g
(information)g(which)h(passes)d(between)h(the)g(caller)j(and)e(the)0
2474 y(service.)127 2715 y(\225)45 b(The)21 b(service)h(name)g
(supplied)f(by)g(the)g(caller)j(is)e(available)i(in)f(the)e
(con\002guration)g(language)h(for)f(decid-)227 2827 y(ing)27
b(whether)d(and)i(which)h(service)f(pr)n(ogram)g(to)g(invoke,)g(in)h
(the)e Fo(service)e Fq(parameter)-7 b(,)27 b(and)f(is)h(used)227
2940 y(by)20 b(the)g Fo(execute-from-d)o(ir)o(ec)o(tor)o(y)14
b Fq(and)20 b Fo(execute-from-pa)o(th)13 b Fq(con\002guration)20
b(dir)n(ectives.)27 b(It)227 3053 y(is)k(usually)g(used)e(to)h(select)g
(which)i(service)e(pr)n(ogram)h(to)f(invoke.)51 b(It)30
b(is)h(also)g(passed)e(to)h(the)g(service)227 3166 y(pr)n(ogram)23
b(in)g(the)f Fo(USERV_SERVICE)16 b Fq(envir)n(onment)23
b(variable.)127 3346 y(\225)45 b(File)24 b(descriptors)d(speci\002ed)h
(by)i(the)e(client)i(and)g(allowed)f(accor)n(ding)h(to)f(the)f
(con\002guration)h(language)227 3459 y(will)k(be)e(connected.)34
b(Each)25 b(\002le)h(descriptor)d(is)i(opened)e(for)i(r)n(eading)g(or)g
(writing.)35 b(Communication)27 b(is)227 3572 y(via)h(pipes,)e(one)f
(end)g(of)h(each)h(pipe)f(being)g(open)f(on)h(the)f(appr)n(opriate)g
(\002le)i(descriptor)d(in)j(the)e(service)227 3685 y(pr)n(ogram)e
(\(when)f(it)h(is)g(invoked\))g(and)f(the)g(other)g(end)g(being)h(held)
f(by)h(the)f(client)h(pr)n(ocess,)e(which)j(will)227
3798 y(r)n(ead)f(and)f(write)h(\002les)f(it)h(opens)e(on)h(behalf)i(of)
e(its)h(caller)g(or)g(\002le)f(descriptors)f(it)i(is)f(passed)f(by)i
(its)f(caller)-7 b(.)227 3944 y(Data)33 b(may)f(be)f(passed)f(into)h
(the)g(service)g(thr)n(ough)f(r)n(eading)h(pipes)g(and)g(out)g(of)g(it)
h(thr)n(ough)e(writing)227 4057 y(pipes.)d(These)19 b(pipes)h(can)i(r)n
(emain)g(open)e(only)h(until)h(the)e(service)h(and)g(client)h(have)f
(terminated,)f(or)h(can)227 4170 y(be)28 b(made)f(to)g(stay)g(open)f
(after)h(the)g(client)h(has)f(terminated)g(and)g(\(if)i(the)e(service)g
(pr)n(ogram)g(forks\))g(the)227 4283 y(main)h(service)e(pr)n(ocess)f
(has)h(exited;)g(the)g(behaviour)g(is)h(contr)n(olled)e(by)h(options)f
(passed)g(to)g(the)h(client)227 4396 y(by)d(its)f(caller)-7
b(.)227 4542 y(The)38 b(caller)h(can)g(arrange)g(that)f(a)g(writing)g
(pipe)g(be)g(connected)f(to)h(a)h(pipe)e(or)h(similar)i(object)e(and)
227 4655 y(cause)22 b(attempts)f(to)h(write)f(to)h(that)g(descriptor)e
(by)j(the)e(service)h(to)g(generate)e(a)j Fo(SIGPIPE)c
Fq(\(or)j Fo(EPIPE)e Fq(if)227 4768 y Fo(SIGPIPE)g Fq(is)j(caught)f(or)
g(ignor)n(ed\))g(in)h(the)f(service.)227 4914 y(Likewise,)35
b(the)f(service)g(can)g(close)g(\002ledescriptors)e(speci\002ed)h(for)h
(r)n(eading,)i(which)f(will)g(cause)f(the)227 5027 y(corr)n(esponding)f
(\002ledescriptors)g(passed)g(by)h(the)g(caller)i(to)f(be)f(closed,)j
(so)d(that)g(if)i(these)d(ar)n(e)i(pipes)227 5140 y(pr)n(ocesses)21
b(which)i(write)f(to)g(them)g(will)i(r)n(eceive)f Fo(SIGPIPE)c
Fq(or)k Fo(EPIPE)p Fq(.)p eop end end
%%Page: 24 28
TeXDict begin HPSdict begin 24 27 bop 0 91 a Fq(Chapter)22
b(5.)h(Information)g(passed)e(thr)n(ough)g(the)h(client/daemon)g
(combination)940 b(24)p 0 128 3901 4 v 127 476 a(\225)45
b(If)21 b Fo(no-suppress-arg)o(s)15 b Fq(is)21 b(set)e(then)h(ar)n
(guments)g(passed)f(to)h(the)g(client)i(by)e(its)h(caller)h(will)g(be)f
(passed)227 589 y(on,)h(verbatim,)i(to)e(the)f(service.)127
776 y(\225)45 b(Fatal)27 b(signals)g(and)f(system)f(call)j(failur)n(es)
f(experienced)e(by)h(the)g(client)h(will)g(r)n(esult)f(in)h(the)e
(disconnec-)227 889 y(tion)i(of)g(the)f(service)h(fr)n(om)g(the)f
(client)i(and)f(possibly)f(some)g(of)h(the)f(communication)i(\002le)f
(descriptors)227 1002 y(described)22 b(above;)g(if)i
Fo(disconnect-hup)16 b Fq(is)23 b(set)e(then)h(the)g(service)g(will)i
(also)f(be)g(sent)e(a)i Fo(SIGHUP)p Fq(.)127 1190 y(\225)45
b(The)31 b(value)h(of)f(the)g Fo(LOGNAME)d Fq(\(or)j
Fo(USER)p Fq(\))f(envir)n(onment)h(variable)i(as)e(passed)f(to)g(the)h
(client)h(will)g(be)227 1303 y(used)27 b(as)h(the)f(login)i(name)f(of)g
(the)f(calling)j(user)d(if)i(the)e(uid)h(of)g(the)g(calling)h(pr)n
(ocess)e(matches)h(the)f(uid)227 1416 y(corr)n(esponding)d(to)g(that)h
(login)h(name.)36 b(Otherwise)24 b(the)g(calling)j(uid's)e(passwor)n(d)
f(entry)g(will)i(be)g(used)227 1528 y(to)c(determine)f(the)h(calling)j
(user)7 b('s)21 b(login)h(name.)227 1679 y(This)41 b(login)g(name)h
(and)f(the)f(calling)j(uid)e(ar)n(e)h(available)i(in)d(the)g
(con\002guration)f(language)h(in)h(the)227 1792 y Fo(calling-user)18
b Fq(parameter)k(and)h(ar)n(e)h(passed)d(to)i(the)f(service)h(pr)n
(ogram)g(in)g(envir)n(onment)g(variables)227 1905 y Fo(USERV_USER)18
b Fq(and)23 b Fo(USERV_UID)p Fq(.)227 2055 y(The)e(shell)h(corr)n
(esponding)e(to)h(that)h(login)f(name)i(\(accor)n(ding)f(to)f(the)g
(passwor)n(d)g(entry\))f(is)i(available)j(as)227 2168
y(in)e(the)f(con\002guration)g(language's)g Fo(calling-user-she)o(ll)16
b Fq(parameter)-7 b(.)227 2318 y(If)23 b(no)f(r)n(elevant)h(passwor)n
(d)e(entry)h(can)h(be)g(found)e(then)h(no)g(service)h(will)h(be)e
(invoked.)127 2506 y(\225)45 b(The)35 b(numeric)h(values)g(and)g
(textual)f(names)h(for)f(calling)j(gid)d(and)h(supplementary)d(gr)n
(oup)i(list)h(ar)n(e)227 2618 y(available)31 b(in)e(the)e
(con\002guration)h(language)g(in)h(the)e Fo(calling-group)22
b Fq(parameter)28 b(and)g(ar)n(e)h(passed)227 2731 y(to)22
b(the)g(service)h(in)g(envir)n(onment)f(variables.)227
2882 y(If)27 b(no)f(name)h(can)h(be)f(found)f(for)g(a)i(numeric)f(gr)n
(oup)f(to)g(which)h(the)f(calling)i(pr)n(ocess)e(belongs)g(then)f(no)
227 2995 y(service)e(will)h(be)e(invoked.)127 3182 y(\225)45
b(The)33 b(name)h(of)g(the)f(curr)n(ent)g(working)g(dir)n(ectory)f(in)i
(which)h(the)d(client)j(was)e(invoked)g(is)h(passed,)g(if)227
3295 y(available)29 b(and)c(not)g(hidden)g(using)g Fo(-hidecwd)p
Fq(,)d(to)j(the)g(service)h(pr)n(ogram)f(in)h(the)f Fo(USERV_CWD)d
Fq(vari-)227 3408 y(able.)35 b(This)25 b(grants)f(no)g(special)i
(access)e(to)g(that)h(dir)n(ectory)f(unless)f(it)i(is)g(a)h(subdir)n
(ectory)d(of)i(a)g(dir)n(ectory)227 3521 y(which)e(is)g(executable)f
(\(sear)n(chable\))j(but)d(not)g(r)n(eadable)h(by)g(the)f(service)g
(user)-7 b(.)127 3709 y(\225)45 b(Settings)28 b(speci\002ed)g(by)h(the)
g(caller)i(using)d(the)h Fo(--defvar)51 b Fj(name)p Fo(=)p
Fj(value)25 b Fq(option)j(to)h(the)g(client)h(ar)n(e)227
3821 y(available)k(in)e(the)e(con\002guration)g(language)h(as)g(the)f
(corr)n(esponding)f Fo(u-)p Fj(name)f Fq(parameters)i(and)h(ar)n(e)227
3934 y(passed)21 b(to)h(the)g(service)h(pr)n(ogram)f(in)h(envir)n
(onment)f(variables)i Fo(USERV_U_)p Fj(name)p Fq(.)127
4122 y(\225)45 b(If)29 b(the)g(calling)h(user)e(is)h(r)n(oot)g(or)f
(the)h(same)f(as)i(the)e(service)h(user)f(then)g(options)f(may)j(be)f
(given)g(to)f(the)227 4235 y(client)37 b(which)g(bypass)e(the)g(usual)i
(security)e(featur)n(es;)42 b(in)36 b(this)g(case)g(other)f
(information)i(may)g(pass)227 4348 y(between)21 b(the)h(caller)i(and)f
(the)e(service.)p eop end end
%%Page: 25 29
TeXDict begin HPSdict begin 25 28 bop 3809 91 a Fq(25)p
0 128 3901 4 v 0 1150 a Fk(Chapter)44 b(6)0 1617 y Fm(Applications)51
b(and)h(notes)f(on)h(use)0 2150 y Fp(6.1)119 b(Examples)0
2412 y Fq(The)23 b(companion)h(package,)f Fo(userv-utils)p
Fq(,)c(contains)k(a)h(selection)f(of)h(example)f(services,)g(some)g(of)
h(which)0 2525 y(ar)n(e)f(useful)f(tools)g(in)h(their)f(own)g(right.)28
b(See)21 b(the)h Fo(README)e Fq(in)j(its)f(top-level)h(dir)n(ectory)e
(for)i(details.)0 2872 y Fp(6.2)119 b(Standard)29 b(services)g(and)h
(directory)g(management)0 3134 y Fq(In)c(later)g(versions)g(of)g(this)g
(speci\002cation)g(standar)n(d)g(service)g(names)g(and)g(interfaces)g
(for)g(common)h(services)0 3247 y(such)22 b(as)h(mail)h(delivery)f(and)
f(WWW)h(CGI)g(scripts)f(may)h(be)f(speci\002ed.)0 3412
y Fo(userv)p Fq(-using)30 b(applications)k(and)f(system)e(services)h
(which)h(hide)g Fo(userv)d Fq(behind)j(wrapper)f(scripts)g(may)0
3525 y(need)38 b(to)h(stor)n(e)f(information)i(in)g(the)f(user)7
b('s)38 b(\002lespace)h(to)g(pr)n(eserve)f(the)h(corr)n(ect)g
(placement)g(of)h(the)f(se-)0 3638 y(curity)44 b(perimiters.)90
b(Such)44 b(applications)g(should)f(usually)h(do)f(so)h(in)g(a)g(dir)n
(ectory)f(\(cr)n(eated)h(by)f(them\))0 3750 y Fo(~/.userv/)p
Fj(servic)o(e)p Fq(,)16 b(wher)n(e)22 b Fn(service)j
Fq(is)e(the)e(service)i(name)g(or)f(application)i(in)f(question.)0
3915 y(If)f(desir)n(ed,)f(a)h(dot-dir)n(ectory)e(inside)i
Fo(~/.userv)d Fq(may)j(be)g(used)f(to)g(avoid)i(the)e(user)g(becoming)h
(confused)f(by)0 4028 y(\002nding)g(parts)f(of)h(a)h(semi-privileged)e
(application's)i(internal)g(state)e(in)h(their)g(\002lespace,)f(and/or)
h(discourage)0 4141 y(them)h(fr)n(om)h(\002ddling)f(with)h(and)g(thus)e
(corr)o(upting)h(it.)0 4305 y(However)-7 b(,)25 b Fo(userv)f
Fq(applications)i(should)f(of)h(course)e(not)h(r)n(ely)h(for)g(their)f
(global)i(integrity)d(and)i(security)e(on)0 4418 y(the)e(integrity)f
(of)i(the)f(data)g(on)h(the)f(user)7 b('s)21 b(side)g(of)i(the)f
(security)f(boundary)-10 b(.)0 4765 y Fp(6.3)119 b(Reducing)30
b(the)g(number)g(of)f(absolutely)h(privileged)g(subsystems)0
5027 y Fq(Curr)n(ently)i(most)g(Unix)h(systems)d(have)j(many)g
(components)e(which)i(need)e(to)h(r)o(un)h(as)f(r)n(oot,)i(even)f
(though)0 5140 y(most)28 b(of)g(their)h(activity)g(does)e(not)h
(strictly)h(r)n(equir)n(e)f(it.)46 b(This)29 b(gives)f(rise)g(to)g(a)h
(lar)n(ge)g(and)g(complex)f(body)g(of)p eop end end
%%Page: 26 30
TeXDict begin HPSdict begin 26 29 bop 0 91 a Fq(Chapter)22
b(6.)h(Applications)g(and)f(notes)f(on)i(use)2153 b(26)p
0 128 3901 4 v 0 476 a(code)22 b(which)h(must)f(be)h(tr)o(usted)d(with)
j(the)f(security)f(of)i(the)f(system.)0 648 y(If)c(they)f(wer)n(e)h(to)
g(use)f Fo(userv)p Fq(,)g(many)h(of)h(these)d(subsystems)g(would)i(no)f
(longer)h(need)f(any)h(unusual)g(privilege.)0 819 y Fo(cron)23
b Fq(and)i Fo(at)p Fq(,)g Fo(lpr)f Fq(and)h(the)f(system's)f(mail)k
(transfer)d(agent)h(\()p Fo(sendmail)p Fq(,)d Fo(smail)p
Fq(,)h Fo(exim)g Fq(or)i(the)f(like\))i(all)0 932 y(fall)21
b(into)f(this)f(category)-10 b(,)19 b(though)f Fo(userv)p
Fq(-based)f(versions)i(of)h(these)e(pr)n(ograms)h(ar)n(e)h(not)f(curr)n
(ently)g(available.)0 1299 y Fp(6.4)119 b(Do)30 b(not)g(give)h(away)e
(excessive)h(privilege)f(to)h Fa(userv)p Fp(-using)f(facilities)0
1571 y Fq(Ther)n(e)k(is)i(a)g(danger)e(that)h(people)f(r)n
(eimplementing)h(the)g(facilities)i(I)e(mention)g(above)h(using)f
Fo(userv)e Fq(will)0 1684 y(discar)n(d)20 b(much)h(of)f(the)f(security)
g(bene\002t)g(by)h(using)g(a)g(naive)h(implementation)f(technique.)26
b(This)20 b(will)h(become)0 1797 y(clear)n(er)i(with)g(an)g(example:)0
1969 y(Consider)j(the)g Fo(lpr)g Fq(pr)n(ogram.)40 b(In)27
b(curr)n(ent)f(systems)f(this)i(needs)e(to)h(have)h(an)h(absolutely)e
(privileged)g(com-)0 2082 y(ponent)g(in)i(or)n(der)e(to)h(support)e
(delayed)h(printing)h(without)g(copying:)36 b(when)27
b(the)g(user)f(queues)g(a)i(\002le)f(to)g(be)0 2195 y(printed)22
b(the)h(\002lename)h(is)g(stor)n(ed)d(in)j(the)f(print)g(queue,)g
(rather)g(than)g(a)h(copy)f(of)h(it,)g(and)f(the)g(printer)g(daemon)0
2307 y(accesses)31 b(the)g(\002le)g(dir)n(ectly)h(when)f(it)h(is)g(r)n
(eady)f(to)g(print)g(the)g(job.)56 b(In)31 b(or)n(der)g(that)g(the)g
(user)g(can)h(print)f(\002les)0 2420 y(which)23 b(ar)n(e)h(not)e
(world-r)n(eadable)h(the)f(daemon)h(is)g(given)g(r)n(oot)f(privilege)h
(so)f(that)h(it)g(can)h(open)d(the)h(\002le)i(in)f(the)0
2533 y(context)e(of)i(the)f(user)-7 b(,)21 b(rather)h(than)h(its)f
(own.)0 2705 y(A)35 b(simple-minded)g(appr)n(oach)h(to)f(converting)g
(this)g(scheme)g(to)g(use)g Fo(userv)e Fq(might)j(involve)g(giving)g
(the)0 2818 y(printer)21 b(daemon)h(\(the)f Fo(lp)g Fq(user\))h(the)f
(ability)i(to)f(r)n(ead)g(the)f(\002le)h(by)g(allowing)h(them)e(to)h(r)
o(un)g Fo(cat)f Fq(\(or)h(a)g(special-)0 2931 y(purpose)f(\002le-r)n
(eading)j(pr)n(ogram\))g(as)g(any)f(user)-7 b(.)30 b(The)23
b Fo(lpr)f Fq(pr)n(ogram)i(would)f(use)f(a)j Fo(userv)c
Fq(service)i(to)g(stor)n(e)0 3044 y(the)d(\002lename)g(in)h(the)f
(printer)g(daemon's)f(queues,)g(and)i(the)f(daemon)g(would)f(r)n(ead)i
(the)e(\002le)i(later)g(when)e(it)i(felt)0 3157 y(like)i(it.)0
3329 y(However)-7 b(,)33 b(this)g(would)e(allow)j(the)d(printer)h
(daemon)g(to)g(r)n(ead)g(any)h(\002le)f(on)g(the)g(system,)h(whether)e
(or)h(not)0 3442 y(someone)38 b(had)h(asked)g(for)g(it)h(to)f(be)h
(printed.)77 b(Since)40 b(many)g(\002les)f(will)i(contain)f(passwor)n
(ds)e(and)h(other)0 3554 y(security-critical)d(information)g(this)f(is)
g(nearly)g(as)g(bad)g(as)g(giving)g(the)g(daemon)f(r)n(oot)g(access)h
(in)h(the)e(\002rst)0 3667 y(place.)41 b(Any)26 b(security)g(holes)g
(in)i(the)e(print)h(server)e(which)j(allow)g(a)f(user)f(to)g(execute)g
(commands)h(as)g(the)f Fo(lp)0 3780 y Fq(user)c(will)h(give)g(the)f
(user)f(the)h(ability)i(to)e(r)n(ead)h(any)f(\002le)h(on)f(the)g
(system.)0 3952 y(Instead,)h(it)i(is)g(necessary)e(to)i(keep)e(a)i(r)n
(ecor)n(d)g(of)f(which)i(\002les)e(the)g(daemon)g(has)h(been)f(asked)g
(to)g(print)g Fn(outside)0 4065 y Fq(the)h(contr)n(ol)h(of)g(the)f
(print)h(daemon.)37 b(This)25 b(r)n(ecor)n(d)h(could)g(be)g(kept)e(by)i
(a)h(new)e(r)n(oot-privileged)g(component,)0 4178 y(but)20
b(this)g(is)h(not)f(necessary:)25 b(the)20 b(r)n(ecor)n(d)g(of)h(which)
g(\002les)f(a)h(user)e(has)i(asked)e(to)h(be)g(printed)g(can)h(be)f
(kept)f(under)0 4291 y(the)28 b(contr)n(ol)i(of)f(the)f(user)g(in)i
(question.)46 b(The)28 b(submission)h(pr)n(ogram)g Fo(lpr)f
Fq(will)i(make)f(a)h(r)n(ecor)n(d)f(in)h(an)f(ar)n(ea)0
4404 y(under)24 b(the)h(user)7 b('s)24 b(contr)n(ol)h(befor)n(e)g
(communicating)i(with)e(the)f(print)h(server)-7 b(,)25
b(and)h(the)e(print)h(server)g(would)0 4517 y(be)f(given)g(the)g
(ability)h(to)f(r)o(un)g(a)h(special)f(\002le-r)n(eading)h(pr)n(ogram)f
(which)g(would)g(only)g(allow)h(\002les)f(to)f(be)h(r)n(ead)0
4630 y(which)f(wer)n(e)f(listed)g(in)h(the)f(user)7 b('s)21
b(\002le)i(of)f(things)g(they'd)f(asked)h(to)g(print.)0
4801 y(Now)g(security)g(holes)f(in)j(most)e(of)g(the)g(printing)h
(system)e(do)h(not)g(critically)j(af)n(fect)e(the)f(security)g(of)h
(the)f(entir)n(e)0 4914 y(system:)35 b(they)25 b(only)i(allow)h(the)e
(attacker)g(to)h(r)n(ead)g(and)g(interfer)n(e)f(with)h(print)f(jobs.)41
b(Bugs)25 b(in)j(the)e(pr)n(ograms)0 5027 y(r)o(un)e(by)g(the)f(print)h
(server)f(to)h(r)n(ead)g(users')e(\002les)i(\(and)g(to)g(r)n(emove)g
(entries)e(fr)n(om)j(the)e(list)i(of)f(\002les)f(when)h(it)g(has)0
5140 y(done)d(with)i(them\))f(will)i(still)f(be)g(serious,)e(but)h
(this)h(pr)n(ogram)f(can)i(be)e(quite)g(simple.)p eop
end end
%%Page: 27 31
TeXDict begin HPSdict begin 27 30 bop 0 91 a Fq(Chapter)22
b(6.)h(Applications)g(and)f(notes)f(on)i(use)2153 b(27)p
0 128 3901 4 v 0 476 a(Similar)31 b(considerations)d(apply)i(to)f(many)
g Fo(userv)p Fq(-based)e(versions)i(of)g(facilities)i(which)f(curr)n
(ently)g(r)o(un)f(as)0 589 y(r)n(oot.)0 747 y(It)23 b(is)g(debatable)h
(whether)d(the)i(user)n(-contr)n(olled)f(state)g(should)g(be)h(kept)f
(in)i(the)e(user)7 b('s)22 b(\002lespace)h(\(in)h(dot\002les,)0
860 y(say\))29 b(or)g(kept)f(in)i(a)g(separate)e(ar)n(ea)i(set)e(aside)
h(for)g(the)g(purpose;)h(however)-7 b(,)30 b(using)e(the)h(user)7
b('s)28 b(home)h(dir)n(ec-)0 973 y(tory)g(\(and)i(possibly)e(cr)n
(eating)i(a)g(separate)e(subdir)n(ectory)g(of)h(it)h(as)f(a)h
(dot\002le)e(to)h(contain)h(subsystem)d(state\))0 1086
y(has)j(fewer)f(implications)j(for)e(the)f(r)n(est)g(of)h(the)f(system)
g(and)h(makes)f(it)h(entir)n(ely)g(clear)h(wher)n(e)e(the)g(security)0
1199 y(boundaries)22 b(lie.)0 1534 y Fp(6.5)119 b Fa(userv)29
b Fp(can)g(often)h(replace)e Fa(sudo)p Fp(,)h(but)h(not)g
Fa(really)0 1791 y Fo(userv)f Fq(is)i(not)f(intended)f(as)i(a)g
(general-purpose)e(system)g(administration)i(tool)f(with)h(which)h
(system)d(ad-)0 1904 y(ministrators)23 b(can)h(execute)d(arbitrary)j
(pr)n(ograms)f(like)g(text)f(editors)g(as)h(r)n(oot)f(\(or)i(other)d
(system)h(users\))g(when)0 2017 y(they)30 b(need)g(to.)54
b(It)30 b(is)i(unsuitable)f(for)h(this)f(purpose)e(pr)n(ecisely)i
(because)g(it)g(enfor)n(ces)g(a)h(str)n(ong)e(separation)0
2129 y(between)21 b(the)h(calling)i(and)f(the)f(called)h(pr)n(ogram,)f
(which)i(is)e(undesirable)g(in)i(this)e(context.)0 2288
y(However)-7 b(,)19 b(its)g(use)f(when)h(r)n(estricted)f(to)h(r)o
(unning)g(particular)i(pr)n(ograms)e(in)g(particular)i(ways)e(is)h
(very)e(similar)0 2401 y(to)23 b(many)g(common)h(uses)e(of)h
Fo(sudo)1254 2368 y Fi(1)p
 (#Hfootnote.2) [[222 479 227 491] [1 1 1 [3 3]] [0 0 1]] pdfm 
1290 2401 a Fq(.)30 b Fo(userv)21 b Fq(is)i(generally)g(much)h(better)e
(than)h(r)n(estricted)f Fo(sudo)p Fq(,)g(because)h(it)0
2514 y(pr)n(otects)c(the)h(called)i(pr)n(ogram)e(much)h(mor)n(e)g(str)n
(ongly)e(fr)n(om)i(bad)g(envir)n(onmental)h(conditions)e(set)f(up)h(by)
h(the)0 2626 y(caller)-7 b(.)34 b(Most)24 b(pr)n(ograms)f(that)h(one)g
(might)g(want)g(to)g(r)o(un)g(via)i(r)n(estricted)d Fo(sudo)p
Fq(,)g(have)h(not)g(been)g(designed)e(to)0 2739 y(r)o(un)h(in)g(a)h
(partially)g(hostile)e(envir)n(onment.)29 b Fo(userv)21
b Fq(allows)i(these)e(pr)n(ograms)i(to)f(be)h(r)o(un)g(in)g(a)h(safer)f
(envir)n(on-)0 2852 y(ment)f(and)h(should)e(be)i(used)e(instead.)0
3188 y Fp(6.6)119 b(Error)29 b(handling)h(and)g(input)f(streams)g(\(eg)
h(stdin\))0 3444 y Fq(When)18 b(the)f(service)i(pr)n(ogram)f(is)g(r)n
(eading)h(fr)n(om)g(a)g(\002le)f(descriptor)f(connected)g(to)h(the)f
(calling)j(side,)e(the)g(fd)g(that)0 3557 y(the)k(service)i(pr)n(ogram)
f(r)n(efers)f(to)h(a)h(pipe)e(set)h(up)f(by)i Fo(userv)d
Fq(and)i(not)g(to)f(the)h(same)g(object)g(as)h(was)f(pr)n(esented)0
3670 y(by)g(the)e(caller)-7 b(.)0 3829 y(Ther)n(efor)n(e)23
b(if)i(ther)n(e)e(is)h(some)f(kind)h(of)g(err)n(or)f(it)i(is)f
(possible)f(for)h(the)g(service-side)f(fd)h(to)f(give)h(pr)n(ematur)n
(e)g(end)0 3941 y(of)j(\002le.)42 b(If)27 b(it)g(is)h(important)f(to)f
(tell)h(whether)f(all)j(of)e(the)f(intended)g(data)h(has)g(been)g(r)n
(eceived)g(by)g(the)f(service)0 4054 y(pr)n(ogram,)c(the)g(datastr)n
(eam)h(must)f(contain)h(an)g(explicit)g(end-of-\002le)f(indication)i
(of)e(some)g(kind.)0 4213 y(For)f(example,)h(consider)e(a)j
Fo(userv)c Fq(service)j(for)g(submitting)f(a)h(mail)i(message,)c(wher)n
(e)h(message)f(is)i(supplied)0 4326 y(on)30 b(the)g(service's)h(stdin.)
51 b(However)-7 b(,)31 b(if)g(the)f(calling)j(pr)n(ocess)c(is)i(interr)
o(upted)d(befor)n(e)j(it)g(has)f(written)g(all)i(of)0
4439 y(the)24 b(message,)h(the)f(service)h(pr)n(ogram)g(will)i(get)d
(EOF)h(on)g(the)f(message)g(data.)36 b(In)25 b(a)h(naive)g(arrangement)
e(this)0 4551 y(would)29 b(cause)h(a)g(half-complete)h(message)d(to)h
(be)h(sent.)49 b(T)-8 b(o)29 b(pr)n(event)f(this,)j(it)g(is)f
(necessary)e(to)h(adopt)g(some)0 4664 y(kind)21 b(of)g(explicit)h(end)e
(indication;)j(for)e(example,)g(the)g(end)f(of)h(the)g(message)f(could)
h(be)g(signalled)g(by)g(a)h(dot)e(on)0 4777 y(a)28 b(line)h(by)f
(itself,)g(and)g(dots)f(doubled,)g(as)h(in)h(SMTP)-12
b(.)27 b(Then)g(the)g(service)h(pr)n(ogram)g(would)f(know)g(when)g(the)
0 4890 y(entir)n(e)22 b(message)f(had)i(been)f(r)n(eceived,)g(and)h
(could)f(avoid)h(queueing)f(incomplete)g(messages.)p
0 4961 1560 4 v 134 5017 a Fg(1)163 5049 y Ff(sudo)d
Fe(is)h(a)g(pr)o(ogram)e(which)k(allows)d(users)g(to)h(execute)g
(certain)g(pr)o(ograms)e(as)i(r)o(oot,)f(accor)o(ding)h(to)g
(con\002guration)g(\002les)g(speci-)0 5140 y(\002ed)e(by)h(the)g
(system)f(administrator)-6 b(.)p eop end end
%%Page: 28 32
TeXDict begin HPSdict begin 28 31 bop 0 91 a Fq(Chapter)22
b(6.)h(Applications)g(and)f(notes)f(on)i(use)2153 b(28)p
0 128 3901 4 v 0 476 a Fp(6.7)119 b(Don')n(t)30 b(give)g(access)g(to)g
(general-purpose)f(utilities)0 743 y Fq(Do)24 b(not)g(specify)f
(general)h(purpose)e(pr)n(ograms)h(like)i Fo(mv)e Fq(or)h
Fo(cat)f Fq(in)h Fo(execute-)d Fq(dir)n(ectives)j(without)f(car)n(eful)
0 856 y(thought)j(about)h(their)g(ar)n(guments,)h(and)f(certainly)h
(not)f(if)h Fo(no-suppress-args)21 b Fq(is)27 b(speci\002ed.)42
b(If)27 b(you)g(do)0 969 y(so)22 b(it)h(will)h(give)e(the)g(caller)i
(much)f(mor)n(e)g(privilige)g(than)g(you)e(pr)n(obably)j(intend.)0
1138 y(It)33 b(is)g(a)h(shame)g(that)f(I)g(have)h(to)f(say)g(this)g
(her)n(e,)i(but)f(inexperienced)d(administrators)i(have)h(made)f
(similar)0 1251 y(mistakes)22 b(with)g(pr)n(ograms)g(like)h
Fo(sudo)p Fq(.)p eop end end
%%Trailer

end