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.
This commit is contained in:
Max Romanov
2021-12-01 18:06:38 +03:00
parent 97e61aad73
commit 2d6e926a1d
2 changed files with 41 additions and 33 deletions

View File

@@ -166,51 +166,53 @@ if [ $nxt_found = no ]; then
fi fi
nxt_feature="sockopt SO_PASSCRED" if [ $NXT_SYSTEM != DragonFly ]; then
nxt_feature_name=NXT_HAVE_SOCKOPT_SO_PASSCRED nxt_feature="sockopt SO_PASSCRED"
nxt_feature_run= nxt_feature_name=NXT_HAVE_SOCKOPT_SO_PASSCRED
nxt_feature_incs=
nxt_feature_libs=
nxt_feature_test="#define _GNU_SOURCE
#include <sys/socket.h>
int main() {
return SO_PASSCRED == 0;
}"
. auto/feature
if [ $nxt_found = yes ]; then
nxt_feature="struct ucred"
nxt_feature_name=NXT_HAVE_UCRED
nxt_feature_run= nxt_feature_run=
nxt_feature_incs= nxt_feature_incs=
nxt_feature_libs= nxt_feature_libs=
nxt_feature_test="#define _GNU_SOURCE nxt_feature_test="#define _GNU_SOURCE
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/un.h>
int main() { int main() {
return sizeof(struct ucred); return SO_PASSCRED == 0;
}"
. auto/feature
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>
int main() {
return sizeof(struct cmsgcred);
}" }"
. auto/feature . auto/feature
fi 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="sys/filio.h"
nxt_feature_name=NXT_HAVE_SYS_FILIO_H nxt_feature_name=NXT_HAVE_SYS_FILIO_H
nxt_feature_run= nxt_feature_run=

View File

@@ -59,6 +59,12 @@ appeared in 1.26.0.
</para> </para>
</change> </change>
<change type="bugfix">
<para>
fatal errors on DragonFly BSD; the bug had appeared in 1.26.0.
</para>
</change>
</changes> </changes>