diff --git a/samba.spec b/samba.spec index 456feb2..2e9c27d 100644 --- a/samba.spec +++ b/samba.spec @@ -2,7 +2,7 @@ Summary: The Samba Suite of programs Name: samba Epoch: 0 Version: 3.0.25c -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ and LGPLv2+ Group: System Environment/Daemons URL: http://www.samba.org/ @@ -42,6 +42,7 @@ Patch110: samba-3.0.21pre1-smbspool.patch Patch111: samba-3.0.13-smbclient.patch Patch200: samba-3.0.25rc1-inotifiy.patch Patch210: samba-3.0.25-imdap-basedn.patch +Patch300: samba3-glibc-open.patch Requires(pre): samba-common = %{epoch}:%{version}-%{release} @@ -51,7 +52,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires(post): /sbin/chkconfig, /sbin/service Requires(preun): /sbin/chkconfig, /sbin/service BuildRequires: pam-devel, readline-devel, ncurses-devel, libacl-devel, krb5-devel, openldap-devel, openssl-devel, cups-devel -BuildRequires: autoconf +BuildRequires: autoconf, gawk # Working around perl dependency problem from docs %define __perl_requires %{SOURCE999} @@ -160,6 +161,7 @@ cp %{SOURCE11} packaging/Fedora/ %patch111 -p1 -b .smbclient %patch200 -p0 -b .inotify %patch210 -p1 -b .idmap_basedn +%patch300 -p0 -b .glibc_open # crap rm -f examples/VFS/.cvsignore @@ -642,6 +644,9 @@ exit 0 #%{_includedir}/libmsrpc.h %changelog +* Tue Aug 21 2007 Simo Sorce 3.0.25c-3.fc8 +- fix a few places were "open" is used an interfere with the new glibc + * Tue Aug 21 2007 Simo Sorce 3.0.25c-2.fc8 - remove old source - add patch to fix samba bugzilla 4772 diff --git a/samba3-glibc-open.patch b/samba3-glibc-open.patch new file mode 100644 index 0000000..f6d6ae7 --- /dev/null +++ b/samba3-glibc-open.patch @@ -0,0 +1,69 @@ +--- source/include/vfs_macros.h 2007-03-20 18:25:39.000000000 -0400 ++++ source/include/vfs_macros.h.new 2007-08-21 10:53:19.000000000 -0400 +@@ -47,7 +47,7 @@ + #define SMB_VFS_CLOSEDIR(conn, dir) ((conn)->vfs.ops.closedir((conn)->vfs.handles.closedir, dir)) + + /* File operations */ +-#define SMB_VFS_OPEN(conn, fname, fsp, flags, mode) ((conn)->vfs.ops.open((conn)->vfs.handles.open, (fname), (fsp), (flags), (mode))) ++#define SMB_VFS_OPEN(conn, fname, fsp, flags, mode) (((conn)->vfs.ops.open)((conn)->vfs.handles.open, (fname), (fsp), (flags), (mode))) + #define SMB_VFS_CLOSE(fsp, fd) ((fsp)->conn->vfs.ops.close_fn((fsp)->conn->vfs.handles.close_hnd, (fsp), (fd))) + #define SMB_VFS_READ(fsp, fd, data, n) ((fsp)->conn->vfs.ops.read((fsp)->conn->vfs.handles.read, (fsp), (fd), (data), (n))) + #define SMB_VFS_PREAD(fsp, fd, data, n, off) ((fsp)->conn->vfs.ops.pread((fsp)->conn->vfs.handles.pread, (fsp), (fd), (data), (n), (off))) +@@ -163,7 +163,7 @@ + #define SMB_VFS_OPAQUE_CLOSEDIR(conn, dir) ((conn)->vfs_opaque.ops.closedir((conn)->vfs_opaque.handles.closedir, dir)) + + /* File operations */ +-#define SMB_VFS_OPAQUE_OPEN(conn, fname, fsp, flags, mode) ((conn)->vfs_opaque.ops.open((conn)->vfs_opaque.handles.open, (fname), (fsp), (flags), (mode))) ++#define SMB_VFS_OPAQUE_OPEN(conn, fname, fsp, flags, mode) (((conn)->vfs_opaque.ops.open)((conn)->vfs_opaque.handles.open, (fname), (fsp), (flags), (mode))) + #define SMB_VFS_OPAQUE_CLOSE(fsp, fd) ((fsp)->conn->vfs_opaque.ops.close_fn((fsp)->conn->vfs_opaque.handles.close_hnd, (fsp), (fd))) + #define SMB_VFS_OPAQUE_READ(fsp, fd, data, n) ((fsp)->conn->vfs_opaque.ops.read((fsp)->conn->vfs_opaque.handles.read, (fsp), (fd), (data), (n))) + #define SMB_VFS_OPAQUE_PREAD(fsp, fd, data, n, off) ((fsp)->conn->vfs_opaque.ops.pread((fsp)->conn->vfs_opaque.handles.pread, (fsp), (fd), (data), (n), (off))) +@@ -280,7 +280,7 @@ + #define SMB_VFS_NEXT_CLOSEDIR(handle, dir) ((handle)->vfs_next.ops.closedir((handle)->vfs_next.handles.closedir, dir)) + + /* File operations */ +-#define SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode) ((handle)->vfs_next.ops.open((handle)->vfs_next.handles.open, (fname), (fsp), (flags), (mode))) ++#define SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode) (((handle)->vfs_next.ops.open)((handle)->vfs_next.handles.open, (fname), (fsp), (flags), (mode))) + #define SMB_VFS_NEXT_CLOSE(handle, fsp, fd) ((handle)->vfs_next.ops.close_fn((handle)->vfs_next.handles.close_hnd, (fsp), (fd))) + #define SMB_VFS_NEXT_READ(handle, fsp, fd, data, n) ((handle)->vfs_next.ops.read((handle)->vfs_next.handles.read, (fsp), (fd), (data), (n))) + #define SMB_VFS_NEXT_PREAD(handle, fsp, fd, data, n, off) ((handle)->vfs_next.ops.pread((handle)->vfs_next.handles.pread, (fsp), (fd), (data), (n), (off))) +--- source/libsmb/libsmbclient.c 2007-08-20 09:04:50.000000000 -0400 ++++ source/libsmb/libsmbclient.c.new 2007-08-21 12:54:57.000000000 -0400 +@@ -6002,7 +6002,7 @@ + + /* What if the path is empty, or the file exists? */ + +- return context->open(context, fname, O_WRONLY, 666); ++ return (context->open)(context, fname, O_WRONLY, 666); + + } + +@@ -6043,7 +6043,7 @@ + + /* Try to open the file for reading ... */ + +- if ((long)(fid1 = c_file->open(c_file, fname, O_RDONLY, 0666)) < 0) { ++ if ((long)(fid1 = (c_file->open)(c_file, fname, O_RDONLY, 0666)) < 0) { + + DEBUG(3, ("Error, fname=%s, errno=%i\n", fname, errno)); + return -1; /* smbc_open sets errno */ +@@ -6269,7 +6269,7 @@ + context->internal->_share_mode = SMBC_SHAREMODE_DENY_NONE; + /* backward compat */ + +- context->open = smbc_open_ctx; ++ context->open = smbc_open_ctx; + context->creat = smbc_creat_ctx; + context->read = smbc_read_ctx; + context->write = smbc_write_ctx; +--- source/libsmb/libsmb_compat.c 2006-06-23 09:16:51.000000000 -0400 ++++ source/libsmb/libsmb_compat.c.new 2007-08-21 15:40:29.000000000 -0400 +@@ -157,7 +157,7 @@ + SMBCFILE * file; + int fd; + +- file = statcont->open(statcont, furl, flags, mode); ++ file = (statcont->open)(statcont, furl, flags, mode); + if (!file) + return -1; +