X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Funix.c;h=268deba112ffa29277d5eb4e9c878e1d044f3f81;hp=5d6cad19cc88ed87c5d7020d89c8abc05c913421;hb=7ef1b50f481cda83d012cc3d69d83f9313836f1f;hpb=1ffd6698cc631866391bf0d646f58907c32ab086 diff --git a/src/unix.c b/src/unix.c index 5d6cad1..268deba 100644 --- a/src/unix.c +++ b/src/unix.c @@ -425,8 +425,16 @@ static int unix_bind(COMSTACK h, void *address, int mode) h->cerrno = CSYSERR; return -1; } - chown(path, sp->uid, sp->gid); - chmod(path, sp->umask != -1 ? sp->umask : 0666); + if (chown(path, sp->uid, sp->gid)) + { + h->cerrno = CSYSERR; + return -1; + } + if (chmod(path, sp->umask != -1 ? sp->umask : 0666)) + { + h->cerrno = CSYSERR; + return -1; + } if (mode == CS_SERVER && listen(h->iofile, 100) < 0) { h->cerrno = CSYSERR;