Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

hash builtin improvements



-----BEGIN PGP SIGNED MESSAGE-----

There is a big hole in restricted mode near ``hash sh=/bin/sh; sh''.
This patch restricts that usage of hash.  It also fixes a couple of minor
bugs: ``hash -m foo=bar'' would ignore the -m, and ``hash -d foo'' would
attempt to hash foo both as a directory and a command.  Finally, ash's -v
option to hash is added; this lists hashtable entries as they are added.

 -zefram

begin 644 hash_patch.gz
M'XL("'KY/S,"`VAA<VA?<&%T8V@`[5G[3]M*%OZ9_A4#J[TD-(0DO!H0E6BA
M+1+;LCQT=5M5U+''V"*V4\\X--S;_=OW._/P(W$"J/>Q6MT(2FS/?.?]G3/N
MVMH:.TK<C8\BV!ADX5"&L6A/DJ5NO[^[T=G<V.RRSN[>=F=O:W>IV^[N/EM?
M7W]H0W=W;_/%WE;WV5KU0]=LJ]]K;6]UF+K!6,2%<&YXF['+@#/^+91,2$=F
M@H6"Q4E\S].$W04\9C+@*6<.?N.$10G^)B,9)I`.F"9^_3#V^+=&X(B@^6R9
MA9)'#2GU-?O$\'7=\Z.TR3[C:NRDC=B)>/,3[A\TZ7+L##/>_(S'[7:[V0#$
MSZ$,2)J3WF01CZ5@26JEMEB.?1<.AVP8"DDZ,JP+H9R;1)$3>T"A14PZ@R$G
M39]I2TF;J&G`F.MD@@NUO9`E$S;`0N<6QCN"C1PI>1H+(#:P<,)$D&1#C]9\
MS1+)O6:+0:#68<B-OKZZ-LJ45`%*Y$@W".,;6B%XCJ]</$K#&)!*X>5<X;1.
MX5ELJWF0)G<Q2S+)M"-2CM"F!%OXP*^#-"Z$1H'!$MQ)W8![+<"0,`<>+PD7
MS$\RNDT9XGG<HVWTO.1[)5/D60,@UXGC1!(\)'L((\0Y\:0(01N+\/,&4>>.
M&Q1)8]9"?`JC1DGLD1^+)&JQ$:PNEH<Q8.J=A:`)D;BA(PD"Z:^@:2V93]M+
MN*30SR@&/N9I&5YH"Y`E3B["6M%28"+@<)G*5)E.2)L$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