home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3565 < prev    next >
SHell self-extracting ARchive  |  1991-07-03  |  5.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: SHell self-extracting ARchive (archive/shar).

You can browse this item here: 3565

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news or mail text default
99% file C source, ASCII text default
100% TrID E-Mail message (Var. 2) default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/rfc822 default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 3a 20 62 72 | 65 6e 64 61 6e 40 63 73 |From: br|endan@cs|
|00000010| 2e 77 69 64 65 6e 65 72 | 2e 65 64 75 20 28 42 72 |.widener|.edu (Br|
|00000020| 65 6e 64 61 6e 20 4b 65 | 68 6f 65 29 0a 4e 65 77 |endan Ke|hoe).New|
|00000030| 73 67 72 6f 75 70 73 3a | 20 63 6f 6d 70 2e 75 6e |sgroups:| comp.un|
|00000040| 69 78 2e 61 64 6d 69 6e | 2c 61 6c 74 2e 73 6f 75 |ix.admin|,alt.sou|
|00000050| 72 63 65 73 0a 53 75 62 | 6a 65 63 74 3a 20 47 69 |rces.Sub|ject: Gi|
|00000060| 76 69 6e 67 20 75 73 65 | 72 73 20 61 63 63 65 73 |ving use|rs acces|
|00000070| 73 20 74 6f 20 43 44 52 | 4f 4d 2c 20 50 43 46 53 |s to CDR|OM, PCFS|
|00000080| 2c 20 61 6e 64 20 6f 74 | 68 65 72 20 73 74 75 66 |, and ot|her stuf|
|00000090| 66 0a 4d 65 73 73 61 67 | 65 2d 49 44 3a 20 3c 51 |f.Messag|e-ID: <Q|
|000000a0| 59 2d 41 4d 5a 46 40 63 | 73 2e 77 69 64 65 6e 65 |Y-AMZF@c|s.widene|
|000000b0| 72 2e 65 64 75 3e 0a 44 | 61 74 65 3a 20 31 20 4a |r.edu>.D|ate: 1 J|
|000000c0| 75 6c 20 39 31 20 31 34 | 3a 31 35 3a 35 33 20 47 |ul 91 14|:15:53 G|
|000000d0| 4d 54 0a 0a 6a 63 40 72 | 61 76 65 6e 2e 62 75 2e |MT..jc@r|aven.bu.|
|000000e0| 65 64 75 20 77 72 6f 74 | 65 3a 0a 3e 50 72 6f 62 |edu wrot|e:.>Prob|
|000000f0| 6c 65 6d 3a 20 54 68 65 | 20 63 64 72 6f 6d 20 6e |lem: The| cdrom n|
|00000100| 65 65 64 73 20 74 6f 20 | 62 65 20 75 73 65 64 20 |eeds to |be used |
|00000110| 62 79 20 67 65 6e 65 72 | 61 6c 20 75 73 65 72 73 |by gener|al users|
|00000120| 2e 20 20 48 6f 77 65 76 | 65 72 2c 0a 3e 09 20 6d |. Howev|er,.>. m|
|00000130| 6f 75 6e 74 20 61 6e 64 | 20 75 6d 6f 75 6e 74 20 |ount and| umount |
|00000140| 63 61 6e 20 6f 6e 6c 79 | 20 62 65 20 75 73 65 64 |can only| be used|
|00000150| 20 62 79 20 72 6f 6f 74 | 2c 20 72 65 67 61 72 64 | by root|, regard|
|00000160| 6c 65 73 73 0a 3e 09 20 | 6f 66 20 74 68 65 20 66 |less.>. |of the f|
|00000170| 69 6c 65 20 61 74 74 72 | 69 62 75 74 65 73 2e 20 |ile attr|ibutes. |
|00000180| 20 53 6f 2c 20 63 61 6e | 20 73 6f 6d 65 6f 6e 65 | So, can| someone|
|00000190| 20 73 68 6f 77 20 6d 65 | 20 68 6f 77 0a 3e 09 20 | show me| how.>. |
|000001a0| 74 6f 20 6d 61 6b 65 20 | 73 69 6d 70 6c 65 20 73 |to make |simple s|
|000001b0| 65 74 75 69 64 20 61 6e | 64 20 73 65 74 67 69 64 |etuid an|d setgid|
|000001c0| 20 70 72 6f 67 72 61 6d | 73 20 74 6f 20 73 6f 6c | program|s to sol|
|000001d0| 76 65 0a 3e 09 20 73 75 | 63 68 20 64 69 6c 65 6d |ve.>. su|ch dilem|
|000001e0| 6d 61 3f 20 20 0a 0a 49 | 20 70 75 74 20 74 6f 67 |ma? ..I| put tog|
|000001f0| 65 74 68 65 72 20 73 6f | 6d 65 74 68 69 6e 67 20 |ether so|mething |
|00000200| 75 73 69 6e 67 20 50 65 | 72 6c 20 26 20 61 20 73 |using Pe|rl & a s|
|00000210| 65 74 2d 75 69 64 20 77 | 72 61 70 70 65 72 20 74 |et-uid w|rapper t|
|00000220| 6f 20 64 6f 20 74 68 69 | 73 2e 0a 48 6f 70 65 20 |o do thi|s..Hope |
|00000230| 69 74 27 73 20 6f 66 20 | 68 65 6c 70 20 74 6f 20 |it's of |help to |
|00000240| 79 61 21 20 5b 52 65 67 | 61 72 64 73 20 74 6f 20 |ya! [Reg|ards to |
|00000250| 63 68 6f 67 61 6e 40 6d | 61 74 68 73 2e 74 63 64 |chogan@m|aths.tcd|
|00000260| 2e 69 65 20 2a 6f 72 2a | 0a 68 6f 67 61 6e 40 63 |.ie *or*|.hogan@c|
|00000270| 73 6c 2e 73 72 69 2e 63 | 6f 6d 2c 20 49 20 66 6f |sl.sri.c|om, I fo|
|00000280| 72 67 65 74 20 77 68 69 | 63 68 3b 20 74 68 65 79 |rget whi|ch; they|
|00000290| 20 73 65 6e 74 20 6d 65 | 20 74 68 65 20 66 6f 72 | sent me| the for|
|000002a0| 65 66 61 74 68 65 72 20 | 74 6f 20 74 68 69 73 2e |efather |to this.|
|000002b0| 5d 0a 0a 4f 68 2c 20 74 | 68 69 73 20 77 61 73 20 |]..Oh, t|his was |
|000002c0| 6f 6e 20 61 20 53 75 6e | 20 53 70 61 72 63 31 20 |on a Sun| Sparc1 |
|000002d0| 72 75 6e 6e 69 6e 67 20 | 53 75 6e 4f 53 20 34 2e |running |SunOS 4.|
|000002e0| 31 2e 31 2c 20 75 73 69 | 6e 67 20 70 65 72 6c 20 |1.1, usi|ng perl |
|000002f0| 34 2e 30 20 70 6c 31 30 | 2e 0a 0a 2d 2d 20 63 75 |4.0 pl10|...-- cu|
|00000300| 74 20 2d 2d 0a 23 21 20 | 2f 62 69 6e 2f 73 68 0a |t --.#! |/bin/sh.|
|00000310| 23 20 54 68 69 73 20 69 | 73 20 61 20 73 68 65 6c |# This i|s a shel|
|00000320| 6c 20 61 72 63 68 69 76 | 65 2e 20 20 52 65 6d 6f |l archiv|e. Remo|
|00000330| 76 65 20 61 6e 79 74 68 | 69 6e 67 20 62 65 66 6f |ve anyth|ing befo|
|00000340| 72 65 20 74 68 69 73 20 | 6c 69 6e 65 2c 20 74 68 |re this |line, th|
|00000350| 65 6e 20 75 6e 70 61 63 | 6b 0a 23 20 69 74 20 62 |en unpac|k.# it b|
|00000360| 79 20 73 61 76 69 6e 67 | 20 69 74 20 69 6e 74 6f |y saving| it into|
|00000370| 20 61 20 66 69 6c 65 20 | 61 6e 64 20 74 79 70 69 | a file |and typi|
|00000380| 6e 67 20 22 73 68 20 66 | 69 6c 65 22 2e 20 20 54 |ng "sh f|ile". T|
|00000390| 6f 20 6f 76 65 72 77 72 | 69 74 65 20 65 78 69 73 |o overwr|ite exis|
|000003a0| 74 69 6e 67 0a 23 20 66 | 69 6c 65 73 2c 20 74 79 |ting.# f|iles, ty|
|000003b0| 70 65 20 22 73 68 20 66 | 69 6c 65 20 2d 63 22 2e |pe "sh f|ile -c".|
|000003c0| 20 20 59 6f 75 20 63 61 | 6e 20 61 6c 73 6f 20 66 | You ca|n also f|
|000003d0| 65 65 64 20 74 68 69 73 | 20 61 73 20 73 74 61 6e |eed this| as stan|
|000003e0| 64 61 72 64 20 69 6e 70 | 75 74 20 76 69 61 0a 23 |dard inp|ut via.#|
|000003f0| 20 75 6e 73 68 61 72 2c | 20 6f 72 20 62 79 20 74 | unshar,| or by t|
|00000400| 79 70 69 6e 67 20 22 73 | 68 20 3c 66 69 6c 65 22 |yping "s|h <file"|
|00000410| 2c 20 65 2e 67 2e 2e 20 | 20 49 66 20 74 68 69 73 |, e.g.. | If this|
|00000420| 20 61 72 63 68 69 76 65 | 20 69 73 20 63 6f 6d 70 | archive| is comp|
|00000430| 6c 65 74 65 2c 20 79 6f | 75 0a 23 20 77 69 6c 6c |lete, yo|u.# will|
|00000440| 20 73 65 65 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 | see the| followi|
|00000450| 6e 67 20 6d 65 73 73 61 | 67 65 20 61 74 20 74 68 |ng messa|ge at th|
|00000460| 65 20 65 6e 64 3a 0a 23 | 09 09 22 45 6e 64 20 6f |e end:.#|.."End o|
|00000470| 66 20 73 68 65 6c 6c 20 | 61 72 63 68 69 76 65 2e |f shell |archive.|
|00000480| 22 0a 23 20 43 6f 6e 74 | 65 6e 74 73 3a 20 20 52 |".# Cont|ents: R|
|00000490| 45 41 44 4d 45 20 73 6d | 6f 75 6e 74 2e 70 6c 20 |EADME sm|ount.pl |
|000004a0| 77 72 61 70 70 65 72 2e | 63 0a 23 20 57 72 61 70 |wrapper.|c.# Wrap|
|000004b0| 70 65 64 20 62 79 20 62 | 72 65 6e 64 61 6e 40 6c |ped by b|rendan@l|
|000004c0| 61 76 65 72 6e 65 20 6f | 6e 20 4d 6f 6e 20 4a 75 |averne o|n Mon Ju|
|000004d0| 6c 20 20 31 20 31 30 3a | 31 33 3a 31 30 20 31 39 |l 1 10:|13:10 19|
|000004e0| 39 31 0a 50 41 54 48 3d | 2f 62 69 6e 3a 2f 75 73 |91.PATH=|/bin:/us|
|000004f0| 72 2f 62 69 6e 3a 2f 75 | 73 72 2f 75 63 62 20 3b |r/bin:/u|sr/ucb ;|
|00000500| 20 65 78 70 6f 72 74 20 | 50 41 54 48 0a 69 66 20 | export |PATH.if |
|00000510| 74 65 73 74 20 2d 66 20 | 27 52 45 41 44 4d 45 27 |test -f |'README'|
|00000520| 20 2d 61 20 22 24 7b 31 | 7d 22 20 21 3d 20 22 2d | -a "${1|}" != "-|
|00000530| 63 22 20 3b 20 74 68 65 | 6e 20 0a 20 20 65 63 68 |c" ; the|n . ech|
|00000540| 6f 20 73 68 61 72 3a 20 | 57 69 6c 6c 20 6e 6f 74 |o shar: |Will not|
|00000550| 20 63 6c 6f 62 62 65 72 | 20 65 78 69 73 74 69 6e | clobber| existin|
|00000560| 67 20 66 69 6c 65 20 5c | 22 27 52 45 41 44 4d 45 |g file \|"'README|
|00000570| 27 5c 22 0a 65 6c 73 65 | 0a 65 63 68 6f 20 73 68 |'\".else|.echo sh|
|00000580| 61 72 3a 20 45 78 74 72 | 61 63 74 69 6e 67 20 5c |ar: Extr|acting \|
|00000590| 22 27 52 45 41 44 4d 45 | 27 5c 22 20 5c 28 37 37 |"'README|'\" \(77|
|000005a0| 39 20 63 68 61 72 61 63 | 74 65 72 73 5c 29 0a 73 |9 charac|ters\).s|
|000005b0| 65 64 20 22 73 2f 5e 58 | 2f 2f 22 20 3e 27 52 45 |ed "s/^X|//" >'RE|
|000005c0| 41 44 4d 45 27 20 3c 3c | 27 45 4e 44 5f 4f 46 5f |ADME' <<|'END_OF_|
|000005d0| 46 49 4c 45 27 0a 58 0a | 58 20 53 65 63 75 72 65 |FILE'.X.|X Secure|
|000005e0| 20 4d 6f 75 6e 74 69 6e | 67 0a 58 20 2d 2d 2d 2d | Mountin|g.X ----|
|000005f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0a 58 0a 58 20 |--------|---.X.X |
|00000600| 54 6f 20 75 73 65 20 74 | 68 69 73 20 70 61 63 6b |To use t|his pack|
|00000610| 61 67 65 2c 20 79 6f 75 | 20 6d 75 73 74 3a 0a 58 |age, you| must:.X|
|00000620| 0a 58 09 2d 20 65 64 69 | 74 20 77 72 61 70 70 65 |.X.- edi|t wrappe|
|00000630| 72 2e 63 2c 20 6d 6f 64 | 69 66 79 69 6e 67 20 50 |r.c, mod|ifying P|
|00000640| 45 52 4c 43 4f 44 45 20 | 61 70 70 72 6f 70 72 69 |ERLCODE |appropri|
|00000650| 61 74 65 6c 79 0a 58 09 | 2d 20 63 6f 6d 70 69 6c |ately.X.|- compil|
|00000660| 65 20 77 72 61 70 70 65 | 72 2e 63 2c 20 63 6f 70 |e wrappe|r.c, cop|
|00000670| 79 20 69 74 20 74 6f 20 | 61 20 63 6f 6d 6d 6f 6e |y it to |a common|
|00000680| 20 61 72 65 61 20 28 6c | 69 6b 65 20 2f 75 73 72 | area (l|ike /usr|
|00000690| 2f 6c 6f 63 61 6c 2f 62 | 69 6e 29 2c 0a 58 09 20 |/local/b|in),.X. |
|000006a0| 20 77 69 74 68 20 74 68 | 65 20 6e 61 6d 65 73 20 | with th|e names |
|000006b0| 60 73 6d 6f 75 6e 74 27 | 20 61 6e 64 20 60 75 6e |`smount'| and `un|
|000006c0| 6d 6f 75 6e 74 27 20 26 | 20 6d 61 6b 65 20 69 74 |mount' &| make it|
|000006d0| 20 73 65 74 2d 75 69 64 | 20 74 6f 20 72 6f 6f 74 | set-uid| to root|
|000006e0| 0a 58 09 20 20 28 65 2e | 67 2e 3a 0a 58 09 09 09 |.X. (e.|g.:.X...|
|000006f0| 63 63 20 2d 4f 20 77 72 | 61 70 70 65 72 2e 63 20 |cc -O wr|apper.c |
|00000700| 2d 6f 20 73 6d 6f 75 6e | 74 0a 58 09 09 09 63 70 |-o smoun|t.X...cp|
|00000710| 20 73 6d 6f 75 6e 74 20 | 2f 75 73 72 2f 6c 6f 63 | smount |/usr/loc|
|00000720| 61 6c 2f 62 69 6e 0a 58 | 09 09 09 63 64 20 2f 75 |al/bin.X|...cd /u|
|00000730| 73 72 2f 6c 6f 63 61 6c | 2f 62 69 6e 0a 58 09 09 |sr/local|/bin.X..|
|00000740| 09 6c 6e 20 73 6d 6f 75 | 6e 74 20 75 6e 6d 6f 75 |.ln smou|nt unmou|
|00000750| 6e 74 0a 58 09 09 09 73 | 74 72 69 70 20 73 6d 6f |nt.X...s|trip smo|
|00000760| 75 6e 74 0a 58 09 09 09 | 63 68 6f 77 6e 20 72 6f |unt.X...|chown ro|
|00000770| 6f 74 20 73 6d 6f 75 6e | 74 0a 58 09 09 09 63 68 |ot smoun|t.X...ch|
|00000780| 6d 6f 64 20 75 2b 73 20 | 73 6d 6f 75 6e 74 0a 58 |mod u+s |smount.X|
|00000790| 0a 58 09 20 20 20 62 6f | 74 68 20 73 6d 6f 75 6e |.X. bo|th smoun|
|000007a0| 74 20 26 20 75 6e 6d 6f | 75 6e 74 20 77 69 6c 6c |t & unmo|unt will|
|000007b0| 20 62 65 20 73 65 74 2d | 75 69 64 20 72 6f 6f 74 | be set-|uid root|
|000007c0| 29 0a 58 0a 58 09 2d 20 | 63 6f 70 79 20 73 6d 6f |).X.X.- |copy smo|
|000007d0| 75 6e 74 2e 70 6c 20 74 | 6f 20 77 68 65 72 65 76 |unt.pl t|o wherev|
|000007e0| 65 72 20 79 6f 75 20 64 | 65 63 69 64 65 64 20 77 |er you d|ecided w|
|000007f0| 69 74 68 20 50 45 52 4c | 43 4f 44 45 20 69 6e 20 |ith PERL|CODE in |
|00000800| 77 72 61 70 70 65 72 2e | 63 0a 58 09 2d 20 65 64 |wrapper.|c.X.- ed|
|00000810| 69 74 20 73 6d 6f 75 6e | 74 2e 70 6c 2c 20 63 68 |it smoun|t.pl, ch|
|00000820| 61 6e 67 69 6e 67 20 74 | 68 65 20 6c 65 67 61 6c |anging t|he legal|
|00000830| 20 61 72 72 61 79 20 74 | 6f 20 62 65 20 77 68 61 | array t|o be wha|
|00000840| 74 65 76 65 72 20 64 69 | 72 73 0a 58 09 20 20 79 |tever di|rs.X. y|
|00000850| 6f 75 20 77 69 73 68 20 | 74 6f 20 61 6c 6c 6f 77 |ou wish |to allow|
|00000860| 20 70 65 6f 70 6c 65 20 | 74 6f 20 6d 6f 75 6e 74 | people |to mount|
|00000870| 20 26 20 75 6e 6d 6f 75 | 6e 74 20 61 74 20 77 69 | & unmou|nt at wi|
|00000880| 6c 6c 0a 58 0a 58 20 54 | 6f 20 62 65 20 61 64 64 |ll.X.X T|o be add|
|00000890| 65 64 3a 0a 58 0a 58 09 | 2d 20 6c 6f 67 67 69 6e |ed:.X.X.|- loggin|
|000008a0| 67 20 6f 66 20 6d 6f 75 | 6e 74 69 6e 67 2f 75 6e |g of mou|nting/un|
|000008b0| 6d 6f 75 6e 74 69 6e 67 | 0a 58 0a 58 20 49 66 20 |mounting|.X.X If |
|000008c0| 79 6f 75 20 68 61 76 65 | 20 61 6e 79 20 71 75 65 |you have| any que|
|000008d0| 73 74 69 6f 6e 73 2c 20 | 65 74 63 2c 20 77 72 69 |stions, |etc, wri|
|000008e0| 74 65 20 74 6f 20 62 72 | 65 6e 64 61 6e 40 63 73 |te to br|endan@cs|
|000008f0| 2e 77 69 64 65 6e 65 72 | 2e 65 64 75 2e 0a 45 4e |.widener|.edu..EN|
|00000900| 44 5f 4f 46 5f 46 49 4c | 45 0a 69 66 20 74 65 73 |D_OF_FIL|E.if tes|
|00000910| 74 20 37 37 39 20 2d 6e | 65 20 60 77 63 20 2d 63 |t 779 -n|e `wc -c|
|00000920| 20 3c 27 52 45 41 44 4d | 45 27 60 3b 20 74 68 65 | <'READM|E'`; the|
|00000930| 6e 0a 20 20 20 20 65 63 | 68 6f 20 73 68 61 72 3a |n. ec|ho shar:|
|00000940| 20 5c 22 27 52 45 41 44 | 4d 45 27 5c 22 20 75 6e | \"'READ|ME'\" un|
|00000950| 70 61 63 6b 65 64 20 77 | 69 74 68 20 77 72 6f 6e |packed w|ith wron|
|00000960| 67 20 73 69 7a 65 21 0a | 66 69 0a 23 20 65 6e 64 |g size!.|fi.# end|
|00000970| 20 6f 66 20 27 52 45 41 | 44 4d 45 27 0a 66 69 0a | of 'REA|DME'.fi.|
|00000980| 69 66 20 74 65 73 74 20 | 2d 66 20 27 73 6d 6f 75 |if test |-f 'smou|
|00000990| 6e 74 2e 70 6c 27 20 2d | 61 20 22 24 7b 31 7d 22 |nt.pl' -|a "${1}"|
|000009a0| 20 21 3d 20 22 2d 63 22 | 20 3b 20 74 68 65 6e 20 | != "-c"| ; then |
|000009b0| 0a 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 57 69 |. echo |shar: Wi|
|000009c0| 6c 6c 20 6e 6f 74 20 63 | 6c 6f 62 62 65 72 20 65 |ll not c|lobber e|
|000009d0| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 5c 22 27 |xisting |file \"'|
|000009e0| 73 6d 6f 75 6e 74 2e 70 | 6c 27 5c 22 0a 65 6c 73 |smount.p|l'\".els|
|000009f0| 65 0a 65 63 68 6f 20 73 | 68 61 72 3a 20 45 78 74 |e.echo s|har: Ext|
|00000a00| 72 61 63 74 69 6e 67 20 | 5c 22 27 73 6d 6f 75 6e |racting |\"'smoun|
|00000a10| 74 2e 70 6c 27 5c 22 20 | 5c 28 31 32 39 38 20 63 |t.pl'\" |\(1298 c|
|00000a20| 68 61 72 61 63 74 65 72 | 73 5c 29 0a 73 65 64 20 |haracter|s\).sed |
|00000a30| 22 73 2f 5e 58 2f 2f 22 | 20 3e 27 73 6d 6f 75 6e |"s/^X//"| >'smoun|
|00000a40| 74 2e 70 6c 27 20 3c 3c | 27 45 4e 44 5f 4f 46 5f |t.pl' <<|'END_OF_|
|00000a50| 46 49 4c 45 27 0a 58 23 | 21 2f 75 73 72 2f 62 69 |FILE'.X#|!/usr/bi|
|00000a60| 6e 2f 70 65 72 6c 0a 58 | 23 0a 58 23 20 73 6d 6f |n/perl.X|#.X# smo|
|00000a70| 75 6e 74 2f 75 6e 6d 6f | 75 6e 74 20 76 31 2e 30 |unt/unmo|unt v1.0|
|00000a80| 20 2d 20 30 36 2f 31 32 | 2f 39 31 20 2d 20 62 79 | - 06/12|/91 - by|
|00000a90| 20 42 72 65 6e 64 61 6e | 20 4b 65 68 6f 65 20 28 | Brendan| Kehoe (|
|00000aa0| 62 72 65 6e 64 61 6e 40 | 63 73 2e 77 69 64 65 6e |brendan@|cs.widen|
|00000ab0| 65 72 2e 65 64 75 29 0a | 58 23 20 42 61 73 65 64 |er.edu).|X# Based|
|00000ac0| 20 6f 6e 20 61 20 70 72 | 6f 67 72 61 6d 20 62 79 | on a pr|ogram by|
|00000ad0| 20 63 68 6f 67 61 6e 40 | 6d 61 74 68 73 2e 74 63 | chogan@|maths.tc|
|00000ae0| 64 2e 69 65 20 5b 49 20 | 74 68 69 6e 6b 2c 20 49 |d.ie [I |think, I|
|00000af0| 20 66 6f 72 67 65 74 20 | 3a 2d 29 5d 0a 58 23 0a | forget |:-)].X#.|
|00000b00| 58 28 24 70 72 6f 67 72 | 61 6d 20 3d 20 24 41 52 |X($progr|am = $AR|
|00000b10| 47 56 5b 30 5d 29 20 3d | 7e 20 73 25 2e 2a 2f 25 |GV[0]) =|~ s%.*/%|
|00000b20| 25 3b 0a 58 23 0a 58 23 | 20 4c 69 73 74 20 6f 66 |%;.X#.X#| List of|
|00000b30| 20 64 69 72 65 63 74 6f | 72 69 65 73 20 74 68 61 | directo|ries tha|
|00000b40| 74 20 61 6e 79 62 6f 64 | 79 20 63 61 6e 20 6d 6f |t anybod|y can mo|
|00000b50| 75 6e 74 20 61 6e 64 20 | 75 6e 6d 6f 75 6e 74 3a |unt and |unmount:|
|00000b60| 0a 58 23 0a 58 25 6c 65 | 67 61 6c 20 3d 20 28 22 |.X#.X%le|gal = ("|
|00000b70| 2f 73 72 63 22 2c 20 20 | 20 20 20 20 22 53 6f 75 |/src", | "Sou|
|00000b80| 72 63 65 20 61 72 63 68 | 69 76 65 22 2c 0a 58 09 |rce arch|ive",.X.|
|00000b90| 20 20 22 2f 70 63 66 73 | 22 2c 20 20 20 20 20 22 | "/pcfs|", "|
|00000ba0| 4d 53 2d 44 4f 53 20 44 | 69 73 6b 65 74 74 65 20 |MS-DOS D|iskette |
|00000bb0| 5b 73 61 6d 65 20 61 73 | 20 60 24 70 72 6f 67 72 |[same as| `$progr|
|00000bc0| 61 6d 20 66 6c 6f 70 70 | 79 27 5d 22 2c 0a 58 09 |am flopp|y']",.X.|
|00000bd0| 20 20 22 2f 63 64 72 6f | 6d 22 2c 20 20 20 20 22 | "/cdro|m", "|
|00000be0| 43 44 2d 52 6f 6d 20 20 | 20 20 20 20 20 20 20 20 |CD-Rom | |
|00000bf0| 5b 73 61 6d 65 20 61 73 | 20 60 24 70 72 6f 67 72 |[same as| `$progr|
|00000c00| 61 6d 20 63 64 72 6f 6d | 27 5d 22 2c 0a 58 09 20 |am cdrom|']",.X. |
|00000c10| 20 22 2f 68 6f 6d 65 2f | 78 79 22 2c 20 20 22 54 | "/home/|xy", "T|
|00000c20| 68 65 20 58 79 20 50 72 | 6f 6a 65 63 74 22 2c 0a |he Xy Pr|oject",.|
|00000c30| 58 09 20 20 22 2f 68 6f | 6d 65 2f 66 6f 6f 22 2c |X. "/ho|me/foo",|
|00000c40| 20 22 46 6f 6f 42 61 72 | 20 47 72 6f 75 70 22 20 | "FooBar| Group" |
|00000c50| 29 3b 0a 58 23 0a 58 23 | 20 49 66 20 74 68 65 73 |);.X#.X#| If thes|
|00000c60| 65 20 61 72 65 20 64 69 | 66 66 65 72 65 6e 74 20 |e are di|fferent |
|00000c70| 6f 6e 20 79 6f 75 72 20 | 73 79 73 74 65 6d 2c 20 |on your |system, |
|00000c80| 63 68 61 6e 67 65 20 74 | 68 65 6d 3a 0a 58 23 0a |change t|hem:.X#.|
|00000c90| 58 24 70 72 6f 67 27 6d | 6f 75 6e 74 20 3d 20 22 |X$prog'm|ount = "|
|00000ca0| 2f 65 74 63 2f 6d 6f 75 | 6e 74 22 3b 0a 58 24 70 |/etc/mou|nt";.X$p|
|00000cb0| 72 6f 67 27 75 6d 6f 75 | 6e 74 20 3d 20 22 2f 65 |rog'umou|nt = "/e|
|00000cc0| 74 63 2f 75 6d 6f 75 6e | 74 22 3b 0a 58 24 6d 6e |tc/umoun|t";.X$mn|
|00000cd0| 74 27 63 64 72 6f 6d 20 | 3d 20 22 2f 63 64 72 6f |t'cdrom |= "/cdro|
|00000ce0| 6d 22 3b 09 09 09 23 20 | 77 68 65 72 65 20 79 6f |m";...# |where yo|
|00000cf0| 72 75 20 43 44 20 52 6f | 6d 20 6d 6f 75 6e 74 73 |ru CD Ro|m mounts|
|00000d00| 0a 58 24 6d 6e 74 27 66 | 6c 6f 70 70 79 20 3d 20 |.X$mnt'f|loppy = |
|00000d10| 22 2f 70 63 66 73 22 3b | 09 09 09 23 20 57 68 65 |"/pcfs";|...# Whe|
|00000d20| 72 65 20 79 6f 75 72 20 | 70 63 66 73 20 69 73 20 |re your |pcfs is |
|00000d30| 73 65 74 20 75 70 20 74 | 6f 20 6d 6f 75 6e 74 20 |set up t|o mount |
|00000d40| 6f 6e 0a 58 23 0a 58 23 | 20 2d 2d 20 59 6f 75 20 |on.X#.X#| -- You |
|00000d50| 73 68 6f 75 6c 64 6e 27 | 74 20 68 61 76 65 20 74 |shouldn'|t have t|
|00000d60| 6f 20 63 68 61 6e 67 65 | 20 61 6e 79 74 68 69 6e |o change| anythin|
|00000d70| 67 20 65 6c 73 65 20 2d | 2d 0a 58 73 75 62 20 73 |g else -|-.Xsub s|
|00000d80| 6d 6f 75 6e 74 27 6c 69 | 73 74 65 6d 20 7b 0a 58 |mount'li|stem {.X|
|00000d90| 20 20 20 20 70 72 69 6e | 74 20 22 20 4c 65 67 61 | prin|t " Lega|
|00000da0| 6c 20 64 69 72 65 63 74 | 6f 72 69 65 73 20 61 72 |l direct|ories ar|
|00000db0| 65 3a 5c 6e 22 3b 0a 58 | 20 20 20 20 66 6f 72 65 |e:\n";.X| fore|
|00000dc0| 61 63 68 20 24 64 69 72 | 20 28 73 6f 72 74 20 28 |ach $dir| (sort (|
|00000dd0| 6b 65 79 73 20 6c 65 67 | 61 6c 29 29 20 7b 20 70 |keys leg|al)) { p|
|00000de0| 72 69 6e 74 20 22 5c 74 | 24 64 69 72 5c 74 5c 74 |rint "\t|$dir\t\t|
|00000df0| 28 24 6c 65 67 61 6c 7b | 24 64 69 72 7d 29 5c 6e |($legal{|$dir})\n|
|00000e00| 22 3b 20 7d 0a 58 7d 0a | 58 0a 58 24 6f 70 74 69 |"; }.X}.|X.X$opti|
|00000e10| 6f 6e 20 3d 20 24 41 52 | 47 56 5b 31 5d 3b 0a 58 |on = $AR|GV[1];.X|
|00000e20| 0a 58 69 66 20 28 24 70 | 72 6f 67 72 61 6d 20 65 |.Xif ($p|rogram e|
|00000e30| 71 20 22 75 6e 6d 6f 75 | 6e 74 22 29 20 7b 20 24 |q "unmou|nt") { $|
|00000e40| 4d 4f 55 4e 54 20 3d 20 | 24 70 72 6f 67 27 75 6d |MOUNT = |$prog'um|
|00000e50| 6f 75 6e 74 3b 20 7d 0a | 58 65 6c 73 65 20 7b 20 |ount; }.|Xelse { |
|00000e60| 24 4d 4f 55 4e 54 20 3d | 20 24 70 72 6f 67 27 6d |$MOUNT =| $prog'm|
|00000e70| 6f 75 6e 74 3b 20 7d 0a | 58 0a 58 69 66 20 28 20 |ount; }.|X.Xif ( |
|00000e80| 24 6f 70 74 69 6f 6e 20 | 65 71 20 22 2d 6c 22 20 |$option |eq "-l" |
|00000e90| 29 20 7b 20 26 73 6d 6f | 75 6e 74 27 6c 69 73 74 |) { &smo|unt'list|
|00000ea0| 65 6d 3b 20 65 78 69 74 | 20 30 3b 20 7d 0a 58 0a |em; exit| 0; }.X.|
|00000eb0| 58 65 78 65 63 28 24 4d | 4f 55 4e 54 2c 20 24 6d |Xexec($M|OUNT, $m|
|00000ec0| 6e 74 27 63 64 72 6f 6d | 29 20 69 66 20 24 6f 70 |nt'cdrom|) if $op|
|00000ed0| 74 69 6f 6e 20 65 71 20 | 22 63 64 72 6f 6d 22 3b |tion eq |"cdrom";|
|00000ee0| 0a 58 65 78 65 63 28 24 | 4d 4f 55 4e 54 2c 20 24 |.Xexec($|MOUNT, $|
|00000ef0| 6d 6e 74 27 66 6c 6f 70 | 70 79 29 20 69 66 20 24 |mnt'flop|py) if $|
|00000f00| 6f 70 74 69 6f 6e 20 65 | 71 20 22 66 6c 6f 70 70 |option e|q "flopp|
|00000f10| 79 22 3b 0a 58 69 66 20 | 28 21 20 24 6c 65 67 61 |y";.Xif |(! $lega|
|00000f20| 6c 7b 24 6f 70 74 69 6f | 6e 7d 29 20 7b 20 70 72 |l{$optio|n}) { pr|
|00000f30| 69 6e 74 20 22 49 6c 6c | 65 67 61 6c 20 64 69 72 |int "Ill|egal dir|
|00000f40| 65 63 74 6f 72 79 21 22 | 3b 20 26 73 6d 6f 75 6e |ectory!"|; &smoun|
|00000f50| 74 27 6c 69 73 74 65 6d | 3b 20 65 78 69 74 20 30 |t'listem|; exit 0|
|00000f60| 3b 20 7d 0a 58 65 78 65 | 63 28 24 4d 4f 55 4e 54 |; }.Xexe|c($MOUNT|
|00000f70| 2c 20 24 6f 70 74 69 6f | 6e 29 20 69 66 20 24 6c |, $optio|n) if $l|
|00000f80| 65 67 61 6c 7b 24 6f 70 | 74 69 6f 6e 7d 3b 0a 45 |egal{$op|tion};.E|
|00000f90| 4e 44 5f 4f 46 5f 46 49 | 4c 45 0a 69 66 20 74 65 |ND_OF_FI|LE.if te|
|00000fa0| 73 74 20 31 32 39 38 20 | 2d 6e 65 20 60 77 63 20 |st 1298 |-ne `wc |
|00000fb0| 2d 63 20 3c 27 73 6d 6f | 75 6e 74 2e 70 6c 27 60 |-c <'smo|unt.pl'`|
|00000fc0| 3b 20 74 68 65 6e 0a 20 | 20 20 20 65 63 68 6f 20 |; then. | echo |
|00000fd0| 73 68 61 72 3a 20 5c 22 | 27 73 6d 6f 75 6e 74 2e |shar: \"|'smount.|
|00000fe0| 70 6c 27 5c 22 20 75 6e | 70 61 63 6b 65 64 20 77 |pl'\" un|packed w|
|00000ff0| 69 74 68 20 77 72 6f 6e | 67 20 73 69 7a 65 21 0a |ith wron|g size!.|
|00001000| 66 69 0a 63 68 6d 6f 64 | 20 2b 78 20 27 73 6d 6f |fi.chmod| +x 'smo|
|00001010| 75 6e 74 2e 70 6c 27 0a | 23 20 65 6e 64 20 6f 66 |unt.pl'.|# end of|
|00001020| 20 27 73 6d 6f 75 6e 74 | 2e 70 6c 27 0a 66 69 0a | 'smount|.pl'.fi.|
|00001030| 69 66 20 74 65 73 74 20 | 2d 66 20 27 77 72 61 70 |if test |-f 'wrap|
|00001040| 70 65 72 2e 63 27 20 2d | 61 20 22 24 7b 31 7d 22 |per.c' -|a "${1}"|
|00001050| 20 21 3d 20 22 2d 63 22 | 20 3b 20 74 68 65 6e 20 | != "-c"| ; then |
|00001060| 0a 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 57 69 |. echo |shar: Wi|
|00001070| 6c 6c 20 6e 6f 74 20 63 | 6c 6f 62 62 65 72 20 65 |ll not c|lobber e|
|00001080| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 5c 22 27 |xisting |file \"'|
|00001090| 77 72 61 70 70 65 72 2e | 63 27 5c 22 0a 65 6c 73 |wrapper.|c'\".els|
|000010a0| 65 0a 65 63 68 6f 20 73 | 68 61 72 3a 20 45 78 74 |e.echo s|har: Ext|
|000010b0| 72 61 63 74 69 6e 67 20 | 5c 22 27 77 72 61 70 70 |racting |\"'wrapp|
|000010c0| 65 72 2e 63 27 5c 22 20 | 5c 28 33 33 36 20 63 68 |er.c'\" |\(336 ch|
|000010d0| 61 72 61 63 74 65 72 73 | 5c 29 0a 73 65 64 20 22 |aracters|\).sed "|
|000010e0| 73 2f 5e 58 2f 2f 22 20 | 3e 27 77 72 61 70 70 65 |s/^X//" |>'wrappe|
|000010f0| 72 2e 63 27 20 3c 3c 27 | 45 4e 44 5f 4f 46 5f 46 |r.c' <<'|END_OF_F|
|00001100| 49 4c 45 27 0a 58 23 69 | 6e 63 6c 75 64 65 20 3c |ILE'.X#i|nclude <|
|00001110| 73 74 64 69 6f 2e 68 3e | 0a 58 0a 58 2f 2a 20 6d |stdio.h>|.X.X/* m|
|00001120| 6f 64 69 66 79 20 74 68 | 69 73 20 61 63 63 6f 72 |odify th|is accor|
|00001130| 64 69 6e 67 6c 79 20 2a | 2f 0a 58 23 64 65 66 69 |dingly *|/.X#defi|
|00001140| 6e 65 20 50 45 52 4c 43 | 4f 44 45 20 22 2f 75 73 |ne PERLC|ODE "/us|
|00001150| 72 2f 6c 6f 63 61 6c 2f | 61 64 6d 2f 73 6d 6f 75 |r/local/|adm/smou|
|00001160| 6e 74 2e 70 6c 22 0a 58 | 0a 58 6d 61 69 6e 28 61 |nt.pl".X|.Xmain(a|
|00001170| 72 67 63 2c 20 61 72 67 | 76 29 0a 58 09 69 6e 74 |rgc, arg|v).X.int|
|00001180| 20 61 72 67 63 3b 0a 58 | 09 63 68 61 72 20 2a 2a | argc;.X|.char **|
|00001190| 61 72 67 76 3b 0a 58 7b | 0a 58 20 20 69 66 20 28 |argv;.X{|.X if (|
|000011a0| 61 72 67 63 20 3c 20 32 | 29 20 7b 0a 58 20 20 20 |argc < 2|) {.X |
|000011b0| 20 66 70 72 69 6e 74 66 | 28 73 74 64 65 72 72 2c | fprintf|(stderr,|
|000011c0| 20 22 75 73 61 67 65 3a | 20 25 73 20 5b 20 2d 6c | "usage:| %s [ -l|
|000011d0| 20 7c 20 66 6c 6f 70 70 | 79 20 7c 20 63 64 72 6f | | flopp|y | cdro|
|000011e0| 6d 20 7c 20 2f 6c 65 67 | 61 6c 2d 70 61 74 68 20 |m | /leg|al-path |
|000011f0| 5d 5c 6e 22 2c 0a 58 09 | 2a 61 72 67 76 29 3b 0a |]\n",.X.|*argv);.|
|00001200| 58 20 20 20 20 65 78 69 | 74 28 31 29 3b 0a 58 20 |X exi|t(1);.X |
|00001210| 20 7d 0a 58 20 20 73 65 | 74 75 69 64 28 67 65 74 | }.X se|tuid(get|
|00001220| 65 75 69 64 28 29 29 3b | 0a 58 20 20 65 78 65 63 |euid());|.X exec|
|00001230| 6c 28 50 45 52 4c 43 4f | 44 45 2c 20 2a 61 72 67 |l(PERLCO|DE, *arg|
|00001240| 76 2c 20 2a 61 72 67 76 | 2c 20 2a 28 61 72 67 76 |v, *argv|, *(argv|
|00001250| 20 2b 20 31 29 2c 20 28 | 63 68 61 72 20 2a 29 30 | + 1), (|char *)0|
|00001260| 29 3b 0a 58 7d 0a 45 4e | 44 5f 4f 46 5f 46 49 4c |);.X}.EN|D_OF_FIL|
|00001270| 45 0a 69 66 20 74 65 73 | 74 20 33 33 36 20 2d 6e |E.if tes|t 336 -n|
|00001280| 65 20 60 77 63 20 2d 63 | 20 3c 27 77 72 61 70 70 |e `wc -c| <'wrapp|
|00001290| 65 72 2e 63 27 60 3b 20 | 74 68 65 6e 0a 20 20 20 |er.c'`; |then. |
|000012a0| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 5c 22 27 77 | echo sh|ar: \"'w|
|000012b0| 72 61 70 70 65 72 2e 63 | 27 5c 22 20 75 6e 70 61 |rapper.c|'\" unpa|
|000012c0| 63 6b 65 64 20 77 69 74 | 68 20 77 72 6f 6e 67 20 |cked wit|h wrong |
|000012d0| 73 69 7a 65 21 0a 66 69 | 0a 23 20 65 6e 64 20 6f |size!.fi|.# end o|
|000012e0| 66 20 27 77 72 61 70 70 | 65 72 2e 63 27 0a 66 69 |f 'wrapp|er.c'.fi|
|000012f0| 0a 65 63 68 6f 20 73 68 | 61 72 3a 20 45 6e 64 20 |.echo sh|ar: End |
|00001300| 6f 66 20 73 68 65 6c 6c | 20 61 72 63 68 69 76 65 |of shell| archive|
|00001310| 2e 0a 65 78 69 74 20 30 | 0a 2d 2d 20 63 75 74 20 |..exit 0|.-- cut |
|00001320| 2d 2d 0a 2d 2d 20 0a 20 | 20 20 20 20 42 72 65 6e |--.-- . | Bren|
|00001330| 64 61 6e 20 4b 65 68 6f | 65 20 2d 20 57 69 64 65 |dan Keho|e - Wide|
|00001340| 6e 65 72 20 53 75 6e 20 | 4e 65 74 77 6f 72 6b 20 |ner Sun |Network |
|00001350| 4d 61 6e 61 67 65 72 20 | 2d 20 62 72 65 6e 64 61 |Manager |- brenda|
|00001360| 6e 40 63 73 2e 77 69 64 | 65 6e 65 72 2e 65 64 75 |n@cs.wid|ener.edu|
|00001370| 0a 20 20 57 69 64 65 6e | 65 72 20 55 6e 69 76 65 |. Widen|er Unive|
|00001380| 72 73 69 74 79 20 69 6e | 20 43 68 65 73 74 65 72 |rsity in| Chester|
|00001390| 2c 20 50 41 20 20 20 20 | 20 20 20 20 20 20 20 20 |, PA | |
|000013a0| 20 20 20 20 41 20 42 6c | 6f 6f 64 79 20 53 75 6e | A Bl|oody Sun|
|000013b0| 2d 44 65 63 20 57 61 72 | 20 5a 6f 6e 65 0a 54 6f |-Dec War| Zone.To|
|000013c0| 70 20 54 65 6e 20 53 75 | 72 70 72 69 73 65 73 20 |p Ten Su|rprises |
|000013d0| 69 6e 20 52 6f 63 6b 79 | 20 56 20 2d 2d 20 4e 75 |in Rocky| V -- Nu|
|000013e0| 6d 62 65 72 20 35 2c 20 | 4c 6f 76 65 61 62 6c 65 |mber 5, |Loveable|
|000013f0| 20 43 68 61 72 61 63 74 | 65 72 20 43 68 65 77 62 | Charact|er Chewb|
|00001400| 61 63 63 61 20 44 69 65 | 73 0a |acca Die|s. |
+--------+-------------------------+-------------------------+--------+--------+