obnox/samba/samba-obnox.git
11 years agovfs: Convert streams_depot_unlink to synthetic_smb_fname
Volker Lendecke [Fri, 12 Apr 2013 09:33:38 +0000 (11:33 +0200)]
vfs: Convert streams_depot_unlink to synthetic_smb_fname

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert streams_depot_open to synthetic_smb_fname
Volker Lendecke [Fri, 12 Apr 2013 09:31:37 +0000 (11:31 +0200)]
vfs: Convert streams_depot_open to synthetic_smb_fname

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert stream_smb_fname to synthetic_smb_fname
Volker Lendecke [Fri, 12 Apr 2013 09:28:16 +0000 (11:28 +0200)]
vfs: Convert stream_smb_fname to synthetic_smb_fname

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert stream_dir to synthetic_smb_fname
Volker Lendecke [Fri, 12 Apr 2013 09:26:27 +0000 (11:26 +0200)]
vfs: Convert stream_dir to synthetic_smb_fname

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert fake_acls_sys_acl_delete_def_file to synthetic_smb_fname
Volker Lendecke [Fri, 12 Apr 2013 09:22:23 +0000 (11:22 +0200)]
vfs: Convert fake_acls_sys_acl_delete_def_file to synthetic_smb_fname

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert vfs_gpfs_chmod to synthetic_smb_fname
Volker Lendecke [Fri, 12 Apr 2013 09:19:26 +0000 (11:19 +0200)]
vfs: Convert vfs_gpfs_chmod to synthetic_smb_fname

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert gpfsacl_emu_chmod to synthetic_smb_fname
Volker Lendecke [Fri, 12 Apr 2013 09:18:10 +0000 (11:18 +0200)]
vfs: Convert gpfsacl_emu_chmod to synthetic_smb_fname

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert recycle_unlink to synthetic_smb_fname
Volker Lendecke [Fri, 12 Apr 2013 09:17:00 +0000 (11:17 +0200)]
vfs: Convert recycle_unlink to synthetic_smb_fname

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert streams_xattr_streaminfo to synthetic_smb_fname
Volker Lendecke [Fri, 12 Apr 2013 09:15:41 +0000 (11:15 +0200)]
vfs: Convert streams_xattr_streaminfo to synthetic_smb_fname

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert streams_xattr_open to synthetic_smb_fname
Volker Lendecke [Fri, 12 Apr 2013 09:14:39 +0000 (11:14 +0200)]
vfs: Convert streams_xattr_open to synthetic_smb_fname

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert streams_xattr_fstat to synthetic_smb_fname
Volker Lendecke [Fri, 12 Apr 2013 09:13:32 +0000 (11:13 +0200)]
vfs: Convert streams_xattr_fstat to synthetic_smb_fname

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert xattr_tdb_get_file_id to synthetic_smb_fname
Volker Lendecke [Fri, 12 Apr 2013 09:09:25 +0000 (11:09 +0200)]
vfs: Convert xattr_tdb_get_file_id to synthetic_smb_fname

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolib: Make create_synthetic_smb_fname_split use synthetic_smb_fname_split
Volker Lendecke [Fri, 12 Apr 2013 09:07:56 +0000 (11:07 +0200)]
lib: Make create_synthetic_smb_fname_split use synthetic_smb_fname_split

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolib: Add synthetic_smb_fname_split
Volker Lendecke [Fri, 12 Apr 2013 09:06:45 +0000 (11:06 +0200)]
lib: Add synthetic_smb_fname_split

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolib: Remove unused copy_smb_filename
Volker Lendecke [Fri, 12 Apr 2013 09:01:15 +0000 (11:01 +0200)]
lib: Remove unused copy_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolib: Make create_synthetic_smb_fname use synthetic_smb_fname
Volker Lendecke [Fri, 12 Apr 2013 09:00:31 +0000 (11:00 +0200)]
lib: Make create_synthetic_smb_fname use synthetic_smb_fname

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert hpuxacl_sys_acl_set_file to synthetic_smb_fname
Volker Lendecke [Fri, 12 Apr 2013 08:56:53 +0000 (10:56 +0200)]
vfs: Convert hpuxacl_sys_acl_set_file to synthetic_smb_fname

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert afsacl_get_nt_acl to synthetic_smb_fname
Volker Lendecke [Fri, 12 Apr 2013 08:55:54 +0000 (10:55 +0200)]
vfs: Convert afsacl_get_nt_acl to synthetic_smb_fname

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolib: Add synthetic_smb_fname
Volker Lendecke [Thu, 11 Apr 2013 15:01:22 +0000 (17:01 +0200)]
lib: Add synthetic_smb_fname

