Skip to contentSkip to conversation

blkid: return cached info on either EPERM or EACCESS

PATCH In review Eric Sandeen 2 participants 4 messages May 27, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 blkid: return cached info on either EPERM or EACCESS

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.

---

lib/blkid/probe.c +1 -1
Index: 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;
 		}
#1 lore raw
Quoted 6 lines · Eric Sandeen

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

#2 lore raw
Quoted 8 lines · Theodore Tso
Quoted 6 lines · Eric Sandeen

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.

Quoted 4 lines

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

#3 lore raw
Quoted 11 lines · Eric Sandeen
Quoted 10 lines · Theodore Tso
Quoted 6 lines · Eric Sandeen

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