 |
≫ |
|
|
 |
パッチ名: PHCO_35880
パッチ摘要: s700_800 11.23 cp(1)累積パッチ
作成日: 07/01/17
公開日: 07/01/31
ハードウェアプラットフォームおよびOSリリース:
s700: 11.23
s800: 11.23
現象:
PHCO_35880:
1.(SR:8606447446 CR:JAGag04785)
"cp(1) -i"がHP-UXのマンページやUNIXでの定義どおりに動作しません。
2.(SR:8606438883 CR:JAGaf96906)
ACL RWパーミッションを有するユーザーがACL(アクセス制御リスト)付きのフ
ァイルに対して"-p"オプション付きのcp(1)を実行すると、次のようなエラー
メッセージが表示されます。
"cp: Warning: cannot cpacl to <file>:
cp: cannot set the permission bits on <file>: Not owner"
問題点の説明:
PHCO_35880:
1.(SR:8606447446 CR:JAGag04785)
-iオプション付きのcp(1)は、入力が正しいかユーザーに問い合わせます。
ところが、この問い合わせ文字列をstderrではなくstdoutに出力していました。
解決方法:
問い合わせ文字列をstderrに出力するように、-iオプション付きのcp(1)を修
正しました。
2.(SR:8606438883 CR:JAGaf96906)
必要なRWパーミッションを有するユーザーが、ACL付きのソースファイルに対
して"-p"オプション付きのcp(1)を実行すると、cp(1)はそのACLをターゲット
ファイルにコピーし、次のようなエラーメッセージを表示していました。
"cp: Warning: cannot cpacl to <file>:
cp: cannot set the permission bits on <file>: Not owner"
問題の再現手順:
# cd /var/tmp
# whoami
root
# echo "hello world" >>acl1
# setacl -s user::rwx,user:vts:rw-,group::r--,other:--- acl1
# ll acl1
-rwxrw----+ 1 root sys 12 May 16 17:24 acl1
# getacl acl1
# file: acl1
# owner: root
# group: sys
user::rwx
user:vts:rw-
group::r--
class:rw-
other:---
$ pwd
/mnt/vts
$ whoami
vts
$ cp -p /var/tmp/acl1 acl2
cp: Warning: cannot cpacl to acl2:
cp: cannot set the permission bits on acl2: Not owner
$ ll acl2
-rwxrw----+ 1 root sys 12 May 16 17:24 acl2
$ ll /var/tmp/acl1
-rwxrw----+ 1 root sys 12 May 16 17:24 /var/tmp/acl1
解決方法:
エラーメッセージを表示せずに、ターゲットファイルのACLをコピーして保持
するようにcp(1)を修正しました。
-----------------------------------------------------------------------------
Patch Name: PHCO_35880
Patch Description: s700_800 11.23 cp(1) cumulative patch
Creation Date: 07/01/17
Post Date: 07/01/31
Hardware Platforms - OS Releases:
s700: 11.23
s800: 11.23
Products: N/A
Filesets:
OS-Core.CORE-ENG-A-MAN,fr=B.11.23,fa=HP-UX_B.11.23_IA/PA,v=HP
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
Category Tags:
defect_repair general_release
Path Name: /hp-ux_patches/s700_800/11.X/PHCO_35880
Symptoms:
PHCO_35880:
( SR:8606447446 CR:JAGag04785 )
cp(1) -i does not follow the HP-UX manpage or UNIX
definition.
( SR:8606438883 CR:JAGaf96906 )
cp(1) with "-p" option throws out the error message
"cp: Warning: cannot cpacl to <file>:
cp: cannot set the permission bits on <file>: Not owner"
when executed on file with ACL (Access Control List),
even when the user has ACL RW permissions.
PHCO_31542:
( SR:8606352441 CR:JAGaf13246 )
For cp(1) -S functionality not listed in manpage.
( SR:8606355287 CR:JAGaf16041 )
cp(1) with -i and -f options changes the permissions of the
target file under UNIX95 flag.
( SR:8606350374 CR:JAGaf11194 )
cp(1) with -r or -R option, doesn't copy largefiles
directory if the largefile directory is a subdirectory.
( SR:8606350372 CR:JAGaf11192 )
cp(1) with -r or -R option, doesn't copy multiple source
correctly if the target directory doesn't exist.
( SR:8606368574 CR:JAGaf29136 )
cp(1) manpage incorrectly documents the behavior of -R
option.
Defect Description:
PHCO_35880:
( SR:8606447446 CR:JAGag04785 )
When cp(1) is called with -i option, it queries the user for
inputs. This query string is being written to stdout
instead of stderr.
Resolution:
cp(1) has been modified to print the query to stderr, when
-i option is used.
( SR:8606438883 CR:JAGaf96906 )
cp(1) with "-p" option when executed on the source file
with ACL set, carries the ACL to the target file and
throws out the error message
"cp: Warning: cannot cpacl to <file>:
cp: cannot set the permission bits on <file>: Not owner"
even when the user has the required RW permissions.
Steps to reproduce the problem:
# cd /var/tmp
# whoami
root
# echo "hello world" >>acl1
# setacl -s user::rwx,user:vts:rw-,group::r--,other:--- acl1
# ll acl1
-rwxrw----+ 1 root sys 12 May 16 17:24 acl1
# getacl acl1
# file: acl1
# owner: root
# group: sys
user::rwx
user:vts:rw-
group::r--
class:rw-
other:---
$ pwd
/mnt/vts
$ whoami
vts
$ cp -p /var/tmp/acl1 acl2
cp: Warning: cannot cpacl to acl2:
cp: cannot set the permission bits on acl2: Not owner
$ ll acl2
-rwxrw----+ 1 root sys 12 May 16 17:24 acl2
$ ll /var/tmp/acl1
-rwxrw----+ 1 root sys 12 May 16 17:24 /var/tmp/acl1
Resolution:
cp(1) is modified so that it copies and retains the ACL
of the target file without giving any error message.
PHCO_31542:
( SR:8606352441 CR:JAGaf13246 )
In the manpage of cp(1), the functionality for -S option is
not listed.
Resolution:
The documentation for the functionality of -S option is
added to the manpage.
( SR:8606355287 CR:JAGaf16041 )
Under UNIX95 flag set, cp(1) command when invoked with -i
and -f options changes the permissions of the target file,
which is not according to the open group documentation.
Steps to reproduce the problem:
$touch file1 file2
$chmod 0666 file2
$echo "hello" >> file1
$ls -l file1 file2
-rw-rw-r-- 1 vts ssgrp 6 Apr 6 21:06 file1
-rw-rw-rw- 1 vts ssgrp 0 Apr 6 21:04 file2
$export UNIX95=1
$cp -i -f file1 file2
overwrite file2? (y/n) y
$ls -l file1 file2
-rw-rw-r-- 1 vts ssgrp 6 Apr 6 21:06 file1
-rw-rw-r-- 1 vts ssgrp 6 Apr 6 21:09 file2
Resolution:
Now the cp(1) command has been modified so that the target
file retains its permissions when 'cp -i -f <source_file>
<target_file>' is executed under UNIX95 flag set
( SR:8606350374 CR:JAGaf11194 )
If a largefile enabled file is being copied to a target
directory(largefile enabled) mounted on non-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 /development/dir1
2.Create largefiles in /development/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' /development/dir1
cp -rp /development/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:8606350372 CR:JAGaf11192 )
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.
With UNIX95 flag set, cp(1) would exit with an error if
any attempt is made to copy multiple files to a
non-existing directory.
( SR:8606368574 CR:JAGaf29136 )
cp(1) manpage incorrectly documents that -R option would
set the read, write and execute permission for the owner on
the target file.
Actual behavior of -R is identical to -r option and it
does not change the permission of the target files.
Resolution:
The man page is updated to document that -r and -R options
have identical behavior.
Enhancement:
No
SR:
8606447446 8606438883 8606350372 8606350374 8606352441
8606355287 8606368574
Patch Files:
OS-Core.CORE-ENG-A-MAN,fr=B.11.23,fa=HP-UX_B.11.23_IA/PA,
v=HP:
/usr/share/man/man1.Z/cp.1
OS-Core.UX-CORE,fr=B.11.23,fa=HP-UX_B.11.23_IA/PA,v=HP:
/usr/lib/nls/msg/C/cp.cat
OS-Core.UX2-CORE,fr=B.11.23,fa=HP-UX_B.11.23_IA,v=HP:
/usr/bin/cp
OS-Core.UX2-CORE,fr=B.11.23,fa=HP-UX_B.11.23_PA,v=HP:
/usr/bin/cp
what(1) Output:
OS-Core.CORE-ENG-A-MAN,fr=B.11.23,fa=HP-UX_B.11.23_IA/PA,
v=HP:
/usr/share/man/man1.Z/cp.1:
None
OS-Core.UX-CORE,fr=B.11.23,fa=HP-UX_B.11.23_IA/PA,v=HP:
/usr/lib/nls/msg/C/cp.cat:
None
OS-Core.UX2-CORE,fr=B.11.23,fa=HP-UX_B.11.23_IA,v=HP:
/usr/bin/cp:
cp.c $Date: 2007/01/03 16:36:32 $Revision: r11.23/2
PATCH_11.23 (PHCO_35880)
$Revision: @(#) cp R11.23_BL2007_0117_2 PATCH_11.23
PHCO_35880
OS-Core.UX2-CORE,fr=B.11.23,fa=HP-UX_B.11.23_PA,v=HP:
/usr/bin/cp:
$Revision: 92453-07 linker linker crt0.o B.11.16.01
030415 $
cp.c $Date: 2007/01/03 16:36:32 $Revision: r11.23/2
PATCH_11.23 (PHCO_35880)
$Revision: @(#) cp R11.23_BL2007_0117_2 PATCH_11.23
PHCO_35880
cksum(1) Output:
OS-Core.CORE-ENG-A-MAN,fr=B.11.23,fa=HP-UX_B.11.23_IA/PA,
v=HP:
887426320 5350 /usr/share/man/man1.Z/cp.1
OS-Core.UX-CORE,fr=B.11.23,fa=HP-UX_B.11.23_IA/PA,v=HP:
1206810716 1538 /usr/lib/nls/msg/C/cp.cat
OS-Core.UX2-CORE,fr=B.11.23,fa=HP-UX_B.11.23_IA,v=HP:
3106349516 67780 /usr/bin/cp
OS-Core.UX2-CORE,fr=B.11.23,fa=HP-UX_B.11.23_PA,v=HP:
2837328653 53248 /usr/bin/cp
Patch Conflicts: None
Patch Dependencies: None
Hardware Dependencies: None
Other Dependencies: None
Supersedes:
PHCO_31542
Equivalent Patches: None
Patch Package Size: 90 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_35880
5. Run swinstall to install the patch:
swinstall -x autoreboot=true -x patch_match_target=true \
-s /tmp/PHCO_35880.depot
By default swinstall will archive the original software in
/var/adm/sw/save/PHCO_35880. 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_35880.text file is
available in the product readme:
swlist -l product -a readme -d @ /tmp/PHCO_35880.depot
To put this patch on a magnetic tape and install from the
tape drive, use the command:
dd if=/tmp/PHCO_35880.depot of=/dev/rmt/0m bs=2k
Special Installation Instructions: None
|