=== modified file 'TODO' --- TODO 2016-06-27 20:21:50 +0000 +++ TODO 2016-07-03 02:56:00 +0000 @@ -13,20 +13,26 @@ ** TODO [#B] Use getaddrinfo(hints=AI_NUMERICHOST) instead of inet_pton() ** TODO [#C] Make start_mandos_communication() take "struct server". ** TODO [#C] --interfaces=regex,eth*,noregex (bridge-utils-interfaces(5)) +** TODO [#A] Detect partial writes to stdout and exit with EX_TEMPFAIL * splashy ** TODO [#B] use scandir(3) instead of readdir(3) +** TODO [#A] Detect partial writes to stdout and exit with EX_TEMPFAIL * usplash (Deprecated) ** TODO [#B] Make it work again ** TODO [#B] use scandir(3) instead of readdir(3) +** TODO [#A] Detect partial writes to stdout and exit with EX_TEMPFAIL * askpass-fifo +** TODO [#A] Detect partial writes to stdout and exit with EX_TEMPFAIL * password-prompt ** TODO [#B] lock stdin (with flock()?) +** TODO [#A] Detect partial writes to stdout and exit with EX_TEMPFAIL * plymouth +** TODO [#A] Detect partial writes to stdout and exit with EX_TEMPFAIL * TODO [#B] passdev @@ -35,6 +41,7 @@ *** Hook up stderr of plugins, buffer them, and prepend "Mandos Plugin [plugin name]" ** TODO [#C] use same file name rules as run-parts(8) ** kernel command line option for debug info +** TODO [#A] Restart plugins which exit with EX_TEMPFAIL * mandos (server) ** TODO [#B] --notify-command === modified file 'plugins.d/mandos-client.c' --- plugins.d/mandos-client.c 2016-03-05 20:11:10 +0000 +++ plugins.d/mandos-client.c 2016-07-03 02:56:00 +0000 @@ -1423,6 +1423,7 @@ &decrypted_buffer, mc); if(decrypted_buffer_size >= 0){ + clearerr(stdout); written = 0; while(written < (size_t) decrypted_buffer_size){ if(quit_now){ @@ -1444,6 +1445,16 @@ } written += (size_t)ret; } + ret = fflush(stdout); + if(ret != 0){ + int e = errno; + if(debug){ + fprintf_plus(stderr, "Error writing encrypted data: %s\n", + strerror(errno)); + } + errno = e; + goto mandos_end; + } retval = 0; } }