Assignment 6, due Mar 4
Part of
the homework for 22C:169, Spring 2011
|
Always, on every assignment, please write your name legibly as it appears on your University ID and on the class list! All assignments will be due at the start of class on the day indicated (usually a Friday), and unless there is what insurance companies call "an act of God" - something outside your control; the only exceptions to this rule will be by advance arrangement.
Now, consider representing a stack as the file fs, with two applications, push fs<data and pop fs>data that implement the abstraction.
A problem: What Unix-style ownership and access rights should be used for the stack object fs and the applications push and pop in order to enforce the access rules that stack users can only manipulate stacks by using the applications that implement the methods of the abstract stack class. You may need to invent some users or groups to solve this problem. If you do, document the purpose of each. Hint: You will probably need to use the SUID or SGID bits. (1 point)
A problem: Give the access control lists for the file holding the stack object, fs and the files holding the push and pop applications, push and pop, so that the abstract rules for stacks are enforced. If you have to invent to invent additional applications to solve the problem, document what they do and give their access control lists. (1 point)
A problem: Give the capability list of this user, along with any auxiliary C-lists needed. Use the name fs for the file holing the protected representation of the stack, accessible only to the code of the push and pop programs. Document the purposes of any auxiliary C-lists and any auxiliary applications needed to solve this problem. Hint: The solution is entirely different from the solution to parts a and b, but it bears a strong relationship to typical models of abstract programming language semantics for object-oriented languages. (1.5 points)
A problem: Give the capability list of this user, along with any auxiliary C-lists needed. Use the name fs for the file holing the protected representation of the stack, accessible only to the code of the push and pop programs. Document the purpose and use of any auxiliary C-lists, auxiliary applications, or auxiliary objects you needed to solve this problem. (1.5 points)