diff options
| author | Theodore Tso <tytso@mit.edu> | 1996-10-30 03:50:04 +0000 |
|---|---|---|
| committer | Theodore Tso <tytso@mit.edu> | 1996-10-30 03:50:04 +0000 |
| commit | a8310b6fd5ff1c05568364472ca5469cabc28831 (patch) | |
| tree | 0c8620b548b78a56288dd6692b6b36440bd9bd13 /src | |
| parent | 492ead9a0d9d89f2bbeb2004c9d704939303e9c5 (diff) | |
New SAP resource files for doing timebombed GSSAPI libraries for the benefit
of SAP clients.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9251 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
| -rw-r--r-- | src/mac/SAP/GSSforSAP.r | 116 | ||||
| -rw-r--r-- | src/mac/SAP/macSAPglue.c | 50 |
2 files changed, 166 insertions, 0 deletions
diff --git a/src/mac/SAP/GSSforSAP.r b/src/mac/SAP/GSSforSAP.r new file mode 100644 index 000000000..ca25a8384 --- /dev/null +++ b/src/mac/SAP/GSSforSAP.r @@ -0,0 +1,116 @@ +#include "Types.r" + +resource 'DITL' (135, nonpurgeable) { + { /* array DITLarray: 2 elements */ + /* [1] */ + {96, 292, 116, 360}, + Button { + enabled, + "OK" + }, + /* [2] */ + {16, 64, 84, 360}, + StaticText { + disabled, + "This version of the SAP client has expir" + "ed. Please consult: http://web.mit.edu/r" + "eeng/www/saphelp/ for instructions on ob" + "taining a new version." + } + } +}; + +resource 'DITL' (136, nonpurgeable) { + { /* array DITLarray: 2 elements */ + /* [1] */ + {116, 300, 136, 368}, + Button { + enabled, + "OK" + }, + /* [2] */ + {16, 64, 100, 360}, + StaticText { + disabled, + "This version of the SAP client will expi" + "re on January 15, 1997. Please consult: " + "http://web.mit.edu/reeng/www/saphelp/ fo" + "r instructions on obtaining a new versio" + "n when it is available." + } + } +}; + +data 'DLGX' (135) { + $"0743 6869 6361 676F 0000 0000 0000 0000" /* .Chicago........ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"000C 0000 0000 0001 0004 0004 0000 0000" /* ................ */ + $"0002 0000 0000 0000 0000 0000 0000 0006" /* ................ */ + $"0000 0000 0000 0000 0000" /* .......... */ +}; + +data 'DLGX' (136) { + $"0743 6869 6361 676F 0000 0000 0000 0000" /* .Chicago........ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"000C 0000 0000 0001 0004 0004 0000 0000" /* ................ */ + $"0002 0000 0000 0000 0000 0000 0000 0006" /* ................ */ + $"0000 0000 0000 0000 0000" /* .......... */ +}; + +data 'ictb' (136) { + $"0000 0000 0000 0000" /* ........ */ +}; + +resource 'ALRT' (135, nonpurgeable) { + {383, 390, 511, 770}, + 135, + { /* array: 4 elements */ + /* [1] */ + OK, visible, sound1, + /* [2] */ + OK, visible, sound1, + /* [3] */ + OK, visible, sound1, + /* [4] */ + OK, visible, sound1 + } + /****** Extra bytes follow... ******/ + /* $"0000" /* .. */ +}; + +resource 'ALRT' (136, nonpurgeable) { + {383, 390, 531, 774}, + 136, + { /* array: 4 elements */ + /* [1] */ + OK, visible, sound1, + /* [2] */ + OK, visible, sound1, + /* [3] */ + OK, visible, sound1, + /* [4] */ + OK, visible, sound1 + } + /****** Extra bytes follow... ******/ + /* $"0000" /* .. */ +}; + +resource 'actb' (136) { + { /* array ColorSpec: 5 elements */ + /* [1] */ + wContentColor, 65535, 65535, 65535, + /* [2] */ + wFrameColor, 0, 0, 0, + /* [3] */ + wTextColor, 0, 0, 0, + /* [4] */ + wHiliteColor, 0, 0, 0, + /* [5] */ + wTitleBarColor, 65535, 65535, 65535 + } +}; + diff --git a/src/mac/SAP/macSAPglue.c b/src/mac/SAP/macSAPglue.c new file mode 100644 index 000000000..a6672852a --- /dev/null +++ b/src/mac/SAP/macSAPglue.c @@ -0,0 +1,50 @@ +#include <CodeFragments.h> +#define TBALERTID 135 +#define TB30ALERTID 136 + +OSErr __initializeSAPglue(InitBlockPtr ibp); + +OSErr __initializeSAPglue(InitBlockPtr ibp) +{ + OSErr err = noErr; + short fileRefNum; + DateTimeRec goalTimeBomb; + long currentTime, goalTimeBombInSecs; + + __initialize(); + + if (ibp->fragLocator.where == kDataForkCFragLocator) { + fileRefNum = FSpOpenResFile(ibp->fragLocator.u.onDisk.fileSpec, fsRdPerm); + + if ( fileRefNum == -1 ) + err = ResError(); + } + + goalTimeBomb.year = 1997; + goalTimeBomb.month = 1; + goalTimeBomb.day = 15; + goalTimeBomb.hour = 0; /* Let's use midnight for simplicity */ + goalTimeBomb.minute = 0; + goalTimeBomb.second = 0; + + DateToSeconds( &goalTimeBomb, &goalTimeBombInSecs ); + + GetDateTime(¤tTime); + + if ( (goalTimeBombInSecs - currentTime) <= 0 ) { + StopAlert(TBALERTID, NULL); + /* if we just reported an error, then the SAP client would continue running. We + don't want that so instead we'll just call ExitToShell and hope it doesn't + leave anything hangin. If we just wanted the error, report non-zero */ + //err = -1; + ExitToShell(); + } else if ( (goalTimeBombInSecs - currentTime) < 1209600 ) { /* num seconds in 14 days */ + NoteAlert(TB30ALERTID, NULL); + } + + if ( fileRefNum != -1 ) + CloseResFile( fileRefNum ); + + return err; +} + |
