Patch Name: PHCO_26385 Patch Description: s700_800 11.11 newgrp(1) cumulative patch Creation Date: 03/08/23 Post Date: 03/09/16 Hardware Platforms - OS Releases: s700: 11.11 s800: 11.11 Products: N/A Filesets: OS-Core.CAUX-ENG-A-MAN,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP OS-Core.CMDS-AUX,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP Automatic Reboot?: No Status: General Release Critical: Yes PHCO_26385: HANG newgrp(1) sometimes hang when the user is not a member of the specified group. Category Tags: defect_repair general_release critical halts_system Path Name: /hp-ux_patches/s700_800/11.X/PHCO_26385 Symptoms: PHCO_26385: ( SR:8606197273 CR:JAGad66466 ) newgrp(1) sets the core limit of the shell to zero. ( SR:8606259121 CR:JAGae23439 ) In some cases, newgrp(1) does not set the environment variables correctly. ( SR:8606315326 CR:JAGae78050 ) newgrp(1) sometimes hang when the user is not a member of the specified group. PHCO_23083: ( SR:8606176552 CR:JAGad45791 ) newgrp is not changing user group properly Defect Description: PHCO_26385: ( SR:8606197273 CR:JAGad66466 ) newgrp(1) sets the core limit of the shell to zero. The problem can be reproduced as follows: $/usr/bin/sh $ulimit -c #corelimit size 4194303 $/usr/bin/newgrp $ulimit -c 0 <---- Not expected $ This is happening because newgrp(1) is setting the core limit to zero during the execution and not resetting the core limit before execing the new shell. Resolution: Now the code is modified to store the value of core limit before setting it to zero and resetting the core limit with the original value before execing the new shell. ( SR:8606259121 CR:JAGae23439 ) In some cases, newgrp(1) does not set the environment variables correctly. Resolution: Now the code has been modified to resolve the above problem. ( SR:8606315326 CR:JAGae78050 ) On a system where NIS is not configured, newgrp(1) hangs when the user is not a member of the specified group, the specified group does not have password and the specified group is the last entry in the group database. The problem can be reproduced as follows: $tail -n 1 /etc/group group5::50: $id uid=202(tmpuser) gid=60(ssgrp) groups=21(tmpuser) $/usr/bin/newgrp group5 newgrp(1) hangs. Press Ctrl-C to terminate. Under the above scenario, newgrp(1) was not checking the EOF condition properly resulting in an infinite loop. Resolution: Now the code has been modified so that it exits with an error message "Sorry". As part of the fix, the WARNING section of man page of newgrp(1) is updated with the behavior of newgrp(1) for the specified group having inconsistent multiple entries in the group database. PHCO_23083: ( SR:8606176552 CR:JAGad45791 ) newgrp is not changing user group properly. Because uninitialised variable were used for password comparison. Resolution: Now the code is changed so that variables are initialized before their usage. Enhancement: No SR: 8606176552 8606197273 8606259121 8606315326 Patch Files: OS-Core.CAUX-ENG-A-MAN,fr=B.11.11,fa=HP-UX_B.11.11_32/64, v=HP: /usr/share/man/man1.Z/newgrp.1 OS-Core.CMDS-AUX,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: /usr/bin/newgrp what(1) Output: OS-Core.CAUX-ENG-A-MAN,fr=B.11.11,fa=HP-UX_B.11.11_32/64, v=HP: /usr/share/man/man1.Z/newgrp.1: None OS-Core.CMDS-AUX,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: /usr/bin/newgrp: newgrp.c $Date: 2003/08/21 09:18:54 $Revision: r11.1 1/6 PATCH_11.11 (PHCO_26385) $Revision: @(#) newgrp CUP11.11_BL2003_0823_1 PATCH_ 11.11 PHCO_26385 Sat Aug 23 01:35:32 PDT 2003 $ cksum(1) Output: OS-Core.CAUX-ENG-A-MAN,fr=B.11.11,fa=HP-UX_B.11.11_32/64, v=HP: 2789647901 2196 /usr/share/man/man1.Z/newgrp.1 OS-Core.CMDS-AUX,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: 3187997103 16384 /usr/bin/newgrp Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHCO_23083 Equivalent Patches: None Patch Package Size: 40 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_26385 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHCO_26385.depot By default swinstall will archive the original software in /var/adm/sw/save/PHCO_26385. 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_26385.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHCO_26385.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHCO_26385.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None