aboutsummaryrefslogtreecommitdiffstats
path: root/assuan/assuan-connect.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2009-10-20 15:39:15 +0000
committerMarcus Brinkmann <[email protected]>2009-10-20 15:39:15 +0000
commite782b1ab06a2d3325bc487c28ab678c95d9675b3 (patch)
tree87aacb82e59e4d7d8b60d2c55d66b12eed01af2e /assuan/assuan-connect.c
parentAdd new debug helper (diff)
downloadgpgme-e782b1ab06a2d3325bc487c28ab678c95d9675b3.tar.gz
gpgme-e782b1ab06a2d3325bc487c28ab678c95d9675b3.zip
2009-10-20 Marcus Brinkmann <[email protected]>
* configure.ac: Replace internal libassuan by external libassuan. * m4/libassuan.m4: New file. * Makefile.am (assuan): Remove variable. (SUBDIRS): Remove ${assuan}. * assuan/: Removed. src/ 2009-10-20 Marcus Brinkmann <[email protected]> * Makefile.am (assuan_cppflags, assuan_libobjs): Removed. (gpgsm_components): Move engine-assuan.c to ... (assuan_components): ... this new variable. (main_sources): Add this new variable. (AM_CPPFLAGS): Remove $(assuan_cppflags). (AM_CFLAGS): Add @LIBASSUAN_CFLAGS@. (libgpgme_la_DEPENDENCIES, libgpgme_pth_la_DEPENDENCIES) (libgpgme_glib_la_DEPENDENCIES, libgpgme_qt_la_DEPENDENCIES) (libgpgme_pthread_la_DEPENDENCIES): Remove $(assuan_libobjs). (libgpgme_la_LIBADD, libgpgme_pth_la_LIBADD) (libgpgme_glib_la_LIBADD, libgpgme_qt_la_LIBADD)) (libgpgme_pthread_la_LIBADD): Replace $(assuan_libobjs) by @LIBASSUAN_LIBS@. * priv-io.h [!HAVE_W32_SYSTEM]: Declare _gpgme_io_recvmsg, _gpgme_io_sendmsg, _gpgme_io_waitpid. * engine-backend.h: Define with [ENABLE_ASSUAN] instead of [ENABLE_GPGSM]. * posix-io.c (_gpgme_io_waitpid): Make non-static. * util.h (ENABLE_ASSUAN): Declar _gpgme_assuan_system_hooks, _gpgme_assuan_malloc_hooks, _gpgme_assuan_log_cb. * engine-gpgsm.c: Don't map assuan error codes. Use assuan_release instead of assuan_disconnect. (map_assuan_error): Remove function. (gpgsm_new): Use new assuan context interface. * engine-assuan.c: Use assuan_release instead of assuan_disconnect. (llass_new): Use new assuan context interface.
Diffstat (limited to '')
-rw-r--r--assuan/assuan-connect.c83
1 files changed, 0 insertions, 83 deletions
diff --git a/assuan/assuan-connect.c b/assuan/assuan-connect.c
deleted file mode 100644
index 2106ac30..00000000
--- a/assuan/assuan-connect.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/* assuan-connect.c - Establish a connection (client)
- * Copyright (C) 2001, 2002 Free Software Foundation, Inc.
- *
- * This file is part of Assuan.
- *
- * Assuan is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * Assuan is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <signal.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sys/types.h>
-#ifndef HAVE_W32_SYSTEM
-#include <sys/wait.h>
-#endif
-
-#include "assuan-defs.h"
-
-/* Disconnect and release the context CTX. */
-void
-assuan_disconnect (assuan_context_t ctx)
-{
- if (ctx)
- {
- assuan_write_line (ctx, "BYE");
- ctx->finish_handler (ctx);
- ctx->deinit_handler (ctx);
- ctx->deinit_handler = NULL;
- _assuan_release_context (ctx);
- }
-}
-
-/* Return the PID of the peer or -1 if not known. This function works
- in some situations where assuan_get_ucred fails. */
-pid_t
-assuan_get_pid (assuan_context_t ctx)
-{
- return (ctx && ctx->pid)? ctx->pid : -1;
-}
-
-
-#ifndef HAVE_W32_SYSTEM
-/* Return user credentials. PID, UID and GID may be given as NULL if
- you are not interested in a value. For getting the pid of the
- peer the assuan_get_pid is usually better suited. */
-assuan_error_t
-assuan_get_peercred (assuan_context_t ctx, pid_t *pid, uid_t *uid, gid_t *gid)
-{
- if (!ctx)
- return _assuan_error (ASSUAN_Invalid_Value);
- if (!ctx->peercred.valid)
- return _assuan_error (ASSUAN_General_Error);
-
-#ifdef HAVE_SO_PEERCRED
- if (pid)
- *pid = ctx->peercred.pid;
- if (uid)
- *uid = ctx->peercred.uid;
- if (gid)
- *gid = ctx->peercred.gid;
-#endif
-
- return 0;
-}
-#endif /* HAVE_W32_SYSTEM */