aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-07-30 12:13:37 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-07-30 12:45:26 +0200
commit0ea89467e6286a91641e86f26579371ecfda4686 (patch)
tree3eb0d8f5f16572a4ac01696171e634693ad16e9f /community
parentdb7e34bf4a0ad7f5f04bcdf6b8b0701ec1163c7d (diff)
downloadaports-0ea89467e6286a91641e86f26579371ecfda4686.tar.bz2
aports-0ea89467e6286a91641e86f26579371ecfda4686.tar.xz
community/py-waitress: fix init to never change owner of e.g. /run
for example when unix_socket_path=/run/app.sock.
Diffstat (limited to 'community')
-rw-r--r--community/py-waitress/APKBUILD4
-rw-r--r--community/py-waitress/waitress.confd6
-rw-r--r--community/py-waitress/waitress.initd4
3 files changed, 10 insertions, 4 deletions
diff --git a/community/py-waitress/APKBUILD b/community/py-waitress/APKBUILD
index b9bae46781..39cceba827 100644
--- a/community/py-waitress/APKBUILD
+++ b/community/py-waitress/APKBUILD
@@ -70,5 +70,5 @@ _py() {
}
sha512sums="d53cf027525aec6fbd49ab78c30fef1b83d8b58c6d2cbb191d45e69141d7c31d6cd195a0924ad862a4cc42e5d098813712c568f768f51825e96fac3dd4132fbe waitress-1.1.0.tar.gz
-92c2e718e3aa3e4f5980208f482b9b0f0b3a3b6e736566635367ecaaecd86cfd98ba064c0b3d0bd33bab1acccfaf5a56557c7a162dbb86a166f277ffb2638a5c waitress.initd
-cceddb312049a1ae6141df403ee92e1276a4697a23ef8063b47721f59c508a4ded604802c6f55face5620e7be06e893ef51309ee7d8058d81858f86b2fc94cbe waitress.confd"
+e3dc21abf42d9e867b129004039d901df5e86f696ff3821f9b2efdf22966b64686ecff6c0fac8101ba011b007fc1358d9dab236ab69208d06a477bb29b8d7d15 waitress.initd
+15c571e6b21cfa36273e7c3f659f70d15c702c747f9ba8c681e448f52260561b87f04607a78d98f173a6068baacdc399d4593f6d7fdabb98e31578303c1b6fdb waitress.confd"
diff --git a/community/py-waitress/waitress.confd b/community/py-waitress/waitress.confd
index 7d0f62609d..80e39da880 100644
--- a/community/py-waitress/waitress.confd
+++ b/community/py-waitress/waitress.confd
@@ -29,8 +29,10 @@ wsgi_module="wsgi"
# Example: listen="127.0.0.1:8080 [::1]:8080 *:8181"
listen_on="*:8080"
-# Path of Unix socket. If a socket path is specified, a Unix domain socket is
-# made instead of the usual inet domain socket.
+# Path of unix socket to create and listen on. The directory of the socket path
+# will be created if not exists and changed owner to the $user. It must not be
+# existing directory owned by root, such as /run. Use e.g. /run/app/server.sock.
+# If specified, $listen_on is effectively ignored.
#unix_socket_path=
# Octal permissions to use for the Unix domain socket. Default is 600.
diff --git a/community/py-waitress/waitress.initd b/community/py-waitress/waitress.initd
index 79e3aa5d3d..4f99eb7677 100644
--- a/community/py-waitress/waitress.initd
+++ b/community/py-waitress/waitress.initd
@@ -48,6 +48,10 @@ start_pre() {
fi
if [ -n "$unix_socket_path" ]; then
+ if [ "$(stat -c %u "${unix_socket_path%/*}" 2>/dev/null)" -eq 0 ]; then
+ eerror "Directory \"${unix_socket_path%/*}\" already exists and is owned by root!"
+ return 1
+ fi
checkpath -d -m 0755 -o $user "${unix_socket_path%/*}"
fi