srp_daemon: Avoid extra permissions for the lock file
PATCH 1/1 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.
Fixes ee138ce1e40d ("Cause srp_daemon launch to fail if another srp_daemon is already working on the same HCA port.")
Signed-off-by Sergey Gorenko <[email protected]>
Reviewed-by Max Gurtovoy <[email protected]>
Reviewed-by Bart Van Assche <[email protected]>
---
Changelog:
v1: Add the fixes line.
--- srp_daemon/srp_daemon.c | 1 - 1 file changed, 1 deletion(-)
srp_daemon/srp_daemon.c +0 -1
@@ -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);
Signature · 1 line
2.21.1