The interface of create_synthetic_smb_fname is just silly

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agosmbd: Make copy_smb_filename static
Volker Lendecke [Thu, 11 Apr 2013 14:46:37 +0000 (16:46 +0200)]
smbd: Make copy_smb_filename static

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agosmbd: Convert call_trans2setfilepathinfo to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 14:34:15 +0000 (16:34 +0200)]
smbd: Convert call_trans2setfilepathinfo to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agosmbd: Convert smb_set_file_unix_basic to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 14:30:38 +0000 (16:30 +0200)]
smbd: Convert smb_set_file_unix_basic to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agosmbd: Convert smb_set_file_size to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 14:28:53 +0000 (16:28 +0200)]
smbd: Convert smb_set_file_size to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agosmbd: Convert call_trans2qfilepathinfo to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 14:27:48 +0000 (16:27 +0200)]
smbd: Convert call_trans2qfilepathinfo to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agosmbd: Convert fsp_set_smb_fname to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 14:26:45 +0000 (16:26 +0200)]
smbd: Convert fsp_set_smb_fname to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agosmbd: Convert copy_file to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 14:25:10 +0000 (16:25 +0200)]
smbd: Convert copy_file to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agosmbd: Convert rename_internals_fsp to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 14:23:53 +0000 (16:23 +0200)]
smbd: Convert rename_internals_fsp to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agosmbd: Convert smbd_dirptr_get_entry to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 14:22:38 +0000 (16:22 +0200)]
smbd: Convert smbd_dirptr_get_entry to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agosmbd: Convert smbd_smb2_close to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 14:20:29 +0000 (16:20 +0200)]
smbd: Convert smbd_smb2_close to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert cap_ntimes to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 14:18:39 +0000 (16:18 +0200)]
vfs: Convert cap_ntimes to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert cap_unlink to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 14:17:42 +0000 (16:17 +0200)]
vfs: Convert cap_unlink to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert cap_rename to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 14:16:58 +0000 (16:16 +0200)]
vfs: Convert cap_rename to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert alloc_get_client_smb_fname to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 14:14:05 +0000 (16:14 +0200)]
vfs: Convert alloc_get_client_smb_fname to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert catia_ntimes to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 14:12:13 +0000 (16:12 +0200)]
vfs: Convert catia_ntimes to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert catia_unlink to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 14:11:26 +0000 (16:11 +0200)]
vfs: Convert catia_unlink to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert catia_rename to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 14:10:22 +0000 (16:10 +0200)]
vfs: Convert catia_rename to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert recycle_do_touch to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 13:40:10 +0000 (15:40 +0200)]
vfs: Convert recycle_do_touch to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert recycle_get_file_size to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 13:38:41 +0000 (15:38 +0200)]
vfs: Convert recycle_get_file_size to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert recycle_file_exists to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 13:37:38 +0000 (15:37 +0200)]
vfs: Convert recycle_file_exists to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert streams_xattr_unlink to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 13:36:18 +0000 (15:36 +0200)]
vfs: Convert streams_xattr_unlink to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert xattr_tdb_unlink to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 13:35:02 +0000 (15:35 +0200)]
vfs: Convert xattr_tdb_unlink to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert shadow_copy2_ntimes to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 13:33:44 +0000 (15:33 +0200)]
vfs: Convert shadow_copy2_ntimes to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert shadow_copy2_unlink to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 13:32:39 +0000 (15:32 +0200)]
vfs: Convert shadow_copy2_unlink to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert posix_eadb_unlink to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 13:31:27 +0000 (15:31 +0200)]
vfs: Convert posix_eadb_unlink to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agovfs: Convert unlink_acl_tdb to cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 13:29:55 +0000 (15:29 +0200)]
vfs: Convert unlink_acl_tdb to cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolib: Convert copy_smb_filename to use cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 13:26:34 +0000 (15:26 +0200)]
lib: Convert copy_smb_filename to use cp_smb_filename

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolib: Add cp_smb_filename
Volker Lendecke [Thu, 11 Apr 2013 13:24:55 +0000 (15:24 +0200)]
lib: Add cp_smb_filename

