Patch Name: PHCO_26562 Patch Description: s700_800 11.11 at(1)/cron(1M)/crontab(1) patch Creation Date: 02/07/17 Post Date: 02/07/22 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 Automatic Reboot?: No Status: General Release Critical: No Category Tags: defect_repair enhancement general_release Path Name: /hp-ux_patches/s700_800/11.X/PHCO_26562 Symptoms: PHCO_26562: ( SR:8606229258 CR:JAGad98311 ) crontab(1) is not properly handling the crontab file when the filesystem is full. ( SR:8606189207 CR:JAGad58423 ) at(1) aborts with "rc=2" error when processing multi-byte characters if 'atjobs' script contain expressions to set the locale to a multi-byte locale. ( SR:8606207446 CR:JAGad76622 ) at(1) command lists all the jobs irrespective of the queue given. ( SR:8606179733 CR:JAGad48956 ) at/cron jobs are not able to create large files. Defect Description: PHCO_26562: ( SR:8606229258 CR:JAGad98311 ) When the filesystem on which /var mounted is full, editing crontab file (using "crontab -e") nullifies the file. Resolution: crontab(1) has been modified to handle the crontab file properly when the filesystem is full, so that the content of the crontab file is not lost. ( SR:8606189207 CR:JAGad58423 ) at(1) creates 'atjobs' scripts for executing batched commands at a later time. But at(1) causes execution error, when 'atjobs' scripts contain expressions to set the LC_CTYPE to a multi-byte locale. For example: if the atjob script has the following expressions: setenv LANG ja_JP.SJIS setenv AAA xxxx at -t 03261500 << EOF ./test1.sh EOF Where "xxxx" is Japanese character and it is SJIS Code '0x93609197'. 'atjobs' script is created in /var/spool/cron/atjobs after above command. But when the above job is scheduled, at(1) aborts with "rc=2" error. The log file /var/adm/cron/log will contain the above error. Resolution: /usr/bin/sh does not handle the change in LC_CTYPE in the same session. This behavior of sh-posix(1) is as per the requirements of POSIX standards.The man page documentation of sh-posix(1) also states this behavior. sh-posix(1) man page states the following: "Changing the value of LC_CTYPE after the shell has started does not affect the lexical processing of shell commands in the current shell execution environment or its subshells. See environ(5)." As the above job involves changing the LC_CTYPE, at(1) used to process the data in the previous set locales resulting in error. at(1) is modified to take care of these environment Variables. Now, When scheduling 'atjobs' involving multibyte locales, at(1) inserts a new shell session in the 'atjobs' file, if it encounters any of LC_ALL, LC_CTYPE and LANG settings. ( SR:8606207446 CR:JAGad76622 ) Check for the specified queue(which user might have given) was not done. Hence by default at(1) was printing all the jobs pending in all the queues. Now, the at(1) command is modified to check for any queue specified by the user before it prints the queued jobs. Eg, 1. Create atjobs in the queue f and q using the following commands : $ at -q q 5pm next year $ at -q f 5pm next month 2. List the atjobs using at -l option $ at -l 975756600.q Sat Dec 2 17:00:00 2000 946812600.f Sun Jan 2 17:00:00 2000 3. Execute the at(1) with -l and -q option : $ at -l -q f 975756600.q Sat Dec 2 17:00:00 2000 946812600.f Sun Jan 2 17:00:00 2000 Here the at(1) was expected to list only the jobs in the queue f. Resolution: This was happening because the check for a particular queue was not present while printing the job details. Now, a check is introduced to print only the jobs of the required queue. ( SR:8606179733 CR:JAGad48956 ) at/cron jobs cannot create large files. This was happening because at(1) was not checking for the allowed maximum limits of user. Steps to reproduce the defect : $ ulimit unlimited $ /usr/bin/at now <t1 EOF job 1023756162.a at Tue Jun 11 06:12:42 2002 $ cat t1 4194303 (expect output here is "unlimited") Resolution: at(1) has been modified so that the atjobs can create large files for users having the required ulimit value. SR: 8606179733 8606189207 8606207446 8606229258 Patch Files: OS-Core.CMDS-MIN,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: /usr/bin/at /usr/bin/crontab /usr/lib/nls/msg/C/at.cat /usr/sbin/cron what(1) Output: OS-Core.CMDS-MIN,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: /usr/bin/at: at.c $Date: 2002/07/09 23:01:20 $Revision: r11.11/2 PATCH_11.11 (PHCO_26562) pdt.c $Date: 2002/07/09 23:01:20 $Revision: r11.11/2 PATCH_11.11 (PHCO_26562) ptime.c $Date: 2002/07/09 23:01:20 $Revision: r11.11 /1 PATCH_11.11 (PHCO_26562) pdate.c $Date: 2002/07/09 23:01:20 $Revision: r11.11 /1 PATCH_11.11 (PHCO_26562) $Revision: @(#) all CUP11.11_BL2002_0717_6 PATCH_11. 11 PHCO_26562 Wed Jul 17 09:48:20 PDT 2002 $ /usr/bin/crontab: crontab.c $Date: 2002/07/09 23:01:20 $Revision: r11. 11/1 PATCH_11.11 (PHCO_26562) $Revision: @(#) all CUP11.11_BL2002_0717_6 PATCH_11. 11 PHCO_26562 Wed Jul 17 09:48:27 PDT 2002 $ /usr/lib/nls/msg/C/at.cat: None /usr/sbin/cron: cron.c $Date: 2002/07/09 23:01:20 $Revision: r11.11/ 2 PATCH_11.11 (PHCO_26562) elm.c $Date: 2002/07/09 23:01:20 $Revision: r11.11/1 PATCH_11.11 (PHCO_26562) $Revision: @(#) all CUP11.11_BL2002_0717_6 PATCH_11. 11 PHCO_26562 Wed Jul 17 09:47:58 PDT 2002 $ cksum(1) Output: OS-Core.CMDS-MIN,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: 3759690663 49152 /usr/bin/at 1082289244 28672 /usr/bin/crontab 2973068972 3386 /usr/lib/nls/msg/C/at.cat 1542386902 40960 /usr/sbin/cron Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: None Equivalent Patches: None Patch Package Size: 150 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_26562 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHCO_26562.depot By default swinstall will archive the original software in /var/adm/sw/save/PHCO_26562. 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_26562.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHCO_26562.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHCO_26562.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None