[SCM] Samba Shared Repository - branch v3-5-test updated

Jeremy Allison jra at samba.org
Fri Oct 16 17:40:57 MDT 2009


The branch, v3-5-test has been updated
       via  9180559... Fix one missing STAT -> LSTAT with POSIX pathnames in vfs_xattr_tdb.c. Caught by the torture tester. I love unit tests :-). Jeremy.
       via  bf68418... s3: build pam_smbpass when possible
      from  f2b9430... nsswitch: increase libwbclient version after adding wbcChangeTrustCredentials().

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test


- Log -----------------------------------------------------------------
commit 9180559b4ab26813699d3c1410b3fc1b775b0e1d
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 16 16:37:20 2009 -0700

    Fix one missing STAT -> LSTAT with POSIX pathnames in vfs_xattr_tdb.c. Caught by the torture tester. I love unit tests :-). Jeremy.

commit bf684180b0bdc93438ab86b102e5883d70bcea6a
Author: Björn Jacke <bj at sernet.de>
Date:   Fri Oct 16 23:40:34 2009 +0200

    s3: build pam_smbpass when possible

-----------------------------------------------------------------------

Summary of changes:
 source3/configure.in                      |   54 ++++++++++++++++++-----------
 source3/modules/vfs_xattr_tdb.c           |    8 ++++-
 source3/script/tests/test_smbclient_s3.sh |    2 +
 3 files changed, 43 insertions(+), 21 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index e07d022..0599864 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -4221,31 +4221,45 @@ fi # try_pam != no
 PAM_MODULES=""
 INSTALL_PAM_MODULES=""
 UNINSTALL_PAM_MODULES=""
+
+try_pam_smbpass=auto
 AC_MSG_CHECKING(whether to use pam_smbpass)
 AC_ARG_WITH(pam_smbpass,
-[AS_HELP_STRING([--with-pam_smbpass], [Build PAM module for authenticating against passdb backends (default=no)])],
+[AS_HELP_STRING([--with-pam_smbpass], [Build PAM module for authenticating against passdb backends (default=auto)])],
 [ case "$withval" in
-  yes)
-    AC_MSG_RESULT(yes)
+  yes|no|auto)
+    try_pam_smbpass=$withval
+  ;;
+  *)
+    AC_MSG_ERROR([valid options are yes,no,auto])
+  ;;
+  esac
+])
 
-       # Conditions under which pam_smbpass should not be built.
+if test x"${try_pam_smbpass}" = xno ; then
+	use_pam_smbpass=no
+else
+	use_pam_smbpass=yes
+	# Conditions under which pam_smbpass can't be built.
+	if test x"$BLDSHARED" != xtrue ; then
+		if test x"${try_pam_smbpass}" = xyes ; then
+			AC_MSG_ERROR([No support for shared modules])
+		fi
+		use_pam_smbpass=no
+	elif test x"$create_pam_modules" != xyes ; then
+		if test x"${try_pam_smbpass}" = xyes ; then
+			AC_MSG_ERROR([No support for PAM MODULES])
+		fi
+		use_pam_smbpass=no
+	fi
 
-       if test x"$BLDSHARED" != x"true"; then
-          AC_MSG_ERROR([No support for shared modules])
-       elif test x"$create_pam_modules" != x"yes"; then
-	  AC_MSG_ERROR([No support for PAM MODULES])
-       else
-          PAM_MODULES="pam_smbpass"
-          INSTALL_PAM_MODULES="installpammodules"
-          UNINSTALL_PAM_MODULES="uninstallpammodules"
-       fi
-    ;;
-  *)
-    AC_MSG_RESULT(no)
-    ;;
-  esac ],
-  AC_MSG_RESULT(no)
-)
+	if test x"${use_pam_smbpass}" = xyes ; then 
+		PAM_MODULES="pam_smbpass"
+		INSTALL_PAM_MODULES="installpammodules"
+		UNINSTALL_PAM_MODULES="uninstallpammodules"
+	fi
+fi
+AC_MSG_RESULT([$use_pam_smbpass])
 
 
 ##
diff --git a/source3/modules/vfs_xattr_tdb.c b/source3/modules/vfs_xattr_tdb.c
index 55fb141..f7fbfce 100644
--- a/source3/modules/vfs_xattr_tdb.c
+++ b/source3/modules/vfs_xattr_tdb.c
@@ -630,9 +630,15 @@ static int xattr_tdb_unlink(vfs_handle_struct *handle,
 		return -1;
 	}
 
-	if (SMB_VFS_STAT(handle->conn, smb_fname_tmp) == -1) {
+	if (lp_posix_pathnames()) {
+		ret = SMB_VFS_LSTAT(handle->conn, smb_fname_tmp);
+	} else {
+		ret = SMB_VFS_STAT(handle->conn, smb_fname_tmp);
+	}
+	if (ret == -1) {
 		goto out;
 	}
+
 	if (smb_fname_tmp->st.st_ex_nlink == 1) {
 		/* Only remove record on last link to file. */
 		remove_record = true;
diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh
index b0199a3..f10bfea 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -94,6 +94,7 @@ test_bad_symlink()
 
     cat > $tmpfile <<EOF
 posix
+posix_unlink newname
 symlink badname newname
 posix_unlink newname
 quit
@@ -118,6 +119,7 @@ EOF
 	# got the correct prompt .. succeed
 	true
     else
+	echo "$out"
 	echo failed create then delete bad symlink
 	false
     fi


-- 
Samba Shared Repository


More information about the samba-cvs mailing list