fix
authorChristian Grothoff <christian@grothoff.org>
Mon, 5 Apr 2010 11:56:28 +0000 (11:56 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 5 Apr 2010 11:56:28 +0000 (11:56 +0000)
src/util/crypto_rsa.c
src/util/pseudonym.c

index 4a0a66b0abd6633957baa3c8c259b4cca1d34657..f3bb04cd25c7cbd1ff9a1f4f925274588499ee83 100644 (file)
@@ -583,7 +583,19 @@ GNUNET_CRYPTO_rsa_key_create_from_file (const char *filename)
       if (NULL == fd)
         {
           if (errno == EEXIST)
-            continue;
+           {         
+             if (GNUNET_YES != GNUNET_DISK_file_test (filename))
+               {
+                 /* must exist but not be accessible, fail for good! */
+                 if (0 != ACCESS (filenae, R_OK))                  
+                   GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
+                                             "access", filename);
+                 else
+                   GNUNET_break (0); /* what is going on!? */
+                 return NULL;
+               }
+             continue;
+           }
           GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
                                     "open", filename);
           return NULL;
index dfacbdcd81067eaabb08d96c4132b1f5b475019c..fcef2e9f86c8d2bbe29d30b2ca038ac7ed44ab20 100644 (file)
@@ -504,6 +504,7 @@ GNUNET_PSEUDONYM_list_all (const struct GNUNET_CONFIGURATION_Handle *cfg,
   return ret;
 }
 
+
 /**
  * Change the ranking of a pseudonym.
  *
@@ -536,6 +537,7 @@ GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg,
   return ranking;
 }
 
+
 /**
  * Insert metadata into existing MD record (passed as cls).
  *
@@ -609,7 +611,4 @@ GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg,
 }
 
 
-
-
-
 /* end of pseudonym.c */