Skip to content

Commit

Permalink
Merge pull request #45 from jguillaumes/macos-vdecrypt-fixes
Browse files Browse the repository at this point in the history
Macos vdecrypt fixes - thznks @jguillaumes !
  • Loading branch information
danielinux authored Apr 22, 2023
2 parents 88f4923 + c9ab522 commit 840a3e5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/vde_cryptcab/vde_cryptcab_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
*
*/

#include "config.h"
#include "cryptcab.h"

#define KEEPALIVE_INTERVAL 30

static unsigned char keepalives = 0;
Expand Down Expand Up @@ -96,9 +98,12 @@ rcv_challenge(struct datagram *pkt, struct peer *p)
}

close (fd);

memset(keyname + strlen(keyname) - 10, 'X', 6);
#ifdef VDE_DARWIN
od = mkostemps(keyname, 4, O_EXLOCK);
#else
od = mkostemps(keyname, 4, O_RDWR | O_CREAT | O_TRUNC);
#endif
if (od < 0){
perror ("chacha.key mktemp error");
goto failure;
Expand Down

0 comments on commit 840a3e5

Please sign in to comment.