summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-10-21 13:03:49 +0200
committerGünther Deschner <gd@samba.org>2008-10-27 19:33:23 +0100
commit8e622f57e705e92095d0f1079618366fd82f80f8 (patch)
tree940a1e32086f72808fc67d2104c1d63aa0c9b0a6 /source4/rpc_server
parentea886864190e7d3bb9f58260ec854489c4642c86 (diff)
downloadsamba-8e622f57e705e92095d0f1079618366fd82f80f8.tar.gz
samba-8e622f57e705e92095d0f1079618366fd82f80f8.tar.bz2
samba-8e622f57e705e92095d0f1079618366fd82f80f8.zip
s4-lsa: merge lsa_QueryDomainInformationPolicy from s3 lsa idl.
Guenther
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/lsa/dcesrv_lsa.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c
index 99afdea654..01c0b03295 100644
--- a/source4/rpc_server/lsa/dcesrv_lsa.c
+++ b/source4/rpc_server/lsa/dcesrv_lsa.c
@@ -2962,19 +2962,21 @@ static NTSTATUS dcesrv_lsa_QueryDomainInformationPolicy(struct dcesrv_call_state
TALLOC_CTX *mem_ctx,
struct lsa_QueryDomainInformationPolicy *r)
{
- r->out.info = talloc(mem_ctx, union lsa_DomainInformationPolicy);
- if (!r->out.info) {
+ union lsa_DomainInformationPolicy *info;
+
+ info = talloc(r->out.info, union lsa_DomainInformationPolicy);
+ if (!info) {
return NT_STATUS_NO_MEMORY;
}
switch (r->in.level) {
case LSA_DOMAIN_INFO_POLICY_EFS:
- talloc_free(r->out.info);
- r->out.info = NULL;
+ talloc_free(info);
+ *r->out.info = NULL;
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
case LSA_DOMAIN_INFO_POLICY_KERBEROS:
{
- struct lsa_DomainInfoKerberos *k = &r->out.info->kerberos_info;
+ struct lsa_DomainInfoKerberos *k = &info->kerberos_info;
struct smb_krb5_context *smb_krb5_context;
int ret = smb_krb5_init_context(mem_ctx,
dce_call->event_ctx,
@@ -2991,11 +2993,12 @@ static NTSTATUS dcesrv_lsa_QueryDomainInformationPolicy(struct dcesrv_call_state
k->user_tkt_renewaltime = 0; /* Need to find somewhere to store this, and query in KDC too */
k->clock_skew = krb5_get_max_time_skew(smb_krb5_context->krb5_context);
talloc_free(smb_krb5_context);
+ *r->out.info = info;
return NT_STATUS_OK;
}
default:
- talloc_free(r->out.info);
- r->out.info = NULL;
+ talloc_free(info);
+ *r->out.info = NULL;
return NT_STATUS_INVALID_INFO_CLASS;
}
}