Patch Name: PHCO_23429 Patch Description: s700_800 11.04 (VVOS) cumulative crontab/at/cron patch Creation Date: 01/02/22 Post Date: 01/03/07 Hardware Platforms - OS Releases: s700: 11.04 s800: 11.04 Products: N/A Filesets: OS-Core.CMDS-MIN,fr=B.11.04,fa=HP-UX_B.11.04_32/64,v=HP OS-Core.CMIN-ENG-A-MAN,fr=B.11.04,fa=HP-UX_B.11.04_32/64,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_23429 Symptoms: PHCO_23429: 1) (SR: 8606139747 DTS: JAGad09058 ) Under certain conditions, cron is unable to create files under /var/spool/cron/tmp, and a message similar to: sh: /var/spool/cron/tmp/croutJHAa00690: Cannot find or open the file is logged into /var/adm/cron/log. 2) Ported HP-UX patch PHCO_22767 to VVOS Based on HP-UX patch PHCO_22767: 1.crontab(1) incorrect functionality . 2.When DST shift is due before the scheduled time, at(1) does not schedule the jobs correctly. 3.at(1) incorrect argument parsing. 4.In trusted mode, crontab(1) does not create correct audit record. PHCO_23194: Ported HP-UX patch PHCO_21494 to VVOS Based on HP-UX patch PHCO_21494: 1. For jobs scheduled for 31st of a month, Cron starts looping on the last day of the month if the month has 30 days. 2. at(1) reports "bad date specification" when specifying four digits time. Based on HP-UX patch PHCO_19986: 1. at now + [n] months ignores leap year. 2. crontab(1) -e creates crontab job files with incorrect permissions. 3. at(1) manpage needs to be modified. 4. Patches for cron(1M) should stop cron and start the new cron. 5. at(1) assumes the given time to be AM if the am_pm string in the specified locale is NULL. PHCO_18320: Ported HP-UX patch PHCO_17553 to VVOS Based on HP-UX patch PHCO_17553: at(1) does not accept input of "00" or "0" for year for all locales. Based on HP-UX patch PHCO_16942: 1. On trusted systems, cron(1) has slower performance due to calling getspwent() when getspwnam() should have been used. 2. at(1) does not recognize year 00 (2000). When year is input as 00, at(1) exits with the error message - "bad date specification" Based on HP-UX patch PHCO_15235: Year displayed in two digits Based on HP-UX patch PHCO_14780: 1. crontab creates files with improper permissions. 2. at creates an invalid file in /var/spool/cron when given a non-existant job file with the -f option. Defect Description: PHCO_23429: 1) (SR: 8606139747 DTS: JAGad09058 ) cron was unable to create the file in the multilevel directory because the multilevel child directory did not exist. Resolution: Ensure that the multilevel child directory exists or is created by the time the file is created. 2) Ported HP-UX patch PHCO_22767 to VVOS Based on HP-UX patch PHCO_22767: 1. crontab(1) incorrect functionality. Resolution: Code has been modified to take care of this issue. 2. When DST shift is due, there will be a non-existing time in a day. When jobs are scheduled for such non-existing times through commands like - at now + minutes, at may fails with message "too late" . Resolution: Now the code has been modified to take care of jobs scheduled for non-existing times. 3. at(1) incorrect argument parsing. Resolution: The code is modified to take care of this. 4. In trusted mode, crontab(1) does not create audit records because required data is not generated by the underlying library call. Resolution: Appropriate calls to get audit ids are used to resolve the problem. PHCO_23194: Ported HP-UX patch PHCO_21494 to VVOS Based on HP-UX patch PHCO_21494: 1. A job scheduled for 31st of a month starts looping on the last day of the month incase the month does not have 31 days (Looping also happens for jobs scheduled for 29th and 30th of Feb incase of non-leap years and for jobs scheduled for 30th of Feb incase of leap years). This erroneous behaviour is due to an unnecessary day comparison introduced for DST fix. Resolution: Now the day comparison made in cron has been commented out to fix the problem. 2. The problem is because at(1) is parsing extra characters other than the time string (for eg. characters from date string), thus, giving the error message "bad date specification". Resolution: The fix is to set the END OF TIME(EOT) to 1 after parsing time string such that the unnecessary parsing of the date string is not done. Based on HP-UX patch PHCO_19986: 1. Setting the system date such that the day is any day after 28th and executing the at(1) command to schedule the job for the month of February in a leap year, schedules the job incorrectly. The following shows the incorrect behaviour of at(1). $ date 1229084495 date: do you really want to run time backwards? [yes/no]yes Fri Dec 29 08:44:00 EST 1995 $ at now + 2 month warning: commands will be executed using /usr/bin/sh job 825687848.a at Fri Mar 1 08:44:08 1996 at(1) should have scheduled the job for Feb 29. Instead it is scheduling the job for Mar 1. 2. crontab when used with -e creates the job files with read permission for all. 3. The manpage of at(1) needs to be more clear regarding the ambiguity of dates. 4. The cron(1M) patches do not stop the old cron daemon and start the new cron daemon. The starting and stopping of the daemon does not correctly work in the swinstall scripts since the signal mask of the cron daemon gets modified through SD scripts. 5. For certain locales like fr_FR.iso88591, where am_pm string is defined as null ("";""), at(1) treats the specified time to be AM. The following illustrates the problem. $ export LANG=fr_FR.iso88591 $ echo date | at 07:00 demain # OK job 879487201.a at Vendredi 14 november 1997 07:00:00 $ echo date | at 20:00 # OK job 879447600.a at Jeudi 13 november 1997 20:00:00 $ echo date | at 20:00 demain # BUG Hours Field Is Invalid Resolution: 1. Checking for the leap year before scheduling the job, solves the problem. 2. The crontab command was relying on a macro for permissions on the job file. This macro was incorrect. This has been set right now. Now, crontab(1) creates job files with read permission only for the owner. 3. Necessary changes are made to the at(1) manpage to solve this problem. 4. Resetting the signal handlers in cron to their respective defaults solves the problem. 5. Checking for the value of am_pm string for the locale solves the problem. PHCO_18320: Ported HP-UX patch PHCO_17553 to VVOS Based on HP-UX patch PHCO_17553: at(1) treats year input of 00 or 0 as incorrect when locale is set to one which defines D_T_FMT (date-time) string to have year in fields other than the third. For eg. japanese locale defines the date string to be of format yy/mm/dd. With locale set to japanese, an attempt to schedule a job using at(1) for a date 00/12/20 or 0/12/20 fails. Resolution: at(1) assumed that the year field can be only in the third field of the date string. This assumption has been removed. Also, the function which returned error if the date string had 0 or 00 in the first or second fields has been changed not to check and return error for such a condition. Now, at(1) accepts input of 0 or 00 for year in any field of the date string, as specified by D_T_FMT string for the locale. Based on HP-UX patch PHCO_16942: 1. On trusted systems, cron(1) called getspwent() which performs a linear search in the passwd database, instead of getspwnam() which performs a keyed search. 2. at(1) treats year input of 00 as incorrect. Following shows how at(1) behaves with 00 as input year. # at 12:00 1 Jan 00 bad date specification The command has been changed to accept 00 as year 2000. After the fix, at(1) treats year input of 00 as year 2000 and does not show any error messages. Based on HP-UX patch PHCO_15235: Year displayed in two digits Based on HP-UX patch PHCO_14780: 1. The problem consists of the creation of a temporary file for "crontab -e".The file is created with improper permissions. The write permission should exist only for the owner of the calling process. 2. At fails to clean up the file created under /var/spool/cron when invoked with -f option and non-existant job file. SR: 8606139747 8606165710 8606125591 8606157697 8606158467 4701411173 8606130624 8606106122 1653303602 8606106557 1653312975 5003459313 1653293407 5003451278 1653238113 4701416891 1653269746 1653266239 4701391466 4701384057 4701383794 Patch Files: OS-Core.CMDS-MIN,fr=B.11.04,fa=HP-UX_B.11.04_32/64,v=HP: /usr/lib/nls/msg/C/at.cat /usr/lib/nls/msg/C/cron.cat /usr/lib/nls/msg/C/crontab.cat /usr/sbin/cron /usr/bin/at /usr/bin/crontab OS-Core.CMIN-ENG-A-MAN,fr=B.11.04,fa=HP-UX_B.11.04_32/64, v=HP: /usr/share/man/man1.Z/at.1 /usr/share/man/man1.Z/batch.1 what(1) Output: OS-Core.CMDS-MIN,fr=B.11.04,fa=HP-UX_B.11.04_32/64,v=HP: /usr/lib/nls/msg/C/at.cat: None /usr/lib/nls/msg/C/cron.cat: None /usr/lib/nls/msg/C/crontab.cat: None /usr/sbin/cron: $Revision: Hewlett-Packard ISSL Level vvos_rose42 $ $Header: Hewlett-Packard ISSL Release vvos_r ose $ $Date: Fri Feb 23 16:06:59 EST 2001 $ $Revision: 82.9.1.15 $ $Source: cmd/cron/cron.c, hpuxcmdcntl, vvos_rose, ro se0214 $Date: 01/02/23 15:44:33 $ $Revision: 1.32 PATCH_11.04 (PHCO_23429) $ $Source: cmd/cron/cron_sec.c, cmdhooks, vvos_rose, r ose0214 $Date: 01/02/23 15:44:33 $ $Revision : 1.11.1.3 PATCH_11.04 (PHCO_23429) $ /usr/bin/at: $Revision: Hewlett-Packard ISSL Level vvos_rose42 $ $Header: Hewlett-Packard ISSL Release vvos_r ose $ $Date: Fri Feb 23 16:06:59 EST 2001 $ $Revision: 82.9.1.15 $ $Source: cmd/cron/at.c, hpuxcmdcntl, vvos_rose, rose 0214 $Date: 01/02/23 15:44:33 $ $Revision: 1 .32 PATCH_11.04 (PHCO_23429) $ $Revision: 82.3.1.9 $ $Revision: 82.1.1.5 $ /usr/bin/crontab: $Revision: Hewlett-Packard ISSL Level vvos_rose42 $ $Header: Hewlett-Packard ISSL Release vvos_r ose $ $Date: Fri Feb 23 16:06:59 EST 2001 $ $Revision: 82.9.1.15 $ $Source: cmd/cron/crontab.c, hpuxcmdcntl, vvos_rose, rose0214 $Date: 01/02/23 15:44:33 $ $Revisi on: 1.21 PATCH_11.04 (PHCO_23429) $ OS-Core.CMIN-ENG-A-MAN,fr=B.11.04,fa=HP-UX_B.11.04_32/64, v=HP: /usr/share/man/man1.Z/at.1: None /usr/share/man/man1.Z/batch.1: None cksum(1) Output: OS-Core.CMDS-MIN,fr=B.11.04,fa=HP-UX_B.11.04_32/64,v=HP: 917137019 3402 /usr/lib/nls/msg/C/at.cat 1745700039 3275 /usr/lib/nls/msg/C/cron.cat 275784114 1058 /usr/lib/nls/msg/C/crontab.cat 3941057915 61440 /usr/sbin/cron 154403066 53248 /usr/bin/at 4018457688 32768 /usr/bin/crontab OS-Core.CMIN-ENG-A-MAN,fr=B.11.04,fa=HP-UX_B.11.04_32/64, v=HP: 933653161 11744 /usr/share/man/man1.Z/at.1 933653161 11744 /usr/share/man/man1.Z/batch.1 Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHCO_18320 PHCO_23194 Equivalent Patches: PHCO_22767: s700: 11.00 s800: 11.00 PHCO_23455: s700: 10.24 s800: 10.24 PHCO_22768: s700: 10.20 s800: 10.20 PHCO_22769: s700: 10.10 s800: 10.10 PHCO_22770: s700: 10.01 s800: 10.01 Patch Package Size: 210 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_23429 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHCO_23429.depot By default swinstall will archive the original software in /var/adm/sw/save/PHCO_23429. If you do not wish to retain a copy of the original software, use the patch_save_files option: swinstall -x autoreboot=true -x patch_match_target=true \ -x patch_save_files=false -s /tmp/PHCO_23429.depot 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_23429.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHCO_23429.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHCO_23429.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None