From e8f82b6827bd9dc85d4ffcc480a7ea93a34a660f Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Wed, 1 Apr 2009 20:57:47 -0400 Subject: [PATCH] The order of getting the password is: 1. PWMD_OPTION_PASSPHRASE (not async/async2) 2. PWMD_OPTION_PASSPHRASE_CB (not async/async2) 3. The calling function method. Fixed do_pwmd_save() to use the local pinentry when PWMD_OPTION_PINENTRY is set when called from pwmd_save(). Documented pwmd_inquire(). --- doc/libpwmd.3 | 43 ++++++--- po/libpwmd.pot | 233 ++++++++++++++++++++++++--------------------- src/libpwmd.c | 281 +++++++++++++++++++++++++++++-------------------------- src/libpwmd.h.in | 50 +++++++--- 4 files changed, 336 insertions(+), 271 deletions(-) rewrite po/libpwmd.pot (61%) diff --git a/doc/libpwmd.3 b/doc/libpwmd.3 index 197b3354..e13e370e 100644 --- a/doc/libpwmd.3 +++ b/doc/libpwmd.3 @@ -1,4 +1,4 @@ -.TH "libpwmd.h" 3 "31 Mar 2009" "Version 6.0.0" "libpwmd" \" -*- nroff -*- +.TH "libpwmd.h" 3 "1 Apr 2009" "Version 6.0.0" "libpwmd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -223,14 +223,7 @@ An XML parse or other error occurred. The details can be found in the error desc A recursion loop was detected while processing a 'target' attribute. .SS "#define EPWMD_MAX_SLOTS GPG_ERR_USER_2" .PP -There are no available cache slots for a new file. -.PP -\fBBug\fP -.RS 4 -Remove for pwmd 2.0. -.RE -.PP - +There are no available cache slots for a new file. .SS "#define EPWMD_NO_FILE GPG_ERR_USER_4" .PP A command required an open file but no file has been opened. @@ -244,8 +237,28 @@ The version of the library. When a handle is mentioned in this documentation it is a pointer of this type. A new handle is created with \fBpwmd_new()\fP. .SS "\fBpwmd_inquire_cb_t\fP" .PP -\fBTodo\fP +This is a callback function that gets passed to \fBpwmd_inquire()\fP. It is used for sending data to the server for commands that return an INQUIRE response (STORE and IMPORT). The reason for this callback is to let the client send as many bytes as it wants at a time rather than the entire chunk at once. It gets called during an \fBassuan_transact()\fP from an internal inquire callback function which in turn calls this function by looping over its return value. +.PP +\fBParameters:\fP +.RS 4 +\fIdata\fP The data pointer passed to \fBpwmd_inquire()\fP. +.br +\fIkeyword\fP The \fIcmd\fP argument to \fBpwmd_inquire()\fP. +.br +\fIrc\fP The result of the last call to \fBassuan_send_data()\fP which did the real sending of the data to the pwmd server. On the first call to this callback it will always be 0 because no data has been sent yet. +.br +\fIline\fP The next line of data to send or NULL. +.br +\fIlen\fP The length of \fIline\fP or 0. +.RE +.PP +\fBReturn values:\fP .RS 4 +\fI0\fP There is more data to be sent. +.br +\fIGPG_ERR_EOF\fP No need to call this function again, the current \fIline\fP is the last to send. +.br +\fIcode\fP Any other error code which will terminate the INQUIRE. .RE .PP @@ -687,13 +700,13 @@ This function must be the first function called in the library before any others .PP Send data to a pwmd server. .PP -This lets commands that use an INQUIRE (STORE and INPORT) send data. +This lets commands that use an INQUIRE (STORE and IMPORT) send the data lines. .PP \fBParameters:\fP .RS 4 \fIpwm\fP A handle. .br -\fIcmd\fP The command that uses an INQUIRE. +\fIcmd\fP The command to send that uses an INQUIRE. .br \fIfunc\fP A callback function which sets the data to be sent. .br @@ -702,12 +715,12 @@ This lets commands that use an INQUIRE (STORE and INPORT) send data. .PP \fBReturns:\fP .RS 4 -0 on success or an error code. +0 on success or an error code. .RE .PP -\fBBug\fP +\fBSee also:\fP .RS 4 -Should be rewritten to send an entire buffer and have a new function pwmd_inquire_async() to send the data in chunks. +\fBpwmd_inquire_cb_t\fP .RE .PP diff --git a/po/libpwmd.pot b/po/libpwmd.pot dissimilarity index 61% index ef42fe0f..6ae819ef 100644 --- a/po/libpwmd.pot +++ b/po/libpwmd.pot @@ -1,108 +1,125 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: bjk@luxsci.net\n" -"POT-Creation-Date: 2009-03-13 21:08-0400\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/libpwmd.c:90 -msgid "Unknown error" -msgstr "" - -#: src/libpwmd.c:92 -msgid "No cache slots available" -msgstr "" - -#: src/libpwmd.c:94 -msgid "Recursion loop" -msgstr "" - -#: src/libpwmd.c:96 -msgid "No file is open" -msgstr "" - -#: src/libpwmd.c:98 -msgid "General LibXML error" -msgstr "" - -#: src/libpwmd.c:100 -msgid "File modified" -msgstr "" - -#: src/libpwmd.c:102 -msgid "Access denied" -msgstr "" - -#: src/libpwmd.c:1226 -msgid "LibPWMD" -msgstr "" - -#: src/libpwmd.c:1229 -msgid "Passphrase:" -msgstr "" - -#: src/libpwmd.c:1232 -msgid "Enter a passphrase." -msgstr "" - -#: src/libpwmd.c:1235 src/libpwmd.c:1767 -msgid "Invalid passphrase, please try again." -msgstr "" - -#: src/libpwmd.c:1239 -msgid "Please type the passphrase again for confirmation." -msgstr "" - -#: src/mem.c:138 src/mem.c:238 -#, c-format -msgid "%s: %p not found" -msgstr "" - -#: src/pwmc.c:56 -#, c-format -msgid "" -"Reads PWMD protocol commands from standard input.\n" -"\n" -"Usage: pwmc [-hvX] [-s ] [-E ] [-y ][-PTNDCM ] [-p " -"]\n" -" [-S [-i ]] [-c ] [-t ] [-d ] [-I ]\n" -" [-H [-R ] -Y -K \n" -" -U [-G]] [filename]\n" -" [filename]\n" -" -E pinentry method (0=pwmd, 1=pwmd async, 2=libpwmd nb)\n" -" -y number of pinentry tries before failing (3)\n" -" -H connect to hostname\n" -" -R alterate port (%i)\n" -" -U SSH username\n" -" -Y SSH identity file\n" -" -K known host's file (for server validation)\n" -" -G retrieve the remote SSH host key and exit\n" -" -t pinentry timeout\n" -" -X disable showing of status messages from the server\n" -" -c set the client name\n" -" -s socket path (~/.pwmd/socket)\n" -" -p passphrase\n" -" -P path to the pinentry binary (server default)\n" -" -T pinentry tty\n" -" -N pinentry terminal type\n" -" -D pinentry display\n" -" -C pinentry LC_CTYPE\n" -" -M pinentry LC_MESSAGES\n" -" -d redirect command output to the specified file descriptor\n" -" -I read inquire data from the specified file descriptor\n" -" -S send the SAVE command before exiting\n" -" -i encrypt with the specified number of iterations\n" -" -v version\n" -" -h this help text\n" -msgstr "" +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: bjk@luxsci.net\n" +"POT-Creation-Date: 2009-03-31 21:59-0400\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: src/libpwmd.c:118 +msgid "Unknown error" +msgstr "" + +#: src/libpwmd.c:120 +msgid "No cache slots available" +msgstr "" + +#: src/libpwmd.c:122 +msgid "Recursion loop" +msgstr "" + +#: src/libpwmd.c:124 +msgid "No file is open" +msgstr "" + +#: src/libpwmd.c:126 +msgid "General LibXML error" +msgstr "" + +#: src/libpwmd.c:128 +msgid "File modified" +msgstr "" + +#: src/libpwmd.c:1400 +msgid "LibPWMD" +msgstr "" + +#: src/libpwmd.c:1406 +msgid "Passphrase:" +msgstr "" + +#: src/libpwmd.c:1412 +msgid "Enter a passphrase." +msgstr "" + +#: src/libpwmd.c:1420 src/libpwmd.c:1911 +msgid "Invalid passphrase, please try again." +msgstr "" + +#: src/libpwmd.c:1423 +msgid "Please type the passphrase again for confirmation." +msgstr "" + +#: src/mem.c:138 src/mem.c:238 +#, c-format +msgid "%s: %p not found" +msgstr "" + +#: src/pwmc.c:65 +msgid "" +"Read a PWMD protocol command from standard input.\n" +"\n" +"Usage: pwmc [options] [file]\n" +" --debug \n" +" pinentry method (0=pwmd, 1=pwmd async, 2=libpwmd)\n" +" --tries \n" +" number of pinentry tries before failing (3)\n" +" --host, -h \n" +" connect to the specified hostname\n" +" --port\n" +" alterate port (22)\n" +" --user\n" +" SSH username (default is the invoking user)\n" +" --identity, -i \n" +" SSH identity file\n" +" --known-hosts, -k \n" +" known host's file (for server validation)\n" +" --get-hostkey, -g\n" +" retrieve the remote SSH host key and exit\n" +" --ipv4, -4\n" +" try connecting via IPv4 only\n" +" --ipv6, -6\n" +" try connecting via IPv6 only\n" +" --timeout \n" +" pinentry timeout\n" +" --no-status\n" +" disable showing of status messages from the server\n" +" --name \n" +" set the client name\n" +" --socket \n" +" local socket to connect to (~/.pwmd/socket)\n" +" --passphrase, -P \n" +" passphrase to use (disables pinentry use)\n" +" --pinentry \n" +" the full path to the pinentry binary (server default)\n" +" --ttyname, -y \n" +" tty that pinentry will use\n" +" --ttytype, -t \n" +" pinentry terminal type (default is TERM)\n" +" --display, -d\n" +" pinentry display (default is DISPLAY)\n" +" --lc-ctype \n" +" locale setting for pinentry\n" +" --lc-messages \n" +" locale setting for pinentry\n" +" --output-fd \n" +" redirect command output to the specified file descriptor\n" +" --inquire-fd \n" +" read inquire data from the specified file descriptor\n" +" --save, -S\n" +" send the SAVE command before exiting\n" +" --iterations, -I \n" +" encrypt with the specified number of iterations when saving\n" +" --version\n" +" --help\n" +msgstr "" diff --git a/src/libpwmd.c b/src/libpwmd.c index d5d758c2..dc145f39 100644 --- a/src/libpwmd.c +++ b/src/libpwmd.c @@ -916,7 +916,7 @@ static int _inquire_cb(void *data, const char *keyword) /* * Since the socket file descriptor is probably set to non-blocking, set to - * blocking to prevent GPG_ERR_EAGAIN errors. This should be fixes when + * blocking to prevent GPG_ERR_EAGAIN errors. This should be fixed when * asynchronous INQUIRE is supported by either libassuan or a later * libpwmd. */ @@ -931,7 +931,7 @@ static int _inquire_cb(void *data, const char *keyword) rc = gpg_err_code(rc); if (rc == GPG_ERR_EOF || !rc) { - if (len <= 0 || !result || !*result) { + if (len <= 0 || !result) { rc = 0; break; } @@ -1793,7 +1793,15 @@ static gpg_error_t do_pwmd_open(pwm_t *pwm, const char *filename, int nb) rc = pwmd_command(pwm, &result, "ISCACHED %s", filename); - if (rc == GPG_ERR_NOT_FOUND) { + if (rc && rc != GPG_ERR_NOT_FOUND) + return rc; + + if (!nb && rc == GPG_ERR_NOT_FOUND) { + if (pwm->password) { + password = pwm->password; + goto gotpassword; + } + if (pwm->passfunc) { rc = pwm->passfunc(pwm->passdata, &password); @@ -1802,96 +1810,84 @@ static gpg_error_t do_pwmd_open(pwm_t *pwm, const char *filename, int nb) goto gotpassword; } + } #ifdef WITH_PINENTRY - /* - * Get the password from pinentry. - */ - if (pwm->use_pinentry) { - /* - * Nonblocking is wanted. fork() then return a file descriptor - * that the client can use to read() from. - */ - if (nb) { - int p[2]; - pid_t pid; - pwmd_nb_status_t pw; - - if (pipe(p) == -1) - return gpg_error_from_syserror(); - - if (!pwm->filename) - pwm->filename = pwmd_strdup(filename); - - if (!pwm->filename) - return gpg_error_from_errno(ENOMEM); + if (rc == GPG_ERR_NOT_FOUND && pwm->use_pinentry) { + /* Get the passphrase using the LOCAL pinentry. */ + if (nb) { + int p[2]; + pid_t pid; + pwmd_nb_status_t pw; + + if (pipe(p) == -1) + return gpg_error_from_syserror(); + + if (!pwm->filename) + pwm->filename = pwmd_strdup(filename); + + if (!pwm->filename) + return gpg_error_from_errno(ENOMEM); #ifdef WITH_LIBPTH - pid = pth_fork(); + pid = pth_fork(); #else - pid = fork(); + pid = fork(); #endif - switch (pid) { - case 0: - close(p[0]); - pw.fd = p[0]; + switch (pid) { + case 0: + close(p[0]); + pw.fd = p[0]; - if (pwm->pinentry_timeout > 0) { - gpwm = pwm; - gtimeout = pwm->pinentry_timeout; - gelapsed = 0; - } + if (pwm->pinentry_timeout > 0) { + gpwm = pwm; + gtimeout = pwm->pinentry_timeout; + gelapsed = 0; + } - pw.error = getpin(pwm, &password, 0); + pw.error = getpin(pwm, &password, 0); - if (gtimeout && gelapsed >= gtimeout) - pw.error = GPG_ERR_TIMEOUT; + if (gtimeout && gelapsed >= gtimeout) + pw.error = GPG_ERR_TIMEOUT; - signal(SIGALRM, SIG_DFL); + signal(SIGALRM, SIG_DFL); - if (!pw.error) - snprintf(pw.password, sizeof(pw.password), "%s", - password); + if (!pw.error) + snprintf(pw.password, sizeof(pw.password), "%s", + password); - pinentry_disconnect(pwm); + pinentry_disconnect(pwm); #ifdef WITH_LIBPTH - pth_write(p[1], &pw, sizeof(pw)); + pth_write(p[1], &pw, sizeof(pw)); #else - write(p[1], &pw, sizeof(pw)); + write(p[1], &pw, sizeof(pw)); #endif - memset(&pw, 0, sizeof(pw)); - close(p[1]); - _exit(0); - break; - case -1: - rc = gpg_error_from_syserror(); - close(p[0]); - close(p[1]); - return rc; - default: - break; - } - - close(p[1]); - pwm->nb_fd = p[0]; - pwm->nb_pid = pid; - return 0; + memset(&pw, 0, sizeof(pw)); + close(p[1]); + _exit(0); + break; + case -1: + rc = gpg_error_from_syserror(); + close(p[0]); + close(p[1]); + return rc; + default: + break; } + + close(p[1]); + pwm->nb_fd = p[0]; + pwm->nb_pid = pid; + return 0; } - else { -#endif - /* - * Not using pinentry and the file was not found - * in the cache. - */ - password = pwm->password; -#ifdef WITH_PINENTRY - } + + rc = getpin(pwm, &password, 0); + + if (rc) + return rc; #endif } - else if (rc) - return rc; gotpassword: pwm->state = ASYNC_DONE; @@ -1904,11 +1900,16 @@ gotpassword: if (!pwm->passfunc && password && password != pwm->password) pwmd_free(password); -#ifdef WITH_PINENTRY if (rc == GPG_ERR_INV_PASSPHRASE) { if (pin_try-- > 0 && !nb) { - rc = pwmd_command(pwm, &result, "OPTION TITLE=%s", - N_("Invalid passphrase, please try again.")); + +#ifdef WITH_PINENTRY + if (pwm->use_pinentry) + rc = getpin(pwm, &password, 1); + else +#endif + rc = pwmd_command(pwm, &result, "OPTION TITLE=%s", + N_("Invalid passphrase, please try again.")); if (rc) return rc; @@ -1916,12 +1917,13 @@ gotpassword: goto gotpassword; } +#ifdef WITH_PINENTRY if (nb) pinentry_disconnect(pwm); +#endif return rc; } -#endif if (!rc) { if (pwm->filename) @@ -1945,6 +1947,10 @@ gpg_error_t pwmd_open_async2(pwm_t *pwm, const char *filename) #else gpg_error_t rc; + /* Must be set so pinentry retries will work properly. */ + if (!pwm->use_pinentry) + return GPG_ERR_INV_STATE; + if (pwm->cmd != ASYNC_CMD_OPEN2) pwm->pin_try = 0; @@ -2028,82 +2034,87 @@ static gpg_error_t do_pwmd_save(pwm_t *pwm, int nb) if (!pwm) return GPG_ERR_INV_ARG; - if (pwm->use_pinentry || pwm->passfunc) { - rc = pwmd_command(pwm, &result, "ISCACHED %s", pwm->filename); + rc = pwmd_command(pwm, &result, "ISCACHED %s", pwm->filename); - if (rc == GPG_ERR_NOT_FOUND) { - if (pwm->passfunc) { - rc = pwm->passfunc(pwm->passdata, &password); + if (rc && rc != GPG_ERR_NOT_FOUND) + return rc; - if (rc) - return rc; - } + if (!nb && rc == GPG_ERR_NOT_FOUND) { + if (pwm->password) { + password = pwm->password; + goto gotpassword; + } + + if (pwm->passfunc) { + rc = pwm->passfunc(pwm->passdata, &password); + + if (rc) + return rc; + } + + goto gotpassword; + } + + if (rc == GPG_ERR_NOT_FOUND && pwm->use_pinentry) { #ifdef WITH_PINENTRY - else if (pwm->use_pinentry) { - if (nb) { - int p[2]; - pid_t pid; - pwmd_nb_status_t pw; + /* Get the password using the LOCAL pinentry. */ + if (nb) { + int p[2]; + pid_t pid; + pwmd_nb_status_t pw; - if (pipe(p) == -1) - return gpg_error_from_syserror(); + if (pipe(p) == -1) + return gpg_error_from_syserror(); #ifdef WITH_LIBPTH - pid = pth_fork(); + pid = pth_fork(); #else - pid = fork(); + pid = fork(); #endif - switch (pid) { - case 0: - close(p[0]); - pw.fd = p[0]; - password = NULL; - pw.error = do_save_getpin(pwm, &password); - pinentry_disconnect(pwm); - snprintf(pw.password, sizeof(pw.password), "%s", - password); + switch (pid) { + case 0: + close(p[0]); + pw.fd = p[0]; + password = NULL; + pw.error = do_save_getpin(pwm, &password); + pinentry_disconnect(pwm); + snprintf(pw.password, sizeof(pw.password), "%s", + password); #ifdef WITH_LIBPTH - pth_write(p[1], &pw, sizeof(pw)); + pth_write(p[1], &pw, sizeof(pw)); #else - write(p[1], &pw, sizeof(pw)); + write(p[1], &pw, sizeof(pw)); #endif - memset(&pw, 0, sizeof(pw)); - close(p[1]); - _exit(0); - break; - case -1: - rc = gpg_error_from_syserror(); - close(p[0]); - close(p[1]); - return rc; - default: - break; - } - + memset(&pw, 0, sizeof(pw)); + close(p[1]); + _exit(0); + break; + case -1: + rc = gpg_error_from_syserror(); + close(p[0]); close(p[1]); - pwm->nb_fd = p[0]; - pwm->nb_pid = pid; - return 0; - } - - rc = do_save_getpin(pwm, &password); - - if (rc) return rc; + default: + break; } -#endif - } - else { - if (rc) - return rc; - pwm->state = ASYNC_DONE; + close(p[1]); + pwm->nb_fd = p[0]; + pwm->nb_pid = pid; + return 0; } + + rc = do_save_getpin(pwm, &password); + + if (rc) + return rc; } +#endif else - password = pwm->password; + pwm->state = ASYNC_DONE; +gotpassword: rc = do_save_command(pwm, password); if (!pwm->passfunc && password && password != pwm->password) @@ -2119,6 +2130,10 @@ gpg_error_t pwmd_save_async2(pwm_t *pwm) #else gpg_error_t rc; + /* Must be set so pinentry retries will work properly. */ + if (!pwm->use_pinentry) + return GPG_ERR_INV_STATE; + pwm->cmd = ASYNC_CMD_SAVE2; pwm->state = ASYNC_PROCESS; rc = do_pwmd_save(pwm, 1); diff --git a/src/libpwmd.h.in b/src/libpwmd.h.in index e7eea2ae..939e182e 100644 --- a/src/libpwmd.h.in +++ b/src/libpwmd.h.in @@ -109,8 +109,8 @@ typedef enum { /*! \ref pwmd_process() should be called again. */ ASYNC_PROCESS, - /*! The command has completed. The result code should be checked for a - * command error. */ + /*! The command has completed. The result code should be checked for an + * error. */ ASYNC_DONE, } pwmd_async_t; @@ -160,7 +160,26 @@ typedef int (*pwmd_status_cb_t)(void *data, const char *line); /*! \typedef pwmd_inquire_cb_t * - * \todo + * This is a callback function that gets passed to \ref pwmd_inquire(). It is + * used for sending data to the server for commands that return an INQUIRE + * response (STORE and IMPORT). The reason for this callback is to let the + * client send as many bytes as it wants at a time rather than the entire + * chunk at once. It gets called during an \ref assuan_transact() from an + * internal inquire callback function which in turn calls this function by + * looping over its return value. + * + * \param data The data pointer passed to \ref pwmd_inquire(). + * \param keyword The \a cmd argument to \ref pwmd_inquire(). + * \param rc The result of the last call to \ref assuan_send_data() which did + * the real sending of the data to the pwmd server. On the first call to this + * callback it will always be 0 because no data has been sent yet. + * \param[out] line The next line of data to send or NULL. + * \param[out] len The length of \a line or 0. + * + * \retval 0 There is more data to be sent. + * \retval GPG_ERR_EOF No need to call this function again, the current + * \a line is the last to send. + * \retval code Any other error code which will terminate the INQUIRE. */ typedef gpg_error_t (*pwmd_inquire_cb_t)(void *data, const char *keyword, gpg_error_t rc, char **line, size_t *len); @@ -181,8 +200,12 @@ typedef enum { /*! User supplied data which is passed to the custom password function. */ PWMD_OPTION_PASSPHRASE_DATA, - /*! \bug The pwmd_open_async2() and pwmd_save_async() functions should - * send the required command before doing anything else. + /*! When 1, disable use of the pwmd pinentry. Note that \ref + * PWMD_OPTION_PASSPHRASE_CB and \ref PWMD_OPTION_PASSPHRASE have + * precedence over this option. + * + * \note This option must be set before calling \ref pwmd_open_async2() or + * \ref pwmd_save_async2(). * * \see \ref pinentry */ @@ -228,10 +251,8 @@ typedef enum { */ PWMD_OPTION_PINENTRY_TERM, - /*! A string to use as the passphrase when doing an open or save. - * - * \note The option \ref PWMD_OPTION_PINENTRY must be set for this option - * to work. + /*! A string to use as the passphrase when doing an open or save. When not + * NULL, this option has precedence over \ref PWMD_OPTION_PASSPHRASE_CB. */ PWMD_OPTION_PASSPHRASE, @@ -604,15 +625,16 @@ gpg_error_t pwmd_command_ap(pwm_t *pwm, char **result, const char *cmd, /*! \brief Send data to a pwmd server. * - * This lets commands that use an INQUIRE (STORE and INPORT) send data. + * This lets commands that use an INQUIRE (STORE and IMPORT) send the data + * lines. * * \param pwm A handle. - * \param cmd The command that uses an INQUIRE. + * \param cmd The command to send that uses an INQUIRE. * \param func A callback function which sets the data to be sent. * \param data A user data pointer passed to the callback function \a func. * \return 0 on success or an error code. - * \bug Should be rewritten to send an entire buffer and have a new function - * pwmd_inquire_async() to send the data in chunks. + * + * \see pwmd_inquire_cb_t */ gpg_error_t pwmd_inquire(pwm_t *pwm, const char *cmd, pwmd_inquire_cb_t func, void *data) @@ -709,8 +731,6 @@ char *pwmd_strdup(const char *str) /*! \def EPWMD_MAX_SLOTS * * There are no available cache slots for a new file. - * - * \bug Remove for pwmd 2.0. */ #define EPWMD_MAX_SLOTS GPG_ERR_USER_2 -- 2.11.4.GIT