summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2021-12-01 18:06:38 +0300
committerMax Romanov <max.romanov@nginx.com>2021-12-01 18:06:38 +0300
commit2d6e926a1def94e4def5b8f8da73078685626ff4 (patch)
tree2986a33cf814de81f4006f08e33b744390858594
parent97e61aad736da5fe1ad136a1d3055e16698f7d2b (diff)
downloadunit-2d6e926a1def94e4def5b8f8da73078685626ff4.tar.gz
unit-2d6e926a1def94e4def5b8f8da73078685626ff4.tar.bz2
Disabling SCM_CREDS usage on DragonFly BSD.
DragonFly BSD supports SCM_CREDS and SCM_RIGHTS, but only the first control message is passed correctly while the second one isn't processed by the kernel. This closes #599 issue on GitHub.
Diffstat (limited to '')
-rw-r--r--auto/sockets62
-rw-r--r--docs/changes.xml6
2 files changed, 38 insertions, 30 deletions
diff --git a/auto/sockets b/auto/sockets
index 1b6b4368..e6ef326d 100644
--- a/auto/sockets
+++ b/auto/sockets
@@ -166,51 +166,53 @@ if [ $nxt_found = no ]; then
fi
-nxt_feature="sockopt SO_PASSCRED"
-nxt_feature_name=NXT_HAVE_SOCKOPT_SO_PASSCRED
-nxt_feature_run=
-nxt_feature_incs=
-nxt_feature_libs=
-nxt_feature_test="#define _GNU_SOURCE
- #include <sys/socket.h>
+if [ $NXT_SYSTEM != DragonFly ]; then
+ nxt_feature="sockopt SO_PASSCRED"
+ nxt_feature_name=NXT_HAVE_SOCKOPT_SO_PASSCRED
+ nxt_feature_run=
+ nxt_feature_incs=
+ nxt_feature_libs=
+ nxt_feature_test="#define _GNU_SOURCE
+ #include <sys/socket.h>
- int main() {
- return SO_PASSCRED == 0;
- }"
-. auto/feature
+ int main() {
+ return SO_PASSCRED == 0;
+ }"
+ . auto/feature
-if [ $nxt_found = yes ]; then
- nxt_feature="struct ucred"
- nxt_feature_name=NXT_HAVE_UCRED
+ if [ $nxt_found = yes ]; then
+ nxt_feature="struct ucred"
+ nxt_feature_name=NXT_HAVE_UCRED
+ nxt_feature_run=
+ nxt_feature_incs=
+ nxt_feature_libs=
+ nxt_feature_test="#define _GNU_SOURCE
+ #include <sys/socket.h>
+ #include <sys/un.h>
+
+ int main() {
+ return sizeof(struct ucred);
+ }"
+ . auto/feature
+ fi
+
+
+ nxt_feature="struct cmsgcred"
+ nxt_feature_name=NXT_HAVE_MSGHDR_CMSGCRED
nxt_feature_run=
nxt_feature_incs=
nxt_feature_libs=
nxt_feature_test="#define _GNU_SOURCE
#include <sys/socket.h>
- #include <sys/un.h>
int main() {
- return sizeof(struct ucred);
+ return sizeof(struct cmsgcred);
}"
. auto/feature
fi
-nxt_feature="struct cmsgcred"
-nxt_feature_name=NXT_HAVE_MSGHDR_CMSGCRED
-nxt_feature_run=
-nxt_feature_incs=
-nxt_feature_libs=
-nxt_feature_test="#define _GNU_SOURCE
- #include <sys/socket.h>
-
- int main() {
- return sizeof(struct cmsgcred);
- }"
-. auto/feature
-
-
nxt_feature="sys/filio.h"
nxt_feature_name=NXT_HAVE_SYS_FILIO_H
nxt_feature_run=
diff --git a/docs/changes.xml b/docs/changes.xml
index 2bbec889..7460aa65 100644
--- a/docs/changes.xml
+++ b/docs/changes.xml
@@ -59,6 +59,12 @@ appeared in 1.26.0.
</para>
</change>
+<change type="bugfix">
+<para>
+fatal errors on DragonFly BSD; the bug had appeared in 1.26.0.
+</para>
+</change>
+
</changes>