summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2007-06-18 08:46:57 +0000
committerArthur de Jong <arthur@arthurdejong.org>2007-06-18 08:46:57 +0000
commitc1345c5b28a983de5aa01ddb007d9b6ed06e596f (patch)
tree57c735e4b133d3546d699fe99cfafa33fd6b1cdd
parentb5c89397ddb7fc1831e7e1797f061fee59e7447d (diff)
add comment explaining the use of chmod() over fchmod()
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@297 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r--nslcd/nslcd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/nslcd/nslcd.c b/nslcd/nslcd.c
index 278430c..35fe3ed 100644
--- a/nslcd/nslcd.c
+++ b/nslcd/nslcd.c
@@ -289,6 +289,10 @@ static int open_socket(void)
}
/* set permissions of socket so anybody can do requests */
+ /* Note: we use chmod() here instead of fchmod() because
+ fchmod does not work on sockets
+ http://www.opengroup.org/onlinepubs/009695399/functions/fchmod.html
+ http://lkml.org/lkml/2005/5/16/11 */
if (chmod(NSLCD_SOCKET,(mode_t)0666))
{
log_log(LOG_ERR,"chmod(0666) failed: %s",strerror(errno));