>From latest commit: * Don't chown it from (possibly) non-root to root. * Do chown it from (possibly) root to non-root. */ - if ((sock->uid != 0) && (sock->gid != 0)) { + if ((sock->uid != -1) || (sock->gid != -1)) { This is more or less what I was thinking of, but I notice that the comment no longer agrees with the behaviour.