| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
* src/assuan-socket.c (_assuan_sock_accept): New.
(assuan_sock_accept): New.
* src/assuan.h.in (assuan_sock_accept): New.
--
GnuPG-bug-id: 5925
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/assuan-defs.h (struct assuan_context_s): Add is_socket flag.
* src/assuan-socket.c (assuan_sock_init): Set the flag.
* src/assuan-socket-connect.c (_assuan_connect_finalize): Likewise.
* src/assuan-socket-server.c (assuan_init_socket_server): Likewise.
* src/system-w32.c (__assuan_close): Use the flag.
(is_socket): Remove.
(__assuan_read, __assuan_write): Use the flag.
--
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/posix-fd-t.inc.h (assuan_fd_from_posix_fd): Revert.
* src/w32-fd-t.inc.h (assuan_fd_from_posix_fd): Revert.
* src/system-w32.c (assuan_fd_from_posix_fd): Revert.
--
Note that assuan_fd_from_posix_fd is exposed inline function.
Fixes-commit: 28a40a298661877e1bbeb3eb9ac58a85bdd85b02
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
|
|
| |
* src/putc_unlocked.c: Remove.
* configure.ac: Remove putc_unlocked replace.
--
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/assuan-defs.h (_assuan_pre_syscall, _assuan_post_syscall): New.
* src/assuan.c (_assuan_pre_syscall, _assuan_post_syscall): New.
(pre_syscall_func, post_syscall_func): New.
(_assuan_syscall_func_initialized): New.
(assuan_new_ext): Call gpgrt_get_syscall_clamp to get clamp functions.
* src/system-posix.c (_assuan_system_hooks): Use version 0.
* src/system-w32.c (_assuan_system_hooks): Likewise.
* src/system.c (_assuan_usleep): Call clamp functions if no hooks.
(_assuan_close, _assuan_close_inheritable, _assuan_read): Likewise.
(_assuan_write, _assuan_recvmsg, _assuan_sendmsg): Likewise.
(_assuan_waitpid, _assuan_connect): Likewise.
(_assuan_pipe): Call __assuan_pipe directly if no hooks.
(_assuan_spawn): Call __assuan_spawn directly if no hooks.
(_assuan_socketpair): Call __assuan_socketpair directly if no hooks.
(_assuan_socket): Call __assuan_socket directly if no hooks.
--
GnuPG-bug-id: 5914
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
|
|
| |
* m4/Makefile.am (EXTRA_DIST): Add ax_cc_for_build.m4 and
gpg-error.m4. Remove sys_socket_h.m4.
--
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/assuan.h.in (assuan_socket_connect_fd): Second arg assuan_fd_t.
* src/assuan-socket-connect.c (assuan_socket_connect_fd): Second arg
should be an object of type SOCKET.
* src/posix-fd-t.inc.h (assuan_fd_from_posix_fd): Remove.
* src/w32-fd-t.inc.h (assuan_fd_from_posix_fd): Move to...
* src/system-w32.c (assuan_fd_from_posix_fd): ... here.
--
On Windows, when an application has an already-connected socket, it
must be an object of type SOCKET. In this case, it is wrong to use
_get_osfhandle.
This does not constitute any ABI/API change for POSIX system.
This is an API change for Windows, as assuan_fd_t on Windows is
pointer type, but it's a fix from non-correctly-usable API.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac: Use AX_CC_FOR_BUILD.
* src/Makefile.am: Use EXEEXT_FOR_BUILD.
* m4/ax_cc_for_build.m4: New from libgpg-error.
--
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/assuan-defs.h (_assuan_socket): Return value has type assuan_fd_t.
(_assuan_connect): Second argument has type assuan_fd_t.
[HAVE_W64_SYSTEM] (SOCKET2HANDLE): Revert the change before.
* src/assuan-socket.c (_assuan_sock_new): No type coercion for
_assuan_socket.
(socks5_connect): No type coercion for _assuan_connect.
(_assuan_sock_connect): Likewise.
* src/assuan.h.in (struct assuan_system_hooks): Fix method signature
of socket for return value type and of connect for the second
argument.
(__assuan_socket): Return value has type assuan_fd_t.
(__assuan_connect): Second argument has type assuan_fd_t.
(ASSUAN_SYSTEM_NPTH_IMPL): Fix for _assuan_npth_connect for its
second argument.
* src/system-w32.c (__assuan_socket): Return value has type
assuan_fd_t.
Use SOCKET2HANDLE for type coercion for socket.
Use INVALID_SOCKET.
(__assuan_connect): Second argument has type assuan_fd_t.
Use HANDLE2SOCKET for type coercion for sock.
* src/system.c (_assuan_socket): Return value has type assuan_fd_t.
(_assuan_connect): Second argument has type assuan_fd_t.
--
Note that this change does *NOT* constitute any ABI change, no API
change, either. It is fix for internal consistency for socket.
The change of SOCKET2HANDLE in the past for HAVE_W64_SYSTEM was done,
because of internal use of 'int' which represents the type for socket.
Instead of fixing that part of code for 'int', I touched another part
to silence warnings. That's not correct fix, but a work around.
This time, with the changes, whole parts are now consisitent.
Fixes-commit: 6c736325c028647dc3283bf723e2e28199e7f45b
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac (USE_GPGRT_CONFIG): New.
* src/Makefile.am [USE_GPGRT_CONFIG]: Conditionalize the install
of libassuan-config.
--
When system will migrate use of gpgrt-config and removal of
gpg-error-config, libassuan-config will not be installed (but use
libassuan.pc by gpgrt-config).
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/posix-sys-pth-impl.h: Remove.
* src/w32-sys-pth-impl.h: Remove.
* src/Makefile.am: Follow the change.
* src/assuan.h.in (ASSUAN_SYSTEM_PTH_IMPL, ASSUAN_SYSTEM_PTH): Remove.
* src/mkheader.c (write_special): Remove Pth support.
--
GnuPG-bug-id: 5911
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
|
| |
* src/w32-types.inc.h: Distinguish the case of _WIN64.
--
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac (AC_PREREQ): Require >= 2.69.
(AC_HEADER_STDC): Remove.
* m4/sys_socket_h.m4: Remove.
--
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
| |
* configure.ac: Don't use gl_HEADER_SYS_SOCKET, but check winsock2.h.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/libtool.m4: Not setting 10.0 to MACOSX_DEPLOYMENT_TARGET when not
defined. Only specify -flat_namespace to linker for specific
(older) versions and hosts.
--
Original patch was by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
in
https://lists.gnu.org/archive/html/libtool-patches/
2020-06/msg00001.html
Reported-by: Aleix Conchillo Flaque
GnuPG-bug-id: 5610
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
| |
* configure.ac (AC_CHECK_HEADERS): Remove string.h.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac (*-apple-darwin*): Set _DARWIN_C_SOURCE 1.
--
GnuPG-bug-id: 5440
Reported-by: Jay Freeman
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
| |
* m4/gpg-error.m4: Update from libgpg-error.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
| |
--
|
| |
|
|
|
|
|
|
|
|
|
| |
* src/assuan-socket.c (utf8_to_wchar): Rename to
(_assuan_utf8_to_wchar): this and give global scope.
* src/system-w32.c (__assuan_spawn): Use CreateProcessW.
--
GnuPG-bug-id: 4398
|
|
|
|
|
|
| |
* src/libassuan.m4: Replace AC_HELP_STRING to AS_HELP_STRING.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac: Use AC_CONFIG_HEADERS instead of AM_CONFIG_HEADER.
Use AC_USE_SYSTEM_EXTENSIONS instead of AC_GNU_SOURCE.
Use AS_HELP_STRING instead of AC_HELP_STRING.
(AC_TYPE_SIGNAL): Remove.
(AC_DECL_SYS_SIGLIST): Remove.
* m4/Makefile.am (EXTRA_DIST): Update.
* m4/gnupg-pth.m4: Remove.
* m4/onceonly.m4: Remove.
* m4/socklen.m4: Update from gnulib.
* m4/libtool.m4: Update from libgpg-error.
* m4/gpg-error.m4: Update from libgpg-error.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
| |
* src/assuan-logging.c (_assuan_log_control_channel): Use gpgrt_malloc.
Signed-off-by: Ben Kibbey <bjk@luxsci.net>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* src/assuan-socket.c [W32]: Always use CreateFileW. Drop support for
Windows-CE
(read_port_and_nonce): Use gpgrt_fopen.
--
GnuPG-bug-id: 5098
Signed-off-by: Werner Koch <wk@gnupg.org>
|
|
|
|
|
|
|
|
|
| |
* configure.ac (LIBASSUAN_CONFIG_LIBS): Remove NETLIBS.
* src/libassuan.pc.in: Distinguish static link.
* tests/Makefile.am: Don't need to link NETLIBS.
GnuPG-bug-id: 4624
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/w32-fd-t.inc.h (assuan_fd_from_posix_fd): Avoid compiler warning.
--
The actual warning was:
warning: cast from function call of type 'intptr_t' {aka 'int'} to
non-matching type 'void *' [-Wbad-function-cast]
return (assuan_fd_t)(HANDLE) _get_osfhandle (fd);
Signed-off-by: Werner Koch <wk@gnupg.org>
|
|
|
|
| |
--
|
|
|
|
|
|
|
|
| |
* src/libassuan.pc.in (Cflags): Add -I flag.
(Libs): Add -L flag.
GnuPG-bug-id: 4678
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/Makefile.am: pass distinct build flags to CC_FOR_BUILD.
--
We don't want to use the standard CFLAGS, CPPFLAGS, and LDFLAGS for
build helper tools because when cross-compiling they might include
choices that only make sense for the platform we are aiming to build
for.
That said, the environment might offer standard build flags for
non-cross-built helper tools too. So we include those flags in the
right place here.
Debian-bug-id: 932213
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
|
|
|
|
| |
--
|
| |
|
|
|
|
|
|
|
|
|
| |
* src/assuan-socket.c (socks5_connect): Use cast macro to get the
hightest socket number.
--
GnuPG-bug-id: 3381
Signed-off-by: Werner Koch <wk@gnupg.org>
|
|
|
|
|
|
|
|
|
|
|
| |
* src/assuan-socket.c (TIMEOUT_NOT_WAITING_SOCKS5_FOREVER): New.
(socks5_connect): Call 'select' in order to not waiting response
forever.
--
GnuPG-bug-id: 3381
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac (LDADD_FOR_TESTS_KLUDGE): New for --disable-new-dtags.
* tests/Makefile.am (LDADD): Use LDADD_FOR_TESTS_KLUDGE.
--
GnuPG-bug-id: 4298
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
| |
--
|
|
|
|
|
|
| |
* configure.ac: Bump LT version to C8/A8/R2.
Signed-off-by: Werner Koch <wk@gnupg.org>
|
|
|
|
| |
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/server.c (_assuan_server_finish): Never call waitpid here.
* src/assuan-socket-server.c (accept_connection_bottom): Indentation.
--
The waitpid/wait only makes sense by parent catching its child
process.
Since the commit 93595de1ede96dedfcaa93c7442536a2cde0b6ef (for version
0.6.5, in 2004-04-21), CTX->PID on server side has client PID.
In the commit cb53f862ff2a864da822d1c16d3df6a02157608b (2009-11-19),
call of _assuan_waitpid was introduced in assuan_server_finish, but
this call always fails because the process is not a child process of
server.
(If we could catch exit of non-child process, it might cause a dead
lock, since client does call waitpid too.)
The indentation fix is to show the place where PID is assigned.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
| |
* autogen.sh: Update from libgpg-error, version 2018-07-10.
* autogen.rc: Remove obsolete --with-gpg-error-prefix option.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/assuan-socket.c (socks5_connect, use_socks): Use union
to access, instead of using cast to the pointer.
--
In some machine like 32-bit ARM, alignment requirement of struct
sockaddr and struct sockaddr_in (or struct sockaddr_in6) is different.
Although it is completely valid to use the value of the address by
cast here, because the object should be allocated by struct
sockaddr_in or struct sockaddr_in6 to be referred by struct
sockaddr *. But compiler doesn't assume such a usage, thus, emits
warnings.
The API with struct sockaddr * is a bit difficult thing. I examined
GNU C library for the implementation of the connect function, it uses
transparent union, the GCC feature. It would be too much, if we do
same thing here.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
| |
* m4/gpg-error.m4: Update to 2018-11-02.
* src/libassuan.m4: Add AC_MSG_NOTICE.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
| |
* m4/gpg-error.m4: Update to 2018-10-26.
* src/libassuan.m4: Follow the change of gpgrt-config.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
| |
* m4/gpg-error.m4: Update.
* src/libassuan.m4: Don't assume libassuan-config is newer.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
| |
* src/libassuan.m4: Use AC_PATH_PROG to detect libassuan-config.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
| |
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
|
|
|
|
| |
* src/libassuan.m4: Don't try gpgrt-config when LIBASSUAN_CONFIG set.
Fall back to detecting libassuan-config, when gpgrt-config doesn't
work well.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
| |
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|