diff options
author | Volker Lendecke <vl@samba.org> | 2021-04-13 14:45:54 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2021-04-19 18:18:31 +0000 |
commit | 999a412db9c2b8e46d87972ad357a8345fde1810 (patch) | |
tree | ecbc43b9d562570d39cab6251eaada0163d0c48a /source3 | |
parent | c0edfd91e4be447f7d4ec59e4c049eadba227008 (diff) | |
download | samba-999a412db9c2b8e46d87972ad357a8345fde1810.tar.gz |
auth3: Use talloc_move() instead of talloc_steal()
More recent coding style, avoid ambiguities about ownership
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/auth/auth_generic.c | 2 | ||||
-rw-r--r-- | source3/auth/auth_util.c | 2 | ||||
-rw-r--r-- | source3/auth/server_info.c | 2 | ||||
-rw-r--r-- | source3/auth/server_info_sam.c | 4 |
4 files changed, 5 insertions, 5 deletions
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: |