mirror of
https://github.com/samba-team/samba.git
synced 2025-01-13 13:18:06 +03:00
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 commit is contained in:
parent
95dfbd3a6c
commit
17b449212a
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user