1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

lib/crypto: move gnutls error wrapper to own subsystem

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Andrew Bartlett 2019-06-26 16:41:05 +12:00 committed by Andreas Schneider
parent 29ee235cae
commit 8f4c30f785
29 changed files with 35 additions and 29 deletions

View File

@ -28,7 +28,7 @@
#include "auth/credentials/credentials.h"
#include "auth/credentials/credentials_internal.h"
#include "libcli/util/gnutls_error.h"
#include "lib/crypto/gnutls_helpers.h"
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>

View File

@ -22,7 +22,7 @@ bld.SAMBA_SUBSYSTEM('CREDENTIALS_SECRETS',
bld.SAMBA_SUBSYSTEM('CREDENTIALS_NTLM',
source='credentials_ntlm.c',
deps='samba-credentials')
deps='samba-credentials GNUTLS_HELPERS')
pytalloc_util = bld.pyembed_libname('pytalloc-util')
pyparam_util = bld.pyembed_libname('pyparam_util')

View File

@ -36,7 +36,7 @@
#include "lib/crypto/crypto.h"
#include "libds/common/roles.h"
#include "libcli/util/gnutls_error.h"
#include "lib/crypto/gnutls_helpers.h"
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>

View File

@ -19,7 +19,7 @@ bld.SAMBA_MODULE('gensec_schannel',
source='schannel.c',
subsystem='gensec',
init_function='gensec_schannel_init',
deps='COMMON_SCHANNEL NDR_SCHANNEL samba-credentials auth_session'
deps='COMMON_SCHANNEL NDR_SCHANNEL samba-credentials auth_session GNUTLS_HELPERS'
)
bld.SAMBA_MODULE('gensec_ncalrpc',

View File

@ -35,7 +35,7 @@ struct auth_session_info;
#include "../auth/ntlmssp/ntlmssp_ndr.h"
#include "../nsswitch/libwbclient/wbclient.h"
#include "libcli/util/gnutls_error.h"
#include "lib/crypto/gnutls_helpers.h"
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>

View File

@ -36,7 +36,7 @@
#include "param/loadparm.h"
#include "libcli/security/session.h"
#include "libcli/util/gnutls_error.h"
#include "lib/crypto/gnutls_helpers.h"
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>

View File

@ -24,7 +24,7 @@
#include "zlib.h"
#include "../auth/ntlmssp/ntlmssp_private.h"
#include "libcli/util/gnutls_error.h"
#include "lib/crypto/gnutls_helpers.h"
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>

View File

@ -15,6 +15,7 @@ bld.SAMBA_SUBSYSTEM('NTLMSSP_COMMON',
samba-credentials
wbclient
z
GNUTLS_HELPERS
''')
bld.SAMBA_MODULE('gensec_ntlmssp',

View File

@ -16,7 +16,7 @@
*/
#include "includes.h"
#include "gnutls_error.h"
#include "gnutls_helpers.h"
#include <gnutls/gnutls.h>

View File

@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _GNUTLS_ERROR_H
#define _GNUTLS_ERROR_H
#ifndef _GNUTLS_HELPERS_H
#define _GNUTLS_HELPERS_H
#include "ntstatus.h"
@ -28,4 +28,4 @@ NTSTATUS _gnutls_error_to_ntstatus(int gnutls_rc,
_gnutls_error_to_ntstatus(gnutls_rc, blocked_status, \
__FUNCTION__, __location__)
#endif /* _GNUTLS_ERROR_H */
#endif /* _GNUTLS_HELPERS_H */

View File

@ -5,6 +5,10 @@ extra_deps = ''
if bld.CONFIG_SET("HAVE_AESNI_INTEL"):
extra_deps += ' aesni-intel'
bld.SAMBA_SUBSYSTEM('GNUTLS_HELPERS',
source='gnutls_error.c',
deps='gnutls samba-errors');
bld.SAMBA_SUBSYSTEM('LIBCRYPTO',
source='''md4.c arcfour.c
aes.c rijndael-alg-fst.c aes_cmac_128.c aes_ccm_128.c aes_gcm_128.c

View File

@ -26,7 +26,7 @@
#include "libcli/auth/libcli_auth.h"
#include "../libcli/security/dom_sid.h"
#include "libcli/util/gnutls_error.h"
#include "lib/crypto/gnutls_helpers.h"
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>

View File

@ -18,7 +18,7 @@ bld.SAMBA_SUBSYSTEM('NTLM_CHECK',
bld.SAMBA_SUBSYSTEM('LIBCLI_AUTH',
source='credentials.c session.c smbencrypt.c smbdes.c',
public_deps='MSRPC_PARSE gnutls',
public_deps='MSRPC_PARSE gnutls GNUTLS_HELPERS',
public_headers='credentials.h:domain_credentials.h'
)

View File

@ -24,7 +24,7 @@
#include "../lib/crypto/crypto.h"
#include "lib/util/iov_buf.h"
#include "libcli/util/gnutls_error.h"
#include "lib/crypto/gnutls_helpers.h"
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>

View File

@ -38,7 +38,7 @@
#include "lib/crypto/aes_ccm_128.h"
#include "lib/crypto/aes_gcm_128.h"
#include "libcli/util/gnutls_error.h"
#include "lib/crypto/gnutls_helpers.h"
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>

View File

@ -23,7 +23,7 @@
#include "smb_common.h"
#include "smb_signing.h"
#include "libcli/util/gnutls_error.h"
#include "lib/crypto/gnutls_helpers.h"
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>

View File

@ -47,7 +47,7 @@ def build(bld):
''',
deps='''
LIBCRYPTO gnutls NDR_SMB2_LEASE_STRUCT samba-errors gensec krb5samba
smb_transport
smb_transport GNUTLS_HELPERS
''',
public_deps='talloc samba-util iov_buf',
private_library=True,

View File

@ -2,10 +2,10 @@
bld.SAMBA_LIBRARY('samba-errors',
public_headers='error.h ntstatus.h ntstatus_gen.h doserr.h werror.h werror_gen.h hresult.h gnutls_error.h',
public_headers='error.h ntstatus.h ntstatus_gen.h doserr.h werror.h werror_gen.h hresult.h',
private_headers='nterr_private.h',
header_path='core',
source='doserr.c errormap.c nterr.c errmap_unix.c hresult.c gnutls_error.c',
source='doserr.c errormap.c nterr.c errmap_unix.c hresult.c',
public_deps='talloc samba-debug',
deps='gnutls',
# private_library=True,

View File

@ -32,7 +32,7 @@
#include "auth.h"
#include "libcli/smb/smbXcli_base.h"
#include "libcli/util/gnutls_error.h"
#include "lib/crypto/gnutls_helpers.h"
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>

View File

@ -32,7 +32,7 @@
#include "lib/crypto/aes_ccm_128.h"
#include "lib/crypto/aes_gcm_128.h"
#include "libcli/util/gnutls_error.h"
#include "lib/crypto/gnutls_helpers.h"
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>

View File

@ -749,6 +749,7 @@ bld.SAMBA3_LIBRARY('smbd_base',
notifyd
vfs_acl_common
NDR_QUOTA
GNUTLS_HELPERS
''' +
bld.env['dmapi_lib'] +
bld.env['legacy_quota_libs'] +

View File

@ -26,7 +26,7 @@
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>
#include "libcli/util/gnutls_error.h"
#include "lib/crypto/gnutls_helpers.h"
/*
sign an outgoing message

View File

@ -3,7 +3,7 @@
bld.SAMBA_SUBSYSTEM('LIBCLI_SMB2',
source='transport.c request.c session.c tcon.c create.c close.c connect.c getinfo.c write.c read.c setinfo.c find.c ioctl.c logoff.c tdis.c flush.c lock.c notify.c cancel.c keepalive.c break.c util.c signing.c lease_break.c',
autoproto='smb2_proto.h',
deps='tevent-util cli_smb_common',
deps='tevent-util cli_smb_common GNUTLS_HELPERS',
public_deps='smbclient-raw gensec samba-credentials tevent',
private_headers='smb2.h',
)

View File

@ -24,7 +24,7 @@
#include "libcli/auth/libcli_auth.h"
#include "librpc/gen_ndr/ndr_samr_c.h"
#include "libcli/util/gnutls_error.h"
#include "lib/crypto/gnutls_helpers.h"
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>

View File

@ -8,7 +8,7 @@ auto_proto='libnet_proto.h'
bld.SAMBA_LIBRARY(name,
source='libnet.c libnet_passwd.c libnet_time.c libnet_rpc.c libnet_join.c libnet_site.c libnet_become_dc.c libnet_unbecome_dc.c libnet_vampire.c libnet_user.c libnet_group.c libnet_share.c libnet_lookup.c libnet_domain.c userinfo.c groupinfo.c userman.c groupman.c prereq_domain.c',
autoproto=auto_proto,
public_deps='samba-credentials dcerpc dcerpc-samr RPC_NDR_LSA RPC_NDR_SRVSVC RPC_NDR_DRSUAPI cli_composite LIBCLI_RESOLVE LIBCLI_FINDDCS cli_cldap LIBCLI_FINDDCS gensec_schannel LIBCLI_AUTH ndr smbpasswdparser %s LIBCLI_SAMSYNC LIBTSOCKET' % (provision),
public_deps='samba-credentials dcerpc dcerpc-samr RPC_NDR_LSA RPC_NDR_SRVSVC RPC_NDR_DRSUAPI cli_composite LIBCLI_RESOLVE LIBCLI_FINDDCS cli_cldap LIBCLI_FINDDCS gensec_schannel LIBCLI_AUTH ndr smbpasswdparser %s LIBCLI_SAMSYNC LIBTSOCKET GNUTLS_HELPERS' % (provision),
private_library=True,
pyembed=True,
enabled=bld.PYTHON_BUILD_IS_ENABLED()

View File

@ -40,7 +40,7 @@
#include "system/network.h"
#include "system/passwd.h"
#include "libcli/util/gnutls_error.h"
#include "lib/crypto/gnutls_helpers.h"
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>

View File

@ -4,7 +4,7 @@ bld.SAMBA_MODULE('service_ntp_signd',
source='ntp_signd.c',
subsystem='service',
init_function='server_service_ntp_signd_init',
deps='samdb NDR_NTP_SIGND LIBTSOCKET LIBSAMBA_TSOCKET',
deps='samdb NDR_NTP_SIGND LIBTSOCKET LIBSAMBA_TSOCKET GNUTLS_HELPERS',
internal_module=False,
enabled=bld.AD_DC_BUILD_IS_ENABLED()
)

View File

@ -32,7 +32,7 @@
#include "rpc_server/samr/proto.h"
#include "auth/auth_sam.h"
#include "libcli/util/gnutls_error.h"
#include "lib/crypto/gnutls_helpers.h"
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>

View File

@ -87,7 +87,7 @@ bld.SAMBA_MODULE('dcesrv_samr',
autoproto='samr/proto.h',
subsystem='dcerpc_server',
init_function='dcerpc_server_samr_init',
deps='samdb DCERPC_COMMON ndr-standard auth4_sam'
deps='samdb DCERPC_COMMON ndr-standard auth4_sam GNUTLS_HELPERS'
)