mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
s3:winbind: Use a goto for cleaning up at the end
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13209 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
264249db0f
commit
00d176c6c5
@ -889,14 +889,14 @@ NTSTATUS append_auth_data(TALLOC_CTX *mem_ctx,
|
|||||||
const char *name_user)
|
const char *name_user)
|
||||||
{
|
{
|
||||||
struct netr_SamInfo3 *info3 = NULL;
|
struct netr_SamInfo3 *info3 = NULL;
|
||||||
NTSTATUS result;
|
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
|
||||||
|
|
||||||
result = map_validation_to_info3(talloc_tos(),
|
result = map_validation_to_info3(talloc_tos(),
|
||||||
validation_level,
|
validation_level,
|
||||||
validation,
|
validation,
|
||||||
&info3);
|
&info3);
|
||||||
if (!NT_STATUS_IS_OK(result)) {
|
if (!NT_STATUS_IS_OK(result)) {
|
||||||
return result;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request_flags & WBFLAG_PAM_USER_SESSION_KEY) {
|
if (request_flags & WBFLAG_PAM_USER_SESSION_KEY) {
|
||||||
@ -919,8 +919,7 @@ NTSTATUS append_auth_data(TALLOC_CTX *mem_ctx,
|
|||||||
if (!NT_STATUS_IS_OK(result)) {
|
if (!NT_STATUS_IS_OK(result)) {
|
||||||
DEBUG(10,("Failed to append Unix Username: %s\n",
|
DEBUG(10,("Failed to append Unix Username: %s\n",
|
||||||
nt_errstr(result)));
|
nt_errstr(result)));
|
||||||
TALLOC_FREE(info3);
|
goto out;
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -931,8 +930,7 @@ NTSTATUS append_auth_data(TALLOC_CTX *mem_ctx,
|
|||||||
if (!NT_STATUS_IS_OK(result)) {
|
if (!NT_STATUS_IS_OK(result)) {
|
||||||
DEBUG(10,("Failed to append INFO3 (NDR): %s\n",
|
DEBUG(10,("Failed to append INFO3 (NDR): %s\n",
|
||||||
nt_errstr(result)));
|
nt_errstr(result)));
|
||||||
TALLOC_FREE(info3);
|
goto out;
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -943,8 +941,7 @@ NTSTATUS append_auth_data(TALLOC_CTX *mem_ctx,
|
|||||||
if (!NT_STATUS_IS_OK(result)) {
|
if (!NT_STATUS_IS_OK(result)) {
|
||||||
DEBUG(10,("Failed to append INFO3 (TXT): %s\n",
|
DEBUG(10,("Failed to append INFO3 (TXT): %s\n",
|
||||||
nt_errstr(result)));
|
nt_errstr(result)));
|
||||||
TALLOC_FREE(info3);
|
goto out;
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -954,13 +951,14 @@ NTSTATUS append_auth_data(TALLOC_CTX *mem_ctx,
|
|||||||
if (!NT_STATUS_IS_OK(result)) {
|
if (!NT_STATUS_IS_OK(result)) {
|
||||||
DEBUG(10,("Failed to append AFS token: %s\n",
|
DEBUG(10,("Failed to append AFS token: %s\n",
|
||||||
nt_errstr(result)));
|
nt_errstr(result)));
|
||||||
TALLOC_FREE(info3);
|
goto out;
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
result = NT_STATUS_OK;
|
||||||
|
out:
|
||||||
TALLOC_FREE(info3);
|
TALLOC_FREE(info3);
|
||||||
return NT_STATUS_OK;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static NTSTATUS winbindd_dual_pam_auth_cached(struct winbindd_domain *domain,
|
static NTSTATUS winbindd_dual_pam_auth_cached(struct winbindd_domain *domain,
|
||||||
|
Loading…
Reference in New Issue
Block a user