librpc: support "packet" for packet level authentication in binding strings
authorGünther Deschner <gd@samba.org>
Tue, 30 Aug 2016 13:44:40 +0000 (15:44 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 26 Oct 2016 09:20:16 +0000 (11:20 +0200)
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
librpc/rpc/binding.c
librpc/rpc/rpc_common.h

index b9ccecd7776d11d7b8eac5a54213d5d798601c60..51f89ccf863cbb0c1963e9e6ca7266d268ca875f 100644 (file)
@@ -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 {
index 9bc7d86dc722746abdecccf0ed5469e213fb29f8..d6b2d5dbc055ec5e1be186549b87caecc4a8a48c 100644 (file)
@@ -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);