Closed m-spitfire closed 1 year ago
Name: Murad Bashirov
Is this a valid scenario?
enum access_control_t { Acl, Capability }; enum permission_t { Own, Read, Execute }; const enum access_control_t access_control = Capability; void init() { create_object("secret_file"); create_object("conferer"); create_object("deputy"); create_subject("attacker"); create_subject("conferer"); create_subject("deputy"); enter(Execute, "attacker", "conferer"); enter(Read, "attacker", "secret_file"); enter(Own, "conferer", "secret_file"); enter(Execute, "conferer", "deputy"); } void attacker() { int fd = open("secret_file", Read); execute_with_capability(fd, "conferer"); } void conferer(int fd) { confer(Read, "deputy", "secret_file"); execute_with_capability(fd, "deputy"); } void deputy(int fd) { read_with_capability(fd, "secret_file"); }
Meaning, can scenarios use the same capability names when passing the capability around more than once?
Possible duplication detected. Refer to #288
Yes, this homework follows C semantics. So, your example scenario is valid.
Thanks.
Name: Murad Bashirov
Is this a valid scenario?
Meaning, can scenarios use the same capability names when passing the capability around more than once?