home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / sun / apps / 2914 < prev    next >
Encoding:
Text File  |  1993-01-07  |  1.8 KB  |  38 lines

  1. Newsgroups: comp.sys.sun.apps
  2. Path: sparky!uunet!spool.mu.edu!news.cs.indiana.edu!lynx!zia.aoc.nrao.edu!rmilner
  3. From: rmilner@zia.aoc.nrao.edu (Ruth Milner)
  4. Subject: printing from snapshot
  5. Message-ID: <1993Jan7.234432.4395@zia.aoc.nrao.edu>
  6. Organization: National Radio Astronomy Observatory, Socorro NM
  7. Date: Thu, 7 Jan 93 23:44:32 GMT
  8. Lines: 28
  9.  
  10. How does the OW3.0 screen snapshot program get print jobs to a printer?
  11.  
  12. For various reasons, we have replaced /usr/ucb/lpr with a script (no, the
  13. script is not setuid root or setgid daemon) which does a bunch of things and 
  14. then runs the original lpr. One of the things it does is log information 
  15. about jobs submitted to our color PostScript printer. The log file is writeable
  16. by anyone, and everything shows up here *except* jobs from snapshot.
  17.  
  18. The script understands piped input as well as files, and we can see that being 
  19. handled for jobs printed from other utilities which pipe into lpr, but somehow 
  20. snapshot is bypassing it.
  21.  
  22. I ran it with trace, and I can see that, when asked to print, it creates a
  23. temporary file called /tmp/snapshotaxxxxx.image, writes into it, calls vfork, 
  24. waits for the child to terminate, and then unlinks the temporary file. 
  25. "strings snapshot" shows the string /usr/ucb/lpr appearing in the executable,
  26. but it is never called, at least not when you use the print button on the main
  27. menu. This seems a very odd way to do things. Since it has created a temporary
  28. file, why not just use system() to print it?
  29.  
  30. Does anyone have any idea 1) what snapshot is doing, and 2) how we can get it
  31. to use the regular printing system? There is no accountability at all if it
  32. doesn't go through the normal print queues.
  33.  
  34. Thanks very much!
  35. -- 
  36. Ruth Milner                          NRAO/VLA                  Socorro NM
  37. Computing Division Head      rmilner@zia.aoc.nrao.edu
  38.