Change the ipc_perm() check from being a check that the socket user and group is set to root into instead check that the socket user/group matches the running tgtd process. This is needed in order to run tgtd as a normal non-root user. Signed-off-by: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx> --- usr/mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/mgmt.c b/usr/mgmt.c index 364b3c8..ebe0fd6 100644 --- a/usr/mgmt.c +++ b/usr/mgmt.c @@ -569,7 +569,7 @@ static int ipc_perm(int fd) return -1; } - if (cred.uid || cred.gid) + if (cred.uid != getuid() || cred.gid != getgid()) return -EPERM; return 0; -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe stgt" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html