summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2016-08-30 15:44:40 +0200
committerAndreas Schneider <asn@cryptomilk.org>2016-10-26 11:20:16 +0200
commit6f642eb3066358fa41fb8d7e8bec420277223af4 (patch)
treee5932b2f3d6331e5fe83de60f56753b8a9f75ce3 /librpc
parent1a46ff2a0fb74fa0c87cb19ac786cc260450acd9 (diff)
downloadsamba-6f642eb3066358fa41fb8d7e8bec420277223af4.tar.gz
librpc: support "packet" for packet level authentication in binding strings
Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'librpc')
-rw-r--r--librpc/rpc/binding.c3
-rw-r--r--librpc/rpc/rpc_common.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/librpc/rpc/binding.c b/librpc/rpc/binding.c
index b9ccecd7776..51f89ccf863 100644
--- a/librpc/rpc/binding.c
+++ b/librpc/rpc/binding.c
@@ -105,6 +105,7 @@ static const struct ncacn_option {
{"bigendian", DCERPC_PUSH_BIGENDIAN},
{"smb2", DCERPC_SMB2},
{"ndr64", DCERPC_NDR64},
+ {"packet", DCERPC_PACKET},
};
static const struct ncacn_option *ncacn_option_by_name(const char *name)
@@ -590,6 +591,8 @@ _PUBLIC_ void dcerpc_binding_get_auth_info(const struct dcerpc_binding *b,
auth_level = DCERPC_AUTH_LEVEL_INTEGRITY;
} else if (b->flags & DCERPC_CONNECT) {
auth_level = DCERPC_AUTH_LEVEL_CONNECT;
+ } else if (b->flags & DCERPC_PACKET) {
+ auth_level = DCERPC_AUTH_LEVEL_PACKET;
} else if (auth_type != DCERPC_AUTH_TYPE_NONE) {
auth_level = DCERPC_AUTH_LEVEL_INTEGRITY;
} else {
diff --git a/librpc/rpc/rpc_common.h b/librpc/rpc/rpc_common.h
index 9bc7d86dc72..d6b2d5dbc05 100644
--- a/librpc/rpc/rpc_common.h
+++ b/librpc/rpc/rpc_common.h
@@ -106,6 +106,8 @@ struct dcerpc_binding;
/* this triggers the DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN flag in the bind request */
#define DCERPC_PROPOSE_HEADER_SIGNING (1<<25)
+#define DCERPC_PACKET (1<<26)
+
/* The following definitions come from ../librpc/rpc/dcerpc_error.c */
const char *dcerpc_errstr(TALLOC_CTX *mem_ctx, uint32_t fault_code);