conf.CHECK_FUNCS('innetgr')
conf.CHECK_FUNCS('initgroups select poll rdchk getgrnam getgrent pathconf')
conf.CHECK_FUNCS('setpriv setgidx setuidx setgroups syscall sysconf')
- conf.CHECK_FUNCS('atexit grantpt posix_openpt fallocate posix_fallocate')
+ conf.CHECK_FUNCS('atexit grantpt posix_openpt fallocate')
conf.CHECK_FUNCS('fseeko setluid')
conf.CHECK_FUNCS('getpwnam', headers='sys/types.h pwd.h')
conf.CHECK_FUNCS('fdopendir')
host_os = sys.platform
if host_os.rfind('sunos') == -1:
conf.CHECK_HEADERS('sys/inotify.h')
- if "HAVE_SYS_INOTIFY_H" in conf.env:
+ if conf.env.HAVE_SYS_INOTIFY_H:
conf.DEFINE('HAVE_INOTIFY', 1)
# Check for kernel change notify support
#include <sys/types.h>
#include <fcntl.h>
#include <signal.h>
-#ifndef F_NOTIFY
-#define F_NOTIFY 1026
+#ifndef F_GETLEASE
+#define F_GETLEASE 1025
#endif
main() {
- exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ? 1 : 0);
+ exit(fcntl(open("/tmp", O_RDONLY), F_GETLEASE, 0) == -1 ? 1 : 0);
}''', 'HAVE_KERNEL_OPLOCKS_LINUX', addmain=False, execute=True,
msg="Checking for Linux kernel oplocks")
conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_flags', define='HAVE_STAT_ST_FLAGS',
headers='sys/types.h sys/stat.h unistd.h')
- if "HAVE_BLKCNT_T" in conf.env:
+ if conf.env.HAVE_BLKCNT_T:
conf.CHECK_CODE('''
static int test_array[1 - 2 * !(((long int)(sizeof(blkcnt_t))) <= 4)];''',
'SIZEOF_BLKCNT_T_4',
msg="Checking whether blkcnt_t is 32 bit")
# If sizeof is 4 it can't be 8
- if "HAVE_BLKCNT_T" in conf.env:
+ if conf.env.HAVE_BLKCNT_T:
if not conf.CONFIG_SET('SIZEOF_BLKCNT_T_4'):
conf.CHECK_CODE('''
static int test_array[1 - 2 * !(((long int)(sizeof(blkcnt_t))) <= 8)];''',
# Check for POSIX capability support
conf.CHECK_FUNCS_IN('cap_get_proc', 'cap', headers='sys/capability.h')
- if "HAVE_SYS_CAPABILITY_H" in conf.env:
+ if conf.env.HAVE_SYS_CAPABILITY_H:
conf.CHECK_CODE('''
cap_t cap;
cap_value_t vals[1];
_lstat __lstat lutimes
__lxstat memalign mknod mlock mlockall munlock munlockall
_open __open _opendir __opendir
-pathconf poll posix_fallocate
+pathconf poll
posix_memalign pread _pread __pread
pwrite _pwrite __pwrite
rdchk _read __read _readdir __readdir
if use_pam:
conf.DEFINE('WITH_PAM', 1)
conf.DEFINE('WITH_PAM_MODULES', 1)
+ else:
+ conf.fatal("PAM support is enabled but prerequisite libraries "
+ "or headers not found. Use --without-pam to disable "
+ "PAM support.");
seteuid = False
execute=True,
msg="Checking whether fcntl lock supports open file description locks")
-# glibc up to 2.3.6 had dangerously broken posix_fallocate(). DON'T USE IT.
- if not conf.CHECK_CODE('''
-#define _XOPEN_SOURCE 600
-#include <stdlib.h>
-#if defined(__GLIBC__) && ((__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 4))
-#error probably broken posix_fallocate
-#endif
-''',
- '_HAVE_UNBROKEN_POSIX_FALLOCATE',
- msg='Checking for broken posix_fallocate'):
- conf.DEFINE('HAVE_BROKEN_POSIX_FALLOCATE', '1')
-
-
conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_mtim.tv_nsec',
define='HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC') # Linux, Solaris
conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_mtimensec',
if Options.options.libcephfs_dir:
conf.env['CPPPATH_CEPHFS'] = Options.options.libcephfs_dir + '/include'
conf.env['LIBPATH_CEPHFS'] = Options.options.libcephfs_dir + '/lib'
+ conf.env['LIBPATH_CEPH-COMMON'] = Options.options.libcephfs_dir + '/lib/ceph'
- if conf.CHECK_HEADERS('cephfs/libcephfs.h', False, False, 'cephfs') and conf.CHECK_LIB('cephfs', shlib=True) and Options.options.with_cephfs:
+ if (Options.options.with_cephfs and
+ conf.CHECK_HEADERS('cephfs/libcephfs.h', False, False, 'cephfs') and
+ conf.CHECK_LIB('cephfs', shlib=True) and
+ conf.CHECK_LIB('ceph-common', shlib=True)):
if Options.options.with_acl_support:
conf.DEFINE('HAVE_CEPH', '1')
- if conf.CHECK_FUNCS_IN('ceph_statx', 'cephfs', headers='cephfs/libcephfs.h'):
+ if conf.CHECK_FUNCS_IN('ceph_statx', 'cephfs ceph-common',
+ headers='cephfs/libcephfs.h'):
conf.DEFINE('HAVE_CEPH_STATX', '1')
else:
Logs.warn("ceph support disabled due to --without-acl-support")
else:
Logs.info("ncurses not available, not building regedit")
+ if conf.CHECK_HEADERS('ftw.h') and conf.CHECK_FUNCS('nftw'):
+ conf.env.build_mvxattr = True
+
conf.CHECK_FUNCS_IN('DES_pcbc_encrypt', 'crypto')
if Options.options.with_fake_kaserver == True:
conf.CHECK_HEADERS('afs/param.h afs/stds.h', together=True)
Logs.info("building with Spotlight support")
default_static_modules.extend(TO_LIST('rpc_mdssvc_module'))
- forced_static_modules.extend(TO_LIST('auth_domain auth_builtin auth_sam auth_winbind'))
+ forced_static_modules.extend(TO_LIST('auth_builtin auth_sam auth_winbind'))
default_static_modules.extend(TO_LIST('''pdb_smbpasswd pdb_tdbsam
auth_unix
nss_info_template idmap_tdb idmap_passdb
default_shared_modules.extend(TO_LIST('vfs_skel_opaque vfs_skel_transparent vfs_shadow_copy_test'))
default_shared_modules.extend(TO_LIST('auth_skel pdb_test'))
default_shared_modules.extend(TO_LIST('vfs_fake_dfq'))
+ default_shared_modules.extend(TO_LIST('gpext_security gpext_registry gpext_scripts'))
if Options.options.enable_selftest or Options.options.developer:
default_shared_modules.extend(TO_LIST('vfs_fake_acls vfs_nfs4acl_xattr'))
if conf.CONFIG_SET('AD_DC_BUILD_IS_ENABLED'):
default_static_modules.extend(TO_LIST('pdb_samba_dsdb auth_samba4 vfs_dfs_samba4'))
- default_shared_modules.extend('vfs_posix_eadb')
+ default_shared_modules.extend(TO_LIST('vfs_posix_eadb'))
if conf.CONFIG_SET('HAVE_FREEBSD_SUNACL_H'):
default_shared_modules.extend(TO_LIST('vfs_zfsacl'))
if p in static_list:
decl_list=""
for entry in static_list[p]:
- decl_list += "extern NTSTATUS %s_init(void); " % entry
+ decl_list += "extern NTSTATUS %s_init(TALLOC_CTX *mem_ctx); " % entry
conf.env[static_env].append('%s' % entry)
decl_list = decl_list.rstrip()
conf.DEFINE('static_decl_%s' % p, decl_list)
- conf.DEFINE('static_init_%s' % p, '{ %s_init(); }' % '_init(); '.join(static_list[p]))
+ conf.DEFINE('static_init_%s(mem_ctx)' % p, '{ %s_init((mem_ctx)); }' % '_init((mem_ctx)); '.join(static_list[p]))
else:
conf.DEFINE('static_decl_%s' % p, '')
- conf.DEFINE('static_init_%s' % p, '{}')
+ conf.DEFINE('static_init_%s(mem_ctx)' % p, '{}')
if p in shared_list:
for entry in shared_list[p]:
conf.DEFINE('%s_init' % entry, 'samba_init_module')
Logs.info("%s: %s" % (shared_env, ','.join(conf.env[shared_env])))
conf.SAMBA_CONFIG_H('include/config.h')
-
-def ctags(ctx):
- "build 'tags' file using ctags"
- import Utils
- source_root = os.path.dirname(Utils.g_module.root_path)
- cmd = 'ctags $(find %s/.. -name "*.[ch]" | grep -v "*_proto\.h")' % source_root
- print("Running: %s" % cmd)
- os.system(cmd)
-