diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2007-06-16 23:10:07 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2007-06-16 23:10:07 +0000 |
commit | aed9dc539c659c357180cca684bd766bbaf316f9 (patch) | |
tree | 956ae18b4a4079173b02910b8b988f1bea304e8e | |
parent | 22c1f37699777400d3692be67534d67651bef2fe (diff) |
change fchmod() into chmod() since fchmod() has undifined behaviour on named sockets (fails silently)
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@286 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r-- | nslcd/nslcd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nslcd/nslcd.c b/nslcd/nslcd.c index 829dad9..278430c 100644 --- a/nslcd/nslcd.c +++ b/nslcd/nslcd.c @@ -289,9 +289,9 @@ static int open_socket(void) } /* set permissions of socket so anybody can do requests */ - if (fchmod(sock,(mode_t)0666)) + if (chmod(NSLCD_SOCKET,(mode_t)0666)) { - log_log(LOG_ERR,"fctnl(F_SETFL,O_NONBLOCK) failed: %s",strerror(errno)); + log_log(LOG_ERR,"chmod(0666) failed: %s",strerror(errno)); if (close(sock)) log_log(LOG_WARNING,"problem closing socket: %s",strerror(errno)); exit(EXIT_FAILURE); |