Patch Name: PHCO_30420 Patch Description: s700_800 11.11 pax(1) cumulative patch Creation Date: 04/02/11 Post Date: 04/03/03 Hardware Platforms - OS Releases: s700: 11.11 s800: 11.11 Products: N/A Filesets: OS-Core.UX-CORE,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP Automatic Reboot?: No Status: General Release Critical: No Category Tags: defect_repair enhancement general_release Path Name: /hp-ux_patches/s700_800/11.X/PHCO_30420 Symptoms: PHCO_30420: ( SR:8606333596 CR:JAGae94684 ) pax(1) does not restore the mode of symbolic links correctly. Users will see mode as specified by umask settings of the system for each restored symbolic link file. For example, let file 1 exist on /paxtest: # umask 0444 # ln -s 1 lnk1 # ll /paxtest total 2 -rw-rw-rw- 1 root sys 39 May 31 00:24 1 l-wx-wx-wx 1 root sys 1 May 31 00:12 lnk1 -> 1 # pax -pe -wvf /dev/rmt/0m /paxtest1 # rm /paxtest1 # umask 747 # pax -pe -rvf /dev/rmt/0m /paxtest1 # ll /paxtest1 total 2 -rw-rw-rw- 1 root sys 39 May 31 03:43 1 l----wx--- 1 root sys 1 May 31 03:43 lnk1 -> 1 The mode on the symbolic link, lnk1, have changed, reflecting the current umask (747). ( SR:8606333583 CR:JAGae94671 ) pax(1) creates a file with 0 bytes when the -k option is used. For example, while copying contents of /a to /b: # cd /a # ll -rw-rw-rw- 1 root sys 39 May 31 00:24 file1 -rw-rw-rw- 1 root sys 9 May 31 00:24 file2 -rw-rw-rw- 1 root sys 3 May 31 00:24 file3 # pax -rwktv . /b # cd /b # ll -rw-rw-rw- 1 root sys 0 May 31 00:24 file1 -rw-rw-rw- 1 root sys 9 May 31 00:24 file2 -rw-rw-rw- 1 root sys 3 May 31 00:24 file3 The first file in /b now contains 0 bytes. PHCO_28414: ( SR:8606279428 CR:JAGae43481 ) Any attempt to backup a file of size 2GB or greater using pax(1M) results in the following failure. > 2GB. Not Dumped. ( SR:8606292410 CR:JAGae56173 ) When pax(1M) needs user attention, it opens /dev/tty to display messages. If this happens when the command is run from a cron/at job the open fails because there is no controlling terminal and we get the following message. pax: Unable to prompt user: /dev/tty is unavailable PHCO_26422: ( SR:8606231186 CR:JAGae00424 ) The command pax(1) does not restore the mode and ownership of symbolic link files correctly. Users will see unexpected mode and ownership for each restored symbolic link file. ( SR:8606182453 CR:JAGad51670 ) The command pax(1) does not close each open file correctly. Users will see the following error messages: pax: XXXX : Too many open files ( SR:8606196471 CR:JAGad65674 ) Enhancement request: pax(1) is enhanced to support the archival of files up to 8GB in USTAR format from 2GB. The command tar(1) is upgraded to support the archival of files up to 8GB as well. PHCO_25393: ( SR:8606221083 CR:JAGad90219 ) When using pax's copy mode, -rw, SUID/SGID bits are not restored. Example : (current user is ville) $chmod 4755 toto $ll total 2 -rwsr-xr-x 1 ville users 18 Aug 20 11:20 toto $mkdir titi $pax -pe -rw toto titi $ll total 2 drwx--x--x 2 ville users 96 Aug 20 11:21 titi -rwsr-xr-x 1 ville users 18 Aug 20 11:20 toto $cd titi $ll total 2 -rwx--x--x 1 ville users 18 Aug 20 11:20 toto $ Note: destination file toto (in directory titi) has lost his suid bit, although -pe option was used. ( SR:8606215972 CR:JAGad85144 ) Pax unable to restore UIG/GID > 60k. Upon retrieving an archive using pax, the UID/GID greater than 60K were replaced by the UID/GID of the current process. Defect Description: PHCO_30420: ( SR:8606333596 CR:JAGae94684 ) pax(1) is affected by the umask of the user and will restore the mode of the symbolic link based on the umask of the user restoring the file, as opposed to what the actual mode was on tape. Resolution: We resolve the defect by creating symbolic links with their original mode. ( SR:8606333583 CR:JAGae94671 ) The pax(1) command reserves the file descriptor '0' for its internal usage and file descriptor '0' should not be be closed.But current pax(1) code does not ensure this before closing the file descriptor.The next file that is opened will get 0 assigned as its file descriptor because the kernel assigns the lowest available value. Now file descriptor 0 is not accepted by other routines. This causes pax(1) to skip writing data to the file although it was created. This results in a situation where a file is created but nothing is written to it, i.e., it has zero bytes. Resolution: The routine in pax(1) that closes file descriptors was changed so that it closes them only if their value was greater than 0. PHCO_28414: ( SR:8606279428 CR:JAGae43481 ) pax(1M) fails to backup a file of size 2GB or greater. Resolution: The flag used to define the maximum file size was changed to support file sizes upto 8GB - 1. ( SR:8606292410 CR:JAGae56173 ) pax(1M) doesn't display real failure reason when unable to open /dev/tty. Resolution: Necessary fprintf statement was added to display the real failure reason. PHCO_26422: ( SR:8606231186 CR:JAGae00424 ) The routine of pax(1) does not handle symbolic link file correctly due to misusing chown(2) system call. Resolution: Modify pax(1) source codes to correct the problem with symbolic link files. ( SR:8606182453 CR:JAGad51670 ) The open file descriptor system call close(2) is not called by the right routine in pax(1) source. Resolution: Modify pax(1) source code to close each open file promptly. ( SR:8606196471 CR:JAGad65674 ) Enhance pax(1) to support the archival of file up to 8GB from the current 2GB. Resolution: Modify pax(1) to support the archival of large files up to 8GB. PHCO_25393: ( SR:8606221083 CR:JAGad90219 ) Pax command fails to preserve the SUID/SGID bit when used to move files, even though -pe option is used. Resolution: (SR: 8606221083 CR: JAGad90219) Restore SUID/SGID bits after the file is created. ( SR:8606215972 CR:JAGad85144 ) The current pax command supports UID/GID only up to 60K. Need to add support for large UID/GID. Resolution: (SR:8606215972 CR:JAGad85144) Cpio format of pax supports UID/GID < 262144 Tar format of pax supports UID/GID < 2097152 if the uname/ gname doens't exist on the system. But if it does, tar supports UID/GID up to 2G. Enhancement: No (superseded patches contained enhancements) PHCO_28414: This is an enhancement to enable pax(1M) to support archival of files upto 8GB. Additional enhancements were delivered in a patch this one has superseded. Please review the Defect Description text for more information. SR: 8606182453 8606196471 8606215972 8606221083 8606231186 8606279428 8606292410 8606333583 8606333596 Patch Files: OS-Core.UX-CORE,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: /sbin/pax /usr/bin/pax /usr/lib/nls/msg/C/pax.cat what(1) Output: OS-Core.UX-CORE,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: /sbin/pax: buffer.c $Date: 2001/09/27 07:25:59 $Revision: r11.1 1/1 PATCH_11.11 (PHCO_25393) create.c $Date: 2002/04/21 14:45:57 $Revision: r11.1 1/2 PATCH_11.11 (PHCO_26422) extract.c $Date: 2001/09/27 07:25:59 $Revision: r11. 11/1 PATCH_11.11 (PHCO_25393) fileio.c $Date: 2004/02/04 02:02:19 $Revision: r11.1 1/1 PATCH_11.11 (PHCO_30420) list.c $Date: 2002/04/21 14:47:41 $Revision: r11.11/ 2 PATCH_11.11 (PHCO_26422) pass.c $Date: 2004/02/04 02:06:07 $Revision: r11.11/ 3 PATCH_11.11 (PHCO_30420) ttyio.c $Date: 2003/01/22 02:33:04 $Revision: r11.11 /1 PATCH_11.11 (PHCO_28414) $Revision: @(#) all R11.11_BL2004_0211_1 PATCH_11.11 PHCO_30420 Wed Feb 11 01:33:56 PST 2004 $ $ Version_11.11 Feb 5 2004 14:29:15 $ /usr/bin/pax: buffer.c $Date: 2001/09/27 07:25:59 $Revision: r11.1 1/1 PATCH_11.11 (PHCO_25393) create.c $Date: 2002/04/21 14:45:57 $Revision: r11.1 1/2 PATCH_11.11 (PHCO_26422) extract.c $Date: 2001/09/27 07:25:59 $Revision: r11. 11/1 PATCH_11.11 (PHCO_25393) fileio.c $Date: 2004/02/04 02:02:19 $Revision: r11.1 1/1 PATCH_11.11 (PHCO_30420) list.c $Date: 2002/04/21 14:47:41 $Revision: r11.11/ 2 PATCH_11.11 (PHCO_26422) pass.c $Date: 2004/02/04 02:06:07 $Revision: r11.11/ 3 PATCH_11.11 (PHCO_30420) ttyio.c $Date: 2003/01/22 02:33:04 $Revision: r11.11 /1 PATCH_11.11 (PHCO_28414) $Revision: @(#) all R11.11_BL2004_0211_1 PATCH_11.11 PHCO_30420 Wed Feb 11 01:33:55 PST 2004 $ /usr/lib/nls/msg/C/pax.cat: None cksum(1) Output: OS-Core.UX-CORE,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: 4093352273 389120 /sbin/pax 1937924519 90112 /usr/bin/pax 1299790370 6328 /usr/lib/nls/msg/C/pax.cat Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHCO_28414 PHCO_26422 PHCO_25393 Equivalent Patches: PHCO_29189: s700: 11.00 s800: 11.00 Patch Package Size: 280 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_30420 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHCO_30420.depot By default swinstall will archive the original software in /var/adm/sw/save/PHCO_30420. 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_30420.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHCO_30420.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHCO_30420.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None