Problem
When a user named "test" uses the /bin/su utility to switch
to another user named "fred", an incorrect entry is logged
to the file /usr/adm/sulog. This entry should contain the
"switched from" and "switched to" users in the form (for this
example) "test-fred", but instead it appears as "root-fred". Cause
su(C) utilizes a function which returns the effective user id
(euid) instead of the real (ruid) of the caller, and writes
this result to /usr/adm/sulog. Since su(C) is a setuid binary
owned by root, the caller's euid is 0 (root), that is, su is
run with an euid of 0. Thus, a typical entry for the example
above looks like:SU 02/07 14:11 + ttyp1 root-fredinstead of the correct:SU 02/07 14:11 + ttyp1 test-fred Solution
SCO has created a new /bin/su binary which writes the ruid
to /usr/adm/sulog instead of the euid, and gives the expected
result. This binary is available upon request from SCO Support
Services. Please follow the steps below to properly install
the new binary, assuming that the binary is initially present
on the system as /tmp/su, and that the operating system platform
is SCO OpenServer Release 5.0.0. The same procedure applies to
OpenServer Release 5.0.2, except that all references to "5.0.0Cl"
(the version number of the Unix component) should be changed to
"5.0.2Dp". In addition, the line in RTS.fl referred to in step 7
below will have different original size and checksum information.1. As root, cd to the directory containing the original su binary:
cd /opt/K/SCO/Unix/5.0.0Cl/bin2. Move the original su binary to another "safe" directory, preferably a directory not accessible by any user other than root.
3. Move /tmp/su to the directory noted in step 1.
4. Change the modes on su (if they aren't set to the values below):
cd /opt/K/SCO/Unix/5.0.0Cl/bin
chmod 6111 su
chgrp auth suThe command "l su" should now yield (except possibly for the date):
---s--s--x 1 root auth 56264 May 16 14:54 su5. Perform a checksum of the su binary:
sum -lr suThis should yield:3470369663 110 su6. Change to the /opt/K/SCO/Unix/5.0.0Cl/.softmgmt directory:cd ../.softmgmt7. Find this line in the file RTS.fl:
RTS.fl:FILE 06111 root auth 1 40552 1950468205 I - - 0 0 ./bin/su
8. Modify both the size and checksum in this line (as given in step 4 and 5 above), so that it reads:
RTS.fl:FILE 06111 root auth 1 56264 3470369663 I - - 0 0 ./bin/su
9. Save the changes to RTS.flNOTE: If you move the original su binary back, the above steps should
be repeated, this time for the original binary instead of the new
one. See also
See the su(C) man pages, for a discussion of how to specify an alternate log file (default is /usr/adm/sulog), and for a description of the types of information found in the sulog entries.