The branch, v3-6-test has been updated via 1e67bf4 s3:vfs:shadow_copy2: fix indentation in _SHADOW2_NEXT_SMB_FNAME via 091f5b1 s3:vfs:shadow_copy2: Fix shadow-copy module for drag&drop from a snapshot via 05e0002 s3:registry correct a debug level via fa5089c s3:winbind: Protect against invalid winbindd_cache entries in lookuprids via f2922ac s3-net: add roundtrip tests for registry import/export via ee22922 packaging(RHEL-CTDB): explicitly build the tsm vfs module. via 435d15c s3: Fix the code to immediately disconnect from a non-working ctdbd via 013eb30 s3:vfs:gpfs: fix logic when gpfs:winattr is false (the default!) from 404a403 s3-spoolss: make it more obvious what winreg_create_printer() does.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log ----------------------------------------------------------------- commit 1e67bf44e2b7882edcd932a8cce0365d520b1804 Author: Michael Adam <ob...@samba.org> Date: Fri Jan 21 09:46:42 2011 +0100 s3:vfs:shadow_copy2: fix indentation in _SHADOW2_NEXT_SMB_FNAME Autobuild-User: Michael Adam <ob...@samba.org> Autobuild-Date: Fri Jan 21 10:57:45 CET 2011 on sn-devel-104 commit 091f5b199ec145561ee5840903c73a26d14e3319 Author: Volker Lendecke <v...@samba.org> Date: Thu Dec 16 04:26:02 2010 -0700 s3:vfs:shadow_copy2: Fix shadow-copy module for drag&drop from a snapshot We have to return NT_STATUS_NOT_SAME_DEVICE to trigger the Windows client to start a copy itself. Unbeknownst to us via the ACLs snapshots are read-only, so a rename would trigger a EACCES. Unfortunately the MacOS/X finder does not do the smart NOT_SAME_DEVICE fallback that Windows does. commit 05e0002b9d2140a57f8edb2c9341ec62b5e19999 Author: Christian Ambach <christian.amb...@de.ibm.com> Date: Thu Dec 9 11:25:17 2010 +0100 s3:registry correct a debug level this is not a level 0 message, move it to 10 commit fa5089cfe589b3e575cf55597d5ea0f7e036c824 Author: Volker Lendecke <v...@samba.org> Date: Tue Nov 23 14:49:12 2010 +0100 s3:winbind: Protect against invalid winbindd_cache entries in lookuprids commit f2922ace5be4f91c4c6d394da6f1d0cb1a32b9b8 Author: Gregor Beck <gb...@sernet.de> Date: Wed Sep 29 15:13:55 2010 +0200 s3-net: add roundtrip tests for registry import/export commit ee2292227a5e849497206971c9013521e62bb05d Author: Volker Lendecke <v...@samba.org> Date: Mon Mar 8 17:59:35 2010 +0100 packaging(RHEL-CTDB): explicitly build the tsm vfs module. commit 435d15c02e924627410675871d76c073d762e22f Author: Volker Lendecke <v...@samba.org> Date: Thu Dec 3 01:55:52 2009 +0100 s3: Fix the code to immediately disconnect from a non-working ctdbd commit 013eb30421c58431f3b25a0b4655f86d1dce140f Author: Rusty Russell <ru...@rustcorp.com.au> Date: Fri Nov 20 10:39:57 2009 +0100 s3:vfs:gpfs: fix logic when gpfs:winattr is false (the default!) On my autocluster setup, it's not set. Maybe it should be? Otherwise smbclient and some Windows client programs will get errors like: # smbclient //localhost/data -Uadministrator%XXX Domain=[VSOFS1] OS=[Unix] Server=[Samba 3.4.2-ctdb-10] smb: \> put /etc/resolv.conf resolv.conf NT_STATUS_ACCESS_DENIED closing remote file \resolv.conf smb: \> Caused by attempting to update the time on close. Signed-off-by: Rusty Russell <ru...@rustcorp.com.au> Signed-off-by: Michael Adam <ob...@samba.org> ----------------------------------------------------------------------- Summary of changes: packaging/RHEL-CTDB/samba.spec.tmpl | 2 +- source3/lib/ctdbd_conn.c | 1 + source3/modules/vfs_gpfs.c | 12 ++++- source3/modules/vfs_shadow_copy2.c | 8 ++- source3/registry/reg_parse.c | 2 +- source3/script/tests/test_net_registry.sh | 88 +++++++++++++++++++++++++++++ source3/winbindd/winbindd_cache.c | 3 +- 7 files changed, 110 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/packaging/RHEL-CTDB/samba.spec.tmpl b/packaging/RHEL-CTDB/samba.spec.tmpl index 475adcb..f27635a 100644 --- a/packaging/RHEL-CTDB/samba.spec.tmpl +++ b/packaging/RHEL-CTDB/samba.spec.tmpl @@ -245,7 +245,7 @@ CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./configure \ --without-smbwrapper \ --with-pam \ --with-quotas \ - --with-shared-modules=idmap_rid,idmap_ad,idmap_tdb2,vfs_gpfs \ + --with-shared-modules=idmap_rid,idmap_ad,idmap_tdb2,vfs_gpfs,vfs_tsmsm \ --with-syslog \ --with-utmp \ --with-cluster-support \ diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index dee477f..d201693 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -515,6 +515,7 @@ static NTSTATUS ctdbd_init_connection(TALLOC_CTX *mem_ctx, if (!ctdbd_working(conn, conn->our_vnn)) { DEBUG(2, ("Node is not working, can not connect\n")); + status = NT_STATUS_INTERNAL_DB_ERROR; goto fail; } diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index ffe51c3..bc634b1 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -991,6 +991,11 @@ static int gpfs_set_xattr(struct vfs_handle_struct *handle, const char *path, ret = set_gpfs_winattrs(CONST_DISCARD(char *, path), GPFS_WINATTR_SET_ATTRS, &attrs); if ( ret == -1){ + if (errno == ENOSYS) { + return SMB_VFS_NEXT_SETXATTR(handle, path, name, value, + size, flags); + } + DEBUG(1, ("gpfs_set_xattr:Set GPFS attributes failed %d\n",ret)); return -1; } @@ -1016,6 +1021,11 @@ static ssize_t gpfs_get_xattr(struct vfs_handle_struct *handle, const char *pat ret = get_gpfs_winattrs(CONST_DISCARD(char *, path), &attrs); if ( ret == -1){ + if (errno == ENOSYS) { + return SMB_VFS_NEXT_GETXATTR(handle, path, name, value, + size); + } + DEBUG(1, ("gpfs_get_xattr: Get GPFS attributes failed: %d\n",ret)); return -1; } @@ -1150,7 +1160,7 @@ static int vfs_gpfs_ntimes(struct vfs_handle_struct *handle, ret = set_gpfs_winattrs(CONST_DISCARD(char *, path), GPFS_WINATTR_SET_CREATION_TIME, &attrs); - if(ret == -1){ + if(ret == -1 && errno != ENOSYS){ DEBUG(1,("vfs_gpfs_ntimes: set GPFS ntimes failed %d\n",ret)); return -1; } diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index 0393f30..2777907 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -250,8 +250,8 @@ static const char *shadow_copy2_normalise_path(TALLOC_CTX *mem_ctx, const char * } while (0) #define _SHADOW2_NEXT_SMB_FNAME(op, args, rtype, eret, extra) do { \ - const char *gmt_start; \ - if (shadow_copy2_match_name(smb_fname->base_name, &gmt_start)) { \ + const char *gmt_start; \ + if (shadow_copy2_match_name(smb_fname->base_name, &gmt_start)) { \ char *name2; \ char *smb_base_name_tmp = NULL; \ rtype ret; \ @@ -535,6 +535,10 @@ static int shadow_copy2_rename(vfs_handle_struct *handle, const struct smb_filename *smb_fname_src, const struct smb_filename *smb_fname_dst) { + if (shadow_copy2_match_name(smb_fname_src->base_name, NULL)) { + errno = EXDEV; + return -1; + } SHADOW2_NEXT2_SMB_FNAME(RENAME, (handle, smb_fname_src, smb_fname_dst)); } diff --git a/source3/registry/reg_parse.c b/source3/registry/reg_parse.c index 98704ec..b76bcfe 100644 --- a/source3/registry/reg_parse.c +++ b/source3/registry/reg_parse.c @@ -861,7 +861,7 @@ int reg_parse_fd(int fd, const struct reg_parse_callback* cb, const char* opts) goto done; } - DEBUG(0, ("reg_parse_fd: encoding file: %s str: %s\n", + DEBUG(10, ("reg_parse_fd: encoding file: %s str: %s\n", opt.file_enc, opt.str_enc)); diff --git a/source3/script/tests/test_net_registry.sh b/source3/script/tests/test_net_registry.sh index 0d5916e..525e13a 100755 --- a/source3/script/tests/test_net_registry.sh +++ b/source3/script/tests/test_net_registry.sh @@ -345,6 +345,93 @@ take_administrative_rights() fi } +SED_INVALID_PARAMS="{ +s/lock directory/;&/g +s/modules dir/;&/g +s/logging/;&/g +s/status/;&/g +s/logdir/;&/g +s/read prediction/;&/g +s/mkprofile/;&/g +s/valid chars/;&/g +s/timesync/;&/g +s/sambaconf/;&/g +s/logtype/;&/g +s/servername/;&/g +}" + +REGPATH="HKLM\Software\Samba" + +conf_roundtrip_step() { + echo $* >>$LOG + $@ 2>>$LOG +# echo -n . +} + +conf_roundtrip() +{ + local DIR=$(mktemp -d --tmpdir=$PREFIX conf_roundtrip_XXXX) + local LOG=$DIR/log + + echo conf_roundtrip $1 > $LOG + + sed -e "$SED_INVALID_PARAMS" $1 >$DIR/conf_in + + conf_roundtrip_step $NET conf drop + test -z "$($NET conf list)" 2>>$LOG + if [ "$?" = "1" ]; then + echo "ERROR: conf drop failed" | tee -a $LOG + return 1 + fi + + conf_roundtrip_step $NET conf import $DIR/conf_in + conf_roundtrip_step $NET conf list > $DIR/conf_exp + + grep "\[global\]" $DIR/conf_exp >/dev/null 2>>$LOG + if [ "$?" = "1" ]; then + echo "ERROR: conf import => conf export failed" | tee -a $LOG + return 1 + fi + + conf_roundtrip_step $NET -d10 registry export $REGPATH $DIR/conf_exp.reg + + conf_roundtrip_step $NET conf drop + test -z "$($NET conf list)" 2>>$LOG + if [ "$?" = "1" ]; then + echo "ERROR: conf drop failed" | tee -a $LOG + return 1 + fi + + conf_roundtrip_step $NET registry import $DIR/conf_exp.reg + + conf_roundtrip_step $NET conf list >$DIR/conf_out + diff -q $DIR/conf_out $DIR/conf_exp >> $LOG + if [ "$?" = "1" ]; then + echo "ERROR: registry import => conf export failed" | tee -a $LOG + return 1 + fi + + conf_roundtrip_step $NET registry export $REGPATH $DIR/conf_out.reg + diff -q $DIR/conf_out.reg $DIR/conf_exp.reg >>$LOG + if [ "$?" = "1" ]; then + echo "Error: registry import => registry export failed" | tee -a $LOG + return 1 + fi + rm -r $DIR +} + +CONF_FILES=${CONF_FILES:-$(find $SRCDIR/.. -name *.conf | xargs grep -l "\[global\]")} + +for conf_file in $CONF_FILES +do + conf_file=${conf_file#$SRCDIR/} + testit "conf_roundtrip $conf_file" \ + conf_roundtrip $conf_file \ + || failed=`expr $failed + 1` +done + + + if test "x${RPC}" = "xrpc" ; then testit "giving user ${USERNAME} administrative rights" \ give_administrative_rights @@ -439,5 +526,6 @@ testit "taking administrative rights from user ${USERNAME}" \ failed=`expr $failed + 1` fi + testok $0 $failed diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c index 37291a7..832e8ef 100644 --- a/source3/winbindd/winbindd_cache.c +++ b/source3/winbindd/winbindd_cache.c @@ -2042,7 +2042,8 @@ static NTSTATUS rids_to_names(struct winbindd_domain *domain, (*names)[i] = centry_string(centry, *names); - } else if (NT_STATUS_EQUAL(centry->status, NT_STATUS_NONE_MAPPED)) { + } else if (NT_STATUS_EQUAL(centry->status, NT_STATUS_NONE_MAPPED) + || NT_STATUS_EQUAL(centry->status, STATUS_SOME_UNMAPPED)) { have_unmapped = true; } else { -- Samba Shared Repository