File cryptconfig-0.3-loop0.patch of Package cryptconfig

Index: cryptconfig-0.3/src/cryptconfig-lib.c
===================================================================
--- cryptconfig-0.3.orig/src/cryptconfig-lib.c	2014-02-18 14:44:47.496769628 +0100
+++ cryptconfig-0.3/src/cryptconfig-lib.c	2014-02-18 14:45:00.994838446 +0100
@@ -183,8 +183,10 @@
     struct stat info;
 
     if (g_stat ("/dev/loop0", &info)) {
-        g_printerr ("stat: %s\n", strerror (errno));
-        return FALSE;
+        /* prefill info with reasonable defaults */
+        info.st_mode = S_IFBLK | 0600;
+        info.st_uid = 0; /* root */
+        info.st_gid = 0; /* root, to be on the safe side */
     }
 
     *device = g_strdup_printf ("/dev/loop%d", nr);
openSUSE Build Service is sponsored by