build: test the generic md5 function after importing it from hashlib

otherwise we used the one from md5 which lead to the following warning on SerNet-imini:

the md5 module is deprecated; use hashlib instead import md5

Signed-off-by: Bjoern Jacke <bj@sernet.de>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
crypto: fix build on OS X

we also need to use the CC_MD5_CTX from CommonCrypto here instead of the MD5_CTX

Signed-off-by: Bjoern Jacke <bj@sernet.de>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jan  8 08:12:29 CET 2014 on sn-devel-104
libcli/auth: fix usage of an uninitialized variable in netlogon_creds_cli_check_caps()

If status is RPC_PROCNUM_OUT_OF_RANGE, result might be uninitialized.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
librpc/rpc: simplify tevent_req_nterror() usage in binding_handle.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
librpc/ndr: add ndr_pop_dcerpc_sec_verification_trailer()

This extracts the dcerpc_sec_verification_trailer from the end
of an ndr_pull structure, it found it reduces ndr->data_size.

NDR_ERR_ALLOC is the only possible error, all other errors
are ignored and a trailer with command count = 0 is returned.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
ndrdump: dump verification trailer

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
s4:rpc_server: remove unused DCESRV_CALL_STATE_FLAG_HEADER_SIGNING

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
s4:rpc_server: use talloc_zero for struct dcesrv_connection

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
s4:rpc_server: remember the hdr_signing negotiation result in dcesrv_auth

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Jan  8 18:37:22 CET 2014 on sn-devel-104
s3: winbindd: Move the logic of whether to set 'domain->primary' into add_trusted_domain().

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10358

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
s3: winbindd: Move calling setup_domain_child() into add_trusted_domain().

Ensure it only gets called when a new domain is allocated
and added to the list.

This should fix problems with the previous logic where
setup_domain_child() was called in places where an existing
domain was returned.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10358

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

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jan  8 20:46:55 CET 2014 on sn-devel-104
s3: Avoid oplock break by storing timestamps with gpfs_set_times

The gpfs_set_times API call allows setting timestamps directly in GPFS
without going through the utime() call. Using this API call fixes an
unecessary oplock break when a client sends a SET_FILE_ALLOCATION_INFO
request and no other client has opened the file. The call to utime()
triggers the oplock break through the Linux kernel. Using the
gpfs_set_times call for updating the timestamp avoids the call to
utime() and the oplock break.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Thu Jan  9 00:04:48 CET 2014 on sn-devel-104