- if (src->unix_token) {
- dst->unix_token = talloc(dst, struct security_unix_token);
- if (!dst->unix_token) {
- return NULL;
- }
-
- dst->unix_token->uid = src->unix_token->uid;
- dst->unix_token->gid = src->unix_token->gid;
- dst->unix_token->ngroups = src->unix_token->ngroups;
- if (src->unix_token->ngroups != 0) {
- dst->unix_token->groups = (gid_t *)talloc_memdup(
- dst->unix_token, src->unix_token->groups,
- sizeof(gid_t)*dst->unix_token->ngroups);
- } else {
- dst->unix_token->groups = NULL;
- }
- } else {
- dst->unix_token = NULL;
- }
-
- if (src->security_token) {
- dst->security_token = dup_nt_token(dst, src->security_token);
- if (!dst->security_token) {
- TALLOC_FREE(dst);
- return NULL;
- }
+ dst = talloc(mem_ctx, struct auth3_session_info);
+ if (dst == NULL) {
+ DEBUG(0, ("talloc failed\n"));
+ TALLOC_FREE(blob.data);
+ return NULL;