rob@uokmax.UUCP (Robert K Shull) (08/10/89)
We're implementing a LaserWriter password system here, using CAP and a custom program on the Mac. What we do is pop up a dialog whenever the user prints to a LaserWriter and ask them for a username and password. All of our printing is through printers connected to our Unix hosts. To do this, I've patched PrGlue with an init. I watch for calls to PrOpenDoc with the printer being a LaserWriter. No problem so far, everything works fine. However, I've already found one program that doesn't go through PrGlue (Microsoft Word, of course). Does anyone have any ideas, places to patch, people to write, etc. The alternative is to have our Word users dump their postscript to a file and upload it to our Unix machine (not very attractive). Thanks, Robert -- Robert K. Shull chinet!uokmax!rob sun!texsun!uokmax!rob
earleh@eleazar.dartmouth.edu (Earle R. Horton) (08/13/89)
In article <3602@uokmax.UUCP> rob@uokmax.UUCP (Robert K Shull) writes: ... >We're implementing a LaserWriter password system here, ... >To do this, I've patched PrGlue with an init. I watch for calls to >PrOpenDoc with the printer being a LaserWriter. No problem so far, everything >works fine. However, I've already found one program that doesn't go through >PrGlue (Microsoft Word, of course). Word 4.0 calls PrGlue on my Mac II running System 6.0.3. You must realize that PrGlue is new with System 4.1, and Word is designed to work with System 3.2, which didn't have the trap. In fact, any program which is sufficiently old would not use the trap. WriteNow 1.07, for instance, works fine with System 6.0.3 and does not call PrGlue. >Does anyone have any ideas, places to patch, people to write, etc. You could tell your users to use only the latest versions of software. This should guarantee that the PrGlue trap gets called, since the latest versions of most software almost certainly do call it. You could abandon the idea of patching PrGlue, and patch the LaserWriter driver instead. Since the LaserWriter driver prints only in draft mode, 'PDEF' 0 must contain all the entry points for the printing routines. You could change the type or ID of this resource, and replace it with one of your own which does the password checking, then calls the original code. MacDTS would probably recommend that you not do this, but then, they don't recommend patching traps, either. Earle R. Horton