[SCM] Samba Shared Repository - branch master updated
Björn Jacke
bjacke at samba.org
Sun Jun 10 15:30:03 MDT 2012
The branch, master has been updated
via 527fdb2 s3/test: make dd call more portable
via 2fb4c55 s4/pvfs: handle non-POSIX compliant Tru64, NetBSD and FreeBSD errno on O_NOFOLLOW symlink open calls
via f97ca7d s3: fix build on systems without O_NOFOLLOW
from bff935b wafsamba: try to fix the build on AIX with xlc_r
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 527fdb2659dc04dafe7c34786e77c2fa4ea9ad5e
Author: Björn Jacke <bj at sernet.de>
Date: Sun Jun 10 21:32:55 2012 +0200
s3/test: make dd call more portable
using multiplicative suffixes like K, M etc. in dd isn't portable
Autobuild-User(master): Björn Jacke <bj at sernet.de>
Autobuild-Date(master): Sun Jun 10 23:29:42 CEST 2012 on sn-devel-104
commit 2fb4c551e8a87cbdfff014a8c9c4ebd6f138d01e
Author: Björn Jacke <bj at sernet.de>
Date: Sun Jun 10 20:17:44 2012 +0200
s4/pvfs: handle non-POSIX compliant Tru64, NetBSD and FreeBSD errno on O_NOFOLLOW symlink open calls
see also f75f1d62339f0accb4e574645b1d265c75a01b5b
commit f97ca7d64318343eb1fd2ed3d8248c6560166fb4
Author: Björn Jacke <bj at sernet.de>
Date: Sun Jun 10 20:00:03 2012 +0200
s3: fix build on systems without O_NOFOLLOW
-----------------------------------------------------------------------
Summary of changes:
source3/script/tests/test_smbclient_posix_large.sh | 2 +-
source3/smbd/open.c | 2 +-
source4/ntvfs/posix/pvfs_sys.c | 23 +++++++++++++++++++-
3 files changed, 24 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/script/tests/test_smbclient_posix_large.sh b/source3/script/tests/test_smbclient_posix_large.sh
index a5fdbba..0aee7af 100755
--- a/source3/script/tests/test_smbclient_posix_large.sh
+++ b/source3/script/tests/test_smbclient_posix_large.sh
@@ -49,7 +49,7 @@ EOF
}
rm -f $PREFIX/largefile
-dd if=/dev/zero of=$PREFIX/largefile skip=20M count=1 bs=1
+dd if=/dev/zero of=$PREFIX/largefile skip=$((20*1024*1024)) count=1 bs=1
incdir=`dirname $0`/../../../testprogs/blackbox
. $incdir/subunit.sh
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index cb43dd2..189614a 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -291,8 +291,8 @@ static NTSTATUS fd_open(struct connection_struct *conn,
fsp->fh->fd = SMB_VFS_OPEN(conn, smb_fname, fsp, flags, mode);
if (fsp->fh->fd == -1) {
-#ifdef O_NOFOLLOW
int posix_errno = errno;
+#ifdef O_NOFOLLOW
#if defined(ENOTSUP) && defined(OSF1)
/* handle special Tru64 errno */
if (errno == ENOTSUP) {
diff --git a/source4/ntvfs/posix/pvfs_sys.c b/source4/ntvfs/posix/pvfs_sys.c
index 9112848..5775d0b 100644
--- a/source4/ntvfs/posix/pvfs_sys.c
+++ b/source4/ntvfs/posix/pvfs_sys.c
@@ -405,11 +405,32 @@ int pvfs_sys_unlink(struct pvfs_state *pvfs, const char *filename, bool allow_ov
static bool contains_symlink(const char *path)
{
int fd = open(path, PVFS_NOFOLLOW | O_RDONLY);
+ int posix_errno = errno;
if (fd != -1) {
close(fd);
return false;
}
- return (errno == ELOOP);
+
+#if defined(ENOTSUP) && defined(OSF1)
+ /* handle special Tru64 errno */
+ if (errno == ENOTSUP) {
+ posix_errno = ELOOP;
+ }
+#endif /* ENOTSUP */
+
+#ifdef EFTYPE
+ /* fix broken NetBSD errno */
+ if (errno == EFTYPE) {
+ posix_errno = ELOOP;
+ }
+#endif /* EFTYPE */
+
+ /* fix broken FreeBSD errno */
+ if (errno == EMLINK) {
+ posix_errno = ELOOP;
+ }
+
+ return (posix_errno == ELOOP);
}
/*
--
Samba Shared Repository
More information about the samba-cvs
mailing list