Jump to content 日本-日本語
日本HPホーム 製品とサービス サポートとドライバ ソリューション ご購入方法
≫ お問い合わせ
日本HPホーム
企業ユーザ向けサポート情報   >  HP-UX サポート  >  セキュリティ報告&パッチダイジェスト翻訳版

PHCO_36735 s700_800 11.23 csh(1)累積パッチ

企業ユーザ向けサポート情報

HP-UX サポート
Tru64 サポート
OpenVMS サポート
セキュリティ報告&パッチダイジェスト翻訳版
技術情報ツリー
ソフトウェアアップデート情報
ITRC日本フォーラム

ITRC

パッチデータベース
技術情報ベースの検索
サポートケースマネージャ
ソフトウェア アップデート マネージャ (SUM)
ご利用の手順
日本HPサイトマップ
コンテンツに進む
パッチ名:   PHCO_36735

パッチ摘要: s700_800 11.23 csh(1)累積パッチ

作成日:  07/07/10

公開日:  07/08/03

ハードウェアプラットフォームおよびOSリリース:

	s700: 11.23
	s800: 11.23

現象:

	PHCO_36735:

	1.(SR:8606465525 CR:JAGag21122)
	PHCO_34935をシステムにインストールすると、ログインcsh(1)セッションが、
	ログアウト時にコマンドヒストリを$HOME/.historyファイルに保存しません。

	2.(SR:8606437014 CR:JAGaf95223)
	設定したはずの変数にアクセスすると、csh(1)が"Undefined variable"という
	エラーメッセージを表示します。競合により、変数に設定したデータが消失す
	るため、データ破壊が起きます。

問題点の説明:

	PHCO_36735:

	1.(SR:8606465525 CR:JAGag21122)
	パッチPHCO_34935をシステムにインストールすると、ログインcsh(1)がヒスト
	リを記録しませんでした。

	例:

	# ls -la .history
	-rw-rw-rw-   1 sent  users  273 May  8 16:34 .history
	# date
	Tue May  8 18:27:42 IST 2007
	#

	別のターミナルにユーザー(cshの場合はログインシェル)としてログインした
	場合:

	librx266 21: echo "xxxxxx"
	xxxxxx
	librx266 22: echo "yyyyyy"
	yyyyyy
	librx266 23: exit
	librx266 24: logout

	# ls -la .history
	-rw-rw-rw-   1 sent  users  273 May  8 16:34 .history

	ログインシェルから抜け出た後、.historyファイルがまったく更新されていま
	せん。

	ここで、再度/usr/bin/cshを実行してみます。

	librx266 23: csh
	librx266 21: which csh
	/usr/bin/csh
	librx266 22: echo "aaaa"
	aaaa
	librx266 23: echo "bbbb"
	bbbb
	librx266 24:  ls -l .history
	-rw-rw-rw-   1 sent  users  273 May  8 16:34 .history
	librx266 25: exit
	librx266 26: librx266 24: date
	Tue May  8 18:32:11 IST 2007
	librx266 26: ls -l .history
	-rw-rw-rw-   1 sent  users  267 May  8 18:32 .history

	/usr/bin/tail on .history :

	which csh
	echo "aaaa"
	echo "bbbb"
	ls -l .history
	exit

	この問題が起きるのは、ログインcshの場合だけであることがわかります。
	コマンド行からcshを実行した場合、この問題は起きません。

	解決方法:
	ログアウト時に、コマンドヒストリを$HOME/.historyファイルに保存するよう
	にcsh(1)を修正しました。

	2.(SR:8606437014 CR:JAGaf95223)
	csh(1)による変数の設定の処理中に、バックグラウンドジョブが終了すると、
	競合により、変数が設定されませんでした。そのため、データ損失が起きてい
	ました。

	解決方法:
	変数を正しく設定するようにcsh(1)を修正しました。

-----------------------------------------------------------------------------
Patch Name: PHCO_36735

Patch Description: s700_800 11.23 csh(1) cumulative patch

Creation Date: 07/07/10

Post Date: 07/08/03

Hardware Platforms - OS Releases: 
	s700: 11.23
	s800: 11.23

Products: N/A

Filesets: 
	OS-Core.CMIN-ENG-A-MAN,fr=B.11.23,fa=HP-UX_B.11.23_IA/PA,v=HP
	OS-Core.CMDS2-MIN,fr=B.11.23,fa=HP-UX_B.11.23_IA,v=HP
	OS-Core.CMDS2-MIN,fr=B.11.23,fa=HP-UX_B.11.23_PA,v=HP

Automatic Reboot?: No

Status: General Release

Critical: 
	Yes
	PHCO_36735: CORRUPTION
		CORRUPTION : (SR:8606437014 CR:JAGaf95223)
		Addresses data loss by fixing a
		race condition.
	PHCO_31543: MEMORY_LEAK