The interface of copy_smb_filename is just silly ;-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agoBug 9807 - wbinfo: fix segfault in wbinfo_pam_logon
David Disseldorp [Wed, 17 Apr 2013 17:39:12 +0000 (10:39 -0700)]
Bug 9807 - wbinfo: fix segfault in wbinfo_pam_logon

wbinfo_pam_logon() incorrectly assumes that wbcLogonUser() always
returns an allocated wbcAuthErrorInfo struct on failure.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Apr 17 21:29:29 CEST 2013 on sn-devel-104

11 years agoCleanup. Remove unused function dptr_DirCacheAdd(). Make DirCacheAdd() static.
Jeremy Allison [Mon, 15 Apr 2013 23:54:20 +0000 (16:54 -0700)]
Cleanup. Remove unused function dptr_DirCacheAdd(). Make DirCacheAdd() static.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue Apr 16 12:05:13 CEST 2013 on sn-devel-104

11 years agoAdd a test that shows the difference between Windows and Samba with respect to Delete...
Richard Sharpe [Fri, 5 Apr 2013 00:15:30 +0000 (17:15 -0700)]
Add a test that shows the difference between Windows and Samba with respect to DeleteOnClose.

Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Apr 16 00:46:54 CEST 2013 on sn-devel-104

11 years agosmbd: Fix an error return in change_dir_owner_to_parent
Volker Lendecke [Mon, 15 Apr 2013 09:15:23 +0000 (11:15 +0200)]
smbd: Fix an error return in change_dir_owner_to_parent

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Autobuild-User(master): Richard Sharpe <sharpe@samba.org>
Autobuild-Date(master): Mon Apr 15 18:05:06 CEST 2013 on sn-devel-104

11 years agosamba-tool - MX records cannot be deleted (part2)
Guenter Kukkukk [Sun, 14 Apr 2013 17:39:02 +0000 (19:39 +0200)]
samba-tool - MX records cannot be deleted (part2)

I missed this one, also a wrong compare of MX vs. SRV record

Signed-off-by: Guenter Kukkukk <kukks@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Apr 14 22:43:07 CEST 2013 on sn-devel-104

11 years agosamba-tool - MX records cannot be deleted (error in called C-program)
Guenter Kukkukk [Sun, 14 Apr 2013 04:17:28 +0000 (06:17 +0200)]
samba-tool - MX records cannot be deleted (error in called C-program)

Only matching UNION-members should be compared. MX vs. SRV record

Signed-off-by: Guenter Kukkukk <kukks@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Apr 14 08:46:07 CEST 2013 on sn-devel-104

11 years agontdb: remove --disable-ntdb.
Rusty Russell [Thu, 11 Apr 2013 07:42:16 +0000 (17:12 +0930)]
ntdb: remove --disable-ntdb.

Remove DISABLE_NTDB option, and --disable-ntdb from waf build.  This just
means that it will always get built: it isn't used by default yet.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Apr 13 02:01:02 CEST 2013 on sn-devel-104

11 years agosource4/cluster and source4/ntvfs: convert to dbwrap, add ntdb option.
Rusty Russell [Thu, 11 Apr 2013 07:42:15 +0000 (17:12 +0930)]
source4/cluster and source4/ntvfs: convert to dbwrap, add ntdb option.

This makes the code use dbwrap_local_open(), so it can handle
NTDB.

brlock.tdb, notify.tdb and openfiles.tdb can now be brlock.ntdb,
notify.ntdb and openfiles.ntdb, if 'use ntdb' is set.

Cc: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agoSamba3-HOWTO: mention NTDB.
Rusty Russell [Thu, 11 Apr 2013 07:42:14 +0000 (17:12 +0930)]
Samba3-HOWTO: mention NTDB.

