PART 1
1. Create an environment variable GROUP in the bash shell and set it to either student or the name of your alternate group.
Write a C program that does not make use of the system function call or shell commands that does the following:
If the value of $GROUP is “student”, create a file exploit in your public_html directory and change the user permissions of the file so that others can execute the program.
If the value of $GROUP is your alternate group, test whether there already is a file public_html/exploit that the current user can execute. Make sure that you report the result of the test.
2. Write a function that is passed a player name and an empty struct PLAYER and then fills the userName with the passed player name and randomly generates values for the other fields as they are described in the test. The data structure should be returned automatically to the calling function.
Get Free Quote!
353 Experts Online