The branch, v4-0-test has been updated via 4096d6c s3: Make SMB2_GETINFO multi-volume aware. via d82117a Fix bug #9642 - vfs_afsacl.c won't build. via 26ce124 autoconf: rename pdb_ldap module to pdb_ldapsam via 13cba9b source3/wscript: support 'pdb_ldap' module in configure via b508949 Rename pdb_ldap to pdb_ldapsam via 6435714 PIDL: fix parsing linemarkers in preprocessor output via 95009ae Fix bug 9633: recursive mget should continue on EPERM from bcea10b s3:auth: wbcAuthenticateEx gives unix times (bug #9625)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test - Log ----------------------------------------------------------------- commit 4096d6ccd4073c0dd410f0c0b9b9c9067e4e4efc Author: Ira Cooper <i...@samba.org> Date: Wed Feb 6 13:35:25 2013 +0000 s3: Make SMB2_GETINFO multi-volume aware. Not all shares are a single volume. Some actually expose multiple volumes under a single share. In these cases showing the amount of space free as the space free at the base of the directory heirarchy is wrong. Reviewed-by: Jeremy Allison <j...@samba.org> Autobuild-User(master): Jeremy Allison <j...@samba.org> Autobuild-Date(master): Fri Feb 8 21:44:37 CET 2013 on sn-devel-104 Fix bug #9646 - dir and similar commands are returning the wrong amount of free space. Autobuild-User(v4-0-test): Karolin Seeger <ksee...@samba.org> Autobuild-Date(v4-0-test): Tue Feb 12 22:54:50 CET 2013 on sn-devel-104 commit d82117a8ef7a779013ed0ff51c8027111e426a75 Author: Jeremy Allison <j...@samba.org> Date: Fri Feb 8 17:08:28 2013 -0800 Fix bug #9642 - vfs_afsacl.c won't build. Add missing mem_ctx argument. Signed-off-by: Jeremy Allison <j...@samba.org> commit 26ce1243cda5edc6e51e6323619543df32a9fc34 Author: Alexander Bokovoy <a...@samba.org> Date: Wed Feb 6 12:22:12 2013 +0200 autoconf: rename pdb_ldap module to pdb_ldapsam Reviewed-by: Andreas Schneider <a...@samba.org> Autobuild-User(master): Alexander Bokovoy <a...@samba.org> Autobuild-Date(master): Wed Feb 6 13:32:53 CET 2013 on sn-devel-104 The last 3 patches address bug #9639 - Rename internal subsystem pdb_ldap to pdb_ldapsam. commit 13cba9b9d34e6c4a6847c45ece3fd2469ac61f4d Author: Alexander Bokovoy <a...@samba.org> Date: Wed Feb 6 10:43:16 2013 +0200 source3/wscript: support 'pdb_ldap' module in configure While PASSDB module ldapsam is called pdb_ldapsam internally, support specifying 'pdb_ldap' during configure step. This should make transition to pdb_ldapsam transparent to distributions. Reviewed-by: Andreas Schneider <a...@samba.org> commit b508949687b73abf6f633bac19028db0717fead1 Author: Andreas Schneider <a...@samba.org> Date: Mon Jan 28 16:16:42 2013 +0100 Rename pdb_ldap to pdb_ldapsam This patch moves pdb_ldap to pdb_ldapsam unconditionally and makes possible to load ldapsam.so dynamically Reviewed-by: Alexander Bokovoy <a...@samba.org> commit 643571470f2e4cd2f58bd60ac7189abb826d33cc Author: Alexander Bokovoy <a...@samba.org> Date: Wed Feb 6 10:17:57 2013 +0200 PIDL: fix parsing linemarkers in preprocessor output When PIDL calls out to C preprocessor to expand IDL files and parse the output, it filters out linemarkers and line control information as described in http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html and http://gcc.gnu.org/onlinedocs/cpp/Line-Control.html#Line-Control With gcc 4.8 stdc-predef.h is included automatically and linemarker for the file has extended flags that PIDL couldn't parse ('system header that needs to be extern "C" protected for C++') Thanks to Jakub Jelinek <ja...@redhat.com> for explanation of the linemarker format. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=906517 Reviewed-by: Andreas Schneider <a...@samba.org> (cherry picked from commit 6ba7ab5c14801aecae96373d5a9db7ab82957526) Signed-off-by: Andreas Schneider <a...@samba.org> Fix bug #9636 - pidl can't parse new linemarkers in preprocessor output. commit 95009ae69ad478b63f98dcd423cc09abc7d2a286 Author: David Disseldorp <dd...@samba.org> Date: Mon Feb 4 19:04:39 2013 +0100 Fix bug 9633: recursive mget should continue on EPERM Regression introduced by 14ff2e8de9bd8d0064762234555260f5eea643fe. When downloading files recursively, smbclient halts if it encounters a folder to which it does not have permission to traverse. ----------------------------------------------------------------------- Summary of changes: pidl/idl.yp | 4 +++- pidl/lib/Parse/Pidl/IDL.pm | 4 +++- source3/client/client.c | 13 +++++++++++-- source3/configure.in | 9 +++++++-- source3/modules/vfs_afsacl.c | 3 ++- source3/passdb/pdb_ipa.c | 2 +- source3/passdb/pdb_ldap.c | 12 +++++++++--- source3/passdb/pdb_ldap.h | 4 ++-- source3/passdb/pdb_nds.c | 2 +- source3/passdb/wscript_build | 6 +++--- source3/smbd/globals.h | 1 + source3/smbd/smb2_getinfo.c | 1 + source3/smbd/trans2.c | 27 ++++++++++++++++++--------- source3/wscript | 15 ++++++++++++++- 14 files changed, 76 insertions(+), 27 deletions(-) Changeset truncated at 500 lines: diff --git a/pidl/idl.yp b/pidl/idl.yp index b5c5185..c8a65f6 100644 --- a/pidl/idl.yp +++ b/pidl/idl.yp @@ -610,7 +610,9 @@ again: for ($parser->YYData->{INPUT}) { if (/^\#/) { - if (s/^\# (\d+) \"(.*?)\"( \d+|)//) { + # Linemarker format is described at + # http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html + if (s/^\# (\d+) \"(.*?)\"(( \d+){1,4}|)//) { $parser->YYData->{LINE} = $1-1; $parser->YYData->{FILE} = $2; goto again; diff --git a/pidl/lib/Parse/Pidl/IDL.pm b/pidl/lib/Parse/Pidl/IDL.pm index d4820ff..6927c89 100644 --- a/pidl/lib/Parse/Pidl/IDL.pm +++ b/pidl/lib/Parse/Pidl/IDL.pm @@ -2576,7 +2576,9 @@ again: for ($parser->YYData->{INPUT}) { if (/^\#/) { - if (s/^\# (\d+) \"(.*?)\"( \d+|)//) { + # Linemarker format is described at + # http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html + if (s/^\# (\d+) \"(.*?)\"(( \d+){1,4}|)//) { $parser->YYData->{LINE} = $1-1; $parser->YYData->{FILE} = $2; goto again; diff --git a/source3/client/client.c b/source3/client/client.c index ab0e77f..49519af 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -1325,8 +1325,17 @@ static NTSTATUS do_mget(struct cli_state *cli_state, struct file_info *finfo, return NT_STATUS_NO_MEMORY; } - status = do_list(mget_mask, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_DIRECTORY,do_mget,false, true); - if (!NT_STATUS_IS_OK(status)) { + status = do_list(mget_mask, + (FILE_ATTRIBUTE_SYSTEM + | FILE_ATTRIBUTE_HIDDEN + | FILE_ATTRIBUTE_DIRECTORY), + do_mget, false, true); + if (!NT_STATUS_IS_OK(status) + && !NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) { + /* + * Ignore access denied errors to ensure all permitted files are + * pulled down. + */ return status; } diff --git a/source3/configure.in b/source3/configure.in index d0c2a48..a4e0763 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -3276,7 +3276,7 @@ if test x"$with_ldap_support" != x"no"; then if test x"$ac_cv_lib_ext_ldap_ldap_init" = x"yes"; then AC_DEFINE(HAVE_LDAP,1,[Whether ldap is available]) CPPFLAGS="$CPPFLAGS -DLDAP_DEPRECATED" - default_static_modules="$default_static_modules pdb_ldap idmap_ldap"; + default_static_modules="$default_static_modules pdb_ldapsam idmap_ldap"; default_shared_modules="$default_shared_modules"; SMBLDAP="lib/smbldap.o" with_ldap_support=yes @@ -6353,13 +6353,18 @@ AC_ARG_WITH(shared-modules, done fi ]) +# additionally, support pdb_ldap -> pdb_ldapsam replacement +if test x"$MODULE_pdb_ldap" != x ; then + MODULE_pdb_ldapsam="$MODULE_pdb_ldap" +fi + if test x"$MODULE_DEFAULT_vfs_notify_fam" = xSTATIC -o \ x"$MODULE_vfs_notify_fam" = xSTATIC ; then SMBD_FAM_LIBS="$SMB_FAM_LIBS" AC_SUBST(SMBD_FAM_LIBS) fi -SMB_MODULE(pdb_ldap, passdb/pdb_ldap.o passdb/pdb_nds.o passdb/pdb_ipa.o passdb/pdb_ldap_util.o, +SMB_MODULE(pdb_ldapsam, passdb/pdb_ldap.o passdb/pdb_nds.o passdb/pdb_ipa.o passdb/pdb_ldap_util.o, "bin/ldapsam.$SHLIBEXT", PDB, [ PASSDB_LIBS="$PASSDB_LIBS $LDAP_LIBS" ] ) SMB_MODULE(pdb_smbpasswd, passdb/pdb_smbpasswd.o, "bin/smbpasswd.$SHLIBEXT", PDB) diff --git a/source3/modules/vfs_afsacl.c b/source3/modules/vfs_afsacl.c index 96521bc..e3e7faf 100644 --- a/source3/modules/vfs_afsacl.c +++ b/source3/modules/vfs_afsacl.c @@ -700,7 +700,8 @@ static size_t afs_fto_nt_acl(struct afs_acl *afs_acl, return 0; } - return afs_to_nt_acl_common(afs_acl, &sbuf, security_info, ppdesc); + return afs_to_nt_acl_common(afs_acl, &sbuf, security_info, + mem_ctx, ppdesc); } static bool mappable_sid(const struct dom_sid *sid) diff --git a/source3/passdb/pdb_ipa.c b/source3/passdb/pdb_ipa.c index d31b37f..a699aab 100644 --- a/source3/passdb/pdb_ipa.c +++ b/source3/passdb/pdb_ipa.c @@ -1446,7 +1446,7 @@ static NTSTATUS pdb_init_IPA_ldapsam(struct pdb_methods **pdb_method, const char struct ldapsam_privates *ldap_state; NTSTATUS status; - status = pdb_init_ldapsam(pdb_method, location); + status = pdb_ldapsam_init_common(pdb_method, location); if (!NT_STATUS_IS_OK(status)) { return status; } diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index ca35ef7..7ae9056 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -6462,7 +6462,8 @@ static NTSTATUS pdb_init_ldapsam_common(struct pdb_methods **pdb_method, const c Initialise the normal mode for pdb_ldap *********************************************************************/ -NTSTATUS pdb_init_ldapsam(struct pdb_methods **pdb_method, const char *location) +NTSTATUS pdb_ldapsam_init_common(struct pdb_methods **pdb_method, + const char *location) { NTSTATUS nt_status; struct ldapsam_privates *ldap_state = NULL; @@ -6611,11 +6612,16 @@ NTSTATUS pdb_init_ldapsam(struct pdb_methods **pdb_method, const char *location) return NT_STATUS_OK; } -NTSTATUS pdb_ldap_init(void) +NTSTATUS pdb_ldapsam_init(void) { NTSTATUS nt_status; - if (!NT_STATUS_IS_OK(nt_status = smb_register_passdb(PASSDB_INTERFACE_VERSION, "ldapsam", pdb_init_ldapsam))) + + nt_status = smb_register_passdb(PASSDB_INTERFACE_VERSION, + "ldapsam", + pdb_ldapsam_init_common); + if (!NT_STATUS_IS_OK(nt_status)) { return nt_status; + } /* Let pdb_nds register backends */ pdb_nds_init(); diff --git a/source3/passdb/pdb_ldap.h b/source3/passdb/pdb_ldap.h index 1372f33..0420314 100644 --- a/source3/passdb/pdb_ldap.h +++ b/source3/passdb/pdb_ldap.h @@ -29,8 +29,8 @@ /* The following definitions come from passdb/pdb_ldap.c */ const char** get_userattr_list( TALLOC_CTX *mem_ctx, int schema_ver ); -NTSTATUS pdb_init_ldapsam(struct pdb_methods **pdb_method, const char *location); -NTSTATUS pdb_ldap_init(void); +NTSTATUS pdb_ldapsam_init_common(struct pdb_methods **pdb_method, const char *location); +NTSTATUS pdb_ldapsam_init(void); int ldapsam_search_suffix_by_name(struct ldapsam_privates *ldap_state, const char *user, LDAPMessage ** result, diff --git a/source3/passdb/pdb_nds.c b/source3/passdb/pdb_nds.c index cce4937..d7c16da 100644 --- a/source3/passdb/pdb_nds.c +++ b/source3/passdb/pdb_nds.c @@ -878,7 +878,7 @@ static NTSTATUS pdb_init_NDS_ldapsam_common(struct pdb_methods **pdb_method, con static NTSTATUS pdb_init_NDS_ldapsam(struct pdb_methods **pdb_method, const char *location) { - NTSTATUS nt_status = pdb_init_ldapsam(pdb_method, location); + NTSTATUS nt_status = pdb_ldapsam_init_common(pdb_method, location); (*pdb_method)->name = "NDS_ldapsam"; diff --git a/source3/passdb/wscript_build b/source3/passdb/wscript_build index 03a0df4..a6620cd 100644 --- a/source3/passdb/wscript_build +++ b/source3/passdb/wscript_build @@ -13,13 +13,13 @@ bld.SAMBA3_MODULE('pdb_tdbsam', internal_module=bld.SAMBA3_IS_STATIC_MODULE('pdb_tdbsam'), enabled=bld.SAMBA3_IS_ENABLED_MODULE('pdb_tdbsam')) -bld.SAMBA3_MODULE('pdb_ldap', +bld.SAMBA3_MODULE('pdb_ldapsam', subsystem='pdb', deps='smbldap smbldaphelper', source=PDB_LDAP_SRC, init_function='', - internal_module=bld.SAMBA3_IS_STATIC_MODULE('pdb_ldap'), - enabled=bld.SAMBA3_IS_ENABLED_MODULE('pdb_ldap') and bld.CONFIG_SET('HAVE_LDAP')) + internal_module=bld.SAMBA3_IS_STATIC_MODULE('pdb_ldapsam'), + enabled=bld.SAMBA3_IS_ENABLED_MODULE('pdb_ldapsam') and bld.CONFIG_SET('HAVE_LDAP')) bld.SAMBA3_MODULE('pdb_smbpasswd', subsystem='pdb', diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index 0d0ebcd..51f55bf 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -155,6 +155,7 @@ NTSTATUS smbd_do_qfsinfo(connection_struct *conn, uint16_t info_level, uint16_t flags2, unsigned int max_data_bytes, + struct smb_filename *smb_fname, char **ppdata, int *ret_data_len); diff --git a/source3/smbd/smb2_getinfo.c b/source3/smbd/smb2_getinfo.c index 33cee99..5616c84 100644 --- a/source3/smbd/smb2_getinfo.c +++ b/source3/smbd/smb2_getinfo.c @@ -413,6 +413,7 @@ static struct tevent_req *smbd_smb2_getinfo_send(TALLOC_CTX *mem_ctx, file_info_level, STR_UNICODE, in_output_buffer_length, + fsp->fsp_name, &data, &data_size); if (!NT_STATUS_IS_OK(status)) { diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 27ff550..6f3dc4e 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -3020,6 +3020,7 @@ NTSTATUS smbd_do_qfsinfo(connection_struct *conn, uint16_t info_level, uint16_t flags2, unsigned int max_data_bytes, + struct smb_filename *fname, char **ppdata, int *ret_data_len) { @@ -3028,10 +3029,17 @@ NTSTATUS smbd_do_qfsinfo(connection_struct *conn, const char *vname = volume_label(talloc_tos(), SNUM(conn)); int snum = SNUM(conn); char *fstype = lp_fstype(talloc_tos(), SNUM(conn)); + char *filename = NULL; uint32 additional_flags = 0; - struct smb_filename smb_fname_dot; + struct smb_filename smb_fname; SMB_STRUCT_STAT st; + if (fname == NULL || fname->base_name == NULL) { + filename = "."; + } else { + filename = fname->base_name; + } + if (IS_IPC(conn)) { if (info_level != SMB_QUERY_CIFS_UNIX_INFO) { DEBUG(0,("smbd_do_qfsinfo: not an allowed " @@ -3043,15 +3051,15 @@ NTSTATUS smbd_do_qfsinfo(connection_struct *conn, DEBUG(3,("smbd_do_qfsinfo: level = %d\n", info_level)); - ZERO_STRUCT(smb_fname_dot); - smb_fname_dot.base_name = discard_const_p(char, "."); + ZERO_STRUCT(smb_fname); + smb_fname.base_name = discard_const_p(char, filename); - if(SMB_VFS_STAT(conn, &smb_fname_dot) != 0) { + if(SMB_VFS_STAT(conn, &smb_fname) != 0) { DEBUG(2,("stat of . failed (%s)\n", strerror(errno))); return map_nt_error_from_unix(errno); } - st = smb_fname_dot.st; + st = smb_fname.st; *ppdata = (char *)SMB_REALLOC( *ppdata, max_data_bytes + DIR_ENTRY_SAFETY_MARGIN); @@ -3068,7 +3076,7 @@ NTSTATUS smbd_do_qfsinfo(connection_struct *conn, { uint64_t dfree,dsize,bsize,block_size,sectors_per_unit,bytes_per_sector; data_len = 18; - if (get_dfree_info(conn,".",False,&bsize,&dfree,&dsize) == (uint64_t)-1) { + if (get_dfree_info(conn,filename,False,&bsize,&dfree,&dsize) == (uint64_t)-1) { return map_nt_error_from_unix(errno); } @@ -3192,7 +3200,7 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)st.st_ex_dev, (u { uint64_t dfree,dsize,bsize,block_size,sectors_per_unit,bytes_per_sector; data_len = 24; - if (get_dfree_info(conn,".",False,&bsize,&dfree,&dsize) == (uint64_t)-1) { + if (get_dfree_info(conn,filename,False,&bsize,&dfree,&dsize) == (uint64_t)-1) { return map_nt_error_from_unix(errno); } block_size = lp_block_size(snum); @@ -3224,7 +3232,7 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned { uint64_t dfree,dsize,bsize,block_size,sectors_per_unit,bytes_per_sector; data_len = 32; - if (get_dfree_info(conn,".",False,&bsize,&dfree,&dsize) == (uint64_t)-1) { + if (get_dfree_info(conn,filename,False,&bsize,&dfree,&dsize) == (uint64_t)-1) { return map_nt_error_from_unix(errno); } block_size = lp_block_size(snum); @@ -3417,7 +3425,7 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned return NT_STATUS_INVALID_LEVEL; } - rc = SMB_VFS_STATVFS(conn, ".", &svfs); + rc = SMB_VFS_STATVFS(conn, filename, &svfs); if (!rc) { data_len = 56; @@ -3597,6 +3605,7 @@ static void call_trans2qfsinfo(connection_struct *conn, info_level, req->flags2, max_data_bytes, + NULL, ppdata, &data_len); if (!NT_STATUS_IS_OK(status)) { reply_nterror(req, status); diff --git a/source3/wscript b/source3/wscript index 097cd83..194d712 100644 --- a/source3/wscript +++ b/source3/wscript @@ -1734,7 +1734,7 @@ main() { default_shared_modules.extend(TO_LIST('vfs_aio_linux')) if conf.CONFIG_SET('HAVE_LDAP'): - default_static_modules.extend(TO_LIST('pdb_ldap idmap_ldap')) + default_static_modules.extend(TO_LIST('pdb_ldapsam idmap_ldap')) if conf.CONFIG_SET('DARWINOS'): default_static_modules.extend(TO_LIST('charset_macosxfs')) @@ -1745,6 +1745,19 @@ main() { explicit_shared_modules = TO_LIST(Options.options.shared_modules, delimiter=',') explicit_static_modules = TO_LIST(Options.options.static_modules, delimiter=',') + def replace_list_item(lst, item, value): + try: + idx = lst.index(item) + lst[idx] = value + except: + pass + # PDB module file name should have the same name as module registers itself + # In Autoconf build we export LDAP passdb module as ldapsam but WAF build + # was always exporting pdb_ldap. In order to support existing packages + # allow referring to pdb_ldapsam as pdb_ldap but use proper name internally. + replace_list_item(explicit_shared_modules, 'pdb_ldap', 'pdb_ldapsam') + replace_list_item(explicit_static_modules, 'pdb_ldap', 'pdb_ldapsam') + final_static_modules = default_static_modules final_shared_modules = default_shared_modules -- Samba Shared Repository