[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8aae59a lib/util don't use enum protocol_types in ms_fnmatch_protocol via e3b8584 libcli/smb Move cifs posix helper functions and headers in common via 8f18103 lib/util Use lib/util/ms_fnmatch.c in common for gen_fnmatch() via 3892112 lib/util Rename ms_fnmatch() to ms_fnmatch_protocol() to avoid dup symbol via cad704e errors: Remove unused unix_to_werror() via db74cad libcli/util Move NTSTATUS table to the top level via 344eb08 nterr: Add mem_ctx for return string from get_nt_error_c_code() via c83aed2 s3-smbd ntstatus_to_dos() pulls the DOS error codes out internally via f1ec288 libcli/util Merge ntstatus_to_dos() ntstatus_to_werror() to the top level via 2b0de5b errors: Merge source3/ werror_to_ntstatus() code to source4/ via 865a937 errors: Merge ntstatus - DOS error table between Samba3 and Samba4. via fa289e8 s3-lib Remove unused dos error codes from errmap_unix via 1475013 lib/util Move source3 tdb_wrap_open() into the common code. from f455772 s3-winbind: another strlcpy()/fstring fix http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8aae59a277fe4bf5a1a84cb4730e5772c9ffca8c Author: Andrew Bartlett abart...@samba.org Date: Wed May 4 21:20:57 2011 +1000 lib/util don't use enum protocol_types in ms_fnmatch_protocol This makes it easier to compile this in the top level with s3 and s4 headers. Andrew Bartlett Autobuild-User: Andrew Bartlett abart...@samba.org Autobuild-Date: Fri May 6 08:50:52 CEST 2011 on sn-devel-104 commit e3b858496ffe213f66387e4f11b311543af4dc54 Author: Andrew Bartlett abart...@samba.org Date: Wed May 4 21:19:46 2011 +1000 libcli/smb Move cifs posix helper functions and headers in common unix_perms_to_wire() was a duplicate symbol in the top level build. Andrew Bartlett commit 8f1810362df7ef9e5c394a9cba83cf0e7c04bd9e Author: Andrew Bartlett abart...@samba.org Date: Wed May 4 20:57:12 2011 +1000 lib/util Use lib/util/ms_fnmatch.c in common for gen_fnmatch() gen_fnmatch was a duplicate symbol in the top level build. gen_fnmatch() used for simple non-CIFS pattern matching, so selecting the lib/util implementation should not be a concern. Andrew Bartlett commit 3892112e7b3143f808932771a7b71f4fd335f8cb Author: Andrew Bartlett abart...@samba.org Date: Wed May 4 20:53:33 2011 +1000 lib/util Rename ms_fnmatch() to ms_fnmatch_protocol() to avoid dup symbol This verison of the function takes a protcol as argument to determine matching rules. Andrew Bartlett commit cad704e8368f6aba28889966a7382afc8b738928 Author: Andrew Bartlett abart...@samba.org Date: Wed May 4 17:00:23 2011 +1000 errors: Remove unused unix_to_werror() commit db74cad1c638ae2142b89757397b50009ea0678a Author: Andrew Bartlett abart...@samba.org Date: Wed May 4 15:50:07 2011 +1000 libcli/util Move NTSTATUS table to the top level commit 344eb08ee4e444c1fc1beac26e50c6a85b942885 Author: Andrew Bartlett abart...@samba.org Date: Wed May 4 15:30:01 2011 +1000 nterr: Add mem_ctx for return string from get_nt_error_c_code() It is clearer to avoid the implicit return on talloc_tos() Andrew Bartlett commit c83aed2568761adda5f4f09e044788557767347e Author: Andrew Bartlett abart...@samba.org Date: Wed May 4 16:16:13 2011 +1000 s3-smbd ntstatus_to_dos() pulls the DOS error codes out internally This means we don't need to duplicate that logic here. Andrew Bartlett commit f1ec28827f61fcb168249aa9855e7f19c65780ae Author: Andrew Bartlett abart...@samba.org Date: Wed May 4 13:59:57 2011 +1000 libcli/util Merge ntstatus_to_dos() ntstatus_to_werror() to the top level This takes the Samba4 version, with the NT_STATUS_IS_DOS() check. This will be used in smbd/error.c shortly. Andrew Bartlett commit 2b0de5b5ca1196a39379dcd86a25b6e73c52cf3c Author: Andrew Bartlett abart...@samba.org Date: Wed May 4 16:51:23 2011 +1000 errors: Merge source3/ werror_to_ntstatus() code to source4/ commit 865a93767159be087ec78f56687c4d3ba24a3756 Author: Andrew Bartlett abart...@samba.org Date: Wed May 4 13:47:26 2011 +1000 errors: Merge ntstatus - DOS error table between Samba3 and Samba4. They are now identical Andrew Bartlett commit fa289e8982ea260a87548c145ef061e7eb64acf6 Author: Andrew Bartlett abart...@samba.org Date: Wed May 4 11:39:21 2011 +1000 s3-lib Remove unused dos error codes from errmap_unix This also makes unix_nt_errmap private to errmap_unix.c and errormap.c so the tables themselves cannot be duplicate symbols until merged. Andrew Bartlett commit 14750139639b3531e57a3ca3f9e481d6e458dc06 Author: Andrew Bartlett
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 41134f7 s3-proto: remove some duplicate prototypes. from ab8219a s3-spoolss: remove unused struct in construct_notify_printer_info(). http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 41134f7f4bb6cd2ff84422782dfb82845d881950 Author: Günther Deschner g...@samba.org Date: Fri May 6 14:03:00 2011 +0200 s3-proto: remove some duplicate prototypes. Guenther Autobuild-User: Günther Deschner g...@samba.org Autobuild-Date: Fri May 6 16:21:08 CEST 2011 on sn-devel-104 --- Summary of changes: source3/include/proto.h | 54 --- 1 files changed, 0 insertions(+), 54 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/include/proto.h b/source3/include/proto.h index 6be4643..352e092 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -370,60 +370,6 @@ int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_T acl_d); int sys_acl_delete_def_file(vfs_handle_struct *handle, const char *path); -SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle, - const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp); -int sys_acl_set_file(vfs_handle_struct *handle, -const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, - SMB_ACL_T acl_d); -int sys_acl_delete_def_file(vfs_handle_struct *handle, - const char *path); -SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle, - const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp); -int sys_acl_set_file(vfs_handle_struct *handle, -const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, - SMB_ACL_T acl_d); -int sys_acl_delete_def_file(vfs_handle_struct *handle, - const char *path); -SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle, - const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp); -int sys_acl_set_file(vfs_handle_struct *handle, -const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, - SMB_ACL_T acl_d); -int sys_acl_delete_def_file(vfs_handle_struct *handle, - const char *path); -SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle, - const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp); -int sys_acl_set_file(vfs_handle_struct *handle, -const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, - SMB_ACL_T acl_d); -int sys_acl_delete_def_file(vfs_handle_struct *handle, - const char *path); -SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle, - const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp); -int sys_acl_set_file(vfs_handle_struct *handle, -const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, - SMB_ACL_T acl_d); -int sys_acl_delete_def_file(vfs_handle_struct *handle, - const char *path); -SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle, - const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp); -int sys_acl_set_file(vfs_handle_struct *handle, -const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, - SMB_ACL_T acl_d); -int sys_acl_delete_def_file(vfs_handle_struct *handle, - const char *path); int no_acl_syscall_error(int err); /* The following definitions come from lib/sysquotas.c */ -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-6-test updated
The branch, v3-6-test has been updated via 43967ee tdb: fix a build warning. via 52cbf2f libcli/security: fix build warning, cr_descr_log_acl() is not used currently. via 68db6bb s3-spoolss: remove unused struct in construct_notify_printer_info(). via dc1219f s3-proto: remove some duplicate prototypes. from 922b6a8 s3: Fix a typo http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log - commit 43967ee75962fc135fbc045bab87b642947eb644 Author: Günther Deschner g...@samba.org Date: Thu May 5 12:52:05 2011 +0200 tdb: fix a build warning. Guenther (cherry picked from commit 73c31f044e32103276558a194698ea6cf876b4f2) commit 52cbf2f1d671589d2c1d48f3f52fd2f667af02ba Author: Günther Deschner g...@samba.org Date: Thu May 5 12:52:29 2011 +0200 libcli/security: fix build warning, cr_descr_log_acl() is not used currently. Guenther (cherry picked from commit 03b9a9938b934ff774ad49c5b409c7060e66b999) commit 68db6bb3d0df017b2ba60b03d585ccdf74558116 Author: Günther Deschner g...@samba.org Date: Thu May 5 21:52:57 2011 +0200 s3-spoolss: remove unused struct in construct_notify_printer_info(). Guenther Autobuild-User: Günther Deschner g...@samba.org Autobuild-Date: Fri May 6 12:07:17 CEST 2011 on sn-devel-104 (cherry picked from commit ab8219a6f39360da742d0f3ca702f2173d798538) commit dc1219fec7187061f3fda96b157bd7946693ff6e Author: Günther Deschner g...@samba.org Date: Fri May 6 14:03:00 2011 +0200 s3-proto: remove some duplicate prototypes. Guenther Autobuild-User: Günther Deschner g...@samba.org Autobuild-Date: Fri May 6 16:21:08 CEST 2011 on sn-devel-104 (cherry picked from commit 41134f7f4bb6cd2ff84422782dfb82845d881950) --- Summary of changes: lib/tdb/pytdb.c |1 + libcli/security/create_descriptor.c |2 + source3/include/proto.h | 54 --- source3/rpc_server/spoolss/srv_spoolss_nt.c |3 +- 4 files changed, 4 insertions(+), 56 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/tdb/pytdb.c b/lib/tdb/pytdb.c index 0faba56..3dd785e 100644 --- a/lib/tdb/pytdb.c +++ b/lib/tdb/pytdb.c @@ -558,6 +558,7 @@ static PyMethodDef tdb_methods[] = { { NULL } }; +void inittdb(void); void inittdb(void) { PyObject *m; diff --git a/libcli/security/create_descriptor.c b/libcli/security/create_descriptor.c index 62919a1..9252896 100644 --- a/libcli/security/create_descriptor.c +++ b/libcli/security/create_descriptor.c @@ -305,6 +305,7 @@ static void cr_descr_log_descriptor(struct security_descriptor *sd, } } +#if 0 static void cr_descr_log_acl(struct security_acl *acl, const char *message, int level) @@ -318,6 +319,7 @@ static void cr_descr_log_acl(struct security_acl *acl, DEBUG(level,(%s: NULL\n, message)); } } +#endif static bool compute_acl(struct security_descriptor *parent_sd, struct security_descriptor *creator_sd, diff --git a/source3/include/proto.h b/source3/include/proto.h index 766c744..5f0e878 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -405,60 +405,6 @@ int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_T acl_d); int sys_acl_delete_def_file(vfs_handle_struct *handle, const char *path); -SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle, - const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp); -int sys_acl_set_file(vfs_handle_struct *handle, -const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, - SMB_ACL_T acl_d); -int sys_acl_delete_def_file(vfs_handle_struct *handle, - const char *path); -SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle, - const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp); -int sys_acl_set_file(vfs_handle_struct *handle, -const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, - SMB_ACL_T acl_d); -int sys_acl_delete_def_file(vfs_handle_struct *handle, - const char *path); -SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle, - const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp); -int sys_acl_set_file(vfs_handle_struct *handle, -
[SCM] Samba Shared Repository - branch v3-6-test updated
The branch, v3-6-test has been updated via 65d7144 s3-waf: add vfs_gpfs_hsm_notify to the build. from 43967ee tdb: fix a build warning. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log - commit 65d7144ef5a0498c82ec61d114aaca91b25dc088 Author: Günther Deschner g...@samba.org Date: Wed May 4 18:01:04 2011 +0200 s3-waf: add vfs_gpfs_hsm_notify to the build. Volker, can you please check this is correct ? Guenther Autobuild-User: Günther Deschner g...@samba.org Autobuild-Date: Wed May 4 19:03:45 CEST 2011 on sn-devel-104 (cherry picked from commit 0d1b2d2033e9cc33accea29a4c3a8fafd3d75aa2) --- Summary of changes: source3/modules/wscript_build |8 source3/wscript |6 ++ 2 files changed, 14 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/wscript_build b/source3/modules/wscript_build index 201610e..ff7163f 100644 --- a/source3/modules/wscript_build +++ b/source3/modules/wscript_build @@ -30,6 +30,7 @@ VFS_CACHEPRIME_SRC = 'vfs_cacheprime.c' VFS_PREALLOC_SRC = 'vfs_prealloc.c' VFS_COMMIT_SRC = 'vfs_commit.c' VFS_GPFS_SRC = 'vfs_gpfs.c gpfs.c' +VFS_GPFS_HSM_NOTIFY_SRC = 'vfs_gpfs_hsm_notify.c' VFS_NOTIFY_FAM_SRC = 'vfs_notify_fam.c' VFS_READAHEAD_SRC = 'vfs_readahead.c' VFS_TSMSM_SRC = 'vfs_tsmsm.c' @@ -280,6 +281,13 @@ bld.SAMBA3_MODULE('vfs_gpfs', internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_gpfs'), enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_gpfs')) +bld.SAMBA3_MODULE('vfs_gpfs_hsm_notify', + subsystem='vfs', + source=VFS_GPFS_HSM_NOTIFY_SRC, + init_function='', + internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_gpfs_hsm_notify'), + enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_gpfs_hsm_notify')) + bld.SAMBA3_MODULE('vfs_notify_fam', subsystem='vfs', source=VFS_NOTIFY_FAM_SRC, diff --git a/source3/wscript b/source3/wscript index 3b15313..32c688c 100644 --- a/source3/wscript +++ b/source3/wscript @@ -1714,6 +1714,9 @@ main() { conf.DEFINE('WITH_PROFILE', 1); +if conf.CHECK_HEADERS('gpfs_gpl.h'): +conf.DEFINE('HAVE_GPFS', '1') + default_static_modules=TO_LIST('''pdb_smbpasswd pdb_tdbsam pdb_wbc_sam auth_sam auth_unix auth_winbind auth_wbc auth_server auth_domain auth_builtin vfs_default @@ -1754,6 +1757,9 @@ main() { if conf.CONFIG_SET('DARWINOS'): default_shared_modules.extend(TO_LIST('charset_macosxfs')) +if conf.CONFIG_SET('HAVE_GPFS'): + default_shared_modules.extend(TO_LIST('vfs_gpfs vfs_gpfs_hsm_notify')) + explicit_shared_modules = TO_LIST(Options.options.shared_modules, delimiter=',') explicit_static_modules = TO_LIST(Options.options.static_modules, delimiter=',') -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via fa8490a s4-smbd: fix randseed_init() usage. via 1e208a7 s3-includes: no need to globally include libads/ads_status.h. via 675573d s3-includes: finally only include client.h when libsmb is used. via 2702258 s3-libsmb: move protos to libsmb/proto.h from 41134f7 s3-proto: remove some duplicate prototypes. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit fa8490aa4cdf8c1836919ca412de1488840094f5 Author: Günther Deschner g...@samba.org Date: Fri May 6 16:22:41 2011 +0200 s4-smbd: fix randseed_init() usage. Guenther Autobuild-User: Günther Deschner g...@samba.org Autobuild-Date: Fri May 6 17:37:11 CEST 2011 on sn-devel-104 commit 1e208a705718adb105d89093041c0ba5d51f2429 Author: Günther Deschner g...@samba.org Date: Fri May 6 12:54:59 2011 +0200 s3-includes: no need to globally include libads/ads_status.h. Guenther commit 675573d54b717ffc24cf3b49301ff649aecc259a Author: Günther Deschner g...@samba.org Date: Fri May 6 12:53:38 2011 +0200 s3-includes: finally only include client.h when libsmb is used. Guenther commit 27022587e31769718ab53f4d114e03ac2f205f27 Author: Günther Deschner g...@samba.org Date: Fri May 6 11:47:43 2011 +0200 s3-libsmb: move protos to libsmb/proto.h Guenther --- Summary of changes: libgpo/gpo_fetch.c |1 + source3/auth/auth_domain.c |1 + source3/auth/auth_server.c |1 + source3/client/client.c|1 + source3/client/client_proto.h |2 + source3/client/clitar.c|1 + source3/client/smbspool.c |1 + source3/include/ads.h |1 + source3/include/async_smb.h|2 +- source3/include/includes.h |3 - source3/include/proto.h| 813 +--- source3/lib/netapi/cm.c|1 + source3/libads/ads_status.c|1 + source3/libads/ads_status.h|4 + source3/libads/kerberos_proto.h|2 + source3/libgpo/gpo_filesync.c |1 + source3/libnet/libnet_join.c |1 + source3/libsmb/async_smb.c |1 + source3/libsmb/cli_np_tstream.c|1 + source3/libsmb/cliconnect.c|1 + source3/libsmb/clidfs.c|1 + source3/libsmb/clidgram.c |1 + source3/libsmb/clientgen.c |1 + source3/libsmb/clierror.c |1 + source3/libsmb/clifile.c |1 + source3/libsmb/clifsinfo.c |1 + source3/libsmb/clilist.c |1 + source3/libsmb/climessage.c|1 + source3/libsmb/clioplock.c |1 + source3/libsmb/cliprint.c |1 + source3/libsmb/cliquota.c |1 + source3/libsmb/clirap.c|1 + source3/libsmb/clirap.h|2 + source3/libsmb/clirap2.c |1 + source3/libsmb/clireadwrite.c |1 + source3/libsmb/clisecdesc.c|1 + source3/libsmb/clisigning.c|1 + source3/libsmb/clistr.c|1 + source3/libsmb/clitrans.c |1 + .../libnet/grouptest.h = source3/libsmb/libsmb.h | 11 +- source3/libsmb/libsmb_cache.c |1 + source3/libsmb/libsmb_context.c|1 + source3/libsmb/libsmb_dir.c|1 + source3/libsmb/libsmb_file.c |1 + source3/libsmb/libsmb_misc.c |1 + source3/libsmb/libsmb_printjob.c |1 + source3/libsmb/libsmb_server.c |1 + source3/libsmb/libsmb_stat.c |1 + source3/libsmb/libsmb_xattr.c |1 + source3/libsmb/passchange.c|1 + source3/libsmb/proto.h | 833 source3/libsmb/smb_seal.c |1 + source3/libsmb/smbsock_connect.c |1 + source3/libsmb/trusts_util.c |1 + source3/nmbd/nmbd_packets.c|1 + source3/nmbd/nmbd_synclists.c |1 +
autobuild: intermittent test failure detected
The autobuild test system has detected an intermittent failing test in the current master tree. The autobuild log of the failure is available here: http://git.samba.org/autobuild.flakey/2011-05-06-2032/flakey.log The samba3 build logs are available here: http://git.samba.org/autobuild.flakey/2011-05-06-2032/samba3.stderr http://git.samba.org/autobuild.flakey/2011-05-06-2032/samba3.stdout The source4 build logs are available here: http://git.samba.org/autobuild.flakey/2011-05-06-2032/samba4.stderr http://git.samba.org/autobuild.flakey/2011-05-06-2032/samba4.stdout The top commit at the time of the failure was: commit f7b3909103a0acd5ee0426b85112f2c9ed4e7730 Author: Jeremy Allison j...@samba.org Date: Fri May 6 07:54:18 2011 -0700 A couple more off-by-one calculations with strlcpy. Autobuild-User: Jeremy Allison j...@samba.org Autobuild-Date: Fri May 6 18:39:17 CEST 2011 on sn-devel-104
[SCM] Samba Shared Repository - branch v3-5-test updated
The branch, v3-5-test has been updated via 3782315 Fix bug 8111 - CIFS VFS: unexpected error on SMB posix open from 80078cb Fix is_myname_or_ipaddr() to be robust against strange DNS setups. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test - Log - commit 37823155157d735356e1f223b425252c956d8c04 Author: Jeremy Allison j...@samba.org Date: Fri Apr 29 14:22:54 2011 -0700 Fix bug 8111 - CIFS VFS: unexpected error on SMB posix open We are conflating the O_CREAT|O_EXCL with the O_TRUNC processing, they need to be separate. We need to chose using (O_CREAT|O_EXCL) first, then modify if O_TRUNC is set. This needs two separate switch statements. Jeremy --- Summary of changes: source3/smbd/trans2.c | 61 +++- 1 files changed, 49 insertions(+), 12 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 1a171d8..0d14421 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -7045,18 +7045,55 @@ static NTSTATUS smb_posix_open(connection_struct *conn, wire_open_mode = ~SMB_ACCMODE; - if((wire_open_mode (SMB_O_CREAT | SMB_O_EXCL)) == (SMB_O_CREAT | SMB_O_EXCL)) { - create_disp = FILE_CREATE; - } else if((wire_open_mode (SMB_O_CREAT | SMB_O_TRUNC)) == (SMB_O_CREAT | SMB_O_TRUNC)) { - create_disp = FILE_OVERWRITE_IF; - } else if((wire_open_mode SMB_O_CREAT) == SMB_O_CREAT) { - create_disp = FILE_OPEN_IF; - } else if ((wire_open_mode (SMB_O_CREAT | SMB_O_EXCL | SMB_O_TRUNC)) == 0) { - create_disp = FILE_OPEN; - } else { - DEBUG(5,(smb_posix_open: invalid create mode 0x%x\n, - (unsigned int)wire_open_mode )); - return NT_STATUS_INVALID_PARAMETER; + /* First take care of O_CREAT|O_EXCL interactions. */ + switch (wire_open_mode (SMB_O_CREAT | SMB_O_EXCL)) { + case (SMB_O_CREAT | SMB_O_EXCL): + /* File exists fail. File not exist create. */ + create_disp = FILE_CREATE; + break; + case SMB_O_CREAT: + /* File exists open. File not exist create. */ + create_disp = FILE_OPEN_IF; + break; + case 0: + /* File exists open. File not exist fail. */ + create_disp = FILE_OPEN; + break; + case SMB_O_EXCL: + /* O_EXCL on its own without O_CREAT is undefined. */ + default: + DEBUG(5,(smb_posix_open: invalid create mode 0x%x\n, + (unsigned int)wire_open_mode )); + return NT_STATUS_INVALID_PARAMETER; + } + + /* Next factor in the effects of O_TRUNC. */ + wire_open_mode = ~(SMB_O_CREAT | SMB_O_EXCL); + + if (wire_open_mode SMB_O_TRUNC) { + switch (create_disp) { + case FILE_CREATE: + /* (SMB_O_CREAT | SMB_O_EXCL | O_TRUNC) */ + /* Leave create_disp alone as + (O_CREAT|O_EXCL|O_TRUNC) == (O_CREAT|O_EXCL) + */ + /* File exists fail. File not exist create. */ + break; + case FILE_OPEN_IF: + /* SMB_O_CREAT | SMB_O_TRUNC */ + /* File exists overwrite. File not exist create. */ + create_disp = FILE_OVERWRITE_IF; + break; + case FILE_OPEN: + /* SMB_O_TRUNC */ + /* File exists overwrite. File not exist fail. */ + create_disp = FILE_OVERWRITE; + break; + default: + /* Cannot get here. */ + smb_panic(smb_posix_open: logic error); + return NT_STATUS_INVALID_PARAMETER; + } } raw_unixmode = IVAL(pdata,8); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-6-test updated
The branch, v3-6-test has been updated via 38155e2 A couple more off-by-one calculations with strlcpy. from 65d7144 s3-waf: add vfs_gpfs_hsm_notify to the build. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log - commit 38155e2833fc3a19b2fd6e4e35d4fd5711b5785f Author: Jeremy Allison j...@samba.org Date: Fri May 6 07:54:18 2011 -0700 A couple more off-by-one calculations with strlcpy. Autobuild-User: Jeremy Allison j...@samba.org Autobuild-Date: Fri May 6 18:39:17 CEST 2011 on sn-devel-104 (cherry picked from commit f7b3909103a0acd5ee0426b85112f2c9ed4e7730) --- Summary of changes: source3/groupdb/mapping_tdb.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/groupdb/mapping_tdb.c b/source3/groupdb/mapping_tdb.c index 1137b8f..548d3a3 100644 --- a/source3/groupdb/mapping_tdb.c +++ b/source3/groupdb/mapping_tdb.c @@ -900,10 +900,10 @@ static int convert_ldb_record(TDB_CONTEXT *ltdb, TDB_DATA key, } } else if (StrCaseCmp(name, ntname) == 0) { strlcpy(map.nt_name, val, - sizeof(map.nt_name) -1); + sizeof(map.nt_name)); } else if (StrCaseCmp(name, comment) == 0) { strlcpy(map.comment, val, - sizeof(map.comment) -1); + sizeof(map.comment)); } else if (StrCaseCmp(name, member) == 0) { if (!string_to_sid(members[j], val)) { errno = EIO; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via ac25835 Fix Samba3 on OpenIndiana. from f7b3909 A couple more off-by-one calculations with strlcpy. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ac25835ab7b76226bd59fec9ffef46d5c5817d54 Author: Gordon Ross gordon.w.r...@gmail.com Date: Fri May 6 16:00:08 2011 -0700 Fix Samba3 on OpenIndiana. I'd like Samba to use the native OpenLDAP and MIT Kerberos libs. Attached are some patches to do that. (relative to git master) It does not build for me without these. (OpenIndiana is an off-shoot of OpenSolaris See http://www.openindiana.org) Autobuild-User: Jeremy Allison j...@samba.org Autobuild-Date: Sat May 7 02:20:14 CEST 2011 on sn-devel-104 --- Summary of changes: auth/kerberos/gssapi_pac.c| 24 lib/replace/system/kerberos.h |4 +++- source3/configure.in | 26 +- source3/wscript |2 +- 4 files changed, 49 insertions(+), 7 deletions(-) Changeset truncated at 500 lines: diff --git a/auth/kerberos/gssapi_pac.c b/auth/kerberos/gssapi_pac.c index d89a649..e115cfe 100644 --- a/auth/kerberos/gssapi_pac.c +++ b/auth/kerberos/gssapi_pac.c @@ -23,6 +23,30 @@ #include libcli/auth/krb5_wrap.h +#if 0 +/* FIXME - need proper configure/waf test + * to determine if gss_mech_krb5 and friends + * exist. JRA. + */ +/* + * These are not exported by Solaris -lkrb5 + * Maybe move to libreplace somewhere? + */ +static const gss_OID_desc krb5_gss_oid_array[] = { + /* this is the official, rfc-specified OID */ + { 9, \052\206\110\206\367\022\001\002\002 }, + /* this is the pre-RFC mech OID */ + { 5, \053\005\001\005\002 }, + /* this is the unofficial, incorrect mech OID emitted by MS */ + { 9, \052\206\110\202\367\022\001\002\002 }, + { 0, 0 } +}; + +const gss_OID_desc * const gss_mech_krb5 = krb5_gss_oid_array+0; +const gss_OID_desc * const gss_mech_krb5_old = krb5_gss_oid_array+1; +const gss_OID_desc * const gss_mech_krb5_wrong= krb5_gss_oid_array+2; +#endif + /* The Heimdal OID for getting the PAC */ #define EXTRACT_PAC_AUTHZ_DATA_FROM_SEC_CONTEXT_OID_LENGTH 8 /* EXTRACTION OID AUTHZ ID */ diff --git a/lib/replace/system/kerberos.h b/lib/replace/system/kerberos.h index 6d8c59f..ec3eff1 100644 --- a/lib/replace/system/kerberos.h +++ b/lib/replace/system/kerberos.h @@ -37,7 +37,9 @@ #include com_err.h #endif -#if HAVE_GSSAPI_GSSAPI_H +#if HAVE_GSSAPI_GSSAPI_EXT_H +#include gssapi/gssapi_ext.h +#elif HAVE_GSSAPI_GSSAPI_H #include gssapi/gssapi.h #elif HAVE_GSSAPI_GSSAPI_GENERIC_H #include gssapi/gssapi_generic.h diff --git a/source3/configure.in b/source3/configure.in index f9263f6..11dbc28 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -3579,16 +3579,16 @@ else # Check to see whether there is enough LDAP functionality to be able # to build AD support. -# HPUX only has ldap_init; ok, we take care of this in smbldap.c +# HPUX and Solaris only has ldap_init; ok, we take care of this in smbldap.c case $host_os in - *hpux*) + *hpux* | *solaris*) AC_CHECK_FUNC_EXT(ldap_init,$LDAP_LIBS) if test x$ac_cv_func_ext_ldap_init != xyes; then if test x$with_ads_support = xyes; then - AC_MSG_ERROR(Active Directory support on HPUX requires ldap_init) + AC_MSG_ERROR(Active Directory support on HPUX or Solaris requires ldap_init) elif test x$with_ads_support = xauto; then - AC_MSG_WARN(Disabling Active Directory support (requires ldap_init on HPUX)) + AC_MSG_WARN(Disabling Active Directory support (requires ldap_init on HPUX or Solaris)) with_ads_support=no fi fi @@ -3638,7 +3638,6 @@ if test x$with_ads_support != xno; then ;; yes) AC_MSG_RESULT(/usr) -FOUND_KRB5=yes ;; *) AC_MSG_RESULT($withval) @@ -3727,6 +3726,21 @@ if test x$with_ads_support != xno; then fi fi + if test x$FOUND_KRB5 = xno; then +# +# see if this box has Solaris MIT kerberos implementation +AC_MSG_CHECKING(for Solaris MIT kerberos) +if test -x $KRB5CONFIG $KRB5CONFIG --version | grep -s Solaris | grep -s MIT /dev/null ; then + FOUND_KRB5=yes + KRB5_LIBS=-lgss -lkrb5 + KRB5_CFLAGS=`$KRB5CONFIG --cflags` + KRB5_CPPFLAGS=`$KRB5CONFIG --cflags` + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi + fi + ac_save_CFLAGS=$CFLAGS ac_save_CPPFLAGS=$CPPFLAGS ac_save_LDFLAGS=$LDFLAGS @@ -3816,6 +3830,7 @@ if test x$with_ads_support != xno; then # now see if we can find