Category Tags: 
	defect_repair general_release critical corruption
	memory_leak

Path Name: /hp-ux_patches/s700_800/11.X/PHCO_36735

Symptoms: 
	PHCO_36735:
	( SR:8606465525 CR:JAGag21122 )
	PHCO_34935 introduced a behavior that will cause login
	csh(1) sessions not to save command history to the
	$HOME/.history file at logout.

	( SR:8606437014 CR:JAGaf95223 )
	The error message "Undefined variable" is thrown by csh(1)
	when a set variable is accessed, due to race condition.
	The data which was set to the variable will be lost, causing
	data corruption.

	PHCO_34935:
	( SR:8606408611 CR:JAGaf68513 )
	If there is an Invalid multibyte character in the ~/.history
	file, then csh(1) script exits with error message
	"readc(1): invalid multibyte character.".

	( SR:8606426491 CR:JAGaf85972 )
	csh(1) fails to match the correct "endif" for "if".

	( SR:8606423253 CR:JAGaf82776 )
	csh(1) fails to find the goto label.

	PHCO_32667:
	( SR:8606386573 CR:JAGaf46727 )
	In a csh(1) script, if there are more than 1024 characters
	between a goto statement and the target label, the
	following error message is encountered:
	<Alabel>: label not found.

	( SR:8606389949 CR:JAGaf50095 )
	When executing a script in a multi-byte locale, with
	multi-byte characters split across 1024 byte boundaries,
	csh(1) may issue the following error message:
	readc(1): Invalid multibyte character

	PHCO_31543:
	( SR:8606350360 CR:JAGaf11180 )
	csh(1) limits the environment variable to 2k when noglob
	mode is unset.

	( SR:8606359311 CR:JAGaf20007 )
	csh(1) gives an error message "Out of memory" on large
	files.

	( SR:8606365126 CR:JAGaf25761 )
	csh(1) built-in 'limit' displays incorrect value
	for the resource datasize.

	( SR:8606359508 CR:JAGaf20204 )
	csh(1) does not support 10240 chars for environment
	variable when double quoted.

	( SR:8606370490 CR:JAGaf30912 )
	csh(1) built-in 'echo' exits with an error message when
	there is '\' at the end of the string.

