summaryrefslogtreecommitdiff
path: root/source3/lib/util_pw.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-02-21 19:22:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:18 -0500
commit6622ba566ed3cc3ac362c4e257d7c8ed3c437a8a (patch)
tree56a43592ed6122eb6bf66e63ea82c616fdc36751 /source3/lib/util_pw.c
parent7b9736eb749d3cd55f0cf19c746cc65bdfd45bf7 (diff)
downloadsamba-6622ba566ed3cc3ac362c4e257d7c8ed3c437a8a.tar.gz
samba-6622ba566ed3cc3ac362c4e257d7c8ed3c437a8a.tar.bz2
samba-6622ba566ed3cc3ac362c4e257d7c8ed3c437a8a.zip
r13601: * Remove unused code from pdb_ldap.c
* Add a 'struct passwd *' to the struct samu for later reference (I know this may be controversial but its easily reverted which is is why I'm checking this is as a seaparate patch before I get too deep). * Remove unix_homedir from struct samu {} and update the pdb wrapper functions associated with it. (This used to be commit 92c251fdf0f1f566cfeca3c75ba2284b644aef5d)
Diffstat (limited to 'source3/lib/util_pw.c')
-rw-r--r--source3/lib/util_pw.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source3/lib/util_pw.c b/source3/lib/util_pw.c
index e632846312..e1bea1a646 100644
--- a/source3/lib/util_pw.c
+++ b/source3/lib/util_pw.c
@@ -22,8 +22,7 @@
#include "includes.h"
-static struct passwd *talloc_copy_passwd(TALLOC_CTX *mem_ctx,
- const struct passwd *from)
+struct passwd *tcopy_passwd(TALLOC_CTX *mem_ctx, const struct passwd *from)
{
struct passwd *ret = TALLOC_P(mem_ctx, struct passwd);
ret->pw_name = talloc_strdup(ret, from->pw_name);
@@ -99,13 +98,13 @@ struct passwd *getpwnam_alloc(TALLOC_CTX *mem_ctx, const char *name)
TALLOC_FREE(pwnam_cache[i]);
}
- pwnam_cache[i] = talloc_copy_passwd(pwnam_cache, temp);
+ pwnam_cache[i] = tcopy_passwd(pwnam_cache, temp);
if (mem_ctx != NULL) {
return talloc_reference(mem_ctx, pwnam_cache[i]);
}
- return talloc_copy_passwd(NULL, pwnam_cache[i]);
+ return tcopy_passwd(NULL, pwnam_cache[i]);
}
struct passwd *getpwuid_alloc(TALLOC_CTX *mem_ctx, uid_t uid)
@@ -123,5 +122,5 @@ struct passwd *getpwuid_alloc(TALLOC_CTX *mem_ctx, uid_t uid)
return NULL;
}
- return talloc_copy_passwd(mem_ctx, temp);
+ return tcopy_passwd(mem_ctx, temp);
}