From: Volker Lendecke Date: Tue, 13 Apr 2021 14:45:54 +0000 (+0000) Subject: auth3: Use talloc_move() instead of talloc_steal() X-Git-Tag: tevent-0.11.0~1100 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=999a412db9c2b8e46d87972ad357a8345fde1810;p=thirdparty%2Fsamba.git auth3: Use talloc_move() instead of talloc_steal() More recent coding style, avoid ambiguities about ownership Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/auth/auth_generic.c b/source3/auth/auth_generic.c index e62585e919c..1b6e85c1cf0 100644 --- a/source3/auth/auth_generic.c +++ b/source3/auth/auth_generic.c @@ -399,7 +399,7 @@ NTSTATUS auth_generic_prepare(TALLOC_CTX *mem_ctx, return nt_status; } - *gensec_security_out = talloc_steal(mem_ctx, gensec_security); + *gensec_security_out = talloc_move(mem_ctx, &gensec_security); TALLOC_FREE(tmp_ctx); return NT_STATUS_OK; } diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 4686b29111e..162adeb5527 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -1292,7 +1292,7 @@ NTSTATUS make_server_info_pw(TALLOC_CTX *mem_ctx, result->utok.uid = pwd->pw_uid; result->utok.gid = pwd->pw_gid; - *server_info = talloc_steal(mem_ctx, result); + *server_info = talloc_move(mem_ctx, &result); status = NT_STATUS_OK; done: talloc_free(tmp_ctx); diff --git a/source3/auth/server_info.c b/source3/auth/server_info.c index f3e2b3b25f8..e5debd45b97 100644 --- a/source3/auth/server_info.c +++ b/source3/auth/server_info.c @@ -781,7 +781,7 @@ NTSTATUS passwd_to_SamInfo3(TALLOC_CTX *mem_ctx, } } - *pinfo3 = talloc_steal(mem_ctx, info3); + *pinfo3 = talloc_move(mem_ctx, &info3); status = NT_STATUS_OK; done: diff --git a/source3/auth/server_info_sam.c b/source3/auth/server_info_sam.c index fef60c2fbd6..755791c1be4 100644 --- a/source3/auth/server_info_sam.c +++ b/source3/auth/server_info_sam.c @@ -96,7 +96,7 @@ NTSTATUS make_server_info_sam(TALLOC_CTX *mem_ctx, goto out; } - server_info->unix_name = talloc_steal(server_info, pwd->pw_name); + server_info->unix_name = talloc_move(server_info, &pwd->pw_name); server_info->utok.gid = pwd->pw_gid; server_info->utok.uid = pwd->pw_uid; @@ -121,7 +121,7 @@ NTSTATUS make_server_info_sam(TALLOC_CTX *mem_ctx, DEBUG(5,("make_server_info_sam: made server info for user %s -> %s\n", pdb_get_username(sampass), server_info->unix_name)); - *pserver_info = talloc_steal(mem_ctx, server_info); + *pserver_info = talloc_move(mem_ctx, &server_info); status = NT_STATUS_OK; out: