Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!ucsd!sdcsvax!ucsdhub!jack!portnoy!ag From: ag@portnoy.CTS.COM (Keith Gabryelski) Newsgroups: comp.unix.xenix Subject: Xenix 286 crypt fix. Message-ID: <112@portnoy.CTS.COM> Date: 2 Apr 88 00:30:30 GMT Reply-To: ag@portnoy.CTS.COM (Keith Gabryelski) Organization: The Meadow Party, San Diego, CA Lines: 325 Summary: binary diff for 286 systems. See previous post for an explanation of the bug and a test program. This binary patch is for 286 SCO Xenix users. I could have just as easily posted just the new crypt.o, but to avoid any legal problems I made it so that you have to have the old broken crypt.o in order to get the new one. The bug was found and fixed by myself Michael Ditto (ford@kenobi.UUCP) using only our bare hands and adb (Well, with some help from M-x compare-windows, etc.). #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create the files: # ORIGScrypt.o (A copy of the old (broken) Scrypt.o) # ORIGMcrypt.o (A copy of the old (broken) Mcrypt.o) # ORIGLcrypt.o (A copy of the old (broken) Lcrypt.o) # NEWScrypt.o (A copy of the new (fixed) Scrypt.o) # NEWMcrypt.o (A copy of the new (fixed) Mcrypt.o) # NEWLcrypt.o (A copy of the new (fixed) Lcrypt.o) # The new [SML]crypt.o will also be installed in /lib/[SML]libc.a # # This archive created: Fri Apr 1 10:17:23 1988 export PATH; PATH=/bin:$PATH if test -f 'Lpatch' then echo shar: will not over-write existing file "'Lpatch'" else cat << \SHAR_EOF > 'Lpatch' begin 666 Lpatch M ( #@ R#ZPN(!P!-4VT03LMKB 6?1=('Q4N("9],TP4.#Q)1V!^( M")],TP4."BG+;8@&G3#Q?X;9V98U!D1!%@@''U\37AH"#0\ :Q<+4 87$$%& M$ $41Y !14514$"&P]6%TL1$0=77 *#:5%,*7P0#+.QDFP,!"= $!4Y1 MP9T! ?*8!P=/ 0J? %"\@,(06N=D@$!FV4+_P8 :F8\@)6GPP" @("!D( M1@6 C7+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Z_Q(;#VZP-AIM/KL(XQ )A"?Z$8J%=>0/DU@V1E:"[+HB; M1X/_("N/ E, 6@$F,U;=,6K]N^H[00+_P?^U&N#8ABA,N-=X)I8%)P)B!XH M!$=&U*DLBB_"UT(&@MWX9/;RLW^MW(@^-:V3 _N5%F2Y!@ K3!?\#_=. M1P 44 '&T)@EC.H4 LK(V?$<^X]4HS+C"L'!K3Y/Y:?@0 JOHM=;AZ$7H$ MQ>T 1?^;U=BA>W-&=@^7T+XK_T1+2BWV,["!)\R+'HF?$<^^1HQ&"68/P(X" M+OW1MKR%;@GH"*9VL$8'"2@&C$O6^"[<$0">=@*?T+\K_G)+ $"#">SW7*%W M<\/(,6[\IE::]^Z+V E%=D4(-J%ZZMP83)YVB5@H=9>>=7"^!O<995-2":%T MFT[% 4'_1T#_%H$Z>@5U53YIQBR'6*Z=@W[^6OW A0!]^),Z%*-RW4*X@_X@ M@VV@>J(" '?0DMR*.+3?F,[W88 O8,'>=T0_8>'4*/O^+)M$>&' K>$Y>^'# MD=DXY!6 .Q=*H%)$14N4NB590FV;SNUH&L)2ZL#KA<*=AL*J R(U6":Q6!N) M6!&-6!296 Z=6%IA4+BAF *0 *[ * * *+ @*L -U -F @.F ND MR<>O5%J0,%J4$EJ%')-&6:VN6:2P69>568UJ6XYPD#M9'H)9$H1;>959=)E; M;F%98F=97W9;5GU;0DA;15=;L2M9M3I;HP5;IAQ;DN=;EO!;C/M;\LY;X]19 MY]I9U*-3PFZ<1H2(Q1PIQXV99/^9;L12N]R[$Q[LP$].P ^K \Z:6\T,6<(8 M6<)W end SHAR_EOF fi # end of overwriting check if test -f 'Mpatch' then echo shar: will not over-write existing file "'Mpatch'" else cat << \SHAR_EOF > 'Mpatch' begin 666 Mpatch M ( #@ R#ZPN(!P!-4VT03LMKB 6?1=('Q4N("9]-TP0.#Q)0V!Z( M")]-TP0."BC+;(@&G3#P?X39VI8U!D1!%@@''U\37AH"#0\ :Q<+4 87$$%& M$ $41Y !14514$"&P]6%T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F5$&#[ @ 40 /7YK(7BA[-%?6+W67Q/ L\'Q0OW11]) M_J-[L89O@&>#I8EN /P9>@,=P(8BAF^ 9ZIU;//-!;+[B);/BXM.Q'S?7(X< M;0$)^T83]AVAZ'8JN EZJ']H=+9T!M;]F/B+ZE$XHWHC'0^ =2'D;MMTE,]# MBID QL*$#P( F(V62T0+_@?_%7XC5LZB0=#+[""#V!"'UP.+"5"C]X$'UT1\ MK-VAR9FHX*-@SCOV0.8"H+\H; X#*P^N! BF1B@K"&7-)@-&Z_LB M1XR\<+X&]QEE4U()T5.;SL4'OGJXL6UUVO8$6_6@".B^*/.^$=B(B5B 3D*^ M"#:A>NO<&$R>=HEP*+A2F?C$OD9T$(FD#ZK>+UA9_M9#TV4&?.B#Q3HJQ?T M( +OJ+ Y07U^_G&!U>6X1@"*L1 #7)"%;H=F CI"@0?E GQHO5_Z+O9X7B%Z MIII"1A^'(*'1FUE(LF+BBH%2%T.SFX$E8 M*B??&L&8FGJ:R4]:-I\!

