1 2007-07-08 Marcus Brinkmann <marcus@g10code.de>
3 * assuan-defs.h (struct assuan_context_s): Have partial peercred
4 structure even if HAVE_W32_SYSTEM, and have full peercred
5 structure only if HAVE_SO_PEERCRED.
6 * assuan-connect.c (assuan_get_peercred) [!HAVE_SO_PEERCRED]: Do
7 not try to set PID, UID and GID.
9 2007-07-04 Marcus Brinkmann <marcus@g10code.de>
11 Change _WIN32 to HAVE_W32_SYSTEM for consistency.
13 * assuan-defs.h (struct assuan_context_s): Have full peercred
14 structure even if not HAVE_SO_PEERCRED, but not if
17 2007-06-18 Werner Koch <wk@g10code.com>
19 * assuan-logging.c (load_libgpg_error, _assuan_gpg_strerror_r)
20 (_assuan_gpg_strsource): New.
21 * assuan-handler.c (process_request) [W32]: Use these new
22 functions for human understable error codes.
24 2007-06-12 Werner Koch <wk@g10code.com>
26 * assuan-io.c (_assuan_simple_read): Hack to allow reading from a
28 (_assuan_simple_write): Likewise.
30 2007-06-11 Werner Koch <wk@g10code.com>
32 * assuan-io-pth.c (_assuan_simple_read, _assuan_simple_write): Use
33 pth versions also for W32.
35 2007-05-29 Werner Koch <wk@g10code.com>
37 * assuan-io-pth.c: Include sys/socket.h only if available. Remove
38 double inclusion of sys/wait.h
40 * assuan-pipe-connect.c (build_w32_commandline): Make ARGV const.
42 * assuan-pipe-server.c (is_valid_socket) [W32]: Do not define.
44 * assuan-socket-server.c [W32]: Include ws2tcpip.h to define
46 * assuan-defs.h (struct assuan_context_s): Define most peercred
47 members only if we can really set them.
48 (_assuan_simple_sendmsg, _assuan_simple_recvmsg) [W32]: Use a
50 * assuan.h (assuan_get_peercred) [W32]: Do not define.
51 * assuan-io.c (_assuan_simple_sendmsg, _assuan_simple_recvmsg)
52 [w32]: Use another prototype.
54 2007-05-09 Werner Koch <wk@g10code.com>
56 * libassuan.m4: Print found version on success.
58 2007-05-01 Werner Koch <wk@g10code.com>
60 * assuan-uds.c (uds_reader): Cast void ptr for arithmetics.
61 Reported by Peter O'Gorman.
63 2006-12-03 Marcus Brinkmann <marcus@g10code.de>
65 * assuan-handler.c (assuan_command_parse_fd): Also allow white
68 2006-12-02 Marcus Brinkmann <marcus@g10code.de>
70 * assuan-uds.c (uds_reader): Return 0 if recvmsg returns 0.
72 2006-12-01 Marcus Brinkmann <marcus@g10code.de>
74 * assuan-client.c (assuan_transact): Also translate some of the
77 2006-11-22 Werner Koch <wk@g10code.com>
79 * assuan-handler.c (fun1_cookie_write, fun2_cookie_write): New.
80 (assuan_get_data_fp) [HAVE_FUNOPEN]: Use it.
82 2006-11-21 Werner Koch <wk@g10code.com>
84 * Makefile.am (libassuan_pth_a_CFLAGS): New.
86 * assuan-pipe-server.c (_assuan_release_context): Free CMDTBL.
88 2006-11-14 Werner Koch <wk@g10code.com>
90 * libassuan.m4 (AM_CHECK_LIBASSUAN): New.
92 * assuan-handler.c (assuan_register_post_cmd_notify)
93 (assuan_register_post_cmd_notify): New.
94 * assuan-util.c (assuan_set_io_monitor): New.
95 * assuan-buffer.c (_assuan_read_line): Use it.
96 (_assuan_write_line): Ditto.
97 (_assuan_cookie_write_data): Ditto.
98 (_assuan_cookie_write_flush): Ditto.
100 2006-10-18 Werner Koch <wk@g10code.com>
102 * libassuan.m4: Pass "pthread" to the common macro. Reported by
105 2006-10-16 Werner Koch <wk@g10code.com>
107 * mkerrors: Map ASSUAN_Not_Confirmed.
109 2006-10-10 Werner Koch <wk@g10code.com>
111 * libassuan.m4 (AM_PATH_LIBASSUAN_PTH)
112 (AM_PATH_LIBASSUAN_PTHREAD): Fixed.
114 * assuan-buffer.c (assuan_sendfd): Implement a runtime detection
115 of implemented descripotr passing.
117 * assuan-uds.c: Take care of USE_DESCRIPTOR_PASSING.
119 * assuan-defs.h: Add missing semicolon.
121 2006-10-09 Werner Koch <wk@g10code.com>
123 * assuan-handler.c (process_request): Use weak pragma for the sake
124 of old gcc's. Reported by Alain Guibert.
126 * assuan-io.c: Removed Pth support.
127 * assuan-io-pth.c: New. Based on assuan-io.c
129 2006-10-06 Werner Koch <wk@g10code.com>
131 * libassuan-config.in: New options --api-version and --thread.
133 2006-10-04 Werner Koch <wk@g10code.com>
135 * assuan-client.c (assuan_transact): Need to map old assuan status
136 codes so that for example CANCELED is correctly mapped.
138 2006-09-28 Marcus Brinkmann <marcus@g10code.de>
140 * assuan-client.c (assuan_transact): Do not convert error on
141 status line, it is already a gpg-error. Do convert
144 2006-09-19 Marcus Brinkmann <marcus@g10code.de>
146 * assuan.h (assuan_init_socket_server_ext)
147 [_ASSUAN_EXT_SYM_PREFIX]: Fix typo in macro.
149 2006-09-19 Werner Koch <wk@g10code.com>
151 * assuan-defs.h (putc_unlocked): Add prototype.
153 * assuan-socket-server.c (accept_connection): Made LEN a socklen_t.
155 * assuan.h: Replaced assuan error code enum by simple defines and
156 made assuan_error_t an int.
157 * mkerrors: Changed parser accordingly.
159 2006-09-19 Marcus Brinkmann <marcus@g10code.de>
161 * assuan-pipe-connect.c: Add hacks for Slowaris.
162 * assuan-socket.c: Likewise here.
164 * assuan.h (enum): Avoid trailing comma in enumerator list. Ugh.
166 * mkerrors (_assuan_error): Change return type to assuan_error_t.
167 * assuan-buffer.c (_assuan_read_line): Change return type to
168 assuan_error_t. Map returned value of -1.
169 (_assuan_write_line): Change type of RC to assuan_error_t.
170 * assuan-defs.h (_assuan_read_line, _assuan_error): Likewise for
173 * assuan-defs.h (unsetenv): Define correctly.
175 2006-09-14 Werner Koch <wk@g10code.com>
177 * assuan-io.c (_assuan_waitpid): New. Changed all waitpid calls
180 * assuan.h (_ASSUAN_DEPRECATED): New internal macro.
181 (assuan_pipe_connect2): Declare deprecated.
182 (assuan_init_connected_socket_server): Declare deprecated.
184 * assuan-connect.c (assuan_get_peercred): New.
185 * assuan-socket-server.c (accept_connection_bottom): Save uid and gid.
187 2006-09-13 Werner Koch <wk@g10code.com>
189 * assuan-client.c (assuan_transact): Need to map the error code.
190 * mkerrors: Need to map ASSUAN_No_Secret_Key.
192 * assuan-pipe-server.c (is_valid_socket): New.
193 (assuan_init_pipe_server): Use UDS with the environmet variable is
194 set and a valid descriptor is given. Ignore FILEDES in this case.
196 * assuan-socket-server.c (assuan_init_socket_server_ext): New.
197 Changed other init fucntions to make use of it.
199 * assuan-handler.c (assuan_command_parse_fd): Allow for lowercase
201 (std_handler_reset): Close pending fds.
202 * assuan-uds.c (uds_receivefd): Fixed.
203 (_assuan_uds_close_fds): New.
205 * assuan-socket-connect.c (assuan_socket_connect_ext): New. Takes
206 all code of assuan_socket_connect plus an option to use sendmsg.
207 * assuan-pipe-connect.c (assuan_pipe_connect_ext): New arg FLAGS.
209 2006-09-12 Werner Koch <wk@g10code.com>
211 * assuan-buffer.c (_assuan_write_line): Also log the prefix.
213 * assuan-defs.h (DIM, DIMof): New.
215 * assuan-domain-server.c: Removed.
216 * assuan-domain-connect.c: Renamed to ..
217 * assuan-uds.c: this.
218 (domain_reader, domain_writer, domain_sendfd, domain_receivefd)
219 (assuan_domain_connect, _assuan_domain_init): Removed.
220 (uds_reader, uds_writer, uds_sendfd, uds_receivefd)
221 (_assuan_init_uds_io): New.
222 (_assuan_uds_deinit): New.
224 * assuan-io.c (_assuan_simple_sendmsg, _assuan_simple_recvmsg): New.
225 (my_pth_fdmode, my_pth_select): New.
227 2006-09-11 Werner Koch <wk@g10code.com>
229 * assuan-pipe-server.c (assuan_init_pipe_server): Allow for
230 FILEDES to be NULL and try to start as a socketpair server in this
233 * assuan-pipe-connect.c (assuan_pipe_connect2): Split up into two
234 functions (unix and w32) for clarity.
235 (pipe_connect_unix): This is the new fucntion. Add USE_CMSG flag.
236 (pipe_connect_w32): Ditto.
237 (initial_handshake): Factored out code.
238 (socketpair_connect): New.
239 (assuan_pipe_connect_ext): New.
240 (do_finish): Handle case if outbound and inbound fd are the same.
241 This is to support socketpairs.
243 2006-09-10 Werner Koch <wk@g10code.com>
245 * assuan-util.c (_assuan_log_print_buffer)
246 (_assuan_log_sanitized_string,assuan_set_log_stream): Moved to ..
247 * assuan-logging.c: .. here.
248 (_assuan_log_print_buffer): Only print the leading bytes in hex
249 log mode unless the new env variable ASSUAN_FULL_LOGGING has been
251 (_assuan_set_default_log_stream): Test this env variable.
253 2006-09-06 Werner Koch <wk@g10code.com>
255 * assuan.h (_ASSUAN_ONLY_GPG_ERRORS): New.
257 * assuan-handler.c (dispatch_command): Use Syntax_Error instead of
260 * assuan-domain-connect.c: Changed alloc malloc/free/realloc to
262 (read_int, write_int): Make args void pointers.
263 (domain_receivefd): Take care of realloc shrinking failure.
265 * assuan-buffer.c (_assuan_read_line, _assuan_write_line)
266 (assuan_write_line, _assuan_cookie_write_data)
267 (_assuan_cookie_write_flush): Print the inbound fd instead of the
268 address of the context when logging I/0. This makes it more
271 2006-09-05 Werner Koch <wk@g10code.com>
273 * assuan-defs.h (err_code, err_is_eof): New.
275 * mkerrors (_assuan_error): New. Wrapped all error code
276 assignments in a call to this.
277 (assuan_strerror): Map gpg-style error codes back. Also print a
278 string for the old EOF code.
279 (assuan_set_assuan_err_source): New.
281 * assuan-logging.c (_assuan_log_printf): Do not change ERRNO and
284 * assuan-domain-connect.c (domain_reader): Replaced plain printf
285 by assuan_log function.
287 2005-10-24 Werner Koch <wk@g10code.com>
289 * putc_unlocked.c, memrchr.c, isascii.c, funopen.c: Changed
290 distribution terms to LGPL. This are small and trivial files so
291 there are no obstacles of doing so.
292 * assuan-socket.c: Likewise, the stated GPL was not intended.
294 2005-10-08 Marcus Brinkmann <marcus@g10code.de>
296 * assuan-defs.h (setenv, unsetenv, clearenv) [!HAVE_SETENV]:
298 * setenv.c: Include "assuan-defs.h".
299 (__add_to_environ): Make static.
301 2005-10-07 Marcus Brinkmann <marcus@g10code.de>
303 * assuan-defs.h (memrchr) [!HAVE_MEMRCHR]: New prototype.
304 (stpcpy) [!HAVE_STPCPY]: Likewise.
305 * stpcpy.c: New LGPL'ed file from the GNU C Library.
306 * setenv.c: New file.
307 * assuan-domain-connect.c (read_int): New function.
308 (write_int): New function.
309 (domain_reader): Use read_int.
310 (domain_sendfd): Use write_int.
312 2005-10-01 Marcus Brinkmann <marcus@g10code.de>
314 * assuan.h (assuan_pipe_connect, assuan_pipe_connect2): Make type
315 of ARGV parameter const in prototype.
316 * assuan-pipe-connect.c (assuan_pipe_connect,
317 assuan_pipe_connect2): Likewise in declaration.
318 (assuan_pipe_connect2): Add braindead cast to make execv happy.
320 * assuan-client.c (assuan_transact): Change LINE, S and D from
321 unsigned char * to char * to silence gcc warning.
322 * assuan-util.c (_assuan_log_sanitized_string): Add explicit cast
323 to silence gcc warning.
324 * assuan-inquire.c (assuan_inquire): Likewise.
326 2005-08-19 Werner Koch <wk@g10code.com>
328 * funopen.c, assuan-socket.c: Copied from libassuan CVS.
329 * assuan-pipe-connect.c (assuan_pipe_connect2): Add missing
332 2005-08-09 Werner Koch <wk@g10code.com>
334 * README.1st: Adjusted to cope with changes done in upstream Assuan.
336 Merged changes for W32 support from libassuan.
338 * assuan.h [_ASSUAN_EXT_SYM_PREFIX]: New.
339 * assuan-io.c [_ASSUAN_NO_PTH]: New.
340 * assuan-pipe-connect.c (fix_signals) [_ASSUAN_NO_FIXED_SIGNALS]: New.
341 (assuan_pipe_connect2) [_ASSUAN_USE_DOUBLE_FORK]: Use double fork.
342 (fix_signals) [_ASSUAN_USE_DOUBLE_FORK]: Do not wait..
343 * assuan-logging.c, assuan-io.c: Include config.h
344 Replaced all usages of _WIN32 by the new HAVE_W32_SYSTEM because
345 there is nothing winning in this API.
346 * assuan-pipe-connect.c (assuan_pipe_connect2) [_WIN32]: Return
347 error Not Imlemented.
348 * assuan-logging.c (_assuan_w32_strerror): New.
349 * assuan-defs.h (w32_strerror): new.
350 * assuan-pipe-connect.c (assuan_pipe_connect2, fix_signals):
351 Factored signal code out to new function.
352 (build_w32_commandline, create_inheritable_pipe): New. Taken
354 (assuan_pipe_connect2) [W32]: Implemented for W32.
355 * assuan-pipe-server.c (assuan_init_pipe_server) [W32]: Map file
356 descriptors using _get_osfhandle.
357 * assuan-socket-connect.c (assuan_socket_connect) [W32]: Allow for
358 a drive letter in the path.
359 * assuan-client.c (assuan_transact): Handle empty and comment
361 * assuan-util.c (_assuan_calloc): Avoid integer overflow.
362 * assuan-util.c (assuan_set_flag, assuan_get_flag): New.
363 * assuan-defs.h (struct assuan_context_s): New field flags.
364 * assuan.h (assuan_flag_t): New with one flag value
365 ASSUAN_NO_WAITPID for now.
366 * assuan-pipe-connect.c (do_finish): Take care of the no_waitpid
368 * mkerrors: Include config.h into assuan-errors.c. This is
369 required so that assuan.h knows about the W32 macro.
371 2005-08-09 Timo Schulz <twoaday@g10code.com> (ported from libassuan by wk)
373 * assuan-io.c (_assuan_simple_read, _assuan_simple_write): W32
375 * assuan-socket.c (_assuan_close): New.
376 (_assuan_sock_new): New.
377 (_assuan_sock_bind): New.
379 2005-03-22 Werner Koch <wk@g10code.com>
381 * assuan-defs.h (struct assuan_io): Renamed elements READ and
382 WRITE to READFNC and WRITEFNC to avoid problems with read defined
383 as macro. Changed callers. Noted by Ville Skyttä.
385 2004-12-16 Marcus Brinkmann <marcus@g10code.de>
387 * assuan-pipe-connect.c (do_finish): Do not wait for child to finish.
388 (assuan_pipe_connect): Use double-fork approach.
389 * assuan-connect.c (assuan_disconnect): Do not write BYE to the
392 2004-12-07 Marcus Brinkmann <marcus@g10code.de>
394 * README.1st: Add copyright notice.
396 2004-06-23 Marcus Brinkmann <marcus@g10code.de>
398 * assuan-domain-connect.c [HAVE_SYS_UIO_H]: Include <sys/uio.h>.
400 * assuan-handler.c: Include <errno.h>.
402 2004-06-08 Marcus Brinkmann <marcus@g10code.de>
404 * assuan-buffer.c (assuan_write_line): If the line is longer than
405 the maximum line length, bail out early.
407 2004-04-21 Werner Koch <wk@gnupg.org>
409 * assuan-socket-server.c (accept_connection_bottom): Save the pid
410 of the peer if it is available.
411 * assuan-socket-connect.c (assuan_socket_connect): Do not save the
412 dummy SERVED_PID arg.
413 * assuan-pipe-connect.c (do_finish): Don't wait if the pid is 0.
414 (assuan_pipe_connect2): Store the parents pid in the environment
416 * assuan-pipe-server.c (assuan_init_pipe_server): Initialize the
417 peer's pid from the environment.
418 * assuan-connect.c (assuan_get_pid): Do not return 0 as a PID.
420 2004-04-19 Werner Koch <wk@gnupg.org>
422 * assuan-socket-server.c, assuan-socket-connect.c: Includes
423 sys/types.h. Reported by Michael Nottebrock.
424 * assuan-domain-connect.c: Ditto.
426 2004-04-13 Werner Koch <wk@gnupg.org>
428 * assuan-util.c (_assuan_log_print_buffer): Relaxed quoting.
429 (_assuan_log_sanitized_string): Ditto.
431 2004-03-14 Werner Koch <wk@gnupg.org>
433 * assuan-handler.c: Include <errno.h>. Reported by Bernd Kuhls.
435 2004-02-18 Werner Koch <wk@gnupg.org>
437 * libassuan-config.in: Ignore setting of --prefix.
439 * assuan-handler.c (assuan_get_data_fp): Fail with ENOSYS if we
440 can't implement this.
442 2004-02-15 Werner Koch <wk@gnupg.org>
444 * memrchr.c (memrchr): Fixed implementation. Taken from gpgme.
446 2004-02-13 Werner Koch <wk@gnupg.org>
448 * assuan-domain-connect.c: Removed the unneeded alloca.h.
450 2004-01-24 Werner Koch <wk@gnupg.org>
452 * assuan-pipe-connect.c (assuan_pipe_connect2): New as an
453 extension of assuan_pipe_connect. Made the latter call this one.
455 2004-01-14 Werner Koch <wk@gnupg.org>
457 * assuan-buffer.c (_assuan_cookie_write_data): Return the
458 requested size to indicate successful operation. Fixes a spurious
459 bug we previously fixed using fflush().
461 2003-12-22 Werner Koch <wk@gnupg.org>
463 * assuan.h (ASSUAN_Locale_Problem): Added.
464 * assuan-errors.c (assuan_strerror): Ditto.
466 2003-12-18 Werner Koch <wk@gnupg.org>
468 * assuan.h (AssuanCommand): Clarified that these are now
469 deprecated and actually useless.
470 (assuan_error_t): Clarified and added ASSUAN_USER_ERROR_FIRST,
471 ASSUAN_USER_ERROR_LAST.
473 2003-12-16 Werner Koch <wk@gnupg.org>
475 * assuan-buffer.c: Changed formatting of the debug output prefix.
476 * assuan-util.c (assuan_set_log_stream): Set global log stream if
477 it has not been done yet.
478 * assuan-logging.c (_assuan_set_default_log_stream): New.
479 (assuan_set_assuan_log_prefix): New.
481 2003-12-11 Werner Koch <wk@gnupg.org>
483 * funopen.c (_assuan_funopen): Renamed from funopen, to keep the
484 name space clean and avoid duplicate definitions if another
485 library uses the same replacement.
486 * assuan-defs.h (funopen): Renamed prototype and add a macro.
488 2003-12-08 Werner Koch <wk@gnupg.org>
492 2003-11-12 Werner Koch <wk@gnupg.org>
494 * assuan-handler.c (process_request): Kludge to print better error
495 messages for gpg-error enabled programs.
497 2003-11-06 Werner Koch <wk@gnupg.org>
499 * assuan.h (assuan_context_t): New. Should be used in favor of
501 (assuan_error_t): New. To be used instead of AssuanError.
503 2003-11-11 Moritz Schulte <mo@g10code.com>
505 * assuan-socket-connect.c (assuan_socket_connect): Fix computation
506 of socket address length.
508 2003-08-13 Werner Koch <wk@gnupg.org>
510 * assuan-inquire.c (assuan_inquire): Increase length of cmdbuf to
513 2003-06-24 Werner Koch <wk@gnupg.org>
515 * mkerrors: Kludge to print libgpg-error values in an easier
518 2003-04-29 Werner Koch <wk@gnupg.org>
520 * libassuan.m4: New. Based on libgrypt.m4.
521 * Makefile.am (m4data_DATA): New.
523 * assuan.h (AssuanCommand): Removed.
525 * assuan-handler.c: Remove the cmd_id element,
526 (assuan_register_command): Likewise. Note that semantics changed.
527 (_assuan_register_std_commands): Adjusted.
529 2003-02-22 Neal H. Walfield <neal@g10code.de>
531 * Makefile.am (bin_SCRIPTS): Renamed from bin_PROGRAMS.
533 2003-02-18 Neal H. Walfield <neal@g10code.de>
535 * Makefile.am (libassuan_a_LIBADD): New variable.
536 * funopen.c: Move from ../common.
537 * isascii.c: Likewise.
538 * memrchr.c: Likewise.
539 * putc_unlocked.c: Likewise.
541 2003-02-18 Neal H. Walfield <neal@g10code.de>
543 * assuan-handler.c (_IO_cookie_io_functions_t): Remove.
544 (cookie_io_functions_t): Remove.
545 (fopencookie): Remove prototype.
546 (assuan_get_data_fp): Use funopen, not fopencookie.
548 2003-02-18 Neal H. Walfield <neal@g10code.de>
550 * libassuan-config.in: New file.
551 * Makefile.am (bin_PROGRAMS): New variable.
553 2003-02-17 Neal H. Walfield <neal@g10code.de>
555 * .cvsignore: New file.
557 2003-02-17 Neal H. Walfield <neal@g10code.de>
559 * Makefile.am (lib_LIBRARIES): Use this instead of . . .
560 (noinst_LIBRARIES): . . . this.
561 (include_HEADERS): New variable.
562 (libassuan_a_SOURCES): Remove assuan.h, add assuan-logging.c.
564 * assuan.h (assuan_set_assuan_log_stream): New prototype.
565 (assuan_get_assuan_log_stream): Likewise.
566 (assuan_get_assuan_log_prefix): Likewise.
567 * assuan-logging.c: New file.
569 * assuan-buffer.c [HAVE_JNLIB_LOGGIN]: Do not include
570 "../jnlib/logging.h".
571 (my_log_prefix): Remove function.
572 (_assuan_read_line): Use assuan_get_assuan_log_prefix in lieu of
574 (assuan_write_line): Likewise.
575 (_assuan_cookie_write_data): Likewise.
576 (_assuan_cookie_write_flush): Likewise.
577 * assuan-domain-connect.c (LOGERROR, LOGERROR1, LOGERROR2,
580 (domain_reader): Use it.
581 (domain_writer): Likewise.
582 (domain_sendfd): Likewise.
583 (domain_receivefd): Likewise.
584 (_assuan_domain_init): Likewise.
585 (assuan_domain_connect): Likewise.
586 * assuan-pipe-connect.c [HAVE_JNLIB_LOGGIN]: Do not include
587 "../jnlib/logging.h".
588 (LOGERROR, LOGERROR1, LOGERROR2, LOGERRORX): Remove.
590 (assuan_pipe_connect): Use it.
591 * assuan-socket-connect.c [HAVE_JNLIB_LOGGIN]: Do not include
592 "../jnlib/logging.h".
593 (LOGERROR, LOGERROR1, LOGERROR2, LOGERRORX): Remove.
595 (assuan_socket_connect): Use it.
596 (socket_reader): Remove dead code.
597 (socket_writer): Likewise.
598 * assuan-util.c [HAVE_JNLIB_LOGGIN]: Do not include
599 "../jnlib/logging.h".
600 (_assuan_log_sanitized_string): Use assuan_get_assuan_log_stream,
603 2002-11-24 Neal H. Walfield <neal@g10code.de>
605 * assuan.h (assuan_command_parse_fd): New prototype.
606 * assuan-handler.c (assuan_command_parse_fd): Rename from
607 parse_cmd_input_output. Export.
608 (std_handler_input): Update to use assuan_command_parse_fd.
609 (std_handler_output): Likewise.
611 2002-11-24 Neal H. Walfield <neal@g10code.de>
613 * assuan.h (assuan_sendfd): New prototype.
614 (assuan_receivefd): New prototype.
615 * assuan-buffer.c (assuan_sendfd): New function.
616 (assuan_receivefd): New function.
617 * assuan-handler.c (parse_cmd_input_output): Recognize incoming
618 file descriptors and act appropriately.
619 * assuan-defs.h (struct assuan_io): Add fields sendfd and
621 (struct assuan_context_s): Add fields pendingfds and
623 * assuan-pipe-server.c (_assuan_new_context): Update IO to reflect
625 * assuan-domain-connect.c (do_deinit): Cleanup any unreceived file
627 (domain_reader): Receive file descriptors.
628 (domain_sendfd): New function.
629 (domain_receivefd): New function.
630 (_assuan_domain_init): Update initialization code to reflect new
633 2002-11-24 Neal H. Walfield <neal@g10code.de>
635 * assuan-domain-connect.c (do_finish): Remove.
636 (_assuan_domain_init): Use default handlers where possible.
637 Add an assert and update comments.
638 * assuan-domain-server.c (accept_connection): Remove.
639 (assuan_init_domain_server): Use default handlers where possible.
640 Put the server in pipe mode: it can only be used by a single
643 2002-11-24 Neal H. Walfield <neal@g10code.de>
645 * assuan.h: Add prototype for assuan_domain_connect and
646 assuan_init_domain_server.
647 * assuan-defs.h: Include <unistd.h>.
648 Add prototype for _assuan_domain_init.
649 * assuan-domain-connect.c: New file.
650 * assuan-domain-server.c: New file.
651 * Makefile.am (libassuan_a_SOURCES): Add assuan-domain-connect.c
652 and assuan-domain-server.c
654 2002-11-23 Neal H. Walfield <neal@g10code.de>
656 * Makefile.am (libassuan_a_SOURCES): Add assuan-io.c.
657 * assuan-io.c: Restore.
658 (_assuan_simple_read): Rename from _assuan_read.
659 (_assuan_simple_write): Rename from _assuan_write.
660 * assuan-defs.h (_assuan_simple_read): New prototype.
661 (_assuan_simple_write): Likewise.
662 * assuan-pipe-server.c (pipe_reader): Remove.
663 (pipe_writer): Remove.
664 (_assuan_new_context): Initialize IO is with _assuan_simple_read
665 and _assuan_simple_write.
666 * assuan-socket-connect.c (socket_reader): Remove.
667 (socket_writer): Remove.
668 (assuan_socket_connect): Initialize IO is with _assuan_simple_read
669 and _assuan_simple_write.
670 * assuan-socket-server.c (io): New local variable.
671 (assuan_init_socket_server): Initialize CTX->io.
672 (assuan_init_connected_socket_server): Likewise.
674 2002-11-23 Neal H. Walfield <neal@g10code.de>
676 * assuan-buffer.c (readline): Use memrchr.
677 (_assuan_read_line): Rewritten to use the string functions.
679 2002-11-20 Neal H. Walfield <neal@g10code.de>
681 * assuan-socket-connect.c (assuan_socket_connect): Pass PF_LOCAL
682 to socket(), not AF_UNIX: it expects a PF_* macro and the former
684 (assuan_socket_connect): Use AF_LOCAL, not AF_UNIX which is more
687 2002-11-20 Neal H. Walfield <neal@g10code.de>
689 * assuan-defs.h (struct assuan_io): New structure.
690 (struct assuan_context_s): New field, io.
691 (_assuan_read): Depreciated.
692 (_assuan_write): Likewise.
693 * assuan-pipe-server.c: Include <unistd.h>.
694 (pipe_reader): New function.
695 (pipe_writer): Likewise.
696 (_assuan_new_context.IO): New local static. Set to pipe_reader
697 and pipe_writer. Use it to initialize new context.
698 * assuan-socket-connect.c (socket_reader): New function.
699 (socket_writer): New function.
700 (assuan_socket_connect.IO): New local static. Set to socket_reader
701 and socket_writer. Use it to initialize new context.
702 * assuan-buffer.c (writen): Take an ASSUAN_CONTEXT rather than a
703 file descriptor. Do not use _assuan_write but the write method
704 in the supplied context.
705 (readline): Likewise for _assuan_read.
706 (assuan_write_line): When calling writen, pass CTX; not the file
708 (_assuan_cookie_write_data): Likewise.
709 (_assuan_cookie_write_flush): Likewise.
710 (_assuan_read_line): Likewise for readline.
711 * Makefile.am (libassuan_a_SOURCES): Remove assuan-io.c.
712 * assuan-io.c: Removed.
714 2002-11-10 Werner Koch <wk@gnupg.org>
716 * assuan-pipe-connect.c (assuan_pipe_connect): Changed the order
717 of the dups to handle cases where we have already used fd 2 for
720 2002-10-31 Neal H. Walfield <neal@g10code.de>
722 * assuan-util.c: Include <ctype.h>.
723 (_assuan_log_print_buffer): Elide the magic numbers preferring the
724 standard isfoo functions. Use putc_unlocked where possible.
725 (_assuan_log_sanitized_string): Rewrite to use putc_unlocked and
728 2002-09-05 Neal H. Walfield <neal@g10code.de>
730 * assuan-defs.h (_assuan_read_wrapper): Depreciated.
731 * assuan-util.c (_assuan_read_wrapper): Removed.
732 * assuan-defs.h (_assuan_write_wrapper): Depreciated.
733 * assuan-util.c (_assuan_write_wrapper): Removed.
734 * assuan.h (assuan_set_io_fun): Depreciated.
735 * assuan-util.c (assuan_set_io_fun): Removed.
737 * assuan-defs.h (_assuan_read): New function.
738 (_assuan_write): Likewise.
739 * assuan-io.c: New file.
741 * assuan-buffer.c (writen): Use _assuan_write rather than doing
743 (readline): Likewise for _assuan_read.
745 * Makefile.am (libassuan_a_SOURCES): Add assuan-io.c.
747 2002-08-16 Werner Koch <wk@gnupg.org>
749 * assuan.h: Renamed Bad_Certificate_Path to Bad_Certificate_Chain.
751 2002-07-30 Werner Koch <wk@gnupg.org>
753 Changed the license from GPL to LGPL.
755 2002-07-23 Werner Koch <wk@gnupg.org>
757 * assuan-handler.c (_IO_cookie_io_functions_t): Define it here if
760 2002-06-27 Werner Koch <wk@gnupg.org>
762 * assuan-pipe-connect.c (assuan_pipe_connect): No special handling
763 for the log_fd and stderr. Connect stderr to /dev/null if it
764 should not be retained.
766 2002-06-26 Werner Koch <wk@gnupg.org>
768 * assuan-buffer.c (assuan_write_line): Make sure we never
769 accidently print an extra LF.
771 2002-05-23 Werner Koch <wk@gnupg.org>
773 * assuan-util.c (assuan_set_io_func): New.
774 * assuan-buffer.c (writen, readline): Use the new functions
776 * assuan-socket-server.c (accept_connection): Don't use the
777 pth_accept - using the assuan included accept code would be a bad
778 idea within Pth so we don't need a replacement function.
780 2002-05-22 Werner Koch <wk@gnupg.org>
782 * assuan-socket-server.c (assuan_init_connected_socket_server): New.
783 (accept_connection): Factored most code out to..
784 (accept_connection_bottom): .. new function.
786 2002-04-04 Werner Koch <wk@gnupg.org>
788 * assuan-buffer.c (my_log_prefix): New. Use it for all i/o debug
791 2002-03-06 Werner Koch <wk@gnupg.org>
793 * assuan-client.c (_assuan_read_from_server): Detect END.
794 (assuan_transact): Pass it to the data callback.
796 2002-02-27 Werner Koch <wk@gnupg.org>
798 * assuan-client.c (assuan_transact): Add 2 more arguments to
799 support status lines. Passing NULL yields the old behaviour.
801 * assuan-handler.c (process_request): Flush data lines send
802 without using the data fp.
804 2002-02-14 Werner Koch <wk@gnupg.org>
806 * assuan-inquire.c (assuan_inquire): Check for a cancel command
807 and return ASSUAN_Canceled. Allow for non-data inquiry.
809 * assuan.h: Add a few token specific error codes.
811 2002-02-13 Werner Koch <wk@gnupg.org>
813 * assuan-defs.h (assuan_context_s): New var CLIENT_PID.
814 * assuan-pipe-server.c (_assuan_new_context): set default value.
815 * assuan-socket-server.c (accept_connection): get the actual pid.
817 2002-02-12 Werner Koch <wk@gnupg.org>
819 * assuan-buffer.c (writen,readline) [USE_GNU_PT]: Use pth_read/write.
820 * assuan-socket-server.c (accept_connection) [USE_GNU_PTH]: Ditto.
822 2002-02-01 Marcus Brinkmann <marcus@g10code.de>
824 * Makefile.am (MOSTLYCLEANFILES): New variable.
826 2002-01-23 Werner Koch <wk@gnupg.org>
828 * assuan-socket-connect.c (LOGERRORX): and removed typo.
830 2002-01-22 Marcus Brinkmann <marcus@g10code.de>
832 * assuan-socket-connect.c (LOGERRORX): Reverse arguments to fputs.
834 2002-01-21 Werner Koch <wk@gnupg.org>
836 * assuan-connect.c: Move all except assuan_get_pid to...
837 * assuan-pipe-connect.c: this.
838 (assuan_pipe_disconnect): Removed.
839 (do_finish, do_deinit): New
840 (assuan_pipe_connect): and set them into the context.
841 * assuan-socket-connect.c: New.
843 * assuan-util.c (_assuan_log_sanitized_string): New.
845 * assuan-pipe-server.c (assuan_init_pipe_server): Factored most
847 (_assuan_new_context): new func.
848 (_assuan_release_context): New
849 * assuan-connect.c (assuan_pipe_connect): Use the new functions.
851 2002-01-20 Werner Koch <wk@gnupg.org>
853 * assuan.h: Added Invalid Option error code.
855 * assuan-handler.c (std_handler_option): New.
856 (std_cmd_tbl): Add OPTION as standard command.
857 (assuan_register_option_handler): New.
858 (dispatch_command): Use case insensitive matching as a fallback.
859 (my_strcasecmp): New.
861 2002-01-19 Werner Koch <wk@gnupg.org>
863 * assuan-buffer.c (_assuan_read_line): Add output logging.
864 (assuan_write_line): Ditto.
865 (_assuan_cookie_write_data): Ditto.
866 (_assuan_cookie_write_flush): Ditto.
867 * assuan-util.c (_assuan_log_print_buffer): New.
868 (assuan_set_log_stream): New.
869 (assuan_begin_confidential): New.
870 (assuan_end_confidential): New.
872 * assuan-defs.h: Add a few handler variables.
873 * assuan-pipe-server.c (assuan_deinit_pipe_server): Removed.
874 (deinit_pipe_server): New.
875 (assuan_deinit_server): New. Changed all callers to use this.
876 * assuan-listen.c (assuan_accept): Use the accept handler.
877 * assuan-handler.c (process_request): Use the close Handler.
878 * assuan-socket-server.c: New.
880 2002-01-14 Werner Koch <wk@gnupg.org>
882 * assuan-client.c (_assuan_read_from_server): Skip spaces after
885 2002-01-03 Werner Koch <wk@gnupg.org>
887 * assuan-handler.c (assuan_set_okay_line): New.
888 (process_request): And use it here.
890 2002-01-02 Werner Koch <wk@gnupg.org>
892 * assuan-inquire.c (init_membuf,put_membuf,get_membuf): Apply a
893 hidden 0 behind the buffer so that the buffer can be used as a
894 string in certain contexts.
896 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
898 * assuan-connect.c (assuan_pipe_connect): New argument
899 FD_CHILD_LIST. Don't close those fds.
900 * assuan.h: Likewise for prototype.
902 2001-12-14 Werner Koch <wk@gnupg.org>
904 * assuan-listen.c (assuan_close_input_fd): New.
905 (assuan_close_output_fd): New.
906 * assuan-handler.c (std_handler_reset): Always close them after a
908 (std_handler_bye): Likewise.
910 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
912 * assuan-buffer.c (_assuan_read_line): New variable ATTICLEN, use
913 it to save the length of the attic line.
914 Rediddle the code a bit to make it more clear what happens.
916 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
918 * assuan-defs.h (LINELENGTH): Define as ASSUAN_LINELENGTH.
919 assuan.h: Define ASSUAN_LINELENGTH.
921 2001-12-13 Marcus Brinkmann <marcus@g10code.de>
923 * assuan-buffer.c (assuan_read_line): Fix order of execution to
924 get correct return values.
926 2001-12-13 Werner Koch <wk@gnupg.org>
928 * assuan-handler.c (assuan_get_active_fds): Fixed silly bug,
929 pretty obvious that nobody ever tested this function.
931 2001-12-12 Werner Koch <wk@gnupg.org>
933 * assuan-connect.c (assuan_pipe_connect): Implemented the inital
935 * assuan-client.c (read_from_server): Renamed to
936 (_assuan_read_from_server): this and made external.
938 * assuan-listen.c (assuan_set_hello_line): New.
939 (assuan_accept): Use a custom hello line is available.
941 * assuan-buffer.c (assuan_read_line): New.
942 (assuan_pending_line): New.
943 (_assuan_write_line): Renamed to ..
944 (assuan_write_line): this, made public and changed all callers.
946 2001-12-04 Werner Koch <wk@gnupg.org>
948 * assuan-connect.c (assuan_pipe_connect): Add more error reporting.
949 * assuan-client.c: New.
951 * assuan-inquire.c: New.
952 * assuan-handler.c (process_request): Check for nested invocations.
954 2001-11-27 Werner Koch <wk@gnupg.org>
956 * assuan-handler.c (assuan_register_input_notify): New.
957 (assuan_register_output_notify): New.
959 2001-11-26 Werner Koch <wk@gnupg.org>
961 * assuan.h: Added more status codes.
963 2001-11-25 Werner Koch <wk@gnupg.org>
965 * assuan-handler.c (assuan_register_bye_notify)
966 (assuan_register_reset_notify)
967 (assuan_register_cancel_notify): New and call them from the
969 (assuan_process): Moved bulk of function to ..
970 (process_request): .. new.
971 (assuan_process_next): One shot version of above.
972 (assuan_get_active_fds): New.
974 2001-11-24 Werner Koch <wk@gnupg.org>
976 * assuan-connect.c (assuan_get_pid): New.
978 * assuan-buffer.c (_assuan_read_line): Deal with reads of more
980 * assuan-defs.h: Add space in the context for this.
983 Copyright 2001, 2002, 2006 Free Software Foundation, Inc.
985 This file is free software; as a special exception the author gives
986 unlimited permission to copy and/or distribute it, with or without
987 modifications, as long as this notice is preserved.
989 This file is distributed in the hope that it will be useful, but
990 WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
991 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.