From c6c74d117dee5ac747ae53ce7a1e75bb2b7470e1 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Wed, 1 Dec 2021 18:06:38 +0300 Subject: 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. --- auto/sockets | 62 +++++++++++++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 30 deletions(-) (limited to 'auto') 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 +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 - 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 + #include + + 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 - #include 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 - - int main() { - return sizeof(struct cmsgcred); - }" -. auto/feature - - nxt_feature="sys/filio.h" nxt_feature_name=NXT_HAVE_SYS_FILIO_H nxt_feature_run= -- cgit