summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetze <metze@0c0555d6-39d7-0310-84fc-f1cc0bd64818>2007-11-06 12:11:35 +0000
committerStefan Metzmacher <metze@samba.org>2007-11-09 09:53:01 +0100
commit29832ab0feb98b6a26084d4f2695220781ff0de3 (patch)
tree2e9446d8b505645baf18c813fbee7969f6164041
parentf54458939df4ab199c058ff06c68dbc513be8e05 (diff)
downloadsamba-29832ab0feb98b6a26084d4f2695220781ff0de3.tar.gz
samba-29832ab0feb98b6a26084d4f2695220781ff0de3.tar.bz2
samba-29832ab0feb98b6a26084d4f2695220781ff0de3.zip
nss_wrapper: set the destination pointer in the get*_r functions
metze git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25871 0c0555d6-39d7-0310-84fc-f1cc0bd64818 (This used to be commit 17b449212a2f68262a95b0ebaabb377cc9a8dcc9)
-rw-r--r--source3/lib/nss_wrapper/nss_wrapper.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/lib/nss_wrapper/nss_wrapper.c b/source3/lib/nss_wrapper/nss_wrapper.c
index 72ddd8d5c3..6d26588fff 100644
--- a/source3/lib/nss_wrapper/nss_wrapper.c
+++ b/source3/lib/nss_wrapper/nss_wrapper.c
@@ -535,7 +535,7 @@ static void nwrap_pw_unload(struct nwrap_cache *nwrap)
}
static int nwrap_pw_copy_r(const struct passwd *src, struct passwd *dst,
- char *buf, size_t buflen, struct passwd **destp)
+ char *buf, size_t buflen, struct passwd **dstp)
{
char *first;
char *last;
@@ -567,6 +567,10 @@ static int nwrap_pw_copy_r(const struct passwd *src, struct passwd *dst,
ofs = PTR_DIFF(src->pw_shell, first);
dst->pw_shell = buf + ofs;
+ if (dstp) {
+ *dstp = dst;
+ }
+
return 0;
}
@@ -719,7 +723,7 @@ static void nwrap_gr_unload(struct nwrap_cache *nwrap)
}
static int nwrap_gr_copy_r(const struct group *src, struct group *dst,
- char *buf, size_t buflen, struct group **destp)
+ char *buf, size_t buflen, struct group **dstp)
{
char *first;
char **lastm;
@@ -759,6 +763,10 @@ static int nwrap_gr_copy_r(const struct group *src, struct group *dst,
dst->gr_mem[i] = buf + ofs;
}
+ if (dstp) {
+ *dstp = dst;
+ }
+
return 0;
}