mirror of
https://github.com/angt/secret
synced 2024-11-16 19:48:05 +01:00
Refuse to init when agent is running
Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
parent
e76d8c1edb
commit
73c0b58b2f
1 changed files with 2 additions and 0 deletions
2
secret.c
2
secret.c
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue