aboutsummaryrefslogtreecommitdiff
path: root/helper.c
diff options
context:
space:
mode:
authorFranklin Wei <me@fwei.tk>2018-06-21 23:02:23 -0400
committerFranklin Wei <me@fwei.tk>2018-06-21 23:02:23 -0400
commit898454639359d49ddb8cb098634473e9207c6e49 (patch)
tree8b7de07e275ef115664aaf038d6c7a1d0cc75b4f /helper.c
parent6f67db25e477a94fc7160fe1052329e41e1f9da7 (diff)
downloadcsaa-898454639359d49ddb8cb098634473e9207c6e49.zip
csaa-898454639359d49ddb8cb098634473e9207c6e49.tar.gz
csaa-898454639359d49ddb8cb098634473e9207c6e49.tar.bz2
csaa-898454639359d49ddb8cb098634473e9207c6e49.tar.xz
Add a separate client communicating by unix socket
This is pretty rough for now; the service provider only handles one client, and dies ungracefully when anything goes wrong. It seems to work, though.
Diffstat (limited to '')
-rw-r--r--helper.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/helper.c b/helper.c
index 97edd7a..e72d39f 100644
--- a/helper.c
+++ b/helper.c
@@ -90,16 +90,16 @@ struct tm_cert cert_rv_by_idx(const struct trusted_module *tm,
return cert;
}
-/* Fill out a user_request struct to create a file with the index
+/* Fill out a tm_request struct to create a file with the index
* given in file_node->idx with the user added with level 3 access in
* the ACL. */
-struct user_request req_filecreate(const struct trusted_module *tm,
+struct tm_request req_filecreate(const struct trusted_module *tm,
uint64_t user_id,
const struct iomt_node *file_node,
const hash_t *file_comp, const int *file_orders, size_t file_n)
{
/* construct a request to create a file */
- struct user_request req = req_null;
+ struct tm_request req = req_null;
req.idx = file_node->idx;
req.user_id = user_id;
req.type = ACL_UPDATE;
@@ -127,10 +127,10 @@ struct user_request req_filecreate(const struct trusted_module *tm,
return req;
}
-/* Fill out a user_request struct to modify an existing file's
+/* Fill out a tm_request struct to modify an existing file's
* contents, given the previously generated FR certificate, and the
* ACL node giving the user's access rights. */
-struct user_request req_filemodify(const struct trusted_module *tm,
+struct tm_request req_filemodify(const struct trusted_module *tm,
const struct tm_cert *fr_cert, hash_t fr_hmac,
const struct iomt_node *file_node,
const hash_t *file_comp, const int *file_orders, size_t file_n,
@@ -139,7 +139,7 @@ struct user_request req_filemodify(const struct trusted_module *tm,
hash_t fileval)
{
/* modification */
- struct user_request req = req_null;
+ struct tm_request req = req_null;
req.type = FILE_UPDATE;
req.idx = file_node->idx;
@@ -166,10 +166,10 @@ struct user_request req_filemodify(const struct trusted_module *tm,
return req;
}
-/* Fill out a user_request struct to modify a file's ACL. Same
+/* Fill out a tm_request struct to modify a file's ACL. Same
* parameters as req_filemodify(), except the hash is the root of the
* new ACL. */
-struct user_request req_aclmodify(const struct trusted_module *tm,
+struct tm_request req_aclmodify(const struct trusted_module *tm,
const struct tm_cert *fr_cert, hash_t fr_hmac,
const struct iomt_node *file_node,
const hash_t *file_comp, const int *file_orders, size_t file_n,
@@ -177,7 +177,7 @@ struct user_request req_aclmodify(const struct trusted_module *tm,
const hash_t *oldacl_comp, const int *oldacl_orders, size_t oldacl_n,
hash_t newacl_root)
{
- struct user_request req = req_null;
+ struct tm_request req = req_null;
req.type = ACL_UPDATE;
req.idx = file_node->idx;