All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: ext4 development <linux-ext4@vger.kernel.org>
Subject: [PATCH e2fsprogs] blkid: return cached info on either EPERM or EACCESS
Date: Tue, 27 May 2008 14:28:04 -0500	[thread overview]
Message-ID: <483C60C4.6020509@redhat.com> (raw)

This is for RH bug #448591: blkid command does not work for unprivileged users

commit 838f133c72a583eae67414368e46ee0303e0a51f made it so that
any error except EPERM would flush cached filesystem info, but
if I run blkid as an unprivileged user on F9, I get EACCES not
EPERM; I think that in this case, as well, we should continue.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

Index: e2fsprogs/lib/blkid/probe.c
===================================================================
--- e2fsprogs.orig/lib/blkid/probe.c
+++ e2fsprogs/lib/blkid/probe.c
@@ -1155,7 +1155,7 @@ blkid_dev blkid_verify(blkid_cache cache
 	if (((probe.fd = open(dev->bid_name, O_RDONLY)) < 0) ||
 	    (fstat(probe.fd, &st) < 0)) {
 		if (probe.fd >= 0) close(probe.fd);
-		if (errno != EPERM) {
+		if (errno != EPERM && errno != EACCES) {
 			blkid_free_dev(dev);
 			return NULL;
 		}



             reply	other threads:[~2008-05-27 19:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-27 19:28 Eric Sandeen [this message]
2008-05-27 20:37 ` [PATCH e2fsprogs] blkid: return cached info on either EPERM or EACCESS Theodore Tso
2008-05-27 20:40   ` Eric Sandeen
2008-05-27 22:18     ` Theodore Tso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=483C60C4.6020509@redhat.com \
    --to=sandeen@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.