bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fdatasync() error in shred from coreutils-5.2.1 on AIX 5.2


From: Paul Eggert
Subject: Re: fdatasync() error in shred from coreutils-5.2.1 on AIX 5.2
Date: Mon, 17 May 2004 11:04:37 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Jim Meyering <address@hidden> writes:

>       * src/shred.c (incname): Decrement `len' only once per loop iteration.

Ouch.  Thanks, good catch.  That's what I get for testing and then
changing later.

> What's the harm in leaving the lower case letters in the list?
> Sure, in some pathological cases, that'd lead to some wasted time
> on case-insensitive systems, but I don't see any portability problem.

You're right.  Sorry, somehow I got confused about 8.3 filesystems
(where the code will rapidly decrease the length to 8 anyway).  Here's
a patch to (mostly) revert that.

2004-05-17  Paul Eggert  <address@hidden>

        * src/shred.c (names): Bring back lower-case letters, "_", and
        ".".  But continue to omit +, =, %, @, #, as they're either
        shell metacharacters (for some shells) or are not in some
        character sets, or (in the case of '%') must be a
        metacharacter somewhere.

Index: shred.c
===================================================================
RCS file: /home/meyering/coreutils/cu/src/shred.c,v
retrieving revision 1.91
diff -p -u -r1.91 shred.c
--- shred.c     17 May 2004 12:34:36 -0000      1.91
+++ shred.c     17 May 2004 17:25:54 -0000
@@ -1348,8 +1348,9 @@ wipefd (int fd, char const *qname, struc
 
 /* --- Name-wiping code --- */
 
-/* Characters allowed in a file name - a safe universal set. */
-static char const nameset[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+/* Characters allowed in a file name - a safe universal set.  */
+static char const nameset[] =
+"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_.";
 
 /* Increment NAME (with LEN bytes).  NAME must be a big-endian base N
    number with the digits taken from nameset.  Return true if




reply via email to

[Prev in Thread] Current Thread [Next in Thread]