Defect Description: 
	PHCO_36735:
	( SR:8606465525 CR:JAGag21122 )
	With the patch PHCO_34935 installed on the system,
	login csh(1) doesn't record history.

	For example,

	# ls -la .history
	-rw-rw-rw-   1 sent  users  273 May  8 16:34 .history
	# date
	Tue May  8 18:27:42 IST 2007
	#

	On another terminal, logged in as an user (with csh as
	the login shell )

	librx266 21: echo "xxxxxx"
	xxxxxx
	librx266 22: echo "yyyyyy"
	yyyyyy
	librx266 23: exit
	librx266 24: logout

	# ls -la .history
	-rw-rw-rw-   1 sent  users  273 May  8 16:34 .history

	   As seen, the .history file has not been updated at
	all after exit from the login shell.

	Now tested again by invoking /usr/bin/csh

	librx266 23: csh
	librx266 21: which csh
	/usr/bin/csh
	librx266 22: echo "aaaa"
	aaaa
	librx266 23: echo "bbbb"
	bbbb
	librx266 24:  ls -l .history
	-rw-rw-rw-   1 sent  users  273 May  8 16:34 .history
	librx266 25: exit
	librx266 26: librx266 24: date
	Tue May  8 18:32:11 IST 2007
	librx266 26: ls -l .history
	-rw-rw-rw-   1 sent  users  267 May  8 18:32 .history

	/usr/bin/tail on .history :

	which csh
	echo "aaaa"
	echo "bbbb"
	ls -l .history
	exit

	   Hence the problem is seen only on login csh and
	not when csh is invoked from command line.

	Resolution:
	csh(1) has been modified to save command history
	to the $HOME/.history file at logout.

	( SR:8606437014 CR:JAGaf95223 )
	When csh(1) is in the process of setting a variable, if
	a background job exits, the variable will not be set
	due to race condition, thus causing data loss.

	Resolution:
	csh(1) has been modified to set the variable correctly.

	PHCO_34935:
	( SR:8606408611 CR:JAGaf68513 )
	If there is an Invalid multibyte character in the
	~/.history file, csh(1) scripts exit with error
	message "readc(1): invalid multibyte character."

	Resolution:
	csh(1) will no longer read the ~/.history file for
	non-interactive invocations. If required by the script,
	read the ~/.history file explicitly using source command.

	( SR:8606426491 CR:JAGaf85972 )
	csh(1) fails to match "if" to "endif" correctly in nested
	"if" statements, if the outer "if" condition is false and
	there is no space between ")" and "then" in one of the
	inner "if" statement.

	Resolution:
	csh(1) has been fixed to match the correct endif in the
	nested if statement.

	( SR:8606423253 CR:JAGaf82776 )
	csh(1) fails to find the goto label if there is a here-doc
	in between goto statement and the label, and if no space
	is provided between the here-document word and the
	redirection (>) operator. goto reports "Label not found"
	error.

	Resolution:
	csh(1) has been modified to search the label for goto
	statement correctly.

	PHCO_32667:
	( SR:8606386573 CR:JAGaf46727 )
	In a csh(1) script, if there are more than 1024 characters
	between a goto statement and the target label, the
	following error message is encountered:
	<Alabel>: label not found.

	The following code construct demonstrates this scenario.
	#!/usr/bin/csh
	mylabel:
	echo "Hello World"
	############## .....
	...... ###########  <-- more than 1024 characters
	                        from mylabel
	goto mylabel        <-- this goto will fail

	This error condition was occuring because csh(1) was
	not retaining appropriate information about the target
	labels.

	Resolution:
	This defect has now been fixed by appropriately retaining
	information about target labels. Further, the fix involved
	changes to the modules that enable csh to execute scripts
	larger than 1GB. Please refer to the csh(1) man page for
	more information (see environment variable LARGESCRIPTS).

	( SR:8606389949 CR:JAGaf50095 )
	When executing a script in a multi-byte locale, with
	multi-byte characters split across 1024 byte boundaries,
	csh(1) fails to recognize the valid multi-byte character
	across the boundary. This gives the error message:
	readc(1): Invalid multibyte character

	Resolution:
	Now, csh(1) recognizes multi-byte characters split across
	1024 byte boundaries correctly.

	PHCO_31543:
	( SR:8606350360 CR:JAGaf11180 )
	csh(1) limits the environment variable of command
	substitution to 2k bytes when noglob mode is unset.
	The csh(1) manpage says that the limit for a word
	is 10240 bytes.
	The problem can be reproduced as follows:
	$ csh
	% set VAR=`yes | head -2046 | tr -d "\012"`
	% echo $VAR | wc
	1 1 2047
	% set VAR=`yes | head -2047 | tr -d "\012"`
	Pathname too long.  <===== wrong behavior
	% set noglob
	% set VAR=`yes | head -2047 | tr -d "\012"`
	% echo $VAR | wc
	1 1 2048
	% unset noglob
	% set VAR=`yes | head -2047 | tr -d "\012"`
	Pathname too long.  <====== wrong behavior

	Resolution:
	csh(1) has been modified to handle environment variable of
	size greater than 2K bytes when noglob is unset.

	( SR:8606359311 CR:JAGaf20007 )
	csh exits with the error message "Out of memory" while
	executing a file. This has been encountered when the size
	of the input file is around 1 GB.
	This can be reproduced as follows:
	1. Create a large script file
	$cat file
	echo "Hi"
	echo "Hi"
	....
	....
	echo "Hi"
	2. Run csh with this file i.e.
	$csh file
	Hi
	Hi
	....
	....
	Hi
	Out of memory.

	Resolution:
	csh is modified to free the space from the buffer
	which contains executed commands from the input
	files.

	( SR:8606365126 CR:JAGaf25761 )
	Built-in command 'limit' of csh(1) is displaying
	incorrect value for datasize if it is set to a
	value greater than 2GB.
	Steps to reproduce the problem :
	1. Set the maxdsiz to 2GB.
	# kctune maxdsiz=2147483648
	# csh -c "limit datasize"
	datasize        -2097152 kbytes
	csh(1) displays negative value for datasize if
	maxdsiz is set to value greater than 2GB.

	Resolution:
	csh(1) has been modified to display correct value
	of datasize.

	( SR:8606359508 CR:JAGaf20204 )
	csh(1) limits the resulting word of command substitution
	to 10237(if quoted) bytes when glob mode is set. The
	csh(1) manpage says that the limit for a word is 10240
	bytes. The problem can be reproduced as follows:
	$cat a.c
	#include<stdio.h>
	int main()
	{
	 int i=0;
	    for(i=0;i<10237;i++)
	     printf("A");
	  printf("\n");
	  return 0;
	}
	$cc a.c -o a
	$./a > LARGESTRING
	$ll LARGESTRING
	-rw-rw-rw-   1 vts   ssgrp   10238 Apr 15 11:58 LARGESTRING
	                             ^^^^^ (includes newline at end)
	create a script to assign large string(10237) to one
	variable and expand that variable using csh shell.
	$cat test1
	#!/usr/bin/csh
	set A=`cat LARGESTRING`
	echo "$A"
	$chmod 0555 test1
	$/usr/bin/csh
	%./test1
	Word too long.

	Resolution:
	csh is modified to handle the word length upto 10240
	characters.

	( SR:8606370490 CR:JAGaf30912 )
	The csh(1) built-in command 'echo' exits with error
	"display_char(1): Invalid multibyte character"
	if the input string contains '\' as the last character.
	This is happening in multibyte locale environment.
	The problem can be reproduced by the following steps:
	$ /usr/bin/csh
	% setenv LANG ja_JP.SJIS
	% echo "Test\"
	Test\display_char(1): Invalid multibyte character.
	     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

	Resolution:
	csh(1) is modified to handle the string with '\' at the
	end.

