gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-merchant] branch master updated: wire response takes


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated: wire response takes perms
Date: Tue, 11 Jun 2019 21:40:37 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new a6d8d76  wire response takes perms
a6d8d76 is described below

commit a6d8d76aed80f90eb4cba9df87b5cda5b4fc7a6d
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Jun 11 20:38:46 2019 +0200

    wire response takes perms
---
 src/backend/taler-merchant-httpd.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/src/backend/taler-merchant-httpd.c 
b/src/backend/taler-merchant-httpd.c
index ee3ccb6..21eb183 100644
--- a/src/backend/taler-merchant-httpd.c
+++ b/src/backend/taler-merchant-httpd.c
@@ -694,6 +694,7 @@ wireformat_iterator_cb (void *cls,
   json_t *j;
   enum TALER_ErrorCode ec;
   struct GNUNET_HashCode h_wire;
+  char *wire_file_mode;
 
   if (0 != strncasecmp (section,
                         "account-",
@@ -862,6 +863,31 @@ wireformat_iterator_cb (void *cls,
   }
   GNUNET_free (fn);
 
+  if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string
+    (iic->config,
+     section,
+     "WIRE_FILE_MODE",
+     &wire_file_mode))
+  {
+    errno = 0;
+    mode_t mode = (mode_t) strtoul (wire_file_mode, NULL, 8);
+    if (0 != errno)
+    {
+      GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
+                                 section,
+                                 "WIRE_FILE_MODE",
+                                 "Must be octal number\n");
+      iic->ret = GNUNET_SYSERR;
+      return;
+    }
+    if (0 != chmod (fn, mode))
+    {
+      TALER_LOG_ERROR ("chmod failed on %s\n", fn);
+      iic->ret = GNUNET_SYSERR;
+      return;
+    }
+  }
+
   if (GNUNET_OK !=
       TALER_JSON_merchant_wire_signature_hash (j,
                                                &h_wire))

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]