serial: should be owned by 'dialout' group

This commit is contained in:
K Lange 2021-08-31 22:40:49 +09:00
parent c2dea31ff0
commit 403b1ecfcb
3 changed files with 5 additions and 0 deletions

View File

@ -1,2 +1,3 @@
root:x:0:
adm:x:1:local
dialout:x:2:local

View File

@ -1,4 +1,5 @@
root:x:0:0:Administrator:/home/root:/bin/sh:fancy
adm:x:1:1:Administrators:/tmp:/bin/false:nope
dialout:x:2:2:Serial Users:/tmp:/bin/false:nope
local:x:1000:1000:Local User:/home/local:/bin/sh:fancy
guest:x:1001:1001:Guest User:/home/guest:/bin/sh:fancy

View File

@ -159,6 +159,9 @@ static fs_node_t * serial_device_create(int port) {
}
}
pty->slave->gid = 2; /* dialout group */
pty->slave->mask = 0660;
return pty->slave;
}