=== modified file 'TODO' --- TODO 2008-08-10 20:22:27 +0000 +++ TODO 2008-08-11 07:41:40 +0000 @@ -87,6 +87,7 @@ does not. See also [[http://sources.redhat.com/ml/libc-alpha/2003-05/msg00251.html][Marcus Brinkmann: Re: getpass obsolete?]] and [[http://article.gmane.org/gmane.comp.lib.glibc.alpha/4906][Petter Reinholdtsen: Re: getpass obsolete?]], and especially also [[http://www.steve.org.uk/Reference/Unix/faq_4.html#SEC48][Unix Programming FAQ 3.1 How can I make my program not echo input?]] +** Replace completely with "/lib/cryptsetup/askpass"? * Mandos (server) ** [#A] Command man page: man8/mandos.8 @@ -124,6 +125,8 @@ [[info:standards:Option%20Table][Table of Long Options]] ** Implement --socket [[info:standards:Option%20Table][Table of Long Options]] +** Date+time on console log messages + Is this the default? * Mandos-tools/utilities All of this probably using D-Bus @@ -141,7 +144,7 @@ * [#A] Package ** /etc/bash_completion.d/mandos -** /etc/initramfs-tools/hooks/mandos +** /usr/share/initramfs-tools/hooks/mandos [[file:/usr/share/doc/initramfs-tools/examples/example_hook][Example initramfs-tools hook script]] *** Create GPG key ring files in initrd ** unperish === modified file 'mandos-client.c' --- mandos-client.c 2008-08-10 20:22:27 +0000 +++ mandos-client.c 2008-08-11 07:41:40 +0000 @@ -171,8 +171,11 @@ } bool print_out_password(const char *buffer, size_t length){ - size_t ret; - for(size_t written = 0; written < length; written += ret){ + ssize_t ret; + if(length>0 and buffer[length-1] == '\n'){ + length--; + } + for(size_t written = 0; written < length; written += (size_t)ret){ ret = TEMP_FAILURE_RETRY(write(STDOUT_FILENO, buffer + written, length - written)); if(ret < 0){ @@ -304,7 +307,7 @@ ret = argp_parse (&argp, argc, argv, 0, 0, &plugin_list); if (ret == ARGP_ERR_UNKNOWN){ - fprintf(stderr, "Unkown error while parsing arguments\n"); + fprintf(stderr, "Unknown error while parsing arguments\n"); exitstatus = EXIT_FAILURE; goto end; } @@ -341,7 +344,7 @@ } ret = argp_parse (&argp, new_argc, plus_argv, 0, 0, &plugin_list); if (ret == ARGP_ERR_UNKNOWN){ - fprintf(stderr, "Unkown error while parsing arguments\n"); + fprintf(stderr, "Unknown error while parsing arguments\n"); exitstatus = EXIT_FAILURE; goto end; } @@ -716,11 +719,6 @@ exitstatus = EXIT_FAILURE; goto end; } - bret = print_out_password("\n", 1); - if(not bret){ - perror("print_out_password"); - exitstatus = EXIT_FAILURE; - } } end: