Allow devpermcheck() to check perms
authorBarret Rhoden <brho@cs.berkeley.edu>
Fri, 20 Jan 2017 18:34:50 +0000 (13:34 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 20 Jan 2017 18:34:50 +0000 (13:34 -0500)
Looks like we were avoiding checks, perhaps due to paranoia or old config
issues.  I checked a few things (VMs, snoopy), and this check didn't break
them.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/src/ns/dev.c

index d4c5502..22df3f8 100644 (file)
@@ -390,9 +390,6 @@ 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.name, fileuid) == 0)