This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "includes.h"
#include "torture/torture.h"
-#include "librpc/gen_ndr/ndr_lsa.h"
+#include "librpc/gen_ndr/ndr_lsa_c.h"
-#include "torture/rpc/proto.h"
-#include "libcli/auth/proto.h"
+#include "libcli/auth/libcli_auth.h"
+#include "torture/rpc/rpc.h"
static void init_lsa_String(struct lsa_String *name, const char *s)
{
blob2 = data_blob_talloc(mem_ctx, NULL, blob1.length);
- secret2 = sess_decrypt_string(&blob1, &session_key);
+ secret2 = sess_decrypt_string(mem_ctx, &blob1, &session_key);
if (strcmp(secret1, secret2) != 0) {
printf("Returned secret '%s' doesn't match '%s'\n",
/* TEST session key correctness by pushing and pulling secrets */
-BOOL torture_rpc_lsa_secrets(void)
+BOOL torture_rpc_lsa_secrets(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
return False;
}
- if (!test_lsa_OpenPolicy2(p, mem_ctx, &handle)) {
- ret = False;
- }
-
- if (!test_CreateSecret_basic(p, mem_ctx, handle)) {
- ret = False;
+ if (test_lsa_OpenPolicy2(p, mem_ctx, &handle)) {
+ if (!handle) {
+ printf("OpenPolicy2 failed. This test cannot run against this server\n");
+ ret = False;
+ } else if (!test_CreateSecret_basic(p, mem_ctx, handle)) {
+ ret = False;
+ }
+ } else {
+ return False;
}
talloc_free(mem_ctx);