s3:rpc_server/lsa: only return collision_info if filled in lsaRSetForestTrustInformat...
authorStefan Metzmacher <metze@samba.org>
Wed, 11 Mar 2015 15:39:05 +0000 (16:39 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 12 Mar 2015 18:49:33 +0000 (19:49 +0100)
If there're no collisions we should not fill the collision_info pointer.

Otherwise Windows fails to create a forest trust.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Mar 12 19:49:33 CET 2015 on sn-devel-104

source3/rpc_server/lsa/srv_lsa_nt.c

index f9d1c13a1eff7d0cec9f03952825e87d17c4aa5c..a989f4b359918cd81d1800c287e0a1af106522c0 100644 (file)
@@ -4522,7 +4522,9 @@ NTSTATUS _lsa_lsaRSetForestTrustInformation(struct pipes_struct *p,
                }
        }
 
-       *r->out.collision_info = c_info;
+       if (c_info->count != 0) {
+               *r->out.collision_info = c_info;
+       }
 
        if (r->in.check_only != 0) {
                return NT_STATUS_OK;