diff options
author | Stefan Metzmacher <metze@samba.org> | 2017-06-14 10:39:26 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2017-06-17 16:48:11 +0200 |
commit | c3a47ceab43989ccc513c16cd9c65b339ebb9f2f (patch) | |
tree | 089186117a16861cc49b8f4f056f724bfd14f6cf /auth | |
parent | 67dd9ceee684cc60f9538005943e5129d3c552ab (diff) | |
download | samba-c3a47ceab43989ccc513c16cd9c65b339ebb9f2f.tar.gz |
auth/gensec: add GENSEC_UPDATE_IS_NTERROR() helper macro
This allows us to write clearer code that
checks for NT_STATUS_OK and NT_STATUS_MORE_PROCESSING_REQUIRED.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'auth')
-rw-r--r-- | auth/gensec/gensec.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/auth/gensec/gensec.h b/auth/gensec/gensec.h index da3e0fdf31d..a466f27b756 100644 --- a/auth/gensec/gensec.h +++ b/auth/gensec/gensec.h @@ -147,6 +147,12 @@ struct tevent_req *gensec_update_send(TALLOC_CTX *mem_ctx, struct gensec_security *gensec_security, const DATA_BLOB in); NTSTATUS gensec_update_recv(struct tevent_req *req, TALLOC_CTX *out_mem_ctx, DATA_BLOB *out); + +#define GENSEC_UPDATE_IS_NTERROR(status) ( \ + !NT_STATUS_IS_OK(status) && \ + !NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED) \ + ) + /** * @brief Ask for features for a following authentication * |