 |
≫ |
|
|
 |
パッチ名: PHCO_35369
パッチ摘要: s700_800 11.23 rm(1)累積パッチ
作成日: 06/10/05
公開日: 07/01/22
ハードウェアプラットフォームおよびOSリリース:
s700: 11.23
s800: 11.23
現象:
PHCO_35369:
(SR:8606424905 CR:JAGaf84425)
現在のワークディレクトリが読み取り不能な場合、"rm(1) -r"が、絶対パスで
指定されたディレクトリを削除できません。
問題点の説明:
PHCO_35369:
(SR:8606424905 CR:JAGaf84425)
現在のワークディレクトリが読み取り不能な場合、ある絶対パスに対して
"rm(1) -r"を実行しようとすると、rm(1)が異常終了し、"Cannot remove
mountable directory"というエラーメッセージを表示します。
問題の再現手順:
# whoami
root
# mkdir /var/tmp/to_be_removed
# chown lp:lp /var/tmp/to_be_removed
# mkdir /var/tmp/restricted; chmod 700 /var/tmp/restricted
# cd /var/tmp/restricted; su lp
# whoami
lp
# rm -r /var/tmp/to_be_removed
rm: directory /var/tmp/to_be_removed not removed.
Cannot remove mountable directory
# ls -d /var/tmp/to_be_removed
/var/tmp/to_be_removed
# rmdir /var/tmp/to_be_removed
# ls -d /var/tmp/to_be_removed
/var/tmp/to_be_removed not found
"Cannot remove mountable directory"という紛らわしいエラーメッセージが
表示されます。
解決方法:
指定されたディレクトリに対してrm(1)操作を行う場合は、その前に、現在の
ワークディレクトリが読み取り可能かチェックするようにrm(1)のコードを修
正しました。現在のワークディレクトリが読み取り不能な場合は、現在のワー
クディレクトリを"/"に変更してから、指定された絶対パスに対してrm操作を
行います。
また、エラーメッセージも修正しました。
-----------------------------------------------------------------------------
Patch Name: PHCO_35369
Patch Description: s700_800 11.23 rm(1) cumulative patch
Creation Date: 06/10/05
Post Date: 07/01/22
Hardware Platforms - OS Releases:
s700: 11.23
s800: 11.23
Products: N/A
Filesets:
OS-Core.UX-CORE,fr=B.11.23,fa=HP-UX_B.11.23_IA/PA,v=HP
OS-Core.UX2-CORE,fr=B.11.23,fa=HP-UX_B.11.23_IA,v=HP
OS-Core.UX2-CORE,fr=B.11.23,fa=HP-UX_B.11.23_PA,v=HP
Automatic Reboot?: No
Status: General Release
Critical:
No (superseded patches were critical)
PHCO_31637: ABORT
Category Tags:
defect_repair general_release critical halts_system
Path Name: /hp-ux_patches/s700_800/11.X/PHCO_35369
Symptoms:
PHCO_35369:
( SR:8606424905 CR:JAGaf84425 )
rm(1) -r fails to remove directories specified with
absolute path when current working directory is unreadable.
PHCO_31637:
( SR:8606363161 CR:JAGaf23824 )
rm -r dumps core under certain circumstances.
Defect Description:
PHCO_35369:
( SR:8606424905 CR:JAGaf84425 )
When rm(1) -r is attempted on a absolute path from a
unreadable current working directory rm(1) aborts and
throws error message as "Cannot remove mountable directory."
It can be reproduced as follows:-
# whoami
root
# mkdir /var/tmp/to_be_removed
# chown lp:lp /var/tmp/to_be_removed
# mkdir /var/tmp/restricted; chmod 700 /var/tmp/restricted
# cd /var/tmp/restricted; su lp
# whoami
lp
# rm -r /var/tmp/to_be_removed
rm: directory /var/tmp/to_be_removed not removed.
Cannot remove mountable directory
# ls -d /var/tmp/to_be_removed
/var/tmp/to_be_removed
# rmdir /var/tmp/to_be_removed
# ls -d /var/tmp/to_be_removed
/var/tmp/to_be_removed not found
The error message "Cannot remove mountable directory" is
misleading.
Resolution:
This defect in rm(1) is fixed by checking if current working
directory is readable before attempting the rm(1) operation
on specified directory. If current working directory is
unreadable then, current working directory is changed to "/"
before attempting rm operation on the specified absolute
path.
The error message is changed to give better information.
PHCO_31637:
( SR:8606363161 CR:JAGaf23824 )
When rm -r is invoked on some directory, under
certain circumstances, rm(1) dumps core. This is
happening while creating the absolute path name
of the directory to be removed. 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 test.sh
#!/bin/sh
cd /tmp
while read a
do
mkdir $a
/usr/bin/rm -r $a
mkdir $a
cd $a
done << !!
opt
stdenv
tetlite
vsc
tet_tmp_dir
18579aa
tset
POSIX.sdo
ar
_ga67_dir18580
0xxxxxxxxxxxxxxxx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x test.sh
# ./test.sh
mkdir: cannot create opt: File exists
./test.sh[8]: 12269 Memory fault(coredump)
mkdir: cannot create xxxxxxxxxxxxxxxxxxxxxxxx....
File exists
Resolution:
While creating the absolute path name,
the available memory space in the buffer
is now being calculated correctly.
Enhancement:
No
SR:
8606424905 8606363161
Patch Files:
OS-Core.UX-CORE,fr=B.11.23,fa=HP-UX_B.11.23_IA/PA,v=HP:
/usr/lib/nls/msg/C/rm.cat
OS-Core.UX2-CORE,fr=B.11.23,fa=HP-UX_B.11.23_IA,v=HP:
/usr/bin/rm
/sbin/rm
/usr/bin/rmdir
OS-Core.UX2-CORE,fr=B.11.23,fa=HP-UX_B.11.23_PA,v=HP:
/usr/bin/rm
/sbin/rm
/usr/bin/rmdir
what(1) Output:
OS-Core.UX-CORE,fr=B.11.23,fa=HP-UX_B.11.23_IA/PA,v=HP:
/usr/lib/nls/msg/C/rm.cat:
None
OS-Core.UX2-CORE,fr=B.11.23,fa=HP-UX_B.11.23_IA,v=HP:
/usr/bin/rm:
rm.c $Date: 2006/09/05 17:46:31 $Revision: r11.23/1
PATCH_11.23 (PHCO_35369)
walkfs.c $Date: 2006/09/05 17:46:18 $Revision: r11.2
3/2 PATCH_11.23 (PHCO_35369)
$Revision: jazz @ 20061005.22:27:52PDT; jmkvw -proj
integ -RW PHCO_35369 r11.23(R11.23_BL2006_10
05_6) ;
/sbin/rm:
rm.c $Date: 2006/09/05 17:46:31 $Revision: r11.23/1
PATCH_11.23 (PHCO_35369)
walkfs.c $Date: 2006/09/05 17:46:18 $Revision: r11.2
3/2 PATCH_11.23 (PHCO_35369)
$Revision: jazz @ 20061005.22:27:56PDT; jmkvw -proj
integ -RW PHCO_35369 r11.23(R11.23_BL2006_10
05_6) ;
/usr/bin/rmdir:
rm.c $Date: 2006/09/05 17:46:31 $Revision: r11.23/1
PATCH_11.23 (PHCO_35369)
walkfs.c $Date: 2006/09/05 17:46:18 $Revision: r11.2
3/2 PATCH_11.23 (PHCO_35369)
$Revision: jazz @ 20061005.22:27:52PDT; jmkvw -proj
integ -RW PHCO_35369 r11.23(R11.23_BL2006_10
05_6) ;
OS-Core.UX2-CORE,fr=B.11.23,fa=HP-UX_B.11.23_PA,v=HP:
/usr/bin/rm:
$Revision: 92453-07 linker linker crt0.o B.11.16.01
030415 $
rm.c $Date: 2006/09/05 17:46:31 $Revision: r11.23/1
PATCH_11.23 (PHCO_35369)
$Revision: jazz @ 20061005.22:28:07PDT; jmkvw -proj
integ -RW PHCO_35369 r11.23(R11.23_BL2006_10
05_6) ;
walkfs.c $Date: 2006/09/05 17:46:18 $Revision: r11.2
3/2 PATCH_11.23 (PHCO_35369)
/sbin/rm:
$Revision: 92453-07 linker linker crt0.o B.11.16.01
030415 $
rm.c $Date: 2006/09/05 17:46:31 $Revision: r11.23/1
PATCH_11.23 (PHCO_35369)
$Revision: jazz @ 20061005.22:28:11PDT; jmkvw -proj
integ -RW PHCO_35369 r11.23(R11.23_BL2006_10
05_6) ;
walkfs.c $Date: 2006/09/05 17:46:18 $Revision: r11.2
3/2 PATCH_11.23 (PHCO_35369)
$ Internal_Unsupported_Version Sep 21 2006 17:09:27
$
/usr/bin/rmdir:
$Revision: 92453-07 linker linker crt0.o B.11.16.01
030415 $
rm.c $Date: 2006/09/05 17:46:31 $Revision: r11.23/1
PATCH_11.23 (PHCO_35369)
$Revision: jazz @ 20061005.22:28:07PDT; jmkvw -proj
integ -RW PHCO_35369 r11.23(R11.23_BL2006_10
05_6) ;
walkfs.c $Date: 2006/09/05 17:46:18 $Revision: r11.2
3/2 PATCH_11.23 (PHCO_35369)
cksum(1) Output:
OS-Core.UX-CORE,fr=B.11.23,fa=HP-UX_B.11.23_IA/PA,v=HP:
1791744332 1224 /usr/lib/nls/msg/C/rm.cat
OS-Core.UX2-CORE,fr=B.11.23,fa=HP-UX_B.11.23_IA,v=HP:
1025348752 75164 /usr/bin/rm
2598796954 640868 /sbin/rm
1025348752 75164 /usr/bin/rmdir
OS-Core.UX2-CORE,fr=B.11.23,fa=HP-UX_B.11.23_PA,v=HP:
1075474583 49152 /usr/bin/rm
2815277733 425984 /sbin/rm
1075474583 49152 /usr/bin/rmdir
Patch Conflicts: None
Patch Dependencies: None
Hardware Dependencies: None
Other Dependencies: None
Supersedes:
PHCO_31637
Equivalent Patches: None
Patch Package Size: 480 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_35369
5. Run swinstall to install the patch:
swinstall -x autoreboot=true -x patch_match_target=true \
-s /tmp/PHCO_35369.depot
By default swinstall will archive the original software in
/var/adm/sw/save/PHCO_35369. 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_35369.text file is
available in the product readme:
swlist -l product -a readme -d @ /tmp/PHCO_35369.depot
To put this patch on a magnetic tape and install from the
tape drive, use the command:
dd if=/tmp/PHCO_35369.depot of=/dev/rmt/0m bs=2k
Special Installation Instructions: None
|