Patch Name: PHCO_27415 Patch Description: s700_800 11.11 ls(1) cumulative patch Creation Date: 03/05/04 Post Date: 03/05/19 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 general_release Path Name: /hp-ux_patches/s700_800/11.X/PHCO_27415 Symptoms: PHCO_27415: ( SR:8606265148 CR:JAGae29476 ) ls(1) shows negative value for a link count more than 32767 ( SR:8606203481 CR:JAGad72654 ) ll(1) displays a value 4294967295 as uid and gid for CD-ROM files. Defect Description: PHCO_27415: ( SR:8606265148 CR:JAGae29476 ) When the link count of a file or directory is more than 32767,ls -l displays negative value for the link count. This problem occurs because st_nlink is an unsigned short variable and the contents of this is being assigned to a signed short variable leading to truncation. NOTE: In order to create more than 32767 hard links to a file, a GR patch PHKL_28185 needs to be installed on the system Steps to reproduce the problem: 1. Create more than 32767 hard links to a file test_file. 2. $ls -l test_file -rw-rw-rw- -32767 vts ssgrp 0 Mar 19 13:53 test_file Resolution: The code has been modified to use the correct data type to take care of truncation problem. ( SR:8606203481 CR:JAGad72654 ) ll(1) or ls -l displays the positive UID/GID's for CD-ROM files, but it should display the negative UID/GID's as per the man page of stat(2). An incorrect type specifier was used in the printf() API for printing UID and GID values. Steps to reproduce the problem: 1. Mount a CD-ROM on a mount point /test 2. ls -l /test total 28672 -r-xr-xr-x 1 4294967295 4294967295 4998 Feb 8 2002 HPII_FAQ.TXT dr-xr-xr-x 1 4294967295 4294967295 2048 Feb 8 2002 PCINSTAL Resolution: The correct type specifiers are being used now,for printing the UID and GID values. Enhancement: No SR: 8606203481 8606265148 Patch Files: OS-Core.UX-CORE,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: /sbin/ls /usr/bin/l /usr/bin/lc /usr/bin/ll /usr/bin/ls /usr/bin/lsf /usr/bin/lsr /usr/bin/lsx what(1) Output: OS-Core.UX-CORE,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: /sbin/ls: ls.c $Date: 2003/03/13 02:04:47 $Revision: r11.11/2 PATCH_11.11 (PHCO_27415) $Revision: @(#) all CUP11.11_BL2003_0504_1 PATCH_11. 11 PHCO_27415 Sun May 4 22:45:01 PDT 2003 $ $ Version_11.11 Mar 31 2003 09:02:37 $ /usr/bin/l: ls.c $Date: 2003/03/13 02:04:47 $Revision: r11.11/2 PATCH_11.11 (PHCO_27415) $Revision: @(#) all CUP11.11_BL2003_0504_1 PATCH_11. 11 PHCO_27415 Sun May 4 22:44:52 PDT 2003 $ /usr/bin/lc: ls.c $Date: 2003/03/13 02:04:47 $Revision: r11.11/2 PATCH_11.11 (PHCO_27415) $Revision: @(#) all CUP11.11_BL2003_0504_1 PATCH_11. 11 PHCO_27415 Sun May 4 22:44:52 PDT 2003 $ /usr/bin/ll: ls.c $Date: 2003/03/13 02:04:47 $Revision: r11.11/2 PATCH_11.11 (PHCO_27415) $Revision: @(#) all CUP11.11_BL2003_0504_1 PATCH_11. 11 PHCO_27415 Sun May 4 22:44:52 PDT 2003 $ /usr/bin/ls: ls.c $Date: 2003/03/13 02:04:47 $Revision: r11.11/2 PATCH_11.11 (PHCO_27415) $Revision: @(#) all CUP11.11_BL2003_0504_1 PATCH_11. 11 PHCO_27415 Sun May 4 22:44:52 PDT 2003 $ /usr/bin/lsf: ls.c $Date: 2003/03/13 02:04:47 $Revision: r11.11/2 PATCH_11.11 (PHCO_27415) $Revision: @(#) all CUP11.11_BL2003_0504_1 PATCH_11. 11 PHCO_27415 Sun May 4 22:44:52 PDT 2003 $ /usr/bin/lsr: ls.c $Date: 2003/03/13 02:04:47 $Revision: r11.11/2 PATCH_11.11 (PHCO_27415) $Revision: @(#) all CUP11.11_BL2003_0504_1 PATCH_11. 11 PHCO_27415 Sun May 4 22:44:52 PDT 2003 $ /usr/bin/lsx: ls.c $Date: 2003/03/13 02:04:47 $Revision: r11.11/2 PATCH_11.11 (PHCO_27415) $Revision: @(#) all CUP11.11_BL2003_0504_1 PATCH_11. 11 PHCO_27415 Sun May 4 22:44:52 PDT 2003 $ cksum(1) Output: OS-Core.UX-CORE,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: 3236820252 294912 /sbin/ls 93218879 28672 /usr/bin/l 93218879 28672 /usr/bin/lc 93218879 28672 /usr/bin/ll 93218879 28672 /usr/bin/ls 93218879 28672 /usr/bin/lsf 93218879 28672 /usr/bin/lsr 93218879 28672 /usr/bin/lsx Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: None Equivalent Patches: None Patch Package Size: 340 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_27415 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHCO_27415.depot By default swinstall will archive the original software in /var/adm/sw/save/PHCO_27415. 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_27415.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHCO_27415.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHCO_27415.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None