prosyslab-classroom / cs348-information-security

61 stars 10 forks source link

[Question][Hw4] Return type of several function #284

Closed castle-bell closed 1 year ago

castle-bell commented 1 year ago

Name: Seongjong Park

Hello, I'm Seongjong Park and I have some questions about HW 4.

  1. Return type of functions
image

In document, confer / remove functions should return Normal which is result type and access control matrix both.

image

But ,in acl.mli, the functions except the read function returns the t type which is the permission map in the assignment. Is the document written wrong? Or do I have to return both of them like (result, access control matrix)?

  1. Details about confer remove function. For confer/ remove functions, I cannot fully understand the functionality of them. Is the meaning of "confer / remove operation is allowed" that if the subject is the owner of object (i.e Permission = Own), then these operations are allowed and if not, then not allowed?
sujin0529 commented 1 year ago

Hi,

  1. Because the return value of the run is the result type, the return value was defined for another command(e.g., create, confer etc). It is okay to modify the function because the type of these functions is provided for your convenience in implementing them. But please do not modify the type of run.

  2. You are right in your understanding.

Thanks.