From 158efc3aa2060e21f40e231a1e8aa945b6a3ab71 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 23 Jan 2002 12:59:24 +0000 Subject: getpwnam -> getpwnam_alloc. idra has promised not to revert these this time :-) (This used to be commit f556ad67e82518f5a024ffe9184ff9430ab5c541) --- source3/passdb/pdb_nisplus.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source3/passdb/pdb_nisplus.c') diff --git a/source3/passdb/pdb_nisplus.c b/source3/passdb/pdb_nisplus.c index 687115733a..3659f169b8 100644 --- a/source3/passdb/pdb_nisplus.c +++ b/source3/passdb/pdb_nisplus.c @@ -1192,14 +1192,17 @@ BOOL pdb_add_sam_account(SAM_ACCOUNT * newpwd) if (result->status != NIS_SUCCESS || NIS_RES_NUMOBJ(result) <= 0) { + struct passwd *passwd; DEBUG(3, ("nis_list failure: %s: %s\n", nisname, nis_sperrno(result->status))); nis_freeresult(result); - if (!sys_getpwnam(pdb_get_username(newpwd))) { + if (!passwd = getpwnam_alloc(pdb_get_username(newpwd))) { /* no such user in system! */ return False; } + passwd_free(&passwd); + /* * user is defined, but not in passwd.org_dir. */ -- cgit