Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the late 1960s and part of 1970s the multi-process systems became really popular. The problems of producer and consumer became a reality and with

In the late 1960s and part of 1970s the multi-process systems became really popular. The problems of producer and consumer became a reality and with it came its problems. Assume that the user A is the consumer who created a proprietary program the process data for a fee. User B on the other hand, has proprietary data that need to be processed by User As program. This is pretty easy, unless you consider access rights to the program and the data: User A is not allowed to get a copy of the data, and User B has to use User As paied program but User B is not allowed to get a copy of the program. Modern Linux/Unix systems provide a slick and simple solution to the problem by setting up a protection domain. A combination of file access rights, user access rights, and group access rights implement the protection domain policies that will accomplish the read access to User Bs data, execute only access to User As program, write access to write the output files that can be only read by User B, and make the processing with data access safe so no-one else has access rights.

a. Assume a single user processing, dont worry about multiple users sharing the process which means you dont have to make it thread safe

b. Write and compile a simple DataProcessor.c code that will read in a file and echo each line of the file with a prefix: Done: into the output file.

c. Write a script file: ProtectionDomain.sh that will implement the protection domain. The script will be executed by the system administrator user only once and it will set up the protection domain.

Assume:

* User names: A, B, C

* Processing Directory: /home/process

* Data processing program (located in /home/process): DataProcessor.o

* Data file to process: DataIn.txt

* Data file to write output to: DataOut.txt

System calls of interest: chmod, chown, chroot, adduser, ...

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions