Skip to content

Commit

Permalink
Refuse to init when agent is running
Browse files Browse the repository at this point in the history
Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
  • Loading branch information
angt committed May 27, 2020
1 parent e76d8c1 commit 73c0b58
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions secret.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,8 @@ s_init(int argc, char **argv, void *data)
printf("Usage: %s\n", argv[0]);
return 0;
}
if (getenv(S_ENV_AGENT))
s_fatal("Agent is running...");

int fd = open(s.path, O_RDWR | O_CREAT | O_EXCL, 0600);

Expand Down

0 comments on commit 73c0b58

Please sign in to comment.