From: Wilfried Göesgens Date: Sun, 19 Aug 2007 16:46:23 +0000 (+0000) Subject: * fchmod doesn't like FD's to sockets. X-Git-Tag: v7.86~3141 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=bd4bc7566e57fceaa89d773296fb46d9ecc99ec5;p=citadel.git * fchmod doesn't like FD's to sockets. --- diff --git a/citadel/sysdep.c b/citadel/sysdep.c index aee0907df..cd7f12107 100644 --- a/citadel/sysdep.c +++ b/citadel/sysdep.c @@ -351,7 +351,7 @@ int ig_uds_server(char *sockpath, int queue_len, char **errormessage) int s; int i; int actual_queue_len; - + long ret, ret2; actual_queue_len = queue_len; if (actual_queue_len < 5) actual_queue_len = 5; @@ -407,7 +407,7 @@ int ig_uds_server(char *sockpath, int queue_len, char **errormessage) return(-1); } - fchmod(s, 0777); + chmod(sockpath, S_ISGID|S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IWGRP|S_IXGRP|S_IROTH|S_IWOTH|S_IXOTH); return(s); }