diff options
author | Andreas Schneider <asn@samba.org> | 2015-11-23 11:44:26 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2017-04-29 23:31:11 +0200 |
commit | fecbc81c600bb5d6796a06e3f2d98229e748b387 (patch) | |
tree | 4a9087914c083b124df1ee32fdb21190c0ab0689 | |
parent | 41f03493ec6377bd7b6430c36d7b5d01b924e48b (diff) | |
download | samba-fecbc81c600bb5d6796a06e3f2d98229e748b387.tar.gz |
waf: Create kerberos_implementation.py for provisioning
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | python/wscript | 45 | ||||
-rw-r--r-- | wscript | 1 |
3 files changed, 49 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore index 1a43d43b3b3..f8d4eab2a7c 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,6 @@ semantic.cache /.emacs.desktop* /.gdb_history .clang-format + +# generated by configure +python/samba/provision/kerberos_implementation.py diff --git a/python/wscript b/python/wscript new file mode 100644 index 00000000000..714d649219d --- /dev/null +++ b/python/wscript @@ -0,0 +1,45 @@ +#!/usr/bin/env python + +import os + +def configure(conf): + kerberos_py = conf.srcdir + "/python/samba/provision/kerberos_implementation.py" + + f = open(kerberos_py, 'w') + try: + header = """# +# Copyright (c) 2016 Andreas Schneider <asn@samba.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +""" + f.write(header) + + data = """kdb_modules_dir = "{0}" +kdc_default_config_dir = "{1}" +""" + + if conf.env.HEIMDAL_KRB5_CONFIG: + f.write(data.format("", "")) + else: + modulesdir = "%s/krb5/plugins/kdb" % conf.env.LIBDIR + paths = [ "/var/kerberos/krb5kdc", "/var/lib/kerberos/krb5kdc" ] + kdc_path = None + for p in paths: + if os.path.exists(p): + kdc_path = p + + f.write(data.format(modulesdir, kdc_path)) + finally: + f.close() @@ -210,6 +210,7 @@ def configure(conf): conf.RECURSE('source3') conf.RECURSE('lib/texpect') + conf.RECURSE('python') if conf.env.with_ctdb: conf.RECURSE('ctdb') conf.RECURSE('lib/socket') |