The assignment is to write a file system permission simulator. The program will read a series of commands from standard input; these commands will perform various file system operations. You need to build up an in-memory data structure representing the file system tree. Each operation must be checked for permission, and rejected if the user does not have the appropriate permission. In addition to the command input, the program should read two other files that contain a list of valid user names and group names. The set of valid users and groups will not change during execution of the program. Input commands are of the following format: user.group command pathname Possible commands are mkdir rmdir create delete read write cd acl chown dump The first two commands create and delete directories; the second two create and delete files. "read" and "write" can only be done to files, not directories. "cd" is per-user. That is, you must retain state for each user saying what directory they're in. We won't have processes; each user is logged in exactly once. The "acl" command is used to change the access control list on a file. "dump" is used to print the file system and its state, including ACLs. "chown" is used to change the ownership of a file. Each command is presumed to be input by that user. The user and group files are system files. The "mkdir", "create", and "acl" commands may all be followed in the input stream by a multi-line ACL. Each line of the ACL starts with one or more white space characters, per the usual Unix definition. The lines look like this: user.group permstring where "user" and "group" are valid names per your configuration files or "*". "*", of course, means every user or every group. "permstring" is either "-" or some sequence of the letters "r", "w", and "x". The sequence of ACL entries for that file or directory are terminated by the occurrence of the next command, i.e., something that's not preceeded by white space. Pathnames are Unix-style, i.e., elements are delimited by /. For the sake of sanity, use only printable, non-whitespace characters in your filenames. "." and ".." must be implemented with their usual meanings. The chown command takes a mandatory, single-line ACL as input. The permissions and group are ignored; the user is used for the new owner and group of the file. At the start of execution, the file system consists of a single node / owned by some user, with a null ACL. Your input data must somehow create the file /etc/passwd that is world-readable but writable only by the system administrator. There must also be a directory /tmp that is world-writable. There are some ambiguities in the semantics I've specified. Make your own decisions and document them. Deliverables: A single tar file, per the general instructions on the web page. The tar file should contain, at a minimum: One or more C or C++ files comprising your source program A Makefile -- again, see the general instructions One or more sets of test data. Each set of test data includes a user file, a group file, and a set of commands and ACLs. A README file documenting how to use your program -- we will run it with our test data -- and any assumptions you've made about file system semantics.