aboutsummaryrefslogtreecommitdiff
path: root/src/util/taler-exchange-secmod-rsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/taler-exchange-secmod-rsa.c')
-rw-r--r--src/util/taler-exchange-secmod-rsa.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/util/taler-exchange-secmod-rsa.c b/src/util/taler-exchange-secmod-rsa.c
index 3c1f81c26..1307b8f45 100644
--- a/src/util/taler-exchange-secmod-rsa.c
+++ b/src/util/taler-exchange-secmod-rsa.c
@@ -1896,6 +1896,45 @@ run (void *cls,
1896 return; 1896 return;
1897 } 1897 }
1898 1898
1899 /* Create client directory and set permissions. */
1900 {
1901 char *client_dir;
1902
1903 if (GNUNET_OK !=
1904 GNUNET_CONFIGURATION_get_value_filename (kcfg,
1905 "taler-exchange-secmod-rsa",
1906 "CLIENT_DIR",
1907 &client_dir))
1908 {
1909 GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
1910 "taler-exchange-secmod-rsa",
1911 "CLIENT_DIR");
1912 global_ret = 3;
1913 return;
1914 }
1915
1916 if (GNUNET_OK != GNUNET_DISK_directory_create (client_dir))
1917 {
1918 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1919 "Can't create client directory (%s)\n",
1920 client_dir);
1921 global_ret = 3;
1922 return;
1923 }
1924 /* Set sticky group bit, so that clients will be writeable by the current service. */
1925 if (0 != chmod (client_dir,
1926 S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_ISGID))
1927 {
1928 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1929 "Can't set permissions for client directory (%s)\n",
1930 client_dir);
1931 global_ret = 3;
1932 return;
1933 }
1934
1935 GNUNET_free (client_dir);
1936 }
1937
1899 if (GNUNET_OK != 1938 if (GNUNET_OK !=
1900 GNUNET_CONFIGURATION_get_value_filename (kcfg, 1939 GNUNET_CONFIGURATION_get_value_filename (kcfg,
1901 "taler-exchange-secmod-rsa", 1940 "taler-exchange-secmod-rsa",