Aa=rK}  0 U`0  0  0@P@ HH $ @d HHHHff@  d Footnote TableFootnote**.\t.\t/ - :;,.!?& b b0TOCHeading1Heading2   MEquationVariablesM::::<====>>  <$lastpagenum><$monthname> <$daynum>, <$year>"<$monthnum>/<$daynum>/<$shortyear>;<$monthname> <$daynum>, <$year> <$hour>:<$minute00> <$ampm>"<$monthnum>/<$daynum>/<$shortyear><$monthname> <$daynum>, <$year>"<$monthnum>/<$daynum>/<$shortyear> <$fullfilename> <$filename> <$paratext[Title]> <$paratext[Heading1]> <$curpagenum> <$marker1> <$marker2> (Continued)+ (Sheet <$tblsheetnum> of <$tblsheetcount>)Heading & Page <$paratext> on page<$pagenum>Pagepage<$pagenum>See Heading & Page%See <$paratext> on page<$pagenum>. Table All7Table<$paranumonly>, <$paratext>, on page<$pagenum>Table Number & Page'Table<$paranumonly> on page<$pagenum> A!!**AA$$&&((AHeadings7zHTML5y:<3.<$2.55<*1.:0::-< =@=B=D=F=H=J=L=N:::-=P=R=T================================I2>>>>!>#>%>)>+>->/>1>3>5ID>9>;>=>?>A>C>E>I>K>M>O>QIVIhIs>>>>>>6f>>>>>>>>>>>>>>>>>>>>>>>??? ? ? ??????????!?#?%?'?)?+?-?/?1?3?5?7?9?;?=???A?C?E?G?I?K?M?O?Q?S?U?W?Y?[?]?_?a?c?e?g?iK?m?o?q?s?u?w?y?{?}?????K^?????????K:?????????????????????????????J????J??????????????@@@@@ @ @ @@@@@@@@@@!@#@%@'@)@+@-@/@1J>@5@7@9@;@=@?@A@C@E@G@I@K@M@O@Q@S@U@W@Y@[@]@_@a@c@e@g@i@k@m@o@q@s@u@wI@{@}@@@@@@@@@@@ELJ@EJFDJFXK<FK`FKG C=C?CACC7CCC6CCC4Cdqd<d9 HmR9HmRHRHR Footnote Hr@9Hr@HzHz Single LineH靕9Footnote 9  HD9 HDHH Double LineH9 Double Line9 9 H֝9  Single Line9 HZ֝9  TableFootnote EGxR9EGxREPwEPw TableFootnoted5p HH5xHH❝G܁e HH5zHH靕l HH<HH܁܁ t( 30 points ) Determine which of the systems in the CSIF provide login/audit UIDs and GIDs, and saqved UIDs P큩@hand GIDs. Write a program to print each of these, as well as the real and effective UIDs and GIDs.  HH<HH靕ld< $$<$$w"G܁Bm Z $$<$$ 靕ld:* HUV 5HUV ❝G܁e HUV 5HUV 靕l H$ 5H$ G܁e H$ 5H$ 靕l HH5HH~-- ` Homework 4 ܁`ETotal Points:  250 Due Date:  Monday, November 27, 1998  y( 100 points ) Please write a program to determine if a named user can access a named file or directory. The proEHgram is to be called  access , and the command line looks like: @?   access  options   user   file  ` Here,  user  is either a users login name or UID,  file  is a file (or directory, or other entity), and  options  is any com0l=bination of  r  (for read),  w  (for write), and  x  (for execute), with a leading   . If none of  r ,  w , or  x  is given, act as @9though all three had been given. Your output should say: ၣ`*  user  can read  file `or `9    user  can read and write  file `and so forth. If the option  l  is given, then every component of the path is to be checked as well as the file itself.   |If the  file  cannot be accessed, any command line argument is malformed, or an error occurs in your code, print an 0qappropriate error message and exit with an exit code of 1. Otherwise, exit with an error code of 0. Please write @$your code robustly, and comment it!  ́`Example . The output of `2 access rwx bishop /home/cs153/public_html ` should be `; bishop can read and execute /home/cs153/public_html `The output of `; access l bishop /home/cs153/public_html/index.html ` should be  % bishop can read and execute / 0_) bishop can read and execute /home / bishop can read and execute /home/cs153 ; bishop can read and execute /home/cs153/public_html @: bishop can read /home/cs153/public_html/index.html   tSubmitting your programs . If you write your programs in a compilable language (like C), you  must  sub2 mit a makefile to compile your source code. A single  make  should generate the  access  executable.  Do not  sub{mit  access  executables unless it is written in a scripted language (such as shell script or Perl). Your program @`should run correctly on any of the CSIF machines (that is, on the DECs, the HPs, and the SGIs). `^( 20 points ) Can the Trojan Horse attack work on a system protected by capabilities?  y( 10 points ) Some early computers protected their operating systems against destruction by placing it in memory 0plocations from which all programs (including the operating system itself) could read, but into which no program @?could write. What problem does this protection scheme create?  {( 20 points ) Prove or disprove: the power set of any set and the relation subset form a lattice. To prove this, 0oshow how to construct a greatest lower bound and a least upper bound (under subset) for any pair of elements uof the power set, and prove that subset is transitive, associative, and antisymmetric. To disprove this, exhibit a @4specific counterexample to any of these properties. . }( 100 points ) Please read the book  The Shockwave Rider  by John Brunner, and contrast his use of the terms 0:oworm, virus, and other references to malicious logic with the way we use those terms now. As with previous @Zessays, please write well. Your essay should be at least two pages (120 lines) long.   _` Extra credit !܁o ( 20 points)  Why do most UNIX systems limit the use of the  chroot (2) system call to the super-user? (Hint: think P{@about protection problems.) HH5HH靕lH$ :!H$  靕l H$ :H$ WC܁܁lPMJGDAG*܁Bm ` _ ^ ] \ [ $$=5$$/66 靕l} =x; yG+eCharacter Macros } =x yG,e } = x yG-e }H= x8<HyG.e Character }=x;=yG/e Replace With }=x<>yG0e Comments }H=x=?HyG1e }=x>@yG2e¢ }=x?PyG3e }H=1xFBHyG4e }=3xACyG5e... }=5xByG6e }H=7xIEHyG7e }=9xDFyG8e- }=;xEAyG9e }H==xLHHy G:e }=?xGIy G;e-- }=AxHDy G<e }H=CxOKHy G=e }=ExJLy G>e° }=GxKGy G?e }H=IxRNHy G@e }=KxMOy GAe® }=MxNJy GBe }H=Ox@QHy GFe }=QxPRy GGe© }=SxQMy GHe } =-gW . GIeGeneral Macros } =- . GJe } =- . GKe } =- . GLe }h=-SXh.GMe Macro Name }h=-WYh.GNe Replace With }h=-XZh.GOeHead }=-Y[.GPe Comments }h=-Z\h.GQe }h=-[]h.GRe }h=-\^h.GSe }=-].GTe } =-wb . GUeCross-Reference Macros } =- . GVe } =- . GWe }=-_c. GXe Macro Name }=-bd. GYe Replace With }=-ce. GZe Comments }=-df. G[e See Also }=-eg. G\eSee <$paratext> }=-fS. G]e } =-}l . G^eSystem Macros } =- . G_e } =- . G`e } =- . Gae }h=-hmh. Gbe Macro Name }h=-lnh. Gce Replace With }h=-moh. GdeHead }h=-nph. Gee Comments }h=-oqh. Gfe StartOfDoc }h=-prh. Gge }h=-qsh. gj% <$default���Etitle> }h=-r h. Gie }h>-{uh. GmeEndOfLastSubDoc }h>-tvh. Gne }h>-uwh. Goe }h> -v_h. Gpe }h>"-yh. GqeStartOfLastSubDoc }h>$-xzh. Gre }h>&-y{h. g% <$default���Etitle> }h>(-zth. Gte }h>*-}h. GueEndOfFirstSubDoc }h>,-|~h. Gve }h>.-}h. Gwe }h>0-~xh. Gxe }h>2-h. GyeStartOfFirstSubDoc }h>4-h. Gze }h>6-h. g % <$default���Etitle> }h>8-|h. G|e }h>:- h. G}e EndOfSubDoc }h><-h. G~e }h>>-h. Ge }h>@-h. Ge }h>B- h. GeStartOfSubDoc }h>D- h. Ge }h>F- h. g{% <$default���Etitle> }h>H- h. Ge }h>J-s h. Ge EndOfDoc }h>L- h. Ge }h>N- h. Ge }h>P-h. Ge } >-4 . GeHTML Options Table } >- . Ge } >- . Ge }>-. GeControl }>-. GeValue }H>-H. Ge Comments }>-. Ge Image Format }>-. g% 0001IMAGGIF E MACP0001GIF }H>-{H. Ge } >5 6 GeHTML Mapping Table } >5 6 Ge } >5 6 Ge } >5 6 Ge } >5 6 G e }.>5.6 !G!eFrameMaker Source Item }~>5!~6 !G"e HTML Item }6>566 !G#e }6.>5"6.6 !g$%Include EAuto# }.>5!$.6 !G%e Comments }>56 "G&e }H>5"%H6 "G'eElement }6>5$(66 "g(%New Web EPage? }6>566 "G)e }>56 "G*e }>5%)6 #G+eP:Body }H>5(*H6 #G,eP }6>5)+66 #G-eN }6>5*,66 #G.eN }>5+s6 #G/e d>// $$>-$$ g^/ gb]XSNID?:50{hlp |xt_beSW[ 8;>PMJGDA$$>-$$7z.. 靕l}?-91. $G0eX:Table Number & Page }H?-02H. $G1e See Also }6?-136. $G2eN }6? -246. $G3eN }? -3. $G4e }?->6. %G5e X:Table All }H?-57H. %G6e See Also }6?-686. %G7eN }6?-796. %G8eN }?-80. %G9e }?-C;. &G:eX:See Heading & Page }H?-:<H. &G;e See Also }6?-;=6. &G<eN }6?-<>6. &G=eN }? -=5. &G>e }?"-H@. 'G?eX:Page }H?$-?AH. 'G@e See Also }6?&-@B6. 'GAeN }6?(-AC6. 'GBeN }?*-B:. 'GCe }?,-ME. (GDeX:Heading & Page }H?.-DFH. (GEe See Also }6?0-EG6. (GFeN }6?2-FH6. (GGeN }?4-G?. (GHe }?6-RJ. )GIeC:EquationVariables }H?8-IKH. )GJeEM }6?:-JL6. )GKeN }6?<-KM6. )GLeN }?>-LD. )GMe }?@-WO. *GNe C:Emphasis }H?B-NPH. *GOeEM }6?D-OQ6. *GPeN }6?F-PR6. *GQeN }?H-QI. *GRe }?J-\T. +GSeC:Code }H?L-SUH. +GTeEM }6?N-TV6. +GUeN }6?P-UW6. +GVeN }?R-VN. +GWe }?T-aY. ,GXeC:Bold }H?V-XZH. ,GYeEM }6?X-Y[6. ,GZeN }6?Z-Z\6. ,G[eN }?\-[S. ,G\e }?^-f^. -G]eP:Title }H?`-]_H. -G^eH* }6?b-^`6. -G_eN }6?d-_a6. -G`eN }?f-`X. -Gae },?h-kc,. .Gbe P:TableTitle }H,?j-bdH,,. .eLI ce Parent = OL Ae Depth = 0 }6,?l-ce6,. .GdeN }6,?n-df6,. .GeeN },?p-e],. .Gfe }?r-h. /GgeP:TableFootnote }H?t-giH. /GheP }6?v-hj6. /GieN }6?x-ik6. /GjeN }?z-jb. /Gke }?|5um6 0GleP:Rule }H?~5lnH6 0GmeP }6?5mo66 0GneN }6?5np66 0GoeN }?5o6 0Gpe },?5zr,6 1Gqe P:Numbered1 }H,?5qsH,,6 1eLI re Parent = OL Ae Depth = 0 }6,?5rt6,6 1GseN }6,?5su6,6 1GteN },?5tl,6 1Gue }?5w6 2Gve P:Numbered+ }H?5vxH6 2GweP }6?5wy66 2GxeN }6?5xz66 2GyeN }?5yq6 2Gze },?5|,6 3G{e P:Numbered }H,?5{}H,,6 3eLI |e Parent = OL Ae Depth = 0 }6,?5|~6,6 3G}eN }6,?5}6,6 3G~eN },?5~v,6 3Ge }?5 6 4GeP:Mapping Table Title }H?5H6 4GeP }6?566 4GeN }6?566 4GeN }?5{6 4Ge }?56 5GeP:Mapping Table Cell }H?5H6 5GeP }6?566 5GeN }6?5 66 5GeN }?56 5G e }?5 6 6G eP:ManHeading2 }H?5 H6 6G eP }6?5 66 6G eN }6?5 66 6G eN }?5 6 6Ge }?56 7Ge P:ManHeading }H?5H6 7GeP }6?566 7GeN }6?566 7GeN }?5 6 7Ge }?56 8Ge P:ManBody }H?5H6 8GeP }6?566 8GeN }6?566 8GeN }?56 8Ge },?5",6 9Ge P:LetteredA }H,?5H,,6 9~eLI e Parent = OL A}e Depth = 0 }6,?56,6 9GeN }6,?56,6 9GeN },?5,6 9Ge },?5',6 :Ge P:Lettered }H,?5 H,,6 :|eLI e Parent = OL A{e Depth = 0 }6,?5!6,6 :G eN }6,?5 "6,6 :G!eN },?5!,6 :G"e }?5,$6 ;G#e P:Indented }H?5#%H6 ;G$eP }6?5$&66 ;G%eN }6?5%'66 ;G&eN }?5&6 ;G'e }?51)6 <G(eP:HeadingRunIn }H?5(*H6 <G)eP }6?5)+66 <G*eN }6?5*,66 <G+eN }?5+#6 <G,e }?56.6 =G-e P:Heading2 }H@5-/H6 =G.eH* }6@5.066 =G/eN }6@5/166 =G0eN }@50(6 =G1e }@5;36 >G2e P:Heading1 }H@ 524H6 >G3eH* }6@ 53566 >G4eN }6@54666 >G5eN }@55-6 >G6e }@5@86 ?G7eP:Heading Info }H@579H6 ?G8eP }6@58:66 ?G9eN }6@59;66 ?G:eN }@5:26 ?G;e }@5E=6 @G<eP:Hand }H@5<>H6 @G=eP }6@ 5=?66 @G>eN }6@"5>@66 @G?eN }@$5?76 @G@e }@&5JB6 AGAe P:Footnote }H@(5ACH6 AGBeP }6@*5BD66 AGCeN }6@,5CE66 AGDeN }@.5D<6 AGEe },@05OG,6 BGFe P:Exercise }H,@25FHH,,6 BzeLI Ge Parent = OL Aye Depth = 0 }6,@45GI6,6 BGHeN }6,@65HJ6,6 BGIeN },@85IA,6 BGJe }@:5TL6 CGKe P:Due Date }H@<5KMH6 CGLeH* }6@>5LN66 CGMeN }6@@5MO66 CGNeN }@B5NF6 CGOe }@D5YQ6 DGPe P:CodeIndent }H@F5PRH6 DGQeP }6@H5QS66 DGReN }6@J5RT66 DGSeN }@L5SK6 DGTe }@N5^V6 EGUe P:CodeCenter }H@P5UWH6 EGVeP }6@R5VX66 EGWeN }6@T5WY66 EGXeN }@V5XP6 EGYe }@X5c[6 FGZeP:Code }H@Z5Z\H6 FG[eP }6@\5[]66 FG\eN }6@^5\^66 FG]eN }@`5]U6 FG^e }@b5h`6 GG_eP:CellHeading }H@d5_aH6 GG`eP }6@f5`b66 GGaeN }6@h5ac66 GGbeN }@j5bZ6 GGce }@l5me6 HGde P:CellBody }H@n5dfH6 HGeeP }6@p5eg66 HGfeN }6@r5fh66 HGgeN }@t5g_6 HGhe },@v5rj,6 IGie P:Bulleted }H,@x5ikH,,6 IxeLI e Parent = UL Aje Depth = 0 }6,@z5jl6,6 IGkeN }6,@|5km6,6 IGleN },@~5ld,6 IGme }@5wo6 JGne P:BodyList }H@5npH6 JGoeP }6@5oq66 JGpeN }6@5pr66 JGqeN }@5qi6 JGre }@5,t6 KGse P:BodyCenter }H@5suH6 KGteP }6@5tv66 KGueN }6@5uw66 KGveN }@5vn6 KGwe d@zz $$@x$$ 8Cz 8;>PMJGDA$$@x$$/yy 靕l}C<-|. LGe!Copy Files Imported by Reference }C>-{}. LGeN }HC@-|hH. LGe }lClMG e1 }C~MG  eTitle }CMG e }lClNG e3 }CNG e Heading2 }C~NGe }l띜C4l띜OGe2 }띜C띜띜OGUTe Heading1 }띜C띜OGe dLeftdRightd ReferencedddHeadingsd#UNIX Manual Paged 5HTMLd -HTMLd xHTML7f@D NBodyBody.  f@PNTitleBody. f@D N.Due DateBody. f@D N.Due DateBody. f@NE N Numbered1 N:.Numbered. f@N N Numbered N:.\t. f@N N Numbered N:.\t. Ŀ@@ NBody. f@ N Indented. f@T NHeading2Body. f@   Numbered+. f@ N Numbered+. f@ N Numbered+. Ŀ@@ NHeader Double Line. f@T N TableTitleT:Table : . Ŀ@@ NMapping Table Title. Ŀ@@ NMapping Table Cell. f@ N CellFooting. f@E N BulletedBulleted. f@ N Footnote. Ŀ@@ NFooter. f@T NHeading2Body. f@T N HeadingRunInBody. Ŀ@@NMapping Table Title. f@D NBodyBody. $f@AE N$. LetteredA A:.Lettered. f@NE N Numbered1 N:.Numbered. Ŀ@@ NMapping Table Cell. f@ N TableFootnote. f@T N TableTitleT:Table : . f@TNHeading1Body. $f@A N$. Lettered A:.\t. f@D N BodyCenterBody. f@ NRule. @   $H.l..... .D.h....Code. Ŀ@@ N $ H l      D h  ManHeading. f@P N Heading InfoBody. f@ N CellHeading. f@H NExerciseBoldH:Exercise . . f@ N CellHeading. f@ N Hand. f@ NCellBody. @   $H.l..... .D.h.... CodeCenter.  f@PNTitleBody. f@ NBody. $$f@D NBodyListBody. $@   $H.l..... .D.h.... CodeIndent. Ŀ@@ N ManHeading2. Ŀ@@ N ManHeading2. Ŀ@@ N $ H l      D h  ManBody. Ŀ@@ NMapping Table Cell. Ŀ@@NMapping Table Cell. f@ NCellBody. Ŀ@@ NMapping Table Cell. Ŀ@@NMapping Table Cell.  NN N N蜜 N蜜 N N  CodeN蜜Emphasis 33NN蜜EquationVariables/Bold , ۸ Code N N  Code N   NN N蜜 N N蜜NThinMediumDoubleThick@ Very Thin H&5H&5H&5H&5H&5Format AH Mapping Table H&5H&5H&5H&5H&5Format BH Mapping Table GMlh pH  hhh    hhhh . LH>T $H66O "-./01O234h y89:hy;<=h y>?@hyABCh yDEFh yG H I h yJ K L h yM N O h yP Q R  .S T U V  .WXYZ.[\]^ ._`a.bcd.efg .hijk.lmno.pqrs.tuvw.xyz{.|}~...   .   ..L. !6      "6!! !!!"!!#6#"$"%"&"'""K6(#)#*#+#,#%.0$1$2$3$4$&$.5%6%7%8%9%'%.:&;&<&=&>&(&.?'@'A'B'C')'.D(E(F(G(H(*(.I)J)K)L)M)+).N*O*P*Q*R*,*.S+T+U+V+W+-+.X,Y,Z,[,\,.,.]-^-_-`-a-,/-.b.c.d.e.f.0..g/h/i/j/k/1/6l0m0n0o0p0,206q1r1s1t1u1316v2w2x2y2z2,426{3|3}3~33536444446465555 5756 6 6 6 668667777797688888,:8699999,;96:: :!:":<:6#;$;%;&;';=;6(<)<*<+<,<><6-=.=/=0=1=?=62>3>4>5>6>@>67?8?9?:?;?A?6<@=@>@?@@@B@6AABACADAEA,CA6FBGBHBIBJBDB6KCLCMCNCOCEC6PDQDRDSDTDFD6UEVEWEXEYEGE6ZF[F\F]F^FHF6_G`GaGbGcGIG6dHeHfHgHhH,JH6iIjIkIlImIKI6nJoJpJqJrJ#J6sKtKuKvKwK.{L|L}LN~MMMOMNNN띜NOOOComment::d BlackT!WhiteddARedddŝGreendd BluedCyandMagentad YellowHeader/Footer $1Header/Footer $1Header/Footer $2Header/Footer $2IndexIndexCommentCommentSubjectSubjectAuthorAuthorGlossaryGlossaryEquationEquation Hypertext Hypertext  Cross-Ref Cross-Ref Conditional TextConditional TextPositionFMPrivatePositionFMPrivateRangeEndFMPrivateRangeEndFMPrivate HTML Macro HTML Macro M.Times.P Times-Roman FrameRoman M.Times.B Times-Bold FrameRoman M.Courier.PCourier FrameRoman M.Times.BITimes-BoldItalic FrameRoman M.Helvetica.BHelvetica-Bold FrameRoman M.Times.I Times-Italic FrameRoman M.Courier.ICourier-Oblique FrameRoman[Courier+ HelveticaMTimes!Regular$Roman MediumBoldRegular ObliqueItalic u s6k-oa_!cju|nU'LDdX+-+7١jw !o:c7t9Dn'к_5SƂHd~MF"W;h.dk0)[#(g.OZm5`9&eJPjX