auth: Generate a human readable Authentication log message.
[nivanova/samba-autobuild/.git] / source4 / kdc / wscript_build
1 #!/usr/bin/env python
2
3 # We do this because we do not want to depend on the KDC, only find and use it's header files.  We do not want 
4 if not bld.CONFIG_SET("USING_SYSTEM_KDC"):
5     kdc_include = "../heimdal/kdc"
6 else:
7     kdc_include = getattr(bld.env, "CPPPATH_KDC")
8
9 bld.SAMBA_MODULE('service_kdc',
10                  source='kdc-heimdal.c',
11                  subsystem='service',
12                  init_function='server_service_kdc_init',
13                  deps='''
14                       kdc
15                       HDB_SAMBA4
16                       WDC_SAMBA4
17                       samba-hostconfig
18                       com_err
19                       samba_server_gensec
20                       PAC_GLUE
21                       KDC-GLUE
22                       KDC-SERVER
23                       KPASSWD-SERVICE
24                       KPASSWD_GLUE
25                  ''',
26                  internal_module=False)
27
28 bld.SAMBA_LIBRARY('HDB_SAMBA4',
29                   source='hdb-samba4.c hdb-samba4-plugin.c',
30                   deps='ldb auth4_sam common_auth samba-credentials hdb db-glue samba-hostconfig com_err sdb_hdb',
31                   includes=kdc_include,
32                   private_library=True,
33                   enabled=bld.CONFIG_SET('SAMBA4_USES_HEIMDAL')
34                   )
35
36 # A plugin for Heimdal's kadmin for users who need to operate that tool
37 bld.SAMBA_LIBRARY('HDB_SAMBA4_PLUGIN',
38                   source='hdb-samba4-plugin.c',
39                   deps='hdb HDB_SAMBA4 samba-util samba-hostconfig ',
40                   includes=kdc_include,
41                   link_name='modules/hdb/hdb_samba4.so',
42                   realname='hdb_samba4.so',
43                   install_path='${MODULESDIR}/hdb',
44                   enabled = (bld.CONFIG_SET("USING_SYSTEM_KRB5") and bld.CONFIG_SET("USING_SYSTEM_HDB"))
45                   )
46
47 bld.SAMBA_SUBSYSTEM('KDC-SERVER',
48                     source='kdc-server.c kdc-proxy.c',
49                     includes=kdc_include,
50                     deps='''
51                          krb5samba
52                          ldb
53                          LIBTSOCKET
54                          LIBSAMBA_TSOCKET
55                     ''',
56                     enabled=bld.CONFIG_SET('SAMBA4_USES_HEIMDAL'))
57
58 kpasswd_flavor_src = 'kpasswd-service.c kpasswd-helper.c'
59 if bld.CONFIG_SET('SAMBA4_USES_HEIMDAL'):
60     kpasswd_flavor_src = kpasswd_flavor_src + ' kpasswd-service-heimdal.c'
61
62 bld.SAMBA_SUBSYSTEM('KPASSWD-SERVICE',
63                     source=kpasswd_flavor_src,
64                     includes=kdc_include,
65                     deps='''
66                          krb5samba
67                          samba_server_gensec
68                          KPASSWD_GLUE
69                          ''')
70
71 bld.SAMBA_SUBSYSTEM('KDC-GLUE',
72         source='kdc-glue.c',
73         includes=kdc_include,
74         deps='hdb PAC_GLUE',
75         enabled=bld.CONFIG_SET('SAMBA4_USES_HEIMDAL')
76         )
77
78 bld.SAMBA_SUBSYSTEM('WDC_SAMBA4',
79         source='wdc-samba4.c',
80         includes=kdc_include,
81         deps='ldb auth4_sam common_auth samba-credentials hdb PAC_GLUE samba-hostconfig com_err KDC-GLUE',
82         enabled=bld.CONFIG_SET('SAMBA4_USES_HEIMDAL')
83         )
84
85 bld.SAMBA_SUBSYSTEM('sdb',
86         source='sdb.c',
87         includes=kdc_include,
88         deps='talloc krb5',
89         )
90
91 bld.SAMBA_SUBSYSTEM('sdb_hdb',
92         source='sdb_to_hdb.c',
93         includes=kdc_include,
94         deps='talloc sdb hdb',
95         autoproto='sdb_hdb.h',
96         enabled=bld.CONFIG_SET('SAMBA4_USES_HEIMDAL')
97         )
98
99 bld.SAMBA_SUBSYSTEM('sdb_kdb',
100         source='sdb_to_kdb.c',
101         includes=kdc_include,
102         deps='sdb kdb5',
103         autoproto='sdb_kdb.h',
104         enabled=bld.CONFIG_SET('HAVE_KDB_H')
105         )
106
107 bld.SAMBA_SUBSYSTEM('PAC_GLUE',
108         source='pac-glue.c',
109         includes=kdc_include,
110         deps='ldb auth4_sam common_auth samba-credentials samba-hostconfig com_err'
111         )
112
113 bld.SAMBA_LIBRARY('pac',
114         source=[],
115         deps='PAC_GLUE',
116         private_library=True,
117         grouping_library=True)
118
119
120 bld.SAMBA_LIBRARY('db-glue',
121         source='db-glue.c',
122         deps='ldb auth4_sam common_auth samba-credentials sdb samba-hostconfig com_err',
123         private_library=True,
124         includes=kdc_include,
125         )
126
127 bld.SAMBA_SUBSYSTEM('KPASSWD_GLUE',
128         source='kpasswd_glue.c',
129         includes=kdc_include,
130         deps='ldb com_err')
131
132 bld.SAMBA_SUBSYSTEM('MIT_SAMBA',
133                     source='mit_samba.c',
134                     deps='''
135                          ldb
136                          auth4_sam
137                          common_auth
138                          samba-credentials
139                          db-glue
140                          PAC_GLUE
141                          KPASSWD_GLUE
142                          samba-hostconfig
143                          com_err
144                          sdb_kdb
145                          kdb5
146                          ''',
147                     enabled=(not bld.CONFIG_SET('SAMBA4_USES_HEIMDAL') and bld.CONFIG_SET('HAVE_KDB_H')) )
148
149 bld.SAMBA_BINARY('samba4ktutil',
150                  'ktutil.c',
151                  deps='krb5samba',
152                  install=False)
153
154 bld.RECURSE('mit-kdb')