summaryrefslogtreecommitdiff
path: root/daemon/remote.c
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2015-04-26 11:23:26 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2015-04-26 11:23:26 +0000
commitd3348d437fb0408bc24892ebd0b035686c294705 (patch)
tree01c1d94467622a175fad10cd34a2f6f05d32c1b7 /daemon/remote.c
parent54dd3272da3f4a5fda7dd6ac359b7cf68e21a796 (diff)
Diffstat (limited to 'daemon/remote.c')
-rw-r--r--daemon/remote.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/daemon/remote.c b/daemon/remote.c
index a5be6d68c8825..7a8fdb75e75b1 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -327,9 +327,13 @@ add_open(const char* ip, int nr, struct listen_port** list, int noproto_is_err,
* group as the user we run as.
*/
if(fd != -1) {
+#ifdef HAVE_CHOWN
if (cfg->username && cfg->username[0])
chown(ip, cfg->uid, cfg->gid);
chmod(ip, (mode_t)(S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP));
+#else
+ (void)cfg;
+#endif
}
} else {
hints.ai_socktype = SOCK_STREAM;