Patch Name: PHCO_29680 Patch Description: s700_800 11.00 cumulative cp(1) patch Creation Date: 03/12/10 Post Date: 04/01/05 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_29680: ABORT Category Tags: defect_repair enhancement general_release critical halts_system Path Name: /hp-ux_patches/s700_800/11.X/PHCO_29680 Symptoms: PHCO_29680: ( SR:8606199118 CR:JAGad68305 ) cp(1) with -r or -R, doesn't copy multiple source correctly if the target directory doesn't exist. ( SR:8606224261 CR:JAGad93356 ) Under certain conditions, cp(1) with -rp option doesn't copy largefiles. ( SR:8606325233 CR:JAGae87523 ) cp(1) with -r option returns 0 if the number of files not copied is 256 or multiple of 256. ( SR:8606215484 CR:JAGad84671 ) cp(1) coredumps if calloc/malloc fails to allocate memory. PHCO_20029: Enhancements to cp(1) to function with JFS ACLs. PHCO_17576: system seems to hang when cp(1) copies huge files. Defect Description: PHCO_29680: ( SR:8606199118 CR:JAGad68305 ) cp(1) with -r/-R option doesn't copy correctly, while trying to copy multiple files/directories to a non-existing directory. Steps to reproduce the problem is as below: $ mkdir -p d1/d2 $ echo "d1/e" > d1/e $ echo "d1/d2/b" > d1/d2/b $ cp -rp d1/* d4 $ diff -r d1 d4 1>/dev/null 2>/dev/null $ echo $? 1 $ The exit status of diff(1) is 1 because cp(1) didn't copy the file and directories correctly. Resolution: cp(1) is modified to copy files and directory correctly. If UNIX95 flag is set, cp(1) would exit with an error if multiple files are copied to a non-existing directory. ( SR:8606224261 CR:JAGad93356 ) If a largefile enabled file is being copied to a target directory (largefile enabled) mounted on no-largefile system this error is seen. In such a case cp(1) with -rp option doesn't copy largefiles. The steps to reproduce the problem is as below: 1.Mount a large file enabled filesystem on /devlopment/dir1. 2.Create largefiles in /devlopment/dir1. 3.Mount a No-Large-filesystem on /temp. 4.Mount a LargeFile system on /temp/development/dir1. 5.Copy the directory using option '-rp' /devlopment/dir1 cp -rp /devlopment/dir1 /temp/development cp(1) gives an error and comes out with non-zero exit status. Resolution: cp(1) is modified to check if the final destination supports largefiles and then allow copying of largefile in it. ( SR:8606325233 CR:JAGae87523 ) If cp(1) with -r option is unable to copy 256 files or multiple of 256 files the exit status of cp(1) changes to 0. The steps to reproduce the defect is as below: 1. Create 256 files in a directory (say dir1). 2. Remove read permission of the files. 3. Using cp(1) with -r option try copying dir1 to dir2. 4. Check the exit status for cp(1). Resolution: The code is modified to give non-zero exit status if cp(1) fails to copy. ( SR:8606215484 CR:JAGad84671 ) If cp(1) program is unable to allocate memory due to some system constraint, cp(1) dumps core. Steps to reproduce the defect is as below: 1. Login as superuser. 2. Create a test directory. 3. Create 200 files and create hard-link each one. 4. Run the command "ulimit -Sd 200". 5. Run cp(1) "cp -r test1 test2". This step can coredump. Resolution: If cp(1) program fails to allocate sufficient memory, it exits with an error. PHCO_20029: Enhancements to cp(1) to function with JFS ACLs. PHCO_17576: System seems to slow down when copying huge files.The slowing down is due to the delayed writes when cp(1) is executed. Resolution: Introduced a new option , "-S" which can be invoked with cp(1) while copying huge files. This option enables no delayed writes while copying into the target file. Enhancement: No (superseded patches contained enhancements) PHCO_29680: Enhancements were delivered in a patch this one has superseded. Please review the Defect Description text for more information. SR: 8606325233 8606224261 8606215484 8606199118 5003311746 1653249284 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/cp.1 OS-Core.UX-CORE,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/lib/nls/msg/C/cp.cat /usr/bin/cp 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/cp.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/cp.cat: None OS-Core.UX-CORE,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/bin/cp: $Revision: 82.2.1.13 $ PATCH_11_00: cp.o 03/12/10 cksum(1) Output: OS-Core.CORE-ENG-A-MAN,fr=B.11.00,fa=HP-UX_B.11.00_32/64, v=HP: 491426986 5263 /usr/share/man/man1.Z/cp.1 OS-Core.UX-CORE,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 1206810716 1538 /usr/lib/nls/msg/C/cp.cat OS-Core.UX-CORE,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 3930843134 32768 /usr/bin/cp Patch Conflicts: None Patch Dependencies: s700: 11.00: PHCO_19491 PHKL_19991 s800: 11.00: PHCO_19491 PHKL_19991 Hardware Dependencies: None Other Dependencies: None Supersedes: PHCO_20029 PHCO_17576 Equivalent Patches: None Patch Package Size: 60 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_29680 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHCO_29680.depot By default swinstall will archive the original software in /var/adm/sw/save/PHCO_29680. 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_29680.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHCO_29680.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHCO_29680.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None