Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2018-05-04 15:57:23 +0300
committerJacob Vosmaer <jacob@gitlab.com>2018-05-04 15:57:23 +0300
commitbcc0335cab2e9c5429a3b544b0a0d80a1936fba0 (patch)
tree110dde9dba651b487b254dd671220b37c3fe951f /helpers.go
parent69b7e196fe0336c91a44da72110f44c2ec0869b0 (diff)
Use permissive unix socket permissions
Diffstat (limited to 'helpers.go')
-rw-r--r--helpers.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/helpers.go b/helpers.go
index 8cc66da9..cb46e322 100644
--- a/helpers.go
+++ b/helpers.go
@@ -37,6 +37,14 @@ func createUnixSocket(addr string) (net.Listener, *os.File) {
fatal(err)
}
+ // This socket should be world-accessible; we have authentication at the
+ // application level. When pages runs with privilege separation, the
+ // default permissions will prevent gitlab-rails from connecting to the
+ // admin socket.
+ if err := os.Chmod(addr, 0777); err != nil {
+ fatal(err)
+ }
+
return l, fileForListener(l)
}