lsasd: Fix CID 1107233 Double close

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
s3-rpc_server: Refactor lsasd_create_sockets().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Oct 21 12:49:44 CEST 2013 on sn-devel-104
nsswitch: Fix short writes in winbind_write_sock

We set the socket to nonblocking and don't handle EAGAIN right. We do
a poll anyway, so wait for writability, which should fix this.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10195
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
idmap_autorid: fix traversal of ranges to correctly exclude mapping records.

When listing all ranges with "net idmap get ranges", the database records
of the form "S-1-5-10" --> "GID 100016" were treated here as rangee mapings,
resulting in an faulty printout like this: "RANGE 541346119: S-1-5-10".

This patch fixes this by adding a filter that checks the size of the
value datablob.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Oct 21 19:48:40 CEST 2013 on sn-devel-104
ntvfs: Fix Coverity ID 1107224 Resource leak

In this error path we were leaking "fd".

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
ntvfs: Fix CID 1107225 Resource leak

After the talloc_strdup, we don't need cwd anymore.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
winbind3: Fix CID 241468 Resource leak

We were leaking centry in this error case

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
ldb: Fix CID 240798 Uninitialized pointer read

Not called right now, because nobody tries multiple sort attributes. But if
someone did, build_response would have looked at the uninitialized controls.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Oct 22 03:28:20 CEST 2013 on sn-devel-104