diff options
author | Jeremy Allison <jra@samba.org> | 2010-11-09 12:07:25 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2010-11-10 01:14:17 +0000 |
commit | 9997ee813b8ceeb7016355bbc07651db7f6b2d5a (patch) | |
tree | a82115ab85000f85e26aca4edd94d4f237c0619c /source3/auth/auth_server.c | |
parent | 692a7477dd3b1a40df58de09a02754dbaecb07d6 (diff) | |
download | samba-9997ee813b8ceeb7016355bbc07651db7f6b2d5a.tar.gz samba-9997ee813b8ceeb7016355bbc07651db7f6b2d5a.tar.bz2 samba-9997ee813b8ceeb7016355bbc07651db7f6b2d5a.zip |
Remove fstring from map_username. Create a more sane interface than the called-parameter-is-modified.
Jeremy.
Diffstat (limited to 'source3/auth/auth_server.c')
-rw-r--r-- | source3/auth/auth_server.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c index 4ce0336ccc..ac757d5a35 100644 --- a/source3/auth/auth_server.c +++ b/source3/auth/auth_server.c @@ -429,14 +429,15 @@ use this machine as the password server.\n")); cli_ulogoff(cli); if (NT_STATUS_IS_OK(nt_status)) { - fstring real_username; - struct passwd *pass; + char *real_username = NULL; + struct passwd *pass = NULL; - if ( (pass = smb_getpwnam( NULL, user_info->mapped.account_name, - real_username, True )) != NULL ) + if ( (pass = smb_getpwnam(talloc_tos(), user_info->mapped.account_name, + &real_username, True )) != NULL ) { nt_status = make_server_info_pw(server_info, pass->pw_name, pass); TALLOC_FREE(pass); + TALLOC_FREE(real_username); } else { |