Patch Name: PHCO_19637 Patch Description: s700_800 10.10 Year 2000 cumulative cron/at/crontab patch Creation Date: 99/09/03 Post Date: 99/09/09 Hardware Platforms - OS Releases: s700: 10.10 s800: 10.10 Products: N/A Filesets: OS-Core.CMDS-MIN OS-Core.CMIN-ENG-A-MAN Automatic Reboot?: No Status: General Superseded Critical: No Path Name: /hp-ux_patches/s700_800/10.X/PHCO_19637 Symptoms: PHCO_19637: 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. PHCO_18060: The cron(1M) and at(1) binaries in the previous patch PHCO_17551 fail to execute in trusted mode. These binaries have been linked with the archive version of libsec instead of the shared version of the library. PHCO_17551: at(1) does not accept input of "00" or "0" for year for all locales. PHCO_16863: 1. On trusted systems, cron(1) has slower performance due to calling getspwent() when getspwnam() should have been used. 2. Cron from patch PHCO_15429 does not run at(1) and batch(1) jobs. 3. at(1) schedules jobs incorrectly relative to 28 February of non-leap years. 4. at(1) does not recognize year 00 (2000). When year is input as 00, at(1) exits with the error message - "bad date specification" PHCO_15429: On trusted systems, /etc/passwd is inherited as stdin by processes spawned by cron. PHCO_15229: Year diplayed in two digits. PHCO_14474: 1. at non able to schedule job for Feb 29 2000 correctly. 2. at creates an invalid file in /var/spool/cron when given a non-existant job file with the -f option.' PHCO_10736: Cron used to dump core and die when jobs submitted with at -m were killed. PHCO_10120: The following symtoms correspond to the descriptions in the defect descriptions field for PHCO_10123: 1. option -t now deal with year 2000 input correctly. 2. year limit has been increased from 2030 to 2037. PHCO_8276: 1. at(1) records incorrect audit id on trusted systems PHCO_7996: 1. Cron does not mail stdout and stderr to user on a trusted system. 2. '.' not present in the default PATH PHCO_7835: at(1) cannot schedule job using weekdays in the last week of the month. PHCO_7031: 1. Cron dumps core intermittently. 2. Cron has a hard-coded limit of MAXRUN (40) child processes which can be running simultaneously. Now the limit has been increased to 100. Defect Description: PHCO_19637: 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 jobs 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. 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. PHCO_18060: cron(1M) and at(1) binaries in the previous patch PHCO_17551 do not work in trusted mode. These binaries are expected to be linked with the shared version of library libsec, but have been incorrectly linked with the archive version of the library. Resolution: The binaries have now been correctly linked with the shared libsec library and successfully execute in trusted mode. PHCO_17551: 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. PHCO_16863: 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. After installing PHCO_15429, jobs submitted from at(1) are never actually run, although they are removed from the /var/spool/cron/atjobs queue. 3. Jobs scheduled after 28 Feb are scheduled erratically by at(1). The following shows the incorrect behaviour of at(1). # date 0227112099 Sat Feb 27 11:20:00 GMT 1999 # at now + 2 day warning: commands will be executed using /usr/bin/sh job 920287223.a at Mon Mar 1 11:20:23 1999 # at now + 3 day warning: commands will be executed using /usr/bin/sh job 920287243.a at Mon Mar 1 11:20:43 1999 In the above example, job is scheduled for March 1st for both the inputs "now + 2 day" and "now + 3 day". For the input "now + 3 day", at(1) should have scheduled the job for March 2nd 1999. The source code has been changed to fix the defect. After the fix, at(1) correctly schedules jobs relative to Feb, 28th. In the above example, for input "now + 3 day", at(1) schedules the job for March 2nd. 4. 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. PHCO_15429: On trusted systems, crontab jobs spawned by cron gets /etc/passwd file on their stdin. PHCO_15229: Year displayed in two digits. PHCO_14474: 1. Job submitted for Feb 29, 2000 was actually scheduled for Mar 1, 2000. 2. At fails to clean up the file created under /var/spool/cron when invoked with -f option and non-existant job file. PHCO_10736: Cron used to dump core and die when jobs submitted with at -m were killed. PHCO_10120: 1. option -t now deal with year 2000 input correctly. 2. year limit has been increased from 2030 to 2037. PHCO_8276: 1. At records incorrect audit id on a trusted system PHCO_7996: 1. Cron does not mail stdout and stderr to user on a trusted system. 2. '.' not present in the default PATH PHCO_7835: at(1) cannot schedule job using weekdays in the last week of the month. PHCO_7031: 1. Cron dumps core intermittently. 2. Cron has a hard-coded limit of MAXRUN (40) child processes which can be running simultaneously. Now the limit has been increased to 100. SR: 1653312975 5003459313 1653293407 5003456673 4701416891 1653274167 5003425777 5003426254 1653269746 1653266239 1653241117 4701347153 4701334763 4701303453 5003239277 1653160630 5003298612 5003325241 4701328179 5003417006 Patch Files: /usr/sbin/cron /usr/bin/at /usr/bin/crontab /usr/share/man/man1.Z/at.1 /usr/share/man/man1.Z/batch.1 what(1) Output: /usr/sbin/cron: PATCH/10_10 PHCO_8276 $Revision: 76.2.1.21 $ PATCH_10_10: hpux_rel.o cron.o funcs.o 99/09/03 /usr/bin/at: PATCH/10_10 PHCO_8276 $Revision: 76.2.1.21 $ $Revision: 76.2.1.4 $ $Revision: 76.2.1.6 $ PATCH_10_10: hpux_rel.o at.o pdt.o ptime.o pdate.o f uncs.o permit.o 99/09/03 /usr/bin/crontab: PATCH/10_10 PHCO_8276 $Revision: 76.2.1.21 $ PATCH_10_10: hpux_rel.o crontab.o permit.o funcs.o 9 9/09/03 /usr/share/man/man1.Z/at.1: None /usr/share/man/man1.Z/batch.1: None cksum(1) Output: 403864078 40960 /usr/sbin/cron 1330957674 45056 /usr/bin/at 462675913 24576 /usr/bin/crontab 3331946115 9011 /usr/share/man/man1.Z/at.1 3331946115 9011 /usr/share/man/man1.Z/batch.1 Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHCO_7031 PHCO_7835 PHCO_7996 PHCO_8276 PHCO_10120 PHCO_10736 PHCO_14474 PHCO_15229 PHCO_15429 PHCO_16863 PHCO_17551 PHCO_18060 Equivalent Patches: None Patch Package Size: 180 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_19637 5a. For a standalone system, run swinstall to install the patch: swinstall -x autoreboot=true -x match_target=true \ -s /tmp/PHCO_19637.depot By default swinstall will archive the original software in /var/adm/sw/patch/PHCO_19637. If you do not wish to retain a copy of the original software, you can create an empty file named /var/adm/sw/patch/PATCH_NOSAVE. WARNING: If this file exists when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. It is recommended that you move the PHCO_19637.text file to /var/adm/sw/patch for future reference. To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHCO_19637.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: This patch cannot automatically start cron(1M) during its installation. Therefore, to get the functionality of the new cron(1M) one of the following *MUST* occur: - the system must be rebooted after the installation of the patch - cron must be stopped and started manually using the commands: /sbin/init.d/cron stop /sbin/init.d/cron start