aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/util/crypto_aes.c2
-rw-r--r--src/util/crypto_ecc.c3
-rw-r--r--src/util/os_priority.c5
-rw-r--r--src/util/service.c7
4 files changed, 4 insertions, 13 deletions
diff --git a/src/util/crypto_aes.c b/src/util/crypto_aes.c
index 5e23208f4..f475494f8 100644
--- a/src/util/crypto_aes.c
+++ b/src/util/crypto_aes.c
@@ -51,7 +51,7 @@ GNUNET_CRYPTO_aes_create_session_key (struct GNUNET_CRYPTO_AesSessionKey *key)
51 * @param handle handle to initialize 51 * @param handle handle to initialize
52 * @param sessionkey session key to use 52 * @param sessionkey session key to use
53 * @param iv initialization vector to use 53 * @param iv initialization vector to use
54 * @return GNUNET_OK on success, GNUNET_SYSERR on error 54 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
55 */ 55 */
56static int 56static int
57setup_cipher (gcry_cipher_hd_t *handle, 57setup_cipher (gcry_cipher_hd_t *handle,
diff --git a/src/util/crypto_ecc.c b/src/util/crypto_ecc.c
index 6617ac6ea..755db9bdd 100644
--- a/src/util/crypto_ecc.c
+++ b/src/util/crypto_ecc.c
@@ -309,7 +309,7 @@ GNUNET_CRYPTO_ecc_public_key_to_string (const struct GNUNET_CRYPTO_EccPublicKey
309 * @param enc encoded public key 309 * @param enc encoded public key
310 * @param enclen number of bytes in enc (without 0-terminator) 310 * @param enclen number of bytes in enc (without 0-terminator)
311 * @param pub where to store the public key 311 * @param pub where to store the public key
312 * @return GNUNET_OK on success 312 * @return #GNUNET_OK on success
313 */ 313 */
314int 314int
315GNUNET_CRYPTO_ecc_public_key_from_string (const char *enc, 315GNUNET_CRYPTO_ecc_public_key_from_string (const char *enc,
@@ -879,7 +879,6 @@ GNUNET_CRYPTO_ecc_ecdh (const struct GNUNET_CRYPTO_EccPrivateKey *priv,
879 } 879 }
880 gcry_mpi_point_release (result); 880 gcry_mpi_point_release (result);
881 gcry_ctx_release (ctx); 881 gcry_ctx_release (ctx);
882 /* FIXME: only use 'result_x' as key material */
883 882
884 mpi_print (xbuf, sizeof (xbuf), result_x); 883 mpi_print (xbuf, sizeof (xbuf), result_x);
885 GNUNET_CRYPTO_hash (xbuf, sizeof (xbuf), key_material); 884 GNUNET_CRYPTO_hash (xbuf, sizeof (xbuf), key_material);
diff --git a/src/util/os_priority.c b/src/util/os_priority.c
index f25c3dec5..c5bb397c1 100644
--- a/src/util/os_priority.c
+++ b/src/util/os_priority.c
@@ -510,7 +510,6 @@ start_process (int pipe_control,
510{ 510{
511#ifndef MINGW 511#ifndef MINGW
512 pid_t ret; 512 pid_t ret;
513 char lpid[16];
514 char fds[16]; 513 char fds[16];
515 struct GNUNET_OS_Process *gnunet_proc; 514 struct GNUNET_OS_Process *gnunet_proc;
516 struct GNUNET_DISK_FileHandle *childpipe_read; 515 struct GNUNET_DISK_FileHandle *childpipe_read;
@@ -615,7 +614,7 @@ start_process (int pipe_control,
615 if (0 != ret) 614 if (0 != ret)
616 { 615 {
617 unsetenv (GNUNET_OS_CONTROL_PIPE); 616 unsetenv (GNUNET_OS_CONTROL_PIPE);
618 gnunet_proc = GNUNET_malloc (sizeof (struct GNUNET_OS_Process)); 617 gnunet_proc = GNUNET_new (struct GNUNET_OS_Process);
619 gnunet_proc->pid = ret; 618 gnunet_proc->pid = ret;
620 gnunet_proc->control_pipe = childpipe_write; 619 gnunet_proc->control_pipe = childpipe_write;
621 if (GNUNET_YES == pipe_control) 620 if (GNUNET_YES == pipe_control)
@@ -669,8 +668,6 @@ start_process (int pipe_control,
669 if (NULL != lscp) 668 if (NULL != lscp)
670 { 669 {
671 /* read systemd documentation... */ 670 /* read systemd documentation... */
672 GNUNET_snprintf (lpid, sizeof (lpid), "%u", getpid ());
673 setenv ("LISTEN_PID", lpid, 1);
674 i = 0; 671 i = 0;
675 tgt = 3; 672 tgt = 3;
676 while (-1 != lscp[i]) 673 while (-1 != lscp[i])
diff --git a/src/util/service.c b/src/util/service.c
index 836501d38..551ab4825 100644
--- a/src/util/service.c
+++ b/src/util/service.c
@@ -1301,8 +1301,6 @@ setup_service (struct GNUNET_SERVICE_Context *sctx)
1301 int tolerant; 1301 int tolerant;
1302 1302
1303#ifndef MINGW 1303#ifndef MINGW
1304 const char *lpid;
1305 unsigned int pid;
1306 const char *nfds; 1304 const char *nfds;
1307 unsigned int cnt; 1305 unsigned int cnt;
1308 int flags; 1306 int flags;
@@ -1343,9 +1341,7 @@ setup_service (struct GNUNET_SERVICE_Context *sctx)
1343 1341
1344#ifndef MINGW 1342#ifndef MINGW
1345 errno = 0; 1343 errno = 0;
1346 if ((NULL != (lpid = getenv ("LISTEN_PID"))) && 1344 if ((NULL != (nfds = getenv ("LISTEN_FDS"))) &&
1347 (1 == SSCANF (lpid, "%u", &pid)) && (getpid () == (pid_t) pid) &&
1348 (NULL != (nfds = getenv ("LISTEN_FDS"))) &&
1349 (1 == SSCANF (nfds, "%u", &cnt)) && (cnt > 0) && (cnt < FD_SETSIZE) && 1345 (1 == SSCANF (nfds, "%u", &cnt)) && (cnt > 0) && (cnt < FD_SETSIZE) &&
1350 (cnt + 4 < FD_SETSIZE)) 1346 (cnt + 4 < FD_SETSIZE))
1351 { 1347 {
@@ -1370,7 +1366,6 @@ setup_service (struct GNUNET_SERVICE_Context *sctx)
1370 break; 1366 break;
1371 } 1367 }
1372 } 1368 }
1373 unsetenv ("LISTEN_PID");
1374 unsetenv ("LISTEN_FDS"); 1369 unsetenv ("LISTEN_FDS");
1375 } 1370 }
1376#else 1371#else