Skip to content

Commit

Permalink
nfc: virtual_ncidev: change default device permissions
Browse files Browse the repository at this point in the history
Device permissions is S_IALLUGO, with many unnecessary bits. Remove them
and also remove read and write permissions from group and others.

Before the change:
crwsrwsrwt    1 0        0          10, 125 Nov 25 13:59 /dev/virtual_nci

After the change:
crw-------    1 0        0          10, 125 Nov 25 14:05 /dev/virtual_nci

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Bongsu Jeon <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
Thadeu Lima de Souza Cascardo authored and kuba-moo committed Nov 26, 2021
1 parent de6d259 commit c26381f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nfc/virtual_ncidev.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ static int __init virtual_ncidev_init(void)
miscdev.minor = MISC_DYNAMIC_MINOR;
miscdev.name = "virtual_nci";
miscdev.fops = &virtual_ncidev_fops;
miscdev.mode = S_IALLUGO;
miscdev.mode = 0600;

return misc_register(&miscdev);
}
Expand Down

0 comments on commit c26381f

Please sign in to comment.