-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Eric Blake on 8/17/2005 12:20 PM: > > Underlying mount points for reading are harmless if the code doing > the reading strips the \r (which is good coding style for any text > file with arbitrary line endings). Only if the code is not robust do > you need to force a text mode read as a minimally-intrusive patch. > > I will re-audit my tar patches, and if there is anywhere that a file is not > created in binary mode (even when it contains human-readable text), > or where a read is not robust without forcing text mode, fix it > accordingly and release tar-1.15.1-2. I think we have been in > violent agreement about this issue. By the way, creat() implies > mount mode unless you link against binmode.o, so part of my > patches in 1.15.1-1 was already turning all creat()s into > open(O_WRONLY|O_TRUNC|O_CREAT|O_BINARY).
I have finished my audit, and found a couple of places where I was not creating text files in binary mode, so I have fixed those. It's a good thing you made me do it, too, because 1.15.1-1 could not read -g files from 1.13.25-7 (because they had \r\n line endings), so the incremental tar would treat everything as new. 1.15.1-2 correctly handles -g files whether they have \r\n or just \n endings, but creates them with \n. Meanwhile, I've noticed a problem with forcing text reads. Managed mounts did not exist when 1.13.25-7 was released, so \r was never a valid character in a filename, so forcing text mode on the -T file was not a problem. But now that managed mounts exist, forcing text mode on a file listing of a managed mount directory, when the file listing was prepared in binary mode, will strip a trailing \r from the filename and do the wrong thing. I went ahead and built 1.15.1-2 so that without --null, there is no behavior changes from 1.13.25-7 (ie. still force text mode on the -T file) as you have requested, but so you can now use --null -T to specify files with trailing \r in a managed mount. http://home.comcast.net/~ericblake/tar/tar-1.15.1-2.tar.bz2 665720 faf7074f47e3021981c503f18037b8f6 http://home.comcast.net/~ericblake/tar/tar-1.15.1-2-src.tar.bz2 1647656 3745516868aaa41b405829437841c07d http://home.comcast.net/~ericblake/tar/setup.hint [UNCHANGED] (prev: 1.13.25-7, curr: 1.15.1-2) 530 fab6331a615ce5a8afced8adfd1cc3a5 - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDBIv284KuGfSFAYARAgQ8AKDGAO+3cG1fY5CiFXsSpSoQNFAW0QCfdpqs qo57c4/xAky+gdWNdMByHSE= =oluF -----END PGP SIGNATURE-----
