The assignment is to write a print spooler. To do this, you will need to use your secondary login as well; details on that will follow shortly. A print spooler accepts files, both on stdin and on the command line, and copies them to some protected directory for eventual printing. It has to be able to read files that are readable only by that user; it also has to ensure that the command is not used to print files that that user isn't able to read. Eventually, another process finds jobs in that protected directory and copies them to the physical printer. We won't worry about that part in this assignment. So -- write a program that acts as the spooler. It has to copy files to some protected directory. It also has to create a log file of each print request, plus its success or failure. Again, this log file must be protected. You also need to write a program to list the queue -- the pending files, their owners, their sizes, and when they were submitted -- and to remove jobs from the queue. (Think "lpq" and "lprm".) Naturally, only the owner should be allowed to remove a job. Pay a lot of attention to test data selection. You must verify that the program can print everything it's supposed to be able to print, and that it can't print things that should be protected. Deliverables: Source code Test data A directory tree showing all necessary directories and files used by the spooler, with appropriate permissions A 1-2 page writeup explaining the security theory of operation The Secondary Account --------------------- By now, you should all have received a login and password for a secondary account. You need this for testing -- the programs (probably) need to be setuid. In addition to the account, you need a new directory. Each of the ACM accounts has a directory /homes/ACMClass/ on compute01, compute02, ..., compute08. Pick one of those machines and do your testing via that directory on that machine. You need that because the NFS-mounted directories -- your regular ones as well as the home directories for the secondary accounts -- cannot be the repositories for setuid programs. Thus, your hwlpr, hwlprm, etc., commands *must* reside on the local disks of the compute* machines.