Exam 2, Question 3 Solution

Written by Priyanka Jain

Answer:

There are a couple of ways of doing it. One of the easiar way could be to have the set user ID bit set on for the mail program, then when the mail program runs a script embedded will compare the user ID of the person running it to the wife's user ID. If they match, the program will continue, setting the effective user ID to mine where appropriate. If they don't match, it exits.

Note: when pine (or whatever email program we are using) invokes an editor, it will also have Dr Hougen's effective user ID. Therefore his wife will have access to all the files in his account, when we only wanted her to have access to his email. Points were not taken off for this problem but that a more complete answer, perhaps involving editing the source code of the email program itself to change the effective and saved user ID's before invoking other software (such as editors), would be preferred.

The other way in which I would implement would be to set the user ID bit for pine. Then copy your pine to the wife's directory. Change pine config to search in not default mail folder but ur mail folder.

Grading standards:
if premissions were merely mentioned-10pts
if no permissions mentioned -5pts
if S_ISUID mentioned, 15pts
Full point if copying of file in directory or other access method mentioned.