Not sure if we're keeping this up-to-date, but try to document which
databases can be NTDB now.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agoschannel_store.tdb: make it schannel_store.ntdb if 'use ntdb'.
Rusty Russell [Thu, 11 Apr 2013 07:42:13 +0000 (17:12 +0930)]
schannel_store.tdb: make it schannel_store.ntdb if 'use ntdb'.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibcli/auth: convert to dbwrap.
Rusty Russell [Thu, 11 Apr 2013 07:42:12 +0000 (17:12 +0930)]
libcli/auth: convert to dbwrap.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agosecrets: use lpcfg_private_db_path() convenience helper.
Rusty Russell [Thu, 11 Apr 2013 07:42:11 +0000 (17:12 +0930)]
secrets: use lpcfg_private_db_path() convenience helper.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolib/param: lpcfg_private_db_path()
Rusty Russell [Thu, 11 Apr 2013 07:42:10 +0000 (17:12 +0930)]
lib/param: lpcfg_private_db_path()

This wrapper avoids testing lpcfg_use_ntdb() everywhere.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agosource4/scripting/python/samba/samba3: handle ntdb files.
Rusty Russell [Thu, 11 Apr 2013 07:42:09 +0000 (17:12 +0930)]
source4/scripting/python/samba/samba3: handle ntdb files.

Upgrading old Samba 3 instances seems like a place where we don't have
to read ntdb files, but Andrew Bartlett points out that you can run a
Samba 4.0 and even a 4.1 'classic' domain and desire to migrate that
to the AD DC.

So make this upgrade code generic: if it finds an ntdb file, read
that, otherwise read the tdb file.

Cc: Jelmer Vernooij <jelmer@samba.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agoautoconf: build in NTDB.
Rusty Russell [Thu, 11 Apr 2013 07:42:08 +0000 (17:12 +0930)]
autoconf: build in NTDB.

I previously added -DDISABLE_NTDB to FLAGS, but lib/param/util.c
doesn't seem to be compiled with that flag, so it's really not a good
solution.

So instead, compile in ntdb for the autoconf build.  This means:

1) Add -DHAVE_CCAN to cflags.
2) Remove pyntdb from autoconf objects (which is what tdb does)
3) Remove -DDISABLE_NTDB
4) Add ntdb utility objects
5) Link in ntdb everywhere we link in tdb.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agoRemove dependency on detection of HAVE_DIRFD for use of fdopendir().
Jeremy Allison [Wed, 10 Apr 2013 23:30:10 +0000 (16:30 -0700)]
Remove dependency on detection of HAVE_DIRFD for use of fdopendir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Apr 12 16:21:10 CEST 2013 on sn-devel-104

11 years agoRemove the "Ugly hack" that was the second use of dirfd().
Jeremy Allison [Wed, 10 Apr 2013 23:29:03 +0000 (16:29 -0700)]
Remove the "Ugly hack" that was the second use of dirfd().

The destructor does all the resource deallocation needed.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
11 years agoIn the struct smb_Dir destructor, use the fsp back pointer to release resources.
Jeremy Allison [Wed, 10 Apr 2013 23:24:15 +0000 (16:24 -0700)]
In the struct smb_Dir destructor, use the fsp back pointer to release resources.

Removes one use of dirfd().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
11 years agoMaintain a back-pointer to the fsp in struct smb_Dir when opening with FDOPENDIR.
Jeremy Allison [Wed, 10 Apr 2013 23:21:39 +0000 (16:21 -0700)]
Maintain a back-pointer to the fsp in struct smb_Dir when opening with FDOPENDIR.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
11 years agolibsmbclient: Use async cli_full_connection in python connection setup
Volker Lendecke [Tue, 9 Apr 2013 10:15:02 +0000 (12:15 +0200)]
libsmbclient: Use async cli_full_connection in python connection setup

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Apr 12 03:07:10 CEST 2013 on sn-devel-104

