Package: e2fsprogs
Version: 1.41.2-1
Followup-For: Bug #502541

Ted,

I propose the following variant of your patch, which does a more
thorough check:

  -Kondrat

BEGIN PATCH -------------------------------------------------------------------
--- a/lib/blkid/devname.c
+++ b/lib/blkid/devname.c
@@ -65,6 +65,10 @@ blkid_dev blkid_get_dev(blkid_cache cach
        }
 
        if (!dev && (flags & BLKID_DEV_CREATE)) {
+               struct stat st;
+               if (stat(devname, &st) < 0 || !S_ISBLK(st.st_mode) ||
+                               access(devname, F_OK) < 0)
+                       return NULL;
                dev = blkid_new_dev();
                if (!dev)
                        return NULL;
END PATCH ---------------------------------------------------------------------

                Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
        have the right to submit it under the open source license
        indicated in the file; or

(b) The contribution is based upon previous work that, to the best
        of my knowledge, is covered under an appropriate open source
        license and I have the right under that license to submit that
        work with modifications, whether created in whole or in part
        by me, under the same open source license (unless I am
        permitted to submit under a different license), as indicated
        in the file; or

(c) The contribution was provided directly to me by some other
        person who certified (a), (b) or (c) and I have not modified
        it.

(d) I understand and agree that this project and the contribution
        are public and that a record of the contribution (including all
        personal information I submit with it, including my sign-off) is
        maintained indefinitely and may be redistributed consistent with
        this project or the open source license(s) involved.

Signed-off-by: Kondrat Pushkarev <[EMAIL PROTECTED]>


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.27 (PREEMPT)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages e2fsprogs depends on:
ii  e2fslibs                      1.41.2-1   ext2 filesystem libraries
ii  libblkid1                     1.41.2-1   block device id library
ii  libc6                         2.7-14     GNU C Library: Shared libraries
ii  libcomerr2                    1.41.2-1   common error description library
ii  libss2                        1.41.2-1   command-line interface parsing lib
ii  libuuid1                      1.41.2-1   universally unique id library

e2fsprogs recommends no packages.

Versions of packages e2fsprogs suggests:
pn  e2fsck-static    <none>                  (no description available)
pn  gpart            <none>                  (no description available)
ii  parted           1.8.8.git.2008.03.24-10 The GNU Parted disk partition resi

-- no debconf information

-- 



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to