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/lib/util.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3/lib/util.c') diff --git a/source3/lib/util.c b/source3/lib/util.c index f598f0aaa4..97ff4e24a0 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -1091,9 +1091,11 @@ uid_t nametouid(char *name) if (winbind_nametouid(&u, name)) return u; - pass = sys_getpwnam(name); - if (pass) + pass = getpwnam_alloc(name); + if (pass) { return(pass->pw_uid); + passwd_free(&pass); + } return (uid_t)-1; } -- cgit