Patch Name: PHCO_30150 Patch Description: s700_800 11.00 pax(1) cumulative patch Creation Date: 04/01/03 Post Date: 04/02/25 Hardware Platforms - OS Releases: s700: 11.00 s800: 11.00 Products: N/A Filesets: OS-Core.CORE-ENG-A-MAN,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP OS-Core.UX-CORE,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP Automatic Reboot?: No Status: General Release Critical: Yes PHCO_30150: HANG pax(1) command loops indefinitely when restored file is larger than 2GB. Category Tags: defect_repair enhancement general_release critical halts_system Path Name: /hp-ux_patches/s700_800/11.X/PHCO_30150 Symptoms: PHCO_30150: ( SR: 8606319505 CR:JAGae81995 ) When using the pax(1)- command to restore a file larger than 2GB,there is no response the command loops indefinitely. Example -- (archiving and retrieving file greater than 2GB, 2gb) # ll /BIG/2gb -rw-rw-rw- 1 root sys 2147483648 Jul 4 16:40 /BIG/2gb # cd /BIG # pax -wvf /BIG/2gb.pax ./2gb ./2gb # ll 2gb.pax -rw-rw-rw- 1 root sys 2147491840 Jul 7 17:21 2gb.pax # cd restore # pax -rvf /BIG/2gb.pax There is no response. PHCO_29189: ( SR: 8606282242 CR: JAGae46189 ) pax(1) does not restore the mode of symbolic links correctly. Users will see unexpected mode 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:8606231186 CR:JAGae00424 ) pax(1) does not restore the ownership of symbolic links correctly. Users will see unexpected ownership for each restored symbolic link file. For example, let file 1 exist on /paxtest. Let a symbolic link be created to it by root. # cd /paxtest1 # ln -s 1 lnk1 # ll total 2 -rw-rw-rw- 1 root sys 39 May 31 00:24 1 lrwxrwxrwx 1 root sys 1 May 31 03:52 lnk1 -> 1 Let us have another user, paxuser, who is not root. This user now attempts the following: $ pax -rw -X -pe . /paxtest1 Could not restore owner/group Could not restore owner/group $ ll /paxtest1 total 2 -rw-rw-rw- 1 root sys 39 May 31 00:24 1 lrwxrwxrwx 1 paxuser users 1 May 31 03:55 lnk1 -> 1 The ownership of the symbolic link has changed from root to paxuser. ( SR:8606308346 CR: JAGae71381 ) 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_28413: ( SR: 8606288039 CR: JAGae51972 ) 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's no controlling terminal and the user gets a misleading message saying /dev/tty is unavailable. ( SR: 8606292412 CR: JAGae56175 ) Enhancement Request: pax(1) is enhanced to support the archival of files up to 8GB in USTAR format from 2GB. PHCO_25418: ( SR: 8606216121 CR: JAGad85291 ) 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: 8606175067 CR: JAGad44311 ) 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. PHCO_20416: For device special files with a concatenated major/minor value greater than pax's maximum small file size (0x7FFFFFFF - 2GB), pax fails with the following error message: /dev/XXXX > 2GB. Not Dumped. PHCO_20027: Enhancements for JFS 3.3 Access Control Lists. PHCO_16885: 1. Pax does not handle soft/hard links properly in ustar format if the file/link names have a length >= 100 characters. 2. Pax cannot restore soft links with a length > 100 characters in cpio format. 3. Pax does not restore hard links in cpio format. Defect Description: PHCO_30150: ( SR: 8606319505 CR:JAGae81995 ) The pax(1M) command is unable to retrieve a file greater than 2GB.Attempts to retrieve the file also result in pax(1) become unresponsive. Resolution: Pax(1) is modified to support the retrieval of files greater than 2GB. PHCO_29189: ( SR: 8606282242 CR: JAGae46189 ) 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:8606231186 CR:JAGae00424 ) pax(1) does not handle symbolic link file correctly due to misusing chown(2) system call. Resolution: chown(2) affects the target file, not the symbolic link that points to it. So we use lchown(2) system call if the file is a symbolic link. ( SR:8606308346 CR: JAGae71381 ) pax(1) closes a file descriptor when it is finished with it. But there is no check to see if the file descriptor was 0, i.e., STDIN. If we close STDIN, 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_28413: ( SR: 8606288039 CR: JAGae51972 ) pax(1M) doesn't display real failure reason when unable to open /dev/tty. Resolution: A single line of code change which prints the real failure reason on stderr. ( SR: 8606292412 CR: JAGae56175 ) Enhance pax(1M) to support archival of files up to 8GB from the current limit of 2GB. Resolution: Modified pax(1M) to support archival of large files up to 8GB. PHCO_25418: ( SR: 8606216121 CR: JAGad85291 ) Pax command fails to preserve the SUID/SGID bit when used to move files, even though -pe option is used. Resolution: Restore SUID/SGID bits after the file is created. ( SR: 8606175067 CR: JAGad44311 ) The current pax command supports UID/GID only up to 60K. Need to add support for large UID/GID. Resolution: Cpio format of pax supports UID/GID <= 262143 Tar format of pax supports UID/GID <= 2097151 if the uname/ gname doesn't exist on the system. But if it does, tar format of pax supports UID/GID up to 2G. PHCO_20416: The concatenated major/minor value for device special files was incorrectly being range checked against pax's maximum small file size (0x7FFFFFFF - 2GB). Resolution: The concatenated major/minor value for device special file is not checked against 2GB. PHCO_20027: Changes to pax(1) to function correctly with Access Control Lists (ACLs) feature introduced in JFS 3.3. PHCO_16885: 1. In ustar format, pax will fail to create a hard link, and the string "ustar" will be appended to the link target of any symbolic link where the target name is exactly 100 characters. There is no error message output to indicate to the user that the tar format of pax will not backup symbolic/hard links if the link target name is > 100 characters in length. 2. In cpio format, pax fill fail to create symbolic links if the link target name is > 100 characters in length. 3. In cpio format, pax fails to restore hard links; it creates regular files instead. Enhancement: No (superseded patches contained enhancements) PHCO_28413: This product update makes pax(1M) large file aware. SR: 8606319505 8606282242 8606231186 8606308346 8606288039 8606292412 8606216121 8606175067 4701406967 8606105686 5003311746 4701406967 Patch Files: OS-Core.CORE-ENG-A-MAN,fr=B.11.00,fa=HP-UX_B.11.00_32/64, v=HP: /usr/share/man/man1.Z/pax.1 OS-Core.UX-CORE,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/lib/nls/msg/C/pax.cat /sbin/pax /usr/bin/pax what(1) Output: OS-Core.CORE-ENG-A-MAN,fr=B.11.00,fa=HP-UX_B.11.00_32/64, v=HP: /usr/share/man/man1.Z/pax.1: None OS-Core.UX-CORE,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/lib/nls/msg/C/pax.cat: None OS-Core.UX-CORE,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /sbin/pax: $Revision: 82.13.1.13 $ $ PATCH/11.00:PHCO_27731 Oct 11 2002 12:59:13 $ PATCH_11_00: hpux_rel.o pax.o append.o buffer.o cpio .o create.o extract.o fileio.o hash.o link.o list.o mem.o namelist.o names.o pass.o path name.o replace.o tar.o ttyio.o warn.o charma p.o 04/01/03 /usr/bin/pax: $Revision: 82.13.1.13 $ PATCH_11_00: hpux_rel.o pax.o append.o buffer.o cpio .o create.o extract.o fileio.o hash.o link.o list.o mem.o namelist.o names.o pass.o path name.o replace.o tar.o ttyio.o warn.o charma p.o 04/01/03 cksum(1) Output: OS-Core.CORE-ENG-A-MAN,fr=B.11.00,fa=HP-UX_B.11.00_32/64, v=HP: 2715419682 8403 /usr/share/man/man1.Z/pax.1 OS-Core.UX-CORE,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 3994088646 5436 /usr/lib/nls/msg/C/pax.cat OS-Core.UX-CORE,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 864813297 405504 /sbin/pax OS-Core.UX-CORE,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 2718577959 102400 /usr/bin/pax Patch Conflicts: None Patch Dependencies: s700: 11.00: PHKL_28202 s800: 11.00: PHKL_28202 Hardware Dependencies: None Other Dependencies: None Supersedes: PHCO_16885 PHCO_20027 PHCO_20416 PHCO_25418 PHCO_28413 PHCO_29189 Equivalent Patches: None Patch Package Size: 310 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_30150 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHCO_30150.depot By default swinstall will archive the original software in /var/adm/sw/save/PHCO_30150. 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_30150.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHCO_30150.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHCO_30150.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None