Added S_ISFIFO check for Solaris.
This commit is contained in:
parent
52b2878abe
commit
19f8dda01b
|
@ -461,8 +461,8 @@ static int server_connect( const char *oldcwd, const char *serverdir )
|
||||||
if (lstat( SOCKETNAME, &st ) == -1) fatal_perror( "lstat %s/%s", serverdir, SOCKETNAME );
|
if (lstat( SOCKETNAME, &st ) == -1) fatal_perror( "lstat %s/%s", serverdir, SOCKETNAME );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make sure the socket is sane */
|
/* make sure the socket is sane (ISFIFO needed for Solaris) */
|
||||||
if (!S_ISSOCK(st.st_mode))
|
if (!S_ISSOCK(st.st_mode) && !S_ISFIFO(st.st_mode))
|
||||||
fatal_error( "'%s/%s' is not a socket\n", serverdir, SOCKETNAME );
|
fatal_error( "'%s/%s' is not a socket\n", serverdir, SOCKETNAME );
|
||||||
if (st.st_uid != getuid())
|
if (st.st_uid != getuid())
|
||||||
fatal_error( "'%s/%s' is not owned by you\n", serverdir, SOCKETNAME );
|
fatal_error( "'%s/%s' is not owned by you\n", serverdir, SOCKETNAME );
|
||||||
|
|
Loading…
Reference in New Issue