banner of Information Technology Services, university of Windsor
 
 

...about the two scripts

The script "y2k_check" is a concatenation of two scripts, y2k_src_scan and y2k_bin_scan. When y2k_check is run from the command prompt of a Unix shell, it calls y2k_bin_scan to scan binary executable images, and then calls the second script y2k_src_scan to look at source code primarily intended for C and C++. They are helpful in finding potential Year 2000 (henceforth referred to as Y2K) problems in files and directories.

...how the individual scripts operate

y2k_src_scan, the source scanner, operates by first building a list of files to scan, then running those files through two distinct searches. The first search identifies date constructs in programs and shell scripts that may have Y2K problems. The second scan looks for incorrect use of date constructs. In both cases, the source files must be manually checked to determine whether or not a real problem exists.
Incorrect date constructs which the script looks for include:

date command used with a %y, as in "date +%y"
    strptime library interface with a %y in an immediate literal format
touch -t yyddmmhhmm
    %y - two digit year in various date library interfaces
    19% - catches 19%y and 19%02d output or input scanning
    1999 as an isolated string.

Incorrect usage of the constructs may include:

    tm_year - most uses are fine, but they need to be examined. tm_year is 100 in
 the year 2000.
    ascftime, cftime, strftime - these library interfaces can be misused.  Frequently
 the strings for the format may not be in the call, so the module must be
 examined.
    date command (the incorrect constructs may not be on the same line, so this
 catches all uses of it for examination)
    touch -t (same as date)
    %D,%Ey,%Oy -  formatting for dates which may have two digit years
    2000, 1900, 1970 or 2037 as isolated strings
    VkTrace - the ViewKit library routine prints trace output with two digit years
    mktime, getdate
 

y2k_bin_scan, the binary scanner, performs two discrete checks on executable files.
This script looks for strings in files which contain:

 %y, 19%, %D, %Ey or %0y

and library calls to

Vktrace, ascftime, cftime, get date, mktime, strftime or strptime
 
 
 

Back  (Reading the output)

Index Page

U of Windsor's main Y2K Project site
 
 
 

Send questions or comments  about Y2K issues to Helpdesk
Or call The Help Desk @  253 - 3000 ext 4440
 
 
  Menu
 
 
 

Send comments about these pages to joe
©March 1999 University of Windsor
Although care has been taken in preparing the information on this site, the University of Windsor cannot guarantee its accuracy or reliability to identify all y2k problems.