diff options
author | Tiago Natel de Moura <t.nateldemoura@f5.com> | 2021-11-09 15:48:44 +0300 |
---|---|---|
committer | Tiago Natel de Moura <t.nateldemoura@f5.com> | 2021-11-09 15:48:44 +0300 |
commit | ff6a7053f500414dc74568a4e49adbac7f0cf634 (patch) | |
tree | cda31505e9746138fb864a6b2902b89107e04bc7 /auto/sockets | |
parent | e878f6d54376ea676b96b56f41708f01cfc4d8b4 (diff) | |
download | unit-ff6a7053f500414dc74568a4e49adbac7f0cf634.tar.gz unit-ff6a7053f500414dc74568a4e49adbac7f0cf634.tar.bz2 |
Introduced SCM_CREDENTIALS / SCM_CREDS in the socket control msgs.
Diffstat (limited to 'auto/sockets')
-rw-r--r-- | auto/sockets | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/auto/sockets b/auto/sockets index c8d1173e..1b6b4368 100644 --- a/auto/sockets +++ b/auto/sockets @@ -158,6 +158,58 @@ nxt_feature_test="#include <stdio.h> }" . auto/feature +if [ $nxt_found = no ]; then + $echo + $echo $0: error: no msghdr.msg_control struct member. + $echo + exit 1; +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> + + 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_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 + nxt_feature="sys/filio.h" nxt_feature_name=NXT_HAVE_SYS_FILIO_H |