 |
≫ |
|
|
 |
パッチ名: PHCO_36502
パッチ摘要: s700_800 11.11 find(1)累積パッチ
作成日: 07/07/30
公開日: 07/08/07
ハードウェアプラットフォームおよびOSリリース:
s700: 11.11
s800: 11.11
現象:
PHCO_36502:
(SR:8606477784 CR:JAGag32162)
findコマンドが、データの欠落したcpioアーカイブを生成します。しかも、
メッセージはなにも表示されません。
問題点の説明:
PHCO_36502:
(SR:8606477784 CR:JAGag32162)
cpio/ncpioオプションを使って生成した4GB以上のサイズのアーカイブをテー
プに書き込む場合、findコマンドは、最終ブロックを書き込んでいませんでし
た。その結果、不完全なアーカイブが作成されるため、リカバリ時に問題が起
きていました。アーカイブのサイズを保持する変数"size"のラップアラウンド
により、nullを含む最終ブロックが5120バイトに追加されませんでした。
解決方法:
この問題が起きないようにようにfindコマンドを修正しました。
-----------------------------------------------------------------------------
Patch Name: PHCO_36502
Patch Description: s700_800 11.11 find(1) cumulative patch
Creation Date: 07/07/30
Post Date: 07/08/07
Hardware Platforms - OS Releases:
s700: 11.11
s800: 11.11
Products: N/A
Filesets:
OS-Core.CMDS-MIN,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP
OS-Core.CMIN-ENG-A-MAN,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP
Automatic Reboot?: No
Status: General Release
Critical:
Yes
PHCO_36502: CORRUPTION
Data loss in cpio archive.
PHCO_30746: ABORT
Category Tags:
defect_repair general_release critical halts_system
corruption
Path Name: /hp-ux_patches/s700_800/11.X/PHCO_36502
Symptoms:
PHCO_36502:
( SR:8606477784 CR:JAGag32162 )
Silent data loss in cpio archives produced by find command.
PHCO_34241:
( SR:8606413895 CR:JAGaf73754 )
find(1) utility fails to support "--" in UNIX95
environment.
PHCO_30746:
( SR:8606384250 CR:JAGaf44425 )
find(1) -aclv option is not giving the correct results.
( SR:8606393499 CR:JAGaf53556 )
find core dumps under certain circumstances.
PHCO_29692:
( SR:8606326820 CR:JAGae89095 )
find(1) fails to locate a file, if current working directory
does not have read permission.
( SR:8606342869 CR:JAGaf03763 )
find(1) with -exec option gives improper output when
delimited with plus sign (+).
PHCO_25905:
( SR:8606201448 CR:JAGad70624 )
On a cdfs file system,
"find /cdrom \( -nouser -o -nogroup \)" causes bus error.
( SR:8606186711 CR:JAGad55921 )
"find <directory> -group +<n>" will display files with
group id matching "n" instead of displaying files with
group id > n .
Defect Description:
PHCO_36502:
( SR:8606477784 CR:JAGag32162 )
When find command is used with cpio/ncpio option to produce
an archive and incase the resulting archive written to a
tape is >=4GB then the last block is not written. An
incomplete archive is created causing recovery issues
later. The variable 'size' holds the size of the archive.
The size wraps the last block doesnt get null added to
5120 bytes.
Resolution:
The command find has been modified to fix this issues.
PHCO_34241:
( SR:8606413895 CR:JAGaf73754 )
According to UNIX95 Standards, "--" is to be treated as end
of options. If a command does not have any options, "--"
should be ignored.
So, if find(1) is invoked with "--" before any other
argument, it should not be considered as an error.
For example:
$find -- . -print
The above command will give all the files in the current
directory similar to "find . -print".
Resolution:
find(1) will support "--" in UNIX95 environment.
PHCO_30746:
( SR:8606384250 CR:JAGaf44425 )
find(1) command with -aclv option displays incorrect
results. The output of find does not match the selection
criteria of aclv pattern, as provided on the command line.
Additionally, "find . -aclv opt" always returns with
no output.
Problem Reproduction:
1. Create a file with ACLs.
$ touch file
$ chmod 777 file
$ setacl -m u:user:rwx file
2. Search files with -aclv options.
$ find . -aclv opt
It gives empty output, where it should show "file" in
the output.
$ find . -aclv u:user:rwx,u::---
It shows "file" in the output, where the correct output
should be empty.
Resolution:
find(1) command has been modified to handle -aclv options
correctly.
( SR:8606393499 CR:JAGaf53556 )
When find is invoked on some directory, under
certain circumstances, find(1) dumps core. This is
happening while creating the absolute path name
of the directory on which find is to be run.
While creating the absolute path name, the available
memory space in the buffer was being calculated
incorrectly resulting in a array bound write and
core dump.
Problem Reproduction:
# cat find.sh
#!/bin/sh
cd /tmp
DIR1=`perl -e 'print "d"x255'`/`perl -e 'print "d"x255'`
mkdir -p $DIR1
cd $DIR1
DIR2=`perl -e 'print "d"x255'`/`perl -e 'print "d"x75'`
mkdir -p $DIR2
cd $DIR2
DIR3=`perl -e 'print "d"x226'`
mkdir $DIR3
touch $DIR3/file
find $DIR3 -name file > /tmp/find.out
cd /tmp
rm -fr `perl -e 'print "d"x255'`
# chmod +x find.sh
# ./find.sh
find.sh[12]: 11966 Memory fault(coredump)
Resolution:
While creating the absolute path name, the available memory
space in the buffer is now being calculated correctly.
PHCO_29692:
( SR:8606326820 CR:JAGae89095 )
find(1) tries to open current working directory to capture
file descriptor for further processing, but fails if it does
not have read permission. In such case find(1) comes out
with an error "find: cannot get 'pwd'". The steps to
reproduce the problem are :-
1. Create two directories in a temp directory.
$ cd /tmp
$ mkdir dir1 dir2
2. Create a file in dir2 directory.
$ touch dir2/file1
3. Goto dir1 directory and remove the read permission.
$ cd dir1
$ chmod -r .
4. Search for file1 in /tmp/dir2 directory.
$ find /tmp/dir2 -name file1
find: cannot get 'pwd'
Resolution:
When opening of current working directory fails due to
missing permissions, find(1) tries to build the complete
path of 'pwd' by climbing up the parent directories till it
reaches root. find(1) will fail if any of the predecessor
directory does not have read permission or the current
directory is very deep (>341 levels).
( SR:8606342869 CR:JAGaf03763 )
find(1) <pathname> -exec <command>, if delimited with plus
sign (+), executes incomplete command. The error is observed
only when one of the command arguments specified is "{}".
While parsing and building the command line vector, the last
argument was not properly updated because of improper
handling of "{}" argument. The steps to reproduce the
problem are :-
1. Create two files, namely file1 file2
$ touch file1 file2
2. Run find command
$ find . -name 'file?' -exec ls -l {} \+
./file1 ./file2
The expected output is a long listing of two files.
$ find . -name 'file?' -exec ls -l \+
-rw-rw-r-- 1 user group 0 Feb 3 19:50 ./file1
-rw-rw-r-- 1 user group 0 Feb 3 19:50 ./file2
Resolution:
The vector that points to the next element in the command
line is now properly updated to point to the beginning of
the arguments to -exec option. Any command argument between
the first occurrence of "{}" and +, is ignored.
PHCO_25905:
( SR:8606201448 CR:JAGad70624 )
When find(1) is used to search for files belonging
to an unlisted user or group under a cdfs file
system,bus error is generated.For example:
$mount /dev/dsk/c0t1d0 /SD_CDROM (mount the CDROM
in the drive)
$find /SD_CDROM \( -nouser -o -nogroup \) >>/dev/null
Bus Error
$find /SD_CDROM -nouser -fstype cdfs
Bus Error
$find /SD_CDROM -nogroup -fstype cdfs
Bus Error
Resolution:
For a CD,-1 is returned by cdfs if no UID/GIDS are
stored on it.This ID(-1) is used for key values of
the hash tables used in find(1).The hash functions
used in find(1) were not handling the negative
numbers properly resulting in out of range values
causing bus errors.
The find(1) command is modified to take care of
negative id's.The data types used internally are
modified to ensure key values never go negative.
( SR:8606186711 CR:JAGad55921 )
When find(1) is used to search for files whose
group id is greater than a particular group id
say n,it does not display all files having
group id greater than n.
For example:On a 11.11 machine,
$ls -l test
-rw-rw-r-- 1 test1 users1 10 May 20 2001 foo1
-rw-rw-r-- 1 test1 users2 10 May 20 2001 foo2
-rw-rw-r-- 1 test1 users3 10 May 20 2001 foo3
(where group id's of users1,users2,users3 are
20,21,22 respectively)
$find test -group +20
-rw-rw-r-- 1 test1 user1 10 May 20 2001 foo1
This is wrong.Instead it should display
-rw-rw-r-- 1 test1 user2 10 May 20 2001 foo2
-rw-rw-r-- 1 test1 user3 10 May 20 2001 foo3
Resolution:
find(1) command was not processing the group id
argument correctly.It used to ignore the "+/-"
sign associated with the "-group" argument.
Now the command is modified to process the "+/-"
sign of "-group" option as per the man page
description.
Enhancement:
No
SR:
8606477784 8606413895 8606186711 8606201448 8606326820
8606342869 8606384250 8606393499
Patch Files:
OS-Core.CMDS-MIN,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP:
/usr/bin/find
OS-Core.CMIN-ENG-A-MAN,fr=B.11.11,fa=HP-UX_B.11.11_32/64,
v=HP:
/usr/share/man/man1.Z/find.1
what(1) Output:
OS-Core.CMDS-MIN,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP:
/usr/bin/find:
find.c $Date: 2005/12/21 22:37:15 $Revision: r11.11/
7 PATCH_11.11 (PHCO_34241)
funcs.c $Date: 2002/02/09 04:05:22 $Revision: r11.11
/2 PATCH_11.11 (PHCO_25905)
aclv_patt.c $Date: 2004/11/22 10:47:21 $Revision: r1
1.11/1 PATCH_11.11 (PHCO_30746)
libcpio.c $Date: 2007/06/27 12:29:49 $Revision: r11.
11/2 PATCH_11.11 (PHCO_36502)
getpwd.c $Date: 2004/11/22 10:47:21 $Revision: r11.1
1/3 PATCH_11.11 (PHCO_30746)
$Revision: @(#) find R11.11_BL2007_0730_1 PATCH_11.
11 PHCO_36502
OS-Core.CMIN-ENG-A-MAN,fr=B.11.11,fa=HP-UX_B.11.11_32/64,
v=HP:
/usr/share/man/man1.Z/find.1:
None
cksum(1) Output:
OS-Core.CMDS-MIN,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP:
767989767 61440 /usr/bin/find
OS-Core.CMIN-ENG-A-MAN,fr=B.11.11,fa=HP-UX_B.11.11_32/64,
v=HP:
2357845662 10699 /usr/share/man/man1.Z/find.1
Patch Conflicts: None
Patch Dependencies: None
Hardware Dependencies: None
Other Dependencies: None
Supersedes:
PHCO_34241 PHCO_30746 PHCO_29692 PHCO_25905
Equivalent Patches: None
Patch Package Size: 80 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_36502
5. Run swinstall to install the patch:
swinstall -x autoreboot=true -x patch_match_target=true \
-s /tmp/PHCO_36502.depot
By default swinstall will archive the original software in
/var/adm/sw/save/PHCO_36502. 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_36502.text file is
available in the product readme:
swlist -l product -a readme -d @ /tmp/PHCO_36502.depot
To put this patch on a magnetic tape and install from the
tape drive, use the command:
dd if=/tmp/PHCO_36502.depot of=/dev/rmt/0m bs=2k
Special Installation Instructions: None
|