diff options
Diffstat (limited to 'src/util/taler-exchange-secmod-eddsa.c')
-rw-r--r-- | src/util/taler-exchange-secmod-eddsa.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/util/taler-exchange-secmod-eddsa.c b/src/util/taler-exchange-secmod-eddsa.c index ac4bfc61b..48dcdf718 100644 --- a/src/util/taler-exchange-secmod-eddsa.c +++ b/src/util/taler-exchange-secmod-eddsa.c | |||
@@ -1522,6 +1522,45 @@ run (void *cls, | |||
1522 | return; | 1522 | return; |
1523 | } | 1523 | } |
1524 | 1524 | ||
1525 | /* Create client directory and set permissions. */ | ||
1526 | { | ||
1527 | char *client_dir; | ||
1528 | |||
1529 | if (GNUNET_OK != | ||
1530 | GNUNET_CONFIGURATION_get_value_filename (kcfg, | ||
1531 | "taler-exchange-secmod-eddsa", | ||
1532 | "CLIENT_DIR", | ||
1533 | &client_dir)) | ||
1534 | { | ||
1535 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, | ||
1536 | "taler-exchange-secmod-eddsa", | ||
1537 | "CLIENT_DIR"); | ||
1538 | global_ret = 3; | ||
1539 | return; | ||
1540 | } | ||
1541 | |||
1542 | if (GNUNET_OK != GNUNET_DISK_directory_create (client_dir)) | ||
1543 | { | ||
1544 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
1545 | "Can't create client directory (%s)\n", | ||
1546 | client_dir); | ||
1547 | global_ret = 3; | ||
1548 | return; | ||
1549 | } | ||
1550 | /* Set sticky group bit, so that clients will be writeable by the current service. */ | ||
1551 | if (0 != chmod (client_dir, | ||
1552 | S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_ISGID)) | ||
1553 | { | ||
1554 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
1555 | "Can't set permissions for client directory (%s)\n", | ||
1556 | client_dir); | ||
1557 | global_ret = 3; | ||
1558 | return; | ||
1559 | } | ||
1560 | |||
1561 | GNUNET_free (client_dir); | ||
1562 | } | ||
1563 | |||
1525 | if (GNUNET_OK != | 1564 | if (GNUNET_OK != |
1526 | GNUNET_CONFIGURATION_get_value_filename (kcfg, | 1565 | GNUNET_CONFIGURATION_get_value_filename (kcfg, |
1527 | "taler-exchange-secmod-eddsa", | 1566 | "taler-exchange-secmod-eddsa", |