3A8?Q-8UUA+ MI5A$K5BWLUBNO%B;EEB,FEJ#:%CZ;%K\=5C@>5CD2%LY45LJ7E,@X)P!<@(! M7P(!/P !VP !Q0(!P@ !P !M (!1P !20 !1P !?P !3P( MP D ((GLG' MA2A;ZS5;YCY9V@!;U0]3P]V>K.^YQ'B>PS/LH1STH2>?Q%N9FRSMO3OKG4.? 2S'#ZJD'OO6[K&A&=V(U4 ZWD end SHAR_EOF fi # end of overwriting check if test -f 'Spatch' then echo shar: will not over-write existing file "'Spatch'" else cat << \SHAR_EOF > 'Spatch' begin 666 Spatch M ( #@ R#ZPN(!P!-4VT03LMKB 6?1=('Q4N("9]3TQH.#Q)6V!B( M")]3TQH."B;+8H@&G3#N?Y#9S98N!D1!%@@''U /41H,$5P72P<*01I!'A M4 5%$ !1 DH-'!I7"T8,$5 14!%LRSB8+ZHKP <"@)ELF$](2TD%!,29N9A/ M $@'!P8-F0V83VI,8@T)D)N1F@K_ 0 ' :IGEN<#0,! 0,# 05#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4F@%H @$0 $& $' $- #E #* ,R M @-% $- R<$%H)\EI"^I.T68X\6X$)6?,46>OC6>WP6=KY6<#$6<39 M6C;?6BJD6B.H6B>\6A:"6@YG6GMT6#9\DYU9"Q!;#QE; 'xorit.c' #include #define DEC(c) (((c) - ' ') & 077) #define xorit(ch) putchar((ch)^getc(orig)) main(argc, argv) int argc; char *argv[]; { int n; FILE *orig; char a, b, c, d; if (argc<3) { fprintf(stderr, "Usage: xorit \n"); exit(-1); } if ((orig=fopen(argv[1], "r")) == NULL) { perror(argv[1]); exit(1); } if (freopen(argv[2], "r", stdin) == NULL) { perror(argv[2]); exit(1); } if (scanf("begin %*o %*s ")) { fputs("xorit: bad uudecode input\n", stderr); exit(1); } while ((n=getchar()) != EOF && (n=DEC(n))!=0) { while (n>0) { a = DEC(getchar()); b = DEC(getchar()); c = DEC(getchar()); d = DEC(getchar()); if (n-- > 0) xorit(a << 2 | b >> 4); if (n-- > 0) xorit(b << 4 | c >> 2); if (n-- > 0) xorit(c << 6 | d); } if ( (n=getchar()) != '\n' ) { fputs("xorit: bad uudecode input\n", stderr); exit(1); } } exit(0); } SHAR_EOF fi # end of overwriting check set -e echo "Extracting the old [SML]crypt.o from [SML]libc..." ar x /lib/Slibc.a crypt.o mv crypt.o ORIGScrypt.o ar x /lib/Mlibc.a crypt.o mv crypt.o ORIGMcrypt.o ar x /lib/Llibc.a crypt.o mv crypt.o ORIGLcrypt.o echo "Making the patch..." cc -o xorit xorit.c ./xorit ORIGScrypt.o Spatch > Scrypt.o ./xorit ORIGMcrypt.o Mpatch > Mcrypt.o ./xorit ORIGLcrypt.o Lpatch > Lcrypt.o echo "Installing the new [SML]crypt.o into [SML]libc..." mv Scrypt.o crypt.o ar r /lib/Slibc.a crypt.o mv crypt.o NEWScrypt.o cp ORIGScrypt.o /lib # Save a copy for future reference mv Mcrypt.o crypt.o ar r /lib/Mlibc.a crypt.o mv crypt.o NEWMcrypt.o cp ORIGMcrypt.o /lib # Save a copy for future reference mv Lcrypt.o crypt.o ar r /lib/Llibc.a crypt.o mv crypt.o NEWLcrypt.o cp ORIGLcrypt.o /lib # Save a copy for future reference echo "Cleaning up..." rm xorit xorit.c Spatch Mpatch Lpatch echo "All done." # End of shell archive exit 0 -- [ Keith ] UUCP: {cbosgd, hplabs!hp-sdd, sdcsvax, nosc}!crash!portnoy!ag [Gabryelski] INET: ag@portnoy.cts.com ARPA: crash!portnoy!ag@nosc.mil