All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfc: virtual_ncidev: change default device permissions
@ 2021-11-25 14:14 Thadeu Lima de Souza Cascardo
  2021-11-25 14:24 ` Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2021-11-25 14:14 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel, krzysztof.kozlowski, bongsu.jeon

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 <cascardo@canonical.com>
---
 drivers/nfc/virtual_ncidev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nfc/virtual_ncidev.c b/drivers/nfc/virtual_ncidev.c
index 221fa3bb8705..f577449e4935 100644
--- a/drivers/nfc/virtual_ncidev.c
+++ b/drivers/nfc/virtual_ncidev.c
@@ -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);
 }
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] nfc: virtual_ncidev: change default device permissions
  2021-11-25 14:14 [PATCH] nfc: virtual_ncidev: change default device permissions Thadeu Lima de Souza Cascardo
@ 2021-11-25 14:24 ` Krzysztof Kozlowski
       [not found] ` <CGME20211125141522epcas2p21d45e3406fe76bdb17048553f8681af9@epcms2p2>
  2021-11-26 19:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2021-11-25 14:24 UTC (permalink / raw)
  To: Thadeu Lima de Souza Cascardo, netdev; +Cc: linux-kernel, bongsu.jeon

On 25/11/2021 15:14, Thadeu Lima de Souza Cascardo wrote:
> 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 <cascardo@canonical.com>
> ---
>  drivers/nfc/virtual_ncidev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] nfc: virtual_ncidev: change default device permissions
       [not found] ` <CGME20211125141522epcas2p21d45e3406fe76bdb17048553f8681af9@epcms2p2>
@ 2021-11-26  6:11   ` 전봉수
  0 siblings, 0 replies; 4+ messages in thread
From: 전봉수 @ 2021-11-26  6:11 UTC (permalink / raw)
  To: Thadeu Lima de Souza Cascardo, netdev; +Cc: linux-kernel, krzysztof.kozlowski

 On 25/11/2021 15:14, Thadeu Lima de Souza Cascardo wrote:
> 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 <cascardo@canonical.com>
> ---
>  drivers/nfc/virtual_ncidev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/nfc/virtual_ncidev.c b/drivers/nfc/virtual_ncidev.c
> index 221fa3bb8705..f577449e4935 100644
--- a/drivers/nfc/virtual_ncidev.c
> +++ b/drivers/nfc/virtual_ncidev.c
> @@ -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);
> }
> -- 

Reviewed-by: Bongsu Jeon <bongsu.jeon@samsung.com>


Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] nfc: virtual_ncidev: change default device permissions
  2021-11-25 14:14 [PATCH] nfc: virtual_ncidev: change default device permissions Thadeu Lima de Souza Cascardo
  2021-11-25 14:24 ` Krzysztof Kozlowski
       [not found] ` <CGME20211125141522epcas2p21d45e3406fe76bdb17048553f8681af9@epcms2p2>
@ 2021-11-26 19:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-26 19:20 UTC (permalink / raw)
  To: Thadeu Lima de Souza Cascardo
  Cc: netdev, linux-kernel, krzysztof.kozlowski, bongsu.jeon

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 25 Nov 2021 11:14:57 -0300 you wrote:
> 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
> 
> [...]

Here is the summary with links:
  - nfc: virtual_ncidev: change default device permissions
    https://git.kernel.org/netdev/net/c/c26381f97e2a

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-11-26 19:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-25 14:14 [PATCH] nfc: virtual_ncidev: change default device permissions Thadeu Lima de Souza Cascardo
2021-11-25 14:24 ` Krzysztof Kozlowski
     [not found] ` <CGME20211125141522epcas2p21d45e3406fe76bdb17048553f8681af9@epcms2p2>
2021-11-26  6:11   ` 전봉수
2021-11-26 19:20 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.