s3-rpc_server: enforce packet level authentication for iremotewinspool server
[samba.git] / 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 );