s3-rpc_server: enforce packet level authentication for iremotewinspool server
authorGünther Deschner <gd@samba.org>
Mon, 26 Sep 2016 17:21:05 +0000 (19:21 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 6 Jan 2017 11:28:18 +0000 (12:28 +0100)
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/rpc_server/srv_pipe.c

index 3af0daf410ec8a13722ec799186955122bc712d5..bf8988b2a76e285b3ab885ecac7e1c55bf93ea96 100644 (file)
@@ -50,6 +50,7 @@
 #include "../librpc/gen_ndr/ndr_netlogon.h"
 #include "../librpc/gen_ndr/ndr_epmapper.h"
 #include "../librpc/gen_ndr/ndr_echo.h"
+#include "../librpc/gen_ndr/ndr_winspool.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_RPC_SRV
@@ -459,6 +460,11 @@ static bool check_bind_req(struct pipes_struct *p,
                "allow dcerpc auth level connect",
                interface_name, context_fns->allow_connect);
 
+       ok = ndr_syntax_id_equal(abstract, &ndr_table_iremotewinspool.syntax_id);
+       if (ok) {
+               context_fns->min_auth_level = DCERPC_AUTH_LEVEL_PACKET;
+       }
+
        /* add to the list of open contexts */
 
        DLIST_ADD( p->contexts, context_fns );