+v3.2.5 (Jan Wolter - Oct 29, 2009)
+-----------------------------------------------
+ * Fixed a bug introduced in 3.2.0 in which data for checkpassword-type
+ authenticators is written to the authenticator's stdin instead of stderr.
+
v3.2.4 (Jan Wolter - May 20, 2009)
-----------------------------------------------
* Dropped the radius code from the distribution, because of possible problems
/* should we create pipes to stdin, stdout and stderr? */
((rc= apr_procattr_io_set(procattr,
- usepipein ? APR_FULL_BLOCK : APR_NO_PIPE,
+ (usepipein && !usecheck) ? APR_FULL_BLOCK : APR_NO_PIPE,
usepipeout ? APR_FULL_BLOCK : APR_NO_PIPE,
- APR_NO_PIPE)) != APR_SUCCESS) ||
+ (usepipein && usecheck) ? APR_FULL_BLOCK : APR_NO_PIPE))
+ != APR_SUCCESS ) ||
/* will give full path of program and make a new environment */
((rc= apr_procattr_cmdtype_set(procattr,
if (usepipein)
{
+ /* Select appropriate pipe to write to */
+ apr_file_t *pipe= (usecheck ? proc.err : proc.in);
+
/* Send the user */
- apr_file_write_full(proc.in, r->user, strlen(r->user), NULL);
- apr_file_putc(usecheck ? '\0' : '\n', proc.in);
+ apr_file_write_full(pipe, r->user, strlen(r->user), NULL);
+ apr_file_putc(usecheck ? '\0' : '\n', pipe);
/* Send the password */
- apr_file_write_full(proc.in, data, strlen(data), NULL);
- apr_file_putc(usecheck ? '\0' : '\n', proc.in);
+ apr_file_write_full(pipe, data, strlen(data), NULL);
+ apr_file_putc(usecheck ? '\0' : '\n', pipe);
/* Send dummy timestamp for checkpassword */
- if (usecheck) apr_file_write_full(proc.in, "0", 2, NULL);
+ if (usecheck) apr_file_write_full(pipe, "0", 2, NULL);
/* Close the file */
- apr_file_close(proc.in);
+ apr_file_close(pipe);
}
/* Wait for the child process to terminate, and get status */