11 years agolibsmbclient: Make cli_full_connection async
Volker Lendecke [Fri, 5 Apr 2013 12:55:26 +0000 (14:55 +0200)]
libsmbclient: Make cli_full_connection async

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibsmbclient: Make cli_tree_connect async
Volker Lendecke [Sat, 6 Apr 2013 08:57:41 +0000 (10:57 +0200)]
libsmbclient: Make cli_tree_connect async

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibsmbclient: Make cli_raw_tcon async
Volker Lendecke [Fri, 5 Apr 2013 13:29:14 +0000 (15:29 +0200)]
libsmbclient: Make cli_raw_tcon async

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibsmbclient: Streamline cli_openx a bit
Volker Lendecke [Fri, 5 Apr 2013 13:09:02 +0000 (15:09 +0200)]
libsmbclient: Streamline cli_openx a bit

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibsmbclient: Use tevent_req_poll_ntstatus in cli_openx
Volker Lendecke [Fri, 5 Apr 2013 13:08:22 +0000 (15:08 +0200)]
libsmbclient: Use tevent_req_poll_ntstatus in cli_openx

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibsmbclient: Streamline cli_tcon_andx a bit
Volker Lendecke [Fri, 5 Apr 2013 13:02:51 +0000 (15:02 +0200)]
libsmbclient: Streamline cli_tcon_andx a bit

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibsmbclient: Use tevent_req_poll_ntstatus in cli_tcon_andx
Volker Lendecke [Fri, 5 Apr 2013 12:58:02 +0000 (14:58 +0200)]
libsmbclient: Use tevent_req_poll_ntstatus in cli_tcon_andx

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibsmbclient: Make cli_start_connection async
Volker Lendecke [Fri, 5 Apr 2013 10:42:01 +0000 (12:42 +0200)]
libsmbclient: Make cli_start_connection async

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibsmbclient: Remove unused cli_connect_sock
Volker Lendecke [Thu, 4 Apr 2013 14:56:43 +0000 (16:56 +0200)]
libsmbclient: Remove unused cli_connect_sock

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibsmbclient: Add async cli_connect_nb
Volker Lendecke [Thu, 4 Apr 2013 14:55:48 +0000 (16:55 +0200)]
libsmbclient: Add async cli_connect_nb

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibsmbclient: Avoid a talloc_strdup in cli_connect_nb
Volker Lendecke [Thu, 4 Apr 2013 13:01:25 +0000 (15:01 +0200)]
libsmbclient: Avoid a talloc_strdup in cli_connect_nb

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibsmbclient: Make cli_connect_sock async
Volker Lendecke [Thu, 4 Apr 2013 12:36:51 +0000 (14:36 +0200)]
libsmbclient: Make cli_connect_sock async

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibsmbclient: Remove unused sync wrappers
Volker Lendecke [Tue, 2 Apr 2013 11:39:05 +0000 (13:39 +0200)]
libsmbclient: Remove unused sync wrappers

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibsmbclient: Add async cli_session_setup
Volker Lendecke [Tue, 2 Apr 2013 11:37:30 +0000 (13:37 +0200)]
libsmbclient: Add async cli_session_setup

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibsmbclient: Remove unused cli_session_setup_ntlmssp()
Volker Lendecke [Tue, 2 Apr 2013 10:50:43 +0000 (12:50 +0200)]
libsmbclient: Remove unused cli_session_setup_ntlmssp()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibsmbclient: Add async cli_session_setup_ntlmssp
Volker Lendecke [Sat, 9 Mar 2013 12:07:57 +0000 (13:07 +0100)]
libsmbclient: Add async cli_session_setup_ntlmssp

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibsmbclient: Factor out cli_session_setup_get_account
Volker Lendecke [Sat, 9 Mar 2013 08:53:42 +0000 (09:53 +0100)]
libsmbclient: Factor out cli_session_setup_get_account

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibsmbclient: Slightly simplify cli_session_setup_spnego
Volker Lendecke [Fri, 8 Mar 2013 18:41:07 +0000 (19:41 +0100)]
libsmbclient: Slightly simplify cli_session_setup_spnego

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibsmbclient: Factor out cli_session_setup_get_principal
Volker Lendecke [Fri, 8 Mar 2013 16:21:13 +0000 (17:21 +0100)]
libsmbclient: Factor out cli_session_setup_get_principal

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibsmbclient: Avoid a data copy
Volker Lendecke [Fri, 8 Mar 2013 14:55:51 +0000 (15:55 +0100)]
libsmbclient: Avoid a data copy

