Homework 2

Due Date: January 28, 2002
100 Points


  1. (15 points) Chapter 19, exercise 4
  2. ( 15 points) Chapter 19, exercise 6
  3. ( 70 points) Read the manual page for popen(3). However, your version will differ from the system version in the following ways:
    1. All environment variables should be deleted, except for PATH, IFS, TZ, and SHELL. These shold be set as follows: PATH to "/bin:/usr/bin:/usr/local/bin:/pkg/bin"; IFS to "\t\n "; TZ to "PST8PDT"; and SHELL to the user's login shell.
    2. All file descriptors except 0, 1, and 2 should be closed.
    3. The umask should be set to 077.
    Please turn in a tar file containing a source file popen.c with the source of popen and a README file. We will untar it, copy a Makefile, a test program, and a driver into the directory, and compile and test your routine. Your routine must be in the single file popen.c.


ECS 153, Introduction to Computer Security
Winter Quarter 2002
Email: cs153@cs.ucdavis.edu