Patch Name: PHCO_17498 Patch Description: s700_800 10.26 Year 2000 cumulative cron/at/crontab patch Creation Date: 99/02/03 Post Date: 99/02/08 Hardware Platforms - OS Releases: s700: 10.26 s800: 10.26 Products: N/A Filesets: OS-Core.CMDS-MIN Automatic Reboot?: No Status: General Superseded Critical: No Path Name: /hp-ux_patches/s700_800/10.X/PHCO_17498 Symptoms: PHCO_17498: Port of PHCO_16864 to 10.26 (PHCO_16864) 1. On trusted systems, cron(1) has slower performance due to calling getspwent() when getspwnam() should have been used. 2. Cron from patch PHCO_15679 does not run at(1) and batch(1) jobs. 3. at(1) schedules jobs incorrectly relative to 28 Feb 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_16958: 1. When an non-root user in /var/adm/cron/cron.allow tries to run crontab -e and then saves, he gets crontab: can't create your crontab file in the crontab directory. 2. When a user submits an at job, /var/adm/cron/log shows that the job was run, but job was not performed. Defect Description: PHCO_17498: (PHCO_16864) 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_15679, 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. Resolution: Port PHCO_16864 PHCO_16958: 1. Code could not handle multi-level directory 2. stdin, stderr and stdout were being closed before the shell was launched. This means, a shell would run with no input and exit, resulting in a good return value. Resolution: 1. Add code for multi-level directory 2. Move the close(2)'s up in the code, so that the proper jobs are opened and stdout / stderr and handled correctly. SR: 0000000000 Patch Files: /usr/bin/crontab /usr/bin/at /usr/sbin/cron what(1) Output: /usr/bin/crontab: 1999/02/02 Hewlett-Packard HP-UX 10.26 TOS [ ic5ar - DAV17 ] PATCH_10_20 PHCO_10737 $Revision: 78.2.1.15 $ 99/02/02 cmd/cron/hpux_rel.c, hpux, hpux_10.26, ic5a r Revision 1.1 PATCH_10.26 (PHCO_17498) 99/02/02 cmd/cron/crontab.c, hpux, hpux_10.26, ic5ar Revision 1.9 PATCH_10.26 (PHCO_17498) /usr/bin/at: 1999/02/02 Hewlett-Packard HP-UX 10.26 TOS [ ic5ar - DAV17 ] PATCH_10_20 PHCO_10737 $Revision: 78.2.1.15 $ 99/02/02 cmd/cron/hpux_rel.c, hpux, hpux_10.26, ic5a r Revision 1.1 PATCH_10.26 (PHCO_17498) 99/02/02 cmd/cron/at.c, hpux, hpux_10.26, ic5ar Revi sion 1.7 PATCH_10.26 (PHCO_17498) $Revision: 76.2.1.3 $ $Revision: 76.2.1.1.1.4 $ 99/02/02 cmd/cron/pdate.c, hpux, hpux_10.26, ic5ar R evision 1.1 PATCH_10.26 (PHCO_17498) UNMODIF IED /usr/sbin/cron: 1999/02/02 Hewlett-Packard HP-UX 10.26 TOS [ ic5ar - DAV17 ] PATCH_10_20 PHCO_10737 $Revision: 78.2.1.15 $ 99/02/02 cmd/cron/hpux_rel.c, hpux, hpux_10.26, ic5a r Revision 1.1 PATCH_10.26 (PHCO_17498) 99/02/02 cmd/cron/cron.c, hpux, hpux_10.26, ic5ar Re vision 1.9 PATCH_10.26 (PHCO_17498) cksum(1) Output: 3175001879 28672 /usr/bin/crontab 3488292739 45056 /usr/bin/at 2872501571 53248 /usr/sbin/cron Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHCO_16958 Equivalent Patches: PHCO_16864: s700: 10.20 s800: 10.20 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_17498 5a. For a standalone system, run swinstall to install the patch: swinstall -x autoreboot=true -x match_target=true \ -s /tmp/PHCO_17498.depot 5b. For a homogeneous NFS Diskless cluster run swcluster on the server to install the patch on the server and the clients: swcluster -i -b This will invoke swcluster in the interactive mode and force all clients to be shut down. WARNING: All cluster clients must be shut down prior to the patch installation. Installing the patch while the clients are booted is unsupported and can lead to serious problems. The swcluster command will invoke an swinstall session in which you must specify: alternate root path - default is /export/shared_root/OS_700 source depot path - /tmp/PHCO_17498.depot To complete the installation, select the patch by choosing "Actions -> Match What Target Has" and then "Actions -> Install" from the Menubar. 5c. For a heterogeneous NFS Diskless cluster: - run swinstall on the server as in step 5a to install the patch on the cluster server. - run swcluster on the server as in step 5b to install the patch on the cluster clients. By default swinstall will archive the original software in /var/adm/sw/patch/PHCO_17498. 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_17498.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_17498.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None