Enhancement: 
	No

SR: 
	8606465525 8606437014 8606408611 8606426491 8606423253
	8606350360 8606359311 8606359508 8606365126 8606370490
	8606386573 8606389949

Patch Files: 
	
	OS-Core.CMIN-ENG-A-MAN,fr=B.11.23,fa=HP-UX_B.11.23_IA/PA,
		v=HP:
	/usr/share/man/man1.Z/csh.1

	OS-Core.CMDS2-MIN,fr=B.11.23,fa=HP-UX_B.11.23_IA,v=HP:
	/usr/bin/csh

	OS-Core.CMDS2-MIN,fr=B.11.23,fa=HP-UX_B.11.23_PA,v=HP:
	/usr/bin/csh

what(1) Output: 
	
	OS-Core.CMIN-ENG-A-MAN,fr=B.11.23,fa=HP-UX_B.11.23_IA/PA,
		v=HP:
	/usr/share/man/man1.Z/csh.1:
		None

	OS-Core.CMDS2-MIN,fr=B.11.23,fa=HP-UX_B.11.23_IA,v=HP:
	/usr/bin/csh:
		sh.func.c $Date: 2006/05/25 04:13:52 $Revision: r11.
			23/2 PATCH_11.23 (PHCO_34935)
		sh.lex.c $Date: 2005/02/28 10:00:30 $Revision: r11.2
			3/2 PATCH_11.23 (PHCO_32667)
		sh.c $Date: 2007/07/09 15:46:38 $Revision: r11.23/2 
			PATCH_11.23 (PHCO_36735)
		sh.set.c $Date: 2007/07/09 15:45:37 $Revision: r11.2
			3/1 PATCH_11.23 (PHCO_36735)
		$Revision: @(#) csh R11.23_BL2007_0710_1 PATCH_11.23
			 PHCO_36735

	OS-Core.CMDS2-MIN,fr=B.11.23,fa=HP-UX_B.11.23_PA,v=HP:
	/usr/bin/csh:
		$Revision: 92453-07 linker linker crt0.o B.11.16.01 
			030415 $
		sh.func.c $Date: 2006/05/25 04:13:52 $Revision: r11.
			23/2 PATCH_11.23 (PHCO_34935)
		sh.lex.c $Date: 2005/02/28 10:00:30 $Revision: r11.2
			3/2 PATCH_11.23 (PHCO_32667)
		sh.c $Date: 2007/07/09 15:46:38 $Revision: r11.23/2 
			PATCH_11.23 (PHCO_36735)
		sh.set.c $Date: 2007/07/09 15:45:37 $Revision: r11.2
			3/1 PATCH_11.23 (PHCO_36735)
		$Revision: @(#) csh R11.23_BL2007_0710_1 PATCH_11.23
			 PHCO_36735

cksum(1) Output: 
	
	OS-Core.CMIN-ENG-A-MAN,fr=B.11.23,fa=HP-UX_B.11.23_IA/PA,
		v=HP:
	2452356731 33092 /usr/share/man/man1.Z/csh.1

	OS-Core.CMDS2-MIN,fr=B.11.23,fa=HP-UX_B.11.23_IA,v=HP:
	3076516604 410684 /usr/bin/csh

	OS-Core.CMDS2-MIN,fr=B.11.23,fa=HP-UX_B.11.23_PA,v=HP:
	2354966443 225280 /usr/bin/csh

Patch Conflicts: None

Patch Dependencies: None

Hardware Dependencies: None

Other Dependencies: None

Supersedes: 
	PHCO_34935 PHCO_32667 PHCO_31543

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_36735

	5. Run swinstall to install the patch:

		swinstall -x autoreboot=true -x patch_match_target=true \
			  -s /tmp/PHCO_36735.depot

	By default swinstall will archive the original software in 
	/var/adm/sw/save/PHCO_36735.  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_36735.text file is 
	available in the product readme:

		swlist -l product -a readme -d @ /tmp/PHCO_36735.depot

	To put this patch on a magnetic tape and install from the
	tape drive, use the command:

		dd if=/tmp/PHCO_36735.depot of=/dev/rmt/0m bs=2k

Special Installation Instructions: None


ページトップへ
セキュリティ報告&パッチダイジェスト翻訳版に戻る
プライバシー 本サイト利用時の合意事項 ウェブマスターに連絡
© 2008 Hewlett-Packard Development Company, L.P.