0
0
mirror of https://github.com/zeromq/libzmq.git synced 2025-01-06 11:22:55 +08:00

5956 Commits

Author SHA1 Message Date
Luca Boccassi
2991e6f602 Merge pull request #2633 from pavel-pimenov/fix-C4324
Suppress C4324 (VC++2017)
2017-07-27 10:10:03 +01:00
pavel.pimenov
dfd9d48496 Suppress C4324 (VC++2017)
'zmq::command_t': structure was padded due to alignment specifier
https://msdn.microsoft.com/en-us/library/92fdk6xx.aspx
2017-07-27 07:06:19 +03:00
Constantin Rack
a537ace084 Merge pull request #2631 from ecoughlan/skip_invalid_setsockopt
Don't try to set IPV6_V6ONLY on OpenBSD
2017-07-22 23:16:28 +02:00
Eamonn Coughlan
cfb59dde21 Problem: can't set IPV6_V6ONLY on OpenBSD
Solution: skip setsockopt call resulting in EINVAL
2017-07-22 22:53:12 +02:00
Constantin Rack
b2c4dad46e Merge pull request #2626 from minrk/relicense
RELICENSE: minrk
2017-07-17 14:01:26 +02:00
Min RK
01f29ed8b9 add license grant for minrk 2017-07-17 13:57:53 +02:00
Constantin Rack
e1dfb2e337 Merge pull request #2625 from trofi/master
configure.ac: allow user to disable libunwind discovery via --disable-libunwind
2017-07-14 23:14:54 +02:00
Sergei Trofimovich
88487e7da3 configure.ac: allow user to disable libunwind discovery via --disable-libunwind
on ia64 architecture libunwind comes with gcc. Unfortunately
libunwind is not directly usable as-is and fails at link time:

```
    ia64-unknown-linux-gnu-g++ -o perf/.libs/local_lat perf/local_lat.o src/.libs/libzmq.so -lsodium -lrt -lpthread -ldl
    src/.libs/libzmq.so: undefined reference to `_ULia64_step'
