Patch Name: PHCO_25796 Patch Description: s700_800 11.00 cumulative patch for /sbin/init Creation Date: 01/12/20 Post Date: 02/01/07 Hardware Platforms - OS Releases: s700: 11.00 s800: 11.00 Products: N/A Filesets: OS-Core.UX-CORE,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP Automatic Reboot?: Yes Status: General Release Critical: No (superseded patches were critical) PHCO_14105: HANG Previous patch was critical. PHCO_13213: OTHER booting to single_user mode causes init to hang, resulting in unusable system. It was a critical defect. Category Tags: defect_repair general_release critical halts_system Path Name: /hp-ux_patches/s700_800/11.X/PHCO_25796 Symptoms: PHCO_25796: 1. init(1m) hangs when two or more processes started by init die (call exit, etc) at very nearly exactly the same time. 2. Console window hangs when the system returns to multiuser run level 3, from single user mode. 3. init(1m) behaves unpredictably because of incorrect use of pwd_shell. PHCO_22664: 1. Boot records are not getting added if /var is a mounted filesystem. 2. Console hangs in single-user mode. 3. init(1m) should execle non-login shell to prevent problems with profiles. 4. init(1m) writes error message into utmpx file, preventing further logins PHCO_14105: 1. Missing "critical" tag in the Category Tags field of the previous patch PHCO_13213. PHCO_13213: 1. If shared library is missing or /etc/pam.conf wrong, booting system into single user will cause /sbin/init to go into infinite loop. Defect Description: PHCO_25796: 1. init(1m) hangs when two or more processes started by init die (call exit, etc) at very nearly exactly the same time. This problem can be reproduced by making two or more init started processes to die at same time. This is a problem of race condition, and lot depends on the current happenings/load, hence can not be consistently reproduced. This was because, In case of a race condition( like two processes dying at same time ) an uninitialized pointer was getting accessed. Resolution: Now the code is changed to address this issue. It is taken care that, the pointer is properly initialized before being accessed. 2. The console window hangs when the system returns to multiuser of run level 3(init 3) from single user mode. The problem can be reproduced as follows: 1.Get the console window(win1) on your work station. 2.Get one more root window(win2) of the same system. 3.On root window(win2) type "init s"(to go to single user mode). 4.Console window displays sysconf file is getting transferred to root window pty(win2) and hangs (expected). 5.Root window(win2) will get sysconf file. 6.Type 'init 3' from root window(win2). 7.sysconf file should return back to console window and back to normal operational mode, however console window never comes back to normal from HANG mode(unexpected). This was because, signal(SIGWINCH) was assigned to run level 3, so whenever 'init 3' was called, SIGWINCH is sent to init, but the init was expecting SIGTRAP to move to run level 3. Resolution: Now the condition is changed to check for SIGWINCH and not SIGTRAP. 3. init(1m) was behaving unpredictably when the pw_shell entry for root in /etc/passwd was null or some invalid shell name with length less than 8. The problem can be reproduced as follows: 1.Modify the entry for root in /etc/passwd file with entry corresponding to pw_shell being made null or some invalid shell name - the length of the shell path being less than 8. 2.Reboot the system. 3.Bring the system in single user mode. 4.The system should come up properly flahing a warning about corrupted shell entry. But the system doesn't behave in expected manner. When the pw_shell( current shell) entry in /etc/passwd is null, pw_shell shell was not assigned any memory. If the pw_shell entry is null or some invalid shell, init tries to copy the contents of SH2 to pwd_entry causing a data corruption. Resolution: Now the code is changed to make pw_shell point to SH2 in case it is null or some invalid shell. PHCO_22664: 1. init is not able to add boot records to /var/adm/wtmp when /var is a mounted file system which will not be available initially during boot time. Resolution: Now init(1m) forks a child which checks every 20 seconds that /var is available(mounted) or not. Whenever it is available it writes the boot records in /var/adm/wtmp. Child checks for availability of /var/adm/wtmp upto maximum 50 times. 2. Console hangs in single-user mode.This is because init(1m) applies bad termios. Problem is due to an unset CREAD termio control flag in the /etc/ioctl.syscon. Resolution: Now the code is changed to address this issue. 3. init(1m) should execle non-login shell to prevent problems with profiles. Resolution: Changed the shell structure "-sh" to "sh". 4. init(1) deamon writes error messages to stderr. The message written to perror goes to one of the open files. For example. The init(1m) may write to utmpx file. This will disallow the rlogin or telnet. Resolution: Now the code is changed to address this issue. Now all the error messages will be written to syslogd(1m) log file. PHCO_14105: 1. Missing "critical" tag in the Category Tags field of the previous patch PHCO_13213. PHCO_13213: 1. Under some conditions, /usr/bin/su fails. This is the first shell tried by /sbin/init when booted into single user mode, and failure of su in some situations results in /sbin/init entering into an infinite loop, rendering the system unusable. Resolution: Now the code is changed to address this issue. SR: 8606204653 8606224172 8606227506 8606146517 8606112360 8606110998 5003415802 4701374371 Patch Files: OS-Core.UX-CORE,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /sbin/init what(1) Output: OS-Core.UX-CORE,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /sbin/init: $ PATCH/11.00:PHCO_19491 Aug 9 1999 09:51:13 $ $Revision: 82.3.1.7 $ PATCH_11_00: account.o init.o inittab.o proctable.o utility.o hpux_rel.o 01/12/20 cksum(1) Output: OS-Core.UX-CORE,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 905173170 307200 /sbin/init Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHCO_13213 PHCO_14105 PHCO_22664 Equivalent Patches: None Patch Package Size: 320 KBytes Installation Instructions: Please review all instructions and the Hewlett-Packard SupportLine User Guide or your Hewlett-Packard support terms and conditions for precautions, scope of license, restrictions, and, limitation of liability and warranties, before installing this patch. ------------------------------------------------------------ 1. Back up your system before installing a patch. 2. Login as root. 3. Copy the patch to the /tmp directory. 4. Move to the /tmp directory and unshar the patch: cd /tmp sh PHCO_25796 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHCO_25796.depot By default swinstall will archive the original software in /var/adm/sw/save/PHCO_25796. If you do not wish to retain a copy of the original software, include the patch_save_files option in the swinstall command above: -x patch_save_files=false WARNING: If patch_save_files is false when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. For future reference, the contents of the PHCO_25796.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHCO_25796.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHCO_25796.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None