X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=lib%2Fuilib.c;h=973a2b326249eeb0b62ec1ab7a8579679b0c9d0d;hb=a8c5ada654f0ff7b7c8bb9542fcae9c4a917f353;hp=303ed0c5ce9408f82c96e2d291041d55a5588655;hpb=15ee5bfbd9496abdc2d03f1b77079ea4dea2ad0b;p=doldaconnect.git diff --git a/lib/uilib.c b/lib/uilib.c index 303ed0c..973a2b3 100644 --- a/lib/uilib.c +++ b/lib/uilib.c @@ -762,6 +762,7 @@ int dc_handleread(void) return(0); } +#if UNIX_AUTH_STYLE == 1 static void mkcreds(struct msghdr *msg) { struct ucred *ucred; @@ -780,6 +781,7 @@ static void mkcreds(struct msghdr *msg) ucred->gid = getgid(); msg->msg_controllen = cmsg->cmsg_len; } +#endif int dc_handlewrite(void) { @@ -798,11 +800,13 @@ int dc_handlewrite(void) msg.msg_iovlen = 1; bufvec.iov_base = queue->buf; bufvec.iov_len = queue->buflen; +#if UNIX_AUTH_STYLE == 1 if((servinfo.family == PF_UNIX) && !servinfo.sentcreds) { mkcreds(&msg); servinfo.sentcreds = 1; } +#endif ret = sendmsg(fd, &msg, MSG_NOSIGNAL | MSG_DONTWAIT); if(ret < 0) {