diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-10-14 09:56:04 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:59:53 -0500 |
commit | 64344b88d17fa92275f564f972566c4e600e7501 (patch) | |
tree | e20e4b512631ac82e652ef8d0e2608261144728f /source4/rpc_server/drsuapi/dcesrv_drsuapi.c | |
parent | f345c4281aa9df6f5ea7d0e9e61a1c7aa2c52f3e (diff) | |
download | samba-64344b88d17fa92275f564f972566c4e600e7501.tar.gz samba-64344b88d17fa92275f564f972566c4e600e7501.tar.bz2 samba-64344b88d17fa92275f564f972566c4e600e7501.zip |
r2970: - give somefields names and typdef enums for the possible values
- do more crackname tests in the torture test
- move server code for cracknames to a different file
metze
(This used to be commit 18050ea6037b3c0c7cfe975eb9c872368b9e3328)
Diffstat (limited to 'source4/rpc_server/drsuapi/dcesrv_drsuapi.c')
-rw-r--r-- | source4/rpc_server/drsuapi/dcesrv_drsuapi.c | 50 |
1 files changed, 3 insertions, 47 deletions
diff --git a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c index 06fa1bba95..503a54b6b3 100644 --- a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c +++ b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c @@ -190,54 +190,10 @@ static NTSTATUS DRSUAPI_GET_NT4_CHANGELOG(struct dcesrv_call_state *dce_call, TA /* - drsuapi_DsCrackNames + drsuapi_DsCrackNames => drsuapip_cracknames.c */ -static NTSTATUS drsuapi_DsCrackNames(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, - struct drsuapi_DsCrackNames *r) -{ - struct dcesrv_handle *h; - - r->out.level = r->in.level; - ZERO_STRUCT(r->out.out); - - DCESRV_PULL_HANDLE(h, r->in.bind_handle, DRSUAPI_BIND_HANDLE); - - switch (r->in.level) { - case 1: { - int i; - - r->out.out.info1 = talloc_p(mem_ctx, struct drsuapi_DsCrackNamesOutInfo1); - NTSTATUS_TALLOC_CHECK(r->out.out.info1); - - r->out.out.info1->names = talloc_array_p(mem_ctx, - struct drsuapi_DsCrackNamesOutInfo1Names, - r->in.in.info1.count); - NTSTATUS_TALLOC_CHECK(r->out.out.info1->names); - - r->out.out.info1->count = r->in.in.info1.count; - - for (i=0; i < r->out.out.info1->count; i++) { - const char *name; - r->out.out.info1->names[i].unknown1 = 2; - r->out.out.info1->names[i].name1 = NULL; - r->out.out.info1->names[i].name2 = NULL; - - /* TODO: fill crack the right names! */ - name = talloc_asprintf(mem_ctx, "%s/", lp_realm()); - if (strcmp(name, r->in.in.info1.names[i].str) != 0) { - continue; - } - r->out.out.info1->names[i].unknown1 = 0; - r->out.out.info1->names[i].name1 = talloc_asprintf(mem_ctx, "%s", lp_realm()); - r->out.out.info1->names[i].name2 = talloc_asprintf(mem_ctx, "%s\\", lp_workgroup()); - } - return NT_STATUS_OK; - } - } - - return NT_STATUS_INVALID_LEVEL; -} - +static NTSTATUS (*drsuapi_DsCrackNames)(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, + struct drsuapi_DsCrackNames *r) = dcesrv_drsuapi_DsCrackNames; /* DRSUAPI_WRITE_SPN |