aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoni <matzeton@googlemail.com>2016-01-04 12:59:00 +0100
committertoni <matzeton@googlemail.com>2016-01-04 12:59:00 +0100
commit1ed2e4dd46d9306014e3d75b9dd746cf9622546e (patch)
treee1683c117920cbcd1d894080efac7bc0f5fa6d7d
parentb4274c3fe239761c88915237da670fd061083576 (diff)
password check fixed, run_cryptcreate silenced
-rw-r--r--src/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 34e27c9..31afd29 100644
--- a/src/main.c
+++ b/src/main.c
@@ -73,7 +73,7 @@ run_cryptcreate(char *pass, char *crypt_cmd)
char *cmd;
if (crypt_cmd == NULL || pass == NULL) return (-1);
- asprintf(&cmd, "echo '%s' | %s", pass, crypt_cmd);
+ asprintf(&cmd, "echo '%s' | %s >/dev/null 2>/dev/null", pass, crypt_cmd);
retval = system(cmd);
free(cmd);
return (retval);
@@ -152,6 +152,8 @@ main(int argc, char **argv)
ui_ipc_msgsend(MQ_IF, MSG(MSG_BUSY));
if (run_cryptcreate(pbuf, GETOPT(CRYPT_CMD).str) != 0) {
ui_ipc_msgsend(MQ_IF, MSG(MSG_CRYPTCMD_ERR));
+ } else {
+ ui_ipc_semtrywait(SEM_UI);
}
ui_ipc_semwait(SEM_IN);
}