spnego_parse_negTokenInit does a asn_load of that blob, which does a data copy
itself. So we don't have to had it a copy as well.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibsmbclient: Fix a leak on talloc_tos()
Volker Lendecke [Fri, 8 Mar 2013 16:40:54 +0000 (17:40 +0100)]
libsmbclient: Fix a leak on talloc_tos()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agoEnsure we test the dirsort module in make test.
Jeremy Allison [Tue, 9 Apr 2013 23:56:24 +0000 (16:56 -0700)]
Ensure we test the dirsort module in make test.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Apr 11 21:17:21 CEST 2013 on sn-devel-104

11 years agoRemove unneeded initializations (we already talloc_zero).
Jeremy Allison [Tue, 9 Apr 2013 18:02:58 +0000 (11:02 -0700)]
Remove unneeded initializations (we already talloc_zero).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
11 years agoRemove the use of dirfd inside the vfs_dirsort.c.
Jeremy Allison [Tue, 9 Apr 2013 17:50:55 +0000 (10:50 -0700)]
Remove the use of dirfd inside the vfs_dirsort.c.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
11 years agoConvert mtime from a time_t to a struct timespec.
Jeremy Allison [Tue, 9 Apr 2013 17:43:53 +0000 (10:43 -0700)]
Convert mtime from a time_t to a struct timespec.

In preparation for removing the dirfd and using fsp_stat()
and VFS_STAT functions.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
11 years agoCheck SMB_VFS_NEXT_OPENDIR return in dirsort_opendir().
Jeremy Allison [Tue, 9 Apr 2013 17:38:24 +0000 (10:38 -0700)]
Check SMB_VFS_NEXT_OPENDIR return in dirsort_opendir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
11 years agoClean error paths in opendir and fd_opendir by only setting handle data on success.
Jeremy Allison [Tue, 9 Apr 2013 17:29:47 +0000 (10:29 -0700)]
Clean error paths in opendir and fd_opendir by only setting handle data on success.

Pass extra struct dirsort_privates * to open_and_sort_dir() function
to avoid it having to re-read the handle data.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
11 years agoProtect open_and_sort_dir() from the directory changing size.
Jeremy Allison [Mon, 8 Apr 2013 23:40:35 +0000 (16:40 -0700)]
Protect open_and_sort_dir() from the directory changing size.

Otherwise there could be an error between initial count, allocation
and re-read.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
11 years agoUse an index i rather than re-using a state variable.
Jeremy Allison [Mon, 8 Apr 2013 23:38:03 +0000 (16:38 -0700)]
Use an index i rather than re-using a state variable.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
11 years agoProtect against early error in SMB_VFS_NEXT_READDIR.
Jeremy Allison [Mon, 8 Apr 2013 23:31:53 +0000 (16:31 -0700)]
Protect against early error in SMB_VFS_NEXT_READDIR.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
11 years agoChange source3/modules/vfs_dirsort.c from MALLOC -> TALLOC.
Jeremy Allison [Mon, 8 Apr 2013 22:11:28 +0000 (15:11 -0700)]
Change source3/modules/vfs_dirsort.c from MALLOC -> TALLOC.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
11 years agoscripting-provision: Do not enforce domain != realm if we are joining an existing...
Andrew Bartlett [Fri, 5 Apr 2013 01:01:17 +0000 (12:01 +1100)]
scripting-provision: Do not enforce domain != realm if we are joining an existing domain

This will allow us users to join existing oddly named domains without
objection from provision.

Andrew Bartlett

Reviewed-by: Matthieu Patou <mat@matws.net>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Apr 11 10:41:02 CEST 2013 on sn-devel-104

11 years agobuild: Raise minimum python version to 2.5.0 for samba build
Andrew Bartlett [Mon, 8 Apr 2013 07:25:27 +0000 (17:25 +1000)]
build: Raise minimum python version to 2.5.0 for samba build

RHEL5 has a python26 package for a modern python, and was the main reason we
kept python 2.5 support.

However, this support never actually worked for AD DC installations,
as samba-tool uses a feature only in 2.5 and above.  Very few folks
noticed and those were on RHEL5, and moving to 2.5 allows us to remove
some other workarounds.

Andrew Bartlett

Reviewed-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>