[PATCH] srp_daemon: Avoid extra permissions for the lock file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Sergey Gorenko <sergeygo@xxxxxxxxxx>
> Sent: Wednesday, August 19, 2020 5:18 PM
> To: bvanassche@xxxxxxx
> Cc: linux-rdma@xxxxxxxxxxxxxxx; Sergey Gorenko <sergeygo@xxxxxxxxxx>;
> Max Gurtovoy <mgurtovoy@xxxxxxxxxx>
> Subject: [PATCH] srp_daemon: Avoid extra permissions for the lock file
> 
> There is no need to create a world-writable lock file.
> It's enough to have an RW permission for the file owner only.
> 
> Signed-off-by: Sergey Gorenko <sergeygo@xxxxxxxxxx>
> Reviewed-by: Max Gurtovoy <mgurtovoy@xxxxxxxxxx>
> ---
>  srp_daemon/srp_daemon.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/srp_daemon/srp_daemon.c b/srp_daemon/srp_daemon.c index
> f14d9f56c9f2..fcf94537cebb 100644
> --- a/srp_daemon/srp_daemon.c
> +++ b/srp_daemon/srp_daemon.c
> @@ -142,7 +142,6 @@ static int check_process_uniqueness(struct config_t
> *conf)
>  		return -1;
>  	}
> 
> -	fchmod(fd,
> S_IRUSR|S_IRGRP|S_IROTH|S_IWUSR|S_IWGRP|S_IWOTH);
>  	if (0 != lockf(fd, F_TLOCK, 0)) {
>  		pr_err("failed to lock %s (errno: %d). possibly another "
>  		       "srp_daemon is locking it\n", path, errno);
> --
> 2.21.1

Hi Bart,

Could you review the patch? I'm asking for you because you are specified as a maintainer for srp_daemon in rdma-core.

Regards,
Sergey 




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux