Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write two library functions in C programming language for system calls (A setter method for setting the security tag value in Linux) and (A getter

Write two library functions in C programming language for system calls (A setter method for setting the security tag value in Linux) and (A getter method for getting the security tag value in Linux)

int set_security_tag(const char *filename, int new_tag) { // Invokes the system call which attempts to change the file's Security_Tag to new_tag

// Returns the changed Security_Tag on success, otherwise it returns "-1" }

int get_security_tag(const char *filename) { // Invokes a system call which reads the security tag of the input file

// It will return Security_Tag upon success; otherwise it will return a value of "-1"

}

Rules are as follows:

Each file in the process of being changed will have a Security_Tag

The rules for the Security_Tag are

1) Every file will contain a default value of zero for the Security_Tag

2) Processes which are classified as running as superuser will be able to read or write the Security_Tag of every file

3) The read and write access permission for files of a user is based on standard Linux file permissions

4) The Security_Tag will exist during and after rebooting the system

5) System call formats are: syscall(call_number, parameter1, parameter2)

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

Hands-On Database

Authors: Steve Conger

2nd Edition

0133024415, 978-0133024418

More Books

Students also viewed these Databases questions

Question

How does the two-way ANOVA differ from the oneway ANOVA?

Answered: 1 week ago

Question

3. How would you address the problems that make up the situation?

Answered: 1 week ago

Question

2. What recommendations will you make to the city council?

Answered: 1 week ago