samba: fix some security problems
[openwrt/staging/chunkeey.git] / package / network / services / samba36 / patches / 260-remove_samr.patch
index 7e5557305607ac5fa4c0fe639f773fdcbf8b7194..aeca3ed5563f819eb547cca677cc074d9334a30a 100644 (file)
        if (!str1 || !str2 || !UserName || !p) {
                return False;
        }
+--- a/source3/rpc_server/srv_pipe.c
++++ b/source3/rpc_server/srv_pipe.c
+@@ -409,6 +409,7 @@ static bool check_bind_req(struct pipes_
+       context_fns->syntax = *abstract;
+       context_fns->allow_connect = lp_allow_dcerpc_auth_level_connect();
++#ifdef SAMR_SUPPORT
+       /*
+        * for the samr and the lsarpc interfaces we don't allow "connect"
+        * auth_level by default.
+@@ -417,6 +418,7 @@ static bool check_bind_req(struct pipes_
+       if (ok) {
+               context_fns->allow_connect = false;
+       }
++#endif
+       ok = ndr_syntax_id_equal(abstract, &ndr_table_lsarpc.syntax_id);
+       if (ok) {
+               context_fns->allow_connect = false;