Year 2000 Patch for Sun3/Sun3x SunOS 4.1.1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This patch fixes several Y2K quirks of the good ol' SunOS 4.1.1. Beware: There is no warranty of any kind! It works for me so it might be usefull for you. This patch doens't fix all Y2K problems of SunOS 4.1.1, but i hope most of them. Fixes in detail: date: could not set/display a date beyond 2000 w: displays funny login times in 2000 at,atq: Didn't work the next century eeprom: Couldn't set hwupdate libc: strftime and strptime couldn't handle years beyond 2000 touch: could not set dates beyond 2000 bar: Verbose listing shows funny dates passwd: Doesn't handle password aging correctly tmac: Some troff macros didn't handle years beyond 2000 Other fixes: eeprom: can now set/reset diag switch on Sun3/80 Revision history ================ rev_01 - initial revision rev_02 - fixed some typos in the README rev_03 - fixed one typo in the README (never released) rev_04 - the revisions before were errorneously based on the somewhat outdated libc jumbo patch 100267-05. - now the latest libc jumbo patch 100267-09 with all libraries and files is completely included. - fixed typo in /usr/lib/shlib.etc/README rev_05 - fixed some typos in the README Prerequisites ============= If you use the U.S. encryption kit, you need to get 100266-0x instead and build a new shared libc yourself. (rev_04: ...and yes, this is a lot of work...) Installation ============ Unpack and untar the patch: cd /tmp zcat y2kpatch.tar.Z | tar xvf - cd y2kpatch This is for people (like me) who love the -i option of rm/mv/cp but still would like to copy & paste all the following commands: unalias rm unalias mv unalias cp Save old stuff (only if you haven't applied an earlier y2kpatch): mv /usr/kvm/w /usr/kvm/w.Y2K mv /usr/kvm/eeprom /usr/kvm/eeprom.Y2K mv /usr/5bin/touch /usr/5bin/touch.Y2K mv /usr/5bin/date /usr/5bin/date.Y2K mv /usr/bin/date /usr/bin/date.Y2K mv /usr/bin/at /usr/bin/at.Y2K mv /usr/bin/atq /usr/bin/atq.Y2K mv /usr/bin/bar /usr/bin/bar.Y2K cp /usr/bin/passwd /usr/bin/passwd.Y2K mv /usr/man/man8/eeprom.8s /usr/man/man8/eeprom.8s.Y2K mv /usr/lib/tmac/tmac.an /usr/lib/tmac/tmac.an.Y2K mv /usr/lib/tmac/tmac.e /usr/lib/tmac/tmac.e.Y2K mv /usr/lib/tmac/tmac.os /usr/lib/tmac/tmac.os.Y2K mv /usr/lib/tmac/tmac.s /usr/lib/tmac/tmac.s.Y2K Save more old stuff (things that are new to rev_04): mv /usr/lib/libc.a /usr/lib/libc.a.Y2K mv /usr/lib/libc_p.a /usr/lib/libc_p.a.Y2K mv /usr/5lib/libc.a /usr/5lib/libc.a.Y2K mv /usr/5lib/libc_p.a /usr/5lib/libc_p.a.Y2K mv /usr/lib/shlib.etc /usr/lib/shlib.Y2K Install new stuff (only if you haven't applied an earlier y2kpatch): cp `arch -k`/w /usr/kvm/w cp `arch -k`/eeprom /usr/kvm/eeprom chgrp kmem /usr/kvm/w /usr/kvm/eeprom chmod 2755 /usr/kvm/w /usr/kvm/eeprom cp 5bin/touch /usr/5bin/touch cp 5bin/date /usr/5bin/date chmod 755 /usr/5bin/touch /usr/5bin/date cp bin/date /usr/bin/date cp bin/at /usr/bin/at cp bin/atq /usr/bin/atq cp bin/bar /usr/bin/bar cp bin/passwd /usr/bin/passwd chmod 755 /usr/bin/date /usr/bin/at /usr/bin/atq /usr/bin/bar cp man/eeprom.8s /usr/man/man8/eeprom.8s cp lib/tmac/tmac.* /usr/lib/tmac/ chmod 644 /usr/lib/tmac/* chown root.staff /usr/lib/tmac/* Install more new stuff (things that are new to rev_04): cp lib/libc.a /usr/lib/libc.a cp lib/libc_p.a /usr/lib/libc_p.a cp 5lib/libc.a /usr/5lib/libc.a cp 5lib/libc_p.a /usr/5lib/libc_p.a tar cf - shlib | (cd /usr/lib/; tar xf -) mv /usr/lib/shlib /usr/lib/shlib.etc ranlib usr/lib/libc.a /usr/lib/libc_p.a ranlib /usr/5lib/libc.a usr/5lib/libc_p.a Now comes the tricky part. You have to install a new shared libc. This is like applying an appendix lobotomy to yourself, so be careful. I have two shared libc prepared for you, one plain SunOS, the other does have the resolver included (it is in lib/resolver). If you don't know what i'm talking about, you probably want to use the plain SunOS libc. For your convenience, there is a libc_pic.a containing the patched object files in the shlib directory. The single object files can be found in obj: obj/position_independent compiled with -pic obj/profiling compiled with -pg obj/relocatable compiled without flags Ok, here is the procedure for safely installing a new shared libc. Have a look into /usr/lib and see what version number the current shared libc does have: ls -l /usr/lib/libc.s* You should see something like this: -rw-r--r-- 1 root 7560 Oct 30 1993 /usr/lib/libc.sa.0.15 -rw-r--r-- 1 root 482346 Oct 30 1993 /usr/lib/libc.so.0.15 -rw-r--r-- 1 root 483328 Dec 8 1994 /usr/lib/libc.so.0.15.2 This means the current shared libc has version 0.15.2. Copy the appropriate shared libc to /usr/lib and give it the next higher number: cp lib/libc.so* /usr/lib/libc.so.new mv /usr/lib/libc.so.new /usr/lib/libc.so.0.15.3 Now activate the new libc: ldconfig Test it! date ping localhost IMPORTANT: If the output from "date" looks suspicious or ping doesn't work, immediately move the new libc away and reestablish the old one!!! mv /usr/lib/libc.so.0.15.3 /usr/lib/libc.so.defective ldconfig Now do the same with the /usr/5lib/libc.so: ls -l /usr/5lib/libc.s* The output should look like: -rw-r--r-- 1 root 7560 Oct 30 1993 /usr/5lib/libc.sa.1.15 -rw-r--r-- 1 root 483328 Oct 30 1993 /usr/5lib/libc.so.1.15 Copy the new shared library to the apropriate place: cp 5lib/libc.so* /usr/5lib/libc.so.new mv /usr/5lib/libc.so.new /usr/5lib/libc.so.1.15.1 Activate! ldconfig Test! /usr/5bin/time /usr/5bin/banner `/usr/5bin/date` | /usr/5bin/sum If things went well up to now, it's time to reboot the machine: reboot Watch the machine coming up and look for suspicious messages. If everything works ok, congratulations! IMPORTATNT: If you see unusual messages, try to login as root and reboot the machine to single user: reboot -- -s If you can't login anymore, send a BREAK or L1-A and type: g0 at the boot monitor prompt. It will (hopefully) sync the disks. Then boot the machine in single user mode: b -s In single user mode, move the new shared libc away and reboot: mv /usr/lib/libc.so.0.15.3 /usr/lib/libc.so.defective reboot If you get to this messy point, contact me: pkoch@k-town.de