Andreas Schott
2003-Feb-14 03:01 UTC
problems with _LARGE_FILES on AIX 5.1 with 32-bit kernel
Dear rsync-developers, on AIX5.1 with 32-bit kernel one can have large-file support. rsync in principle supports it correctly since the flag _LARGE_FILES is treated correctly in the /usr/include/*.h But there is one point missing, the mkstemp is not opening a large file. So syncing large files crash after 2GB. To avoid this one could either put a #ifdef _LARGE_FILES #undef HAVE_SECURE_MKSTEMP #endif at the beginning of syscall.c or in rsync.h, or one could add a &&!defined(_LARGE_FILES) in line 154 of syscall.c Best configure would not define HAVE_SECURE_MKSTEMP if _LARGE_FILES is defined, because mkstemp is not secure for large files. There is no mkstemp64. I did not check, whether with a 64-bit-kernel the mkstemp works properly, since I have no access to a machine running AIX5.1 in 64-bit kernel-mode. For replies, pleas reply directly, since I am not on the list. With kind regards Andreas Schott. ---------------------------------------------------------------- http://www.rzg.mpg.de/~ays | :-O Wissen ist Macht! email: schott@rzg.mpg.de | 8-( Ich wei? nichts. phone/fax: +49 89 3299-2180/1301 | ;-> Macht auch nichts.
On Thu, Feb 13, 2003 at 05:01:58PM +0100, Andreas Schott wrote:> Dear rsync-developers, > > on AIX5.1 with 32-bit kernel one can have large-file support. > rsync in principle supports it correctly since the flag > _LARGE_FILES is treated correctly in the /usr/include/*.h > But there is one point missing, the mkstemp is not opening > a large file. So syncing large files crash after 2GB. > To avoid this one could either put a > > #ifdef _LARGE_FILES > #undef HAVE_SECURE_MKSTEMP > #endif > > at the beginning of syscall.c or in rsync.h, or one could add a > > &&!defined(_LARGE_FILES) > > in line 154 of syscall.c > > Best configure would not define HAVE_SECURE_MKSTEMP if > _LARGE_FILES is defined, because mkstemp is not secure > for large files. There is no mkstemp64. > > I did not check, whether with a 64-bit-kernel the mkstemp > works properly, since I have no access to a machine running > AIX5.1 in 64-bit kernel-mode. > > For replies, pleas reply directly, since I am not on the list.This is an ongoing problem with AIX and only AIX. If you have a support contract file a bug report against libc with IBM. open() is working, they just need to fix mkstemp in the library. The fix (workaround) should go in autoconf. I'd consider doing it but i neither have acccess to an AIX system nor am a wiz with autoconf. It needs to be AIX specific. -- ________________________________________________________________ J.W. Schultz Pegasystems Technologies email address: jw@pegasys.ws Remember Cernan and Schmitt