gnome-keyring r1131 - in trunk: . daemon pk ssh



Author: nnielsen
Date: Sun Apr  6 04:44:42 2008
New Revision: 1131
URL: http://svn.gnome.org/viewvc/gnome-keyring?rev=1131&view=rev

Log:
	* daemon/gkr-daemon.c:
	* pk/gkr-pk-places.h:
	* ssh/gkr-ssh-daemon-io.c:
	* configure.in:
	* Makefile.am: Add configure option to disable SSH agent. 


Modified:
   trunk/ChangeLog
   trunk/Makefile.am
   trunk/configure.in
   trunk/daemon/gkr-daemon.c
   trunk/pk/gkr-pk-places.h
   trunk/ssh/gkr-ssh-daemon-io.c

Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am	(original)
+++ trunk/Makefile.am	Sun Apr  6 04:44:42 2008
@@ -4,6 +4,12 @@
 PAM_DIR = 
 endif
 
+if WITH_SSH
+SSH_DIR = ssh
+else
+SSH_DIR =
+endif
+
 if WITH_TESTS
 TESTS_DIR = tests
 else
@@ -18,7 +24,7 @@
 	keyrings \
 	pkix \
 	pk \
-	ssh \
+	$(SSH_DIR) \
 	pkcs11 \
 	daemon \
 	data \

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Sun Apr  6 04:44:42 2008
@@ -310,6 +310,22 @@
 	pam_status="yes ($with_pam_dir)"
 fi
 
+# --------------------------------------------------------------------
+# SSH Agent support
+#
+
+AC_ARG_ENABLE([ssh-agent], 
+		AC_HELP_STRING([--disable-ssh-agent],
+		[Don't include SSH agent in gnome-keyring]))
+
+if test "$enable_ssh_agent" != "no"; then
+	AC_DEFINE(WITH_SSH, 1, [Whether to build SSH agent or not])
+	ssh_status="yes"
+else
+	ssh_status="no"
+fi
+
+AM_CONDITIONAL(WITH_SSH, test "$enable_ssh_agent" != "no")
 
 # --------------------------------------------------------------------
 # Trusted Root Certificates Directory
@@ -457,6 +473,7 @@
 echo "  HAL:           $hal_status"
 echo
 echo "CONFIGURATION"
+echo "  SSH Agent:            $ssh_status"
 echo "  Root Certificates:    $root_status"
 echo
 echo "BUILD"

Modified: trunk/daemon/gkr-daemon.c
==============================================================================
--- trunk/daemon/gkr-daemon.c	(original)
+++ trunk/daemon/gkr-daemon.c	Sun Apr  6 04:44:42 2008
@@ -37,7 +37,9 @@
 
 #include "pkcs11/gkr-pkcs11-daemon.h"
 
+#ifdef WITH_SSH
 #include "ssh/gkr-ssh-daemon.h"
+#endif
 
 #include "ui/gkr-ask-daemon.h"
 
@@ -80,8 +82,12 @@
  */
 
 /* All the components to run on startup if not set in gconf */
+#ifdef WITH_SSH
 #define DEFAULT_COMPONENTS  "ssh,keyring,pkcs11"
- 
+#else
+#define DEFAULT_COMPONENTS  "keyring,pkcs11"
+#endif
+
 static gboolean run_foreground = FALSE;
 static gboolean run_daemonized = FALSE;
 static gboolean unlock_with_login = FALSE;
@@ -95,7 +101,7 @@
 	{ "login", 'l', 0, G_OPTION_ARG_NONE, &unlock_with_login, 
 	  "Use login password from stdin", NULL },
 	{ "components", 'c', 0, G_OPTION_ARG_STRING, &run_components,
-	  "The components to run", "ssh,keyring,pkcs11" },
+	  "The components to run", DEFAULT_COMPONENTS },
 	{ NULL }
 };
 
@@ -448,11 +454,13 @@
 		if (!gkr_daemon_io_create_master_socket ())
 			cleanup_and_exit (1);
 	}
-	
+
+#ifdef WITH_SSH	
 	if (check_run_component ("ssh")) {
 		if (!gkr_daemon_ssh_io_initialize ())
 			cleanup_and_exit (1);
 	}
+#endif
 	
 	if (check_run_component ("pkcs11")) {
 		if (!gkr_pkcs11_daemon_setup ())

Modified: trunk/pk/gkr-pk-places.h
==============================================================================
--- trunk/pk/gkr-pk-places.h	(original)
+++ trunk/pk/gkr-pk-places.h	Sun Apr  6 04:44:42 2008
@@ -42,9 +42,11 @@
 	{ NULL, "keystore", "*", "*.keystore", 
 		"[default]\n" },
 	
+#ifdef WITH_SSH
 	/* The SSH directory, mark all keys as ssh-authentication capable */
 	{ GKR_LOCATION_VOLUME_HOME_S, ".ssh", "id_?sa", NULL, 
 		"[default]\npurposes=ssh-authentication" },
+#endif
 
 #ifdef ROOT_CERTIFICATES
 	/* The root certificates directory, mark as trusted anchors */

Modified: trunk/ssh/gkr-ssh-daemon-io.c
==============================================================================
--- trunk/ssh/gkr-ssh-daemon-io.c	(original)
+++ trunk/ssh/gkr-ssh-daemon-io.c	Sun Apr  6 04:44:42 2008
@@ -318,6 +318,9 @@
 	channel = g_io_channel_unix_new (sock);
 	g_io_add_watch (channel, G_IO_IN | G_IO_HUP, accept_client, NULL);
 	g_io_channel_unref (channel);
+	
+	if (g_getenv ("SSH_AUTH_SOCK"))
+		g_message ("another SSH agent is running at: %s", g_getenv ("SSH_AUTH_SOCK")); 
 		
 	/* TODO: Do we need to push SSH_AGENT_PID? */
 	gkr_daemon_util_push_environment ("SSH_AUTH_SOCK", socket_path);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]