diff options
author | toni <matzeton@googlemail.com> | 2016-01-04 12:59:00 +0100 |
---|---|---|
committer | toni <matzeton@googlemail.com> | 2016-01-04 12:59:00 +0100 |
commit | 1ed2e4dd46d9306014e3d75b9dd746cf9622546e (patch) | |
tree | e1683c117920cbcd1d894080efac7bc0f5fa6d7d | |
parent | b4274c3fe239761c88915237da670fd061083576 (diff) |
password check fixed, run_cryptcreate silenced
-rw-r--r-- | src/main.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); } |