15 lines
642 B
Diff
15 lines
642 B
Diff
Index: util-linux-ng-2.14.1/mount/lomount.c
|
|
===================================================================
|
|
--- util-linux-ng-2.14.1.orig/mount/lomount.c 2008-09-10 11:02:43.000000000 +0200
|
|
+++ util-linux-ng-2.14.1/mount/lomount.c 2008-11-07 14:00:28.000000000 +0100
|
|
@@ -653,7 +653,8 @@ set_loop(const char *device, const char
|
|
|
|
mode = (*options & SETLOOP_RDONLY) ? O_RDONLY : O_RDWR;
|
|
if ((ffd = open(file, mode)) < 0) {
|
|
- if (!(*options & SETLOOP_RDONLY) && errno == EROFS)
|
|
+ if (!(*options & SETLOOP_RDONLY) &&
|
|
+ (errno == EROFS || errno == EACCES))
|
|
ffd = open(file, mode = O_RDONLY);
|
|
if (ffd < 0) {
|
|
perror(file);
|