AHCI: Skip device permission check
authorFergus Simpson <afergs@google.com>
Tue, 18 Oct 2016 00:11:26 +0000 (17:11 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 18 Oct 2016 20:02:14 +0000 (16:02 -0400)
Permissions are not currently implemented in Akaros. This change simply
makes it so that devpermcheck(...) always returns before throwing an
error that would result in permission being denied. This allows the
device to actually be used while even though permissions have not been
implemented.

Change-Id: Ic2f19071803bba497d916031a22bcbc0b70e8ffd
Signed-off-by: Fergus Simpson <afergs@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/src/ns/dev.c

index 496cf94..abf683a 100644 (file)
@@ -388,6 +388,10 @@ devdirread(struct chan *c, char *d, long n,
 void devpermcheck(char *fileuid, uint32_t perm, int omode)
 {
        int rwx;
+
+       /* TODO: Implement permission checking, for now permission is always
+        * granted. */
+       return;
        /* select user, group, or other from the traditional rwxrwxrwx, shifting
         * into the upper-most position */
        if (strcmp(current->user, fileuid) == 0)