linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH e2fsprogs] blkid: return cached info on either EPERM or EACCESS
@ 2008-05-27 19:28 Eric Sandeen
  2008-05-27 20:37 ` Theodore Tso
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2008-05-27 19:28 UTC (permalink / raw)
  To: ext4 development

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;
 		}



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH e2fsprogs] blkid: return cached info on either EPERM or EACCESS
  2008-05-27 19:28 [PATCH e2fsprogs] blkid: return cached info on either EPERM or EACCESS Eric Sandeen
@ 2008-05-27 20:37 ` Theodore Tso
  2008-05-27 20:40   ` Eric Sandeen
  0 siblings, 1 reply; 4+ messages in thread
From: Theodore Tso @ 2008-05-27 20:37 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: ext4 development

On Tue, May 27, 2008 at 02:28:04PM -0500, Eric Sandeen wrote:
> 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.

This fix is already in e2fsprogs 1.10.....  what version were you
patching against?

							- Ted

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH e2fsprogs] blkid: return cached info on either EPERM or EACCESS
  2008-05-27 20:37 ` Theodore Tso
@ 2008-05-27 20:40   ` Eric Sandeen
  2008-05-27 22:18     ` Theodore Tso
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2008-05-27 20:40 UTC (permalink / raw)
  To: Theodore Tso; +Cc: ext4 development

Theodore Tso wrote:
> On Tue, May 27, 2008 at 02:28:04PM -0500, Eric Sandeen wrote:
>> 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.
> 
> This fix is already in e2fsprogs 1.10.....  what version were you
> patching against?
> 
> 							- Ted

Oh, sorry.. a slightly earlier version.  :)  I just missed the fix.
Sorry for the noise...

-Eric

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH e2fsprogs] blkid: return cached info on either EPERM or EACCESS
  2008-05-27 20:40   ` Eric Sandeen
@ 2008-05-27 22:18     ` Theodore Tso
  0 siblings, 0 replies; 4+ messages in thread
From: Theodore Tso @ 2008-05-27 22:18 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: ext4 development

On Tue, May 27, 2008 at 03:40:51PM -0500, Eric Sandeen wrote:
> Theodore Tso wrote:
> > On Tue, May 27, 2008 at 02:28:04PM -0500, Eric Sandeen wrote:
> >> 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.
> > 
> > This fix is already in e2fsprogs 1.10.....  what version were you
> > patching against?

Err, 1.40.10, but I guess you figured that out.  :-)

     	      	    	      - Ted

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-05-27 22:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-27 19:28 [PATCH e2fsprogs] blkid: return cached info on either EPERM or EACCESS Eric Sandeen
2008-05-27 20:37 ` Theodore Tso
2008-05-27 20:40   ` Eric Sandeen
2008-05-27 22:18     ` Theodore Tso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).