Patch-ID# 100457-01 Keywords: archive, zero, writes, compress, bar segmentation fault core dumped include EOT no rewind Synopsis: SunOS 4.1.1: bar Z option, special chars 'bar tvf rst0' causes segmentation fault. bar's include file option (I) causes segmentation violation using the *no rewind* tape device and end up writing past EOT Date: SunOS release: 4.1, 4.1.1 Topic: bar compress Z-option bar segmentation fault bar should do more checking when at EOT BugId's fixed with this patch: 1058869 1048339 1017233 1045302 1066617 1073572 1071068 Architectures for which this patch is available: sun4, sun4c, sun3, sun3x Patches which may conflict with this patch: Obsoleted by: SunOS 5.0 Problem Description: Bugid: 1058869 If we try to archive a compressed file using the Z option of bar, bar writes a empty file to the archive. Patch 100291-02 did not restore already-compressed file in the compressed form when un'baring. This patch fixes the problem. Bugid: 1048339 Bar gives error message of "No such file or directory." The problem seems to be similar to bug 1017233. In bar.c, the library call system() is passed the filename along with the command to compress. When system gives this string to the shell, the "#" is used for parameter substitution. Bugid: 1017233 The bar command cannot handle filenames with a leading "$" if the "Z" option (to compress files) is specified. This is because bar uses the system() library routine and passes the string "$filename" to perform the compression. When system() gives the string to sh(), the shell sees the leading "$" which causes parameter substitution to take place and the bar to fail: Bugid: 1045302 When attempting to read a bar file a segmentation fault (core dumped) error occurs. Both with t and x options. Bugid: 1073572 When using the include option of bar (I) with a list of files approx. >= 1100 long, a segmentation violation occurrs. Bugid: 1066617 If there are more than 1055 lines in the includefile used in the I option of bar, bar crashes with a segmentation fault. Bugid: 1071068 When using the "no rewind" tape device and forget to change tape when prompted, "bar" will end up writing past EOT. INSTALL: "sun3/bar" will work on both sun3 and sun3x architectures. "sun4/bar" will work on both sun4 and sun4c architectures. As root: # mv /bin/bar /bin/bar.FCS # cp sun{3,4}/{4.1,4.1.1}/bar /bin # chmod 755 /bin/bar