```

The change adds --{enable,disable}-libunwind flag to control
automatic dependency. The default is unchanged: use if available.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2017-07-14 21:44:30 +01:00
Luca Boccassi
dfcf396ded Merge pull request #2624 from msune/master
Problem: adapt, clarify docs ZMQ_ROUTER_MANDATORY
2017-07-14 17:53:55 +01:00
Marc Sune
609c131249 Problem: adapt, clarify docs ZMQ_ROUTER_MANDATORY
Solution:

* Document the new behaviour when generating 'ZMQ_POLLOUT' events
  for ZMQ_ROUTER sockets with 'ZMQ_ROUTER_MANDATORY' set to `1`
* Add clarifications for 'ZMQ_ROUTER' socket when
  'ZMQ_ROUTER_MANDATORY' is set to `1`
2017-07-14 18:49:14 +02:00
Luca Boccassi
bba4a93727 Merge pull request #2622 from msune/master
Fix ROUTER's xhas_out() in MANDATORY mode
2017-07-14 15:48:37 +01:00
Marc Sune
b7b89a8f60 Fix ROUTER's xhas_out() in MANDATORY mode
Before this commit, xhas_out() was returning true regardless. This
was correct before the ZMQ_ROUTER_MANDATORY flag as introduced.
However, ZMQ_POLLOUT.

With this commit, _if_ ZMQ_ROUTER_MANDATORY is set, xhas_out() will
return false if ALL peer's outgoing pipes are full.

There is an outstanding high-level design question:

If ZMQ_ROUTER_MANDATORY is set, and zmq_poll() waits for ZMQ_POLLOUT
events, zmq_poll() will immediately wake up if only 1 pipe has
room to send, regardless of the peer, creating a busy loop of
zmq_poll() wake-up, zmq_send() (EAGAIN). There is no way for
the application to selectively wait for ZMQ_POLLOUT for specific
peer(s), which seems somehow necessary in ZMQ_ROUTER_MANDATORY.

This discussion will be addressed in a separate issue.

Signed-off-by: Marc Sune <marc@voltanet.io>
Signed-off-by: Fredi Raspall <fredi@voltanet.io>
2017-07-14 15:55:58 +02:00
Doron Somech
30ab0ed897 Merge pull request #2615 from bluca/curve_server_reconnect
Problem: CURVE server (connect) fails when client rebinds
2017-07-01 20:54:32 +03:00
Luca Boccassi
d04065b778 Problem: CURVE server (connect) fails when client rebinds
Solution: if a CURVE server is using zmq_connect, the same session
will be used for any client "reconnect" (actual binds). This is
acceptable, so do not assert if zap_pipe already exists during the
handshake, but simply reuse it.
Fixes #2608
2017-07-01 17:37:07 +01:00
Constantin Rack
4e6c89e3cd Merge pull request #2613 from mattconnolly/relicense
RELICENSE: Matt Connolly
2017-06-29 08:04:24 +02:00
Matt Connolly
1d17182799 RELICENSE: Matt Connolly
Refs #2376
2017-06-28 22:51:24 -07:00
Luca Boccassi
35cd0245c9 Merge pull request #2610 from bjovke/my_work_2
Problem: When using print_backtrace() on Linux with libunwind, printout of stack traces from multiple threads are interleaved. Solution: added static mutex to serialize printing of stack traces.
2017-06-27 21:05:48 +01:00
Luca Boccassi
33038da522 Merge pull request #2609 from bjovke/my_work
Problem: intermittent memory leak for req/rep send/recv. #2602 Solution: memory leak fixed.
2017-06-27 20:13:28 +01:00
bjovke
9ef34addb8 Problem: When using print_backtrace() on Linux with libunwind, printout of stack traces from multiple threads are interleaved. Solution: added static mutex to serialize printing of stack traces. 2017-06-27 20:29:08 +02:00
bjovke
69355730a4 Problem: intermittent memory leak for req/rep send/recv. #2602 Solution: memory leak fixed. 2017-06-27 20:15:08 +02:00
Constantin Rack
a3550e6104 Merge pull request #2605 from emanuelkoczwara/master
Update zmq.txt
2017-06-23 19:02:09 +02:00
Emanuel Koczwara
cb54a6b24a Update zmq.txt
Fixed minor typo.
2017-06-23 18:57:33 +02:00
Doron Somech
f5da4b1c6c Merge pull request #2603 from bluca/xpub_manual_subs
Problem: XPUB_MANUAL subscriptions not removed on peer term
2017-06-22 11:46:31 +03:00
Luca Boccassi
3536c4b9c4 Problem: XPUB_MANUAL subscriptions not removed on peer term
Solution: remove the pipe from the real trie when a peer disconnects.
Also add a unit test that exercises the behaviour by reconnecting
a different socket and sending a message that matches.
Fixes #2601 and introduced by #2042
2017-06-22 01:02:08 +01:00
Luca Boccassi
8e2027983a Problem: XPUB_MANUAL takes effect for the next bind
Solution: fix unit test to bind after setting the option.
2017-06-22 00:58:44 +01:00
Joe Eli McIlvain
2d83acceff Merge pull request #2596 from bluca/zap_curve
Problems: ZAP can be set up incorrectly, CURVE and GSSAPI can be used only with ZAP
2017-06-15 11:51:43 -07:00
Luca Boccassi
35fce88fee Merge pull request #2599 from ibancg/master
Problem: cannot cross-compile with Mingw-w64
2017-06-14 15:28:02 +01:00
Iban Cereijo
d040dc18b5 Problem: CMake evaluation fails with Mingw-w64
Solution: we can use 'CMAKE_SYSTEM_VERSION' instead of
'${CMAKE_SYSTEM_VERSION}' for the 'if' clauses.

CMake fails to evaluate condition when CMAKE_SYSTEM_VERSION is
empty, which can happen with a default installation of Mingw-w64
in Linux.
2017-06-14 15:55:29 +02:00
Iban Cereijo
2c4e5364aa Problem: missing Ws2_32.lib when cross compiling
Solution: use lower case ws2_32.lib to enable cross compilation
from platforms with case-sensitive filesystems.

When cross compiling the tests with Mingw-w64, CMake cannot
locate Ws2_32.lib
2017-06-14 15:54:03 +02:00
Luca Boccassi
6ad0b08da9 Problem: GSSAPI can no longer be used without ZAP
Solution: do not fail if ZAP is not enabled.
GSSAPI already provides authentication and can be used separately,
so it is a valid use case.
2017-06-13 22:56:49 +01:00
Luca Boccassi
0ce18eac25 Problem: CURVE can no longer be used without ZAP
Solution: revert change that made ZAP mandatory.
The "Stonehouse" pattern, where CURVE is used only for encryption and
without authentication, is a valid use case so we should still
support it.
Also restore CURVE testing in the test_heartbeat.

Fixes #2594
2017-06-13 22:56:32 +01:00
Luca Boccassi
33695d1da8 Problem: ZAP is allowed to be configured incorrectly or not to work
Solution: if inproc://zeromq.zap.01 exists, which means ZAP is
enabled, abort immediately if it cannot be used (eg: out of memory)
or it is configured incorrectly (eg: wrong socket type).
Otherwise authentication failures will simply be ignored and
unauthorised peers will be allowed to slip in.
2017-06-13 22:56:31 +01:00
Doron Somech
10a9ba0926 Merge pull request #2593 from ilovexyz/dev
fix bug: #2592 dish client does not resend subscriptions to radio server after radio server restart
2017-06-12 07:34:28 +03:00
sunddy
af598f2e1c fix bug: dish client does not resend subscriptions to radio server after radio server restart
problem: for zmq radio/dish pattern, if the radio process restarts, the dish will not resend subscriptions to radio. And the result is that the dish will never receive any more messages.

solution: in session_base_t::reconnect (), take ZMQ_DISH into consideration when invoking hiccup method.
2017-06-12 12:26:21 +08:00
BJovke
99805931e4 Merge pull request #2591 from laplaceyang/pr_cancel_timer_in_reconnect
fix bug: coredump if set linger and immediate together
2017-06-02 10:25:18 +02:00
laplaceyang
67a6594fc0 fix bug: coredump if set linger and immediate together
In function session_base_t::reconnect, if we set immediate to 1 and set linger, we will get into first block of reconnect function, and set pipe to NULL, but we forget to cancel timer of linger. Once timer tiggered, we will get coredump. Solution: cancel timer in the end of set pipe to NULL
2017-06-02 11:36:41 +08:00
Constantin Rack
bcc30f2ab0 Merge pull request #2584 from GreatFruitOmsk/master
RELICENSE: Ilya Kulakov
2017-05-23 19:40:34 +02:00
Ilya Kulakov
545135fb8d RELICENSE: Ilya Kulakov
Refs #2376
2017-05-23 10:38:13 -07:00
Constantin Rack
ec56eaaeb6 Merge pull request #2583 from timou/wincmake
Suppress linker warning 4221 for MSVC
2017-05-20 21:08:58 +02:00
Tim Ebringer
293a18257a Suppress linker warning 4221 for MSVC
Some #define switches cause the body of entire files to be omitted. This
causes a linker warning on Visual Studio 2017, for example

    warning LNK4221: This object file does not define any previously
    undefined public symbols, so it will not be used by any link
    operation that consumes this library

Since this is warning us about something that shouldn't be
earth-shattering news, we add a linker flag to suppress this warning on
MSVC builds.
2017-05-20 14:29:58 -04:00
Doron Somech
92339a4d9d Merge pull request #2582 from bluca/test_poller_use_after_free
Problem: use-after-free in test_poller
2017-05-18 15:37:31 +03:00
Luca Boccassi
17637536b8 Problem: use-after-free in test_poller
Solution: remove server socket from poller before closing it
Fixes #2581
2017-05-18 13:10:19 +01:00
Luca Boccassi
bc8ad8860b Merge pull request #2580 from diorcety/ninja
Use OBJECT_DEPENDS and OBJECT_OUTPUTS for precompiled.hpp
2017-05-18 11:33:05 +01:00
Yann Diorcet
f66c49a62b Fix precompiled 2017-05-18 12:02:07 +02:00
Luca Boccassi
6ad533bec4 Merge pull request #2578 from rkfg/dev
Problem: abort at socket creation on Android with jzmq
2017-05-17 14:09:14 +01:00
rkfg
72b4b6830f Problem: abort at socket creation on Android with jzmq
Solution: don't set thread name on Android

Setting a thread name on Android may fail with "permission
denied" error and abort the process due to failed assertion.
Tested on Android 5 and 6 (two phones).
Strangely enough, it only happens on signed APKs and is fine
in debug. Using JeroMQ is not an option as we need TCP keepalive
settings and authentication which JeroMQ doesn't support.
2017-05-17 15:05:37 +03:00
Doron Somech
8e1facc73e Merge pull request #2577 from bluca/rep_leak
Problem: REP leaves label msgs for dead REQ in pipe
2017-05-17 11:53:49 +03:00
Luca Boccassi
bdc676f687 Problem: REP leaves label msgs for dead REQ in pipe
Solution: roll back the pipe if writing messages other than the
first fails in router::xsend. Roll it back also when the pipe is
terminating.
Also add test case that reproduces the memory leak when ran with
valgrind.
Fixes #2567
2017-05-17 09:18:15 +01:00
Luca Boccassi
766c47ffdd Merge pull request #2575 from zeromq/revert-2572-rep_leak
Revert "Problem: REP leaves label msgs for dead REQ in pipe"
2017-05-16 10:31:23 +01:00
BJovke
1489fc1ac5 Revert "Problem: REP leaves label msgs for dead REQ in pipe" 2017-05-16 11:20:03 +02:00
BJovke
75cc2015d1 Merge pull request #2572 from bluca/rep_leak
Problem: REP leaves label msgs for dead REQ in pipe
2017-05-16 10:28:24 +02:00
Luca Boccassi
0999fdd885 Problem: REP leaves label msgs for dead REQ in pipe
Solution: roll back the pipe if writing messages other than the
first fails in router::xsend.
Also add test case that reproduces the memory leak when ran with
valgrind.
Fixes #2567
2017-05-10 23:44:03 +01:00
Luca Boccassi
d17581929c Merge pull request #2570 from jruffin/master-relicense
Added the license grant for jruffin
2017-05-10 11:57:03 +01:00
Julien Ruffin
30dac3807f Added the license grant for jruffin 2017-05-10 12:50:41 +02:00
Doron Somech
b7e8a3d699 Merge pull request #2566 from leonarf/leonarf-relicense
license right grant from Leonard Michelet
2017-05-08 19:02:31 +03:00
Leonard
7dc06fdfb2 license right grant from Leonard Michelet 2017-05-08 17:42:55 +02:00
Doron Somech
f0df483fa7 Merge pull request #2564 from rotty/master
Relicensing grant from rotty
2017-05-07 15:34:58 +03:00
Andreas Rottmann
806bc9dd08 Relicensing grant from rotty 2017-05-07 14:05:55 +02:00
Luca Boccassi
fb92cd30a1 Merge pull request #2562 from pijyoi/fix_init_fdset
Problem: not using official api FD_ZERO to init fd_set
2017-05-06 10:51:51 +01:00
KIU Shueng Chuan
d11f501dc1 problem: not using official api FD_ZERO to init fd_set
solution: fix it

In particular, on Windows, using FD_ZERO is much more efficient than
zeroing out the whole structure.
2017-05-06 08:03:09 +08:00
Constantin Rack
0a66acb31b Merge pull request #2560 from bluca/tests_ports
Problems: cannot use wildcard port with source address, tests bind to hardcoded TCP ports, ASAN CI run could use some improvements
2017-05-05 08:23:07 +02:00
Constantin Rack
18651d1699 Merge pull request #2561 from flub/master
Grant permission to relicense to MPL
2017-05-03 19:50:54 +02:00
Floris Bruynooghe
3241875b7b Grant permission to relicense to MPL 2017-05-03 19:46:20 +02:00
Luca Boccassi
655fbfc399 Problem: ASAN test doesn't print good traces with GCC 4.8
Solution: add Ubuntu toolchain PPA and use GCC 6
2017-05-01 22:57:05 +01:00
Luca Boccassi
86f9f1df7a Problem: CI doesn't build with debugging symbols
Solution: pass -g so that valgrind/asan can print useful backtraces
2017-05-01 22:57:05 +01:00
Luca Boccassi
11e2e5f6b5 Problem: address sanitizer support in CI is hacky
Solution: import better solution from zproject and add a new autoconf
option
2017-05-01 22:57:05 +01:00
Luca Boccassi
6d76106cde Problem: test_many_sockets is flacky on OSX
Solution: mark it as XFAIL. We tried many times to tweak the system
settings from the CI script but it still fails.
2017-05-01 22:57:05 +01:00
Luca Boccassi
463c2d75ae Problem: CI builds and test runs not done in parallel
Solution: run make with -j5, as now the tests support it.
2017-05-01 22:57:05 +01:00
Luca Boccassi
48792f8006 Problem: CI runs libsodium tests
Solution: don't, libzmq's CI tests are not responsible for testing
libsodium stable releases. Save some time in the CI.
2017-05-01 22:57:05 +01:00
Luca Boccassi
b29d46b6a5 Problem: tests use same IPC endpoint
Solution: use either a wildcard IPC, or where the codepath needs to
be tested a file named after the test, so that it is unique and there
is no clash on the filesystem, allowing parallel test runs.
2017-05-01 22:57:05 +01:00
Luca Boccassi
5934919f3e Problem: tests bind to hardcoded TCP ports
Solution: use ZMQ_LAST_ENDPOINT in most places. This alllows running
tests in paralle, and on over-booked shared machines where many of
the ports would be already in use.
Keep 3 tests with an hardcoded port, as there are some code paths that
require it (eg: connect before bind), but list those ports in
tests/testutil.hpp as macros so that they do not overlap and still
allow parallel runs.

These changes were inspired by a patch uploaded to Ubuntu by the
package maintainer, Steve Langasek <steve.langasek@ubuntu.com>.
Thank you Steve!
2017-05-01 22:57:05 +01:00
Luca Boccassi
2c2c813824 Merge pull request #2559 from michicc/master
RELICENSE: Grant from michicc
2017-05-01 21:53:41 +01:00
Michael Lutz
584706f023 RELICENSE: Grant from michicc 2017-05-01 21:31:57 +02:00
Luca Boccassi
ae461dc2a9 Problem: cannot use wildcard port with source address
Solution: fix TCP endpoint parsing to allow
tcp://127.0.0.1:*;127.0.0.1:1000
2017-05-01 14:57:29 +01:00
Doron Somech
06666d8c4a Merge pull request #2558 from bluca/obs_release
Problem: no way to deploy releases to OBS
2017-05-01 16:39:19 +03:00
Luca Boccassi
f126da8b22 Problem: no way to deploy releases to OBS
Solution: add new tokens to .travis.yml and change ci_deploy.sh
script to use Github APIs to create a temporary branch at the tag,
and the OBS APIs to trigger a source service run in the stable and
draft release projects:
network:messaging:zeromq:release-stable
network:messaging:zeromq:release-draft

The branch hack is unfortunately necessary as it is not possible to
modify OBS sources with the token APIs, and it is also not possible
to automatically fetch the latest tag in the service files.
The temporary branch is immediately deleted.
2017-04-30 16:15:15 +01:00
Constantin Rack
e24ef3ff48 Merge pull request #2557 from bluca/package_gssapi_manpage
Problem: RPM build fails due to ignored zmq_gssapi.7
2017-04-29 14:14:30 +02:00
Luca Boccassi
d96c48ffa4 Problem: OBS _service sets version to unix timestamp.commitid
Solution: a new option has been added to the tar_scm service, so use
it to set the version to last_tag+git<last commit date> which is more
useful.
Unfortunately it's not possible to set it to the current version as
set in the header files, as it's not possible to parse files, only
commit ids, dates and git tags. But it's a step forward.
2017-04-29 13:08:25 +01:00
Luca Boccassi
9dd75e62bf Problem: RPM build fails due to ignored zmq_gssapi.7
Solution: use wildcard to pick up manpages in the spec file
2017-04-29 12:53:09 +01:00
Constantin Rack
2215a9d391 Merge pull request #2554 from bluca/disable_new_poller_without_drafts
Problem: new zmq_poller used by zmq_poll without DRAFTs
2017-04-28 18:01:04 +02:00
Luca Boccassi
90c76fbd60 Problem: new zmq_poller used by zmq_poll without DRAFTs
Solution: do not define ZMQ_HAVE_POLLER in src/zmq_drafts.h otherwise
src/zmq.cpp will implement zmq_poll using the new poller classes.
Same for ZMQ_HAVE_TIMERS, even though it has no internal effect, but
to be safe against future development.
2017-04-28 16:10:01 +01:00
Luca Boccassi
e905f9da99 Merge pull request #2553 from diorcety/x
Fix WITH_DOC
2017-04-28 12:59:17 +01:00
Yann Diorcet
ec7b9480f5 Fix WITH_DOC 2017-04-28 13:43:17 +02:00
Luca Boccassi
54b89858ab Merge pull request #2550 from garlick/gssapi_test
add simple GSSAPI test for make check
2017-04-26 17:42:33 +01:00
Jim Garlick
edd6b0ad01 gssapi: add a basic test for GSSAPI security
Problem: there is no test coverage for GSSAPI.

Solution: add a test structured like the CURVE test.

The test is not built if libzmq is not configured with
--with-libgssapi_krb5. It will report SKIPPED status
if the required environment is missing (see below).

Environment:  KRB5_KTNAME and KRB5_CLIENT_KTNAME
environment variables must point to a keytab file
containing creds for a host-based test principal
(see comment at top of source for details).
Kerberos must be configured and a KDC containing the
test principal must be running, otherwise the test
will fail/hang.

N.B. For now, the test must use the same principal for
both client and server roles because it seems impossible
to set them to different principals when they are
threads in the same process.  Once one principal is
cached in credential cache, attempts to acquire creds
for a different "desired name" seem to be ignored and
the cached principal is used instead.
2017-04-26 09:31:21 -07:00
Luca Boccassi
8e33d4247c Merge pull request #2549 from garlick/gssapi_nametype
Clean up after move of GSSAPI NAMETYPE options to DRAFT
2017-04-25 22:49:56 +01:00
Jim Garlick
53918fc115 gssapi: drop unnecessary ifdefs
Problem: GSSAPI DRAFT code was made conditional on
ZMQ_BUILD_DRAFT_API, but zmq_draft.h duplicates the DRAFT
symbols definitions from zmq.h so this is unnecessary.

Solution: drop the extra ifdefs
2017-04-25 13:50:12 -07:00
Jim Garlick
c978d3bb0a gssapi: renumber socket options
Problem: GSSAPI NAMETYPE socket option numbers were modified
+1000 when moved to DRAFT section, but should use the definitive
values while in DRAFT to minimize disruption later.

Solution: renumber the socket options
2017-04-25 09:58:07 -07:00
Luca Boccassi
c23fcc1b05 Merge pull request #2548 from garlick/gssapi_nametype
move GSSAPI NAMETYPE options to DRAFT, etc.
2017-04-25 09:44:17 +01:00
Jim Garlick
568feb1c7f gssapi: document NAMETYPE options in get/setsockopt(3)
Problem: GSSAPI NAMETYPE options were not documented in man
pages for zmq_getsockopt() and zmq_setsockopt().

Solution: add new options to these manual pages.
2017-04-24 16:13:10 -07:00
Jim Garlick
8892087e99 gssapi: add NAMETYPE options to zmq_getsockopt
Problem: GSSAPI NAMETYPE options were added to zmq_setsockopt()
but not zmq_getsockopt().

Add them to zmq_getsockopt().
2017-04-24 16:12:42 -07:00
Jim Garlick
9fbf2e2eb6 gssapi: move new options to DRAFT section
Problem: The new GSSAPI NAMESPACE options should have been
added to the DRAFT section of the API so they can be changed
until stabilized.

Solution:
- Move defines to the DRAFT section of zmq.h
- Duplicate them in zmq_draft.h, as is the local custom
- Compile only if defined (ZMQ_BUILD_DRAFT_API)
- Refactor internals slightly to avoid #ifdef hell
2017-04-24 16:12:27 -07:00
Luca Boccassi
c49436ad94 Merge pull request #2547 from diorcety/x
Targets broken by some parts of f7d1c159d4f96686ce994319280c1bd3a2eab994
2017-04-24 15:48:10 +01:00
Yann Diorcet
17460b3b2b Targets broken by some parts of f7d1c159d4f96686ce994319280c1bd3a2eab994 2017-04-24 15:57:14 +02:00
Constantin Rack
74395668c6 Merge pull request #2546 from rikvdh/master
RELICENSE: Grant from rikvdh
2017-04-23 11:52:54 +02:00
Rik van der Heijden
67eee47557 RELICENSE: Grant from rikvdh 2017-04-23 11:21:12 +02:00
Luca Boccassi
4ae2ffdac7 Merge pull request #2545 from garlick/gssapi_nametype
add GSSAPI NAMETYPE socket options
2017-04-22 11:12:23 +01:00
Jim Garlick
48f72844ad gssapi: add zmq_gssapi.7 to MAN7 in Makefile.am
Problem: zmq_gssapi.7 was not mentioned in doc/Makefile.am

Solution: add man page to MAN7 in doc/Makefile.am
2017-04-21 13:08:48 -07:00
Jim Garlick
8bd3f03cd4 gssapi: add NAMETYPE socket opts to zmq_gssapi.7
Problem: new GSSAPI socket options are not documented.

Solution: add PRINCIPAL NAMES section to zmq_gssapi.7
2017-04-21 13:08:48 -07:00
Jim Garlick
0b185e8297 gssapi: add NAMETYPE socket options
Problem: principals are looked up unconditionally
with the GSS_C_NT_HOSTBASED_SERVICE name type.

Solution: Add two new socket options to set the name type
for ZMQ_GSSAPI_PRINCIPAL and ZMQ_GSSAPI_SERVICE_PRINCIPAL:

ZMQ_GSSAPI_PRINCIPAL_NAMETYPE
ZMQ_GSSAPI_SERVICE_PRINCIPAL_NAMETYPE

They take an integer argument which must be one of
ZMQ_GSSAPI_NT_HOSTBASED (0) - default
ZMQ_GSSAPI_NT_USER_NAME (1)
ZMQ_GSSAPI_NT_KRB5_PRINCIPAL (2)

These correspond to GSSAPI name types of:
GSS_C_NT_HOSTBASED_SERVICE
GSS_C_NT_USER_NAME
GSS_KRB5_NT_PRINCIPAL_NAME

Fixes #2542
2017-04-21 13:08:45 -07:00