diff -urN libgtsol.orig/src/pam_conv.c libgtsol.new/src/pam_conv.c
--- libgtsol.orig/src/pam_conv.c	2010-03-29 01:07:54.520458917 +0100
+++ libgtsol.new/src/pam_conv.c	2010-03-29 01:08:09.960481341 +0100
@@ -44,6 +44,18 @@
 free_resp (int num_msg,
 	   struct pam_response * pr);
 
+static gchar*
+prompt_in_global_zone (conv_info_t *info, gchar *msg, gchar *c)
+{
+	char buf[PAM_MAX_MSG_SIZE];
+	int nbytes;
+	write (info->writefd, c, 1);
+	write (info->writefd, msg, strlen (msg));
+	nbytes = read (info->readfd, buf, PAM_MAX_MSG_SIZE);
+	buf[nbytes] = '\0';
+	return g_strdup (buf);
+}
+
 /*
  * gnometsol_pam_conv():
  * 
@@ -151,38 +163,44 @@
 					locale_msg ? locale_msg : "(null)");
 		}
 		g_free (locale_msg);
-
-		pamdialog = gnome_tsol_password_dialog_new ("", "", "", (((conv_info_t *) info)->sysmodal), TRUE);
-		msgdialog = gnome_tsol_message_dialog_new (NULL,
+		
+		if (c_info->writefd == -1){/*cross zone prompting not required*/
+			pamdialog = gnome_tsol_password_dialog_new ("", "", "", (((conv_info_t *) info)->sysmodal), TRUE);
+			msgdialog = gnome_tsol_message_dialog_new (NULL,
 							   GTK_DIALOG_MODAL,
 							   GTK_MESSAGE_INFO,
 							   GTK_BUTTONS_OK,
 					 (((conv_info_t *) info)->sysmodal),
 							   "",
 							   NULL);
-		gtk_window_set_screen (GTK_WINDOW (pamdialog), screen);
-		gtk_window_set_screen (GTK_WINDOW (msgdialog), screen);
+			gtk_window_set_screen (GTK_WINDOW (pamdialog), screen);
+			gtk_window_set_screen (GTK_WINDOW (msgdialog), screen);
+		}
 
 		switch (m->msg_style) {
 		case PAM_PROMPT_ECHO_ON:
-			/* Pop up a dialog to get user id from the user */
-			gnome_tsol_password_dialog_set_input_prompt (GNOME_TSOL_PASSWORD_DIALOG (pamdialog),
-								     utf8_msg);
-			gnome_tsol_password_dialog_set_input_visibility (GNOME_TSOL_PASSWORD_DIALOG (pamdialog), TRUE);
-			gnome_tsol_password_dialog_set_message (GNOME_TSOL_PASSWORD_DIALOG (pamdialog),
-				c_info->echoonmsg ? c_info->echoonmsg : "");
-			response = gtk_dialog_run (GTK_DIALOG (pamdialog));
-
-			if (response == GTK_RESPONSE_OK) {
-				g_object_get (G_OBJECT (pamdialog), "input-text", &password, NULL);
-				r->resp = g_strdup (password);
-				if (r->resp == NULL) {
-					syslog (LOG_AUTH | LOG_ERR, "libgnometsol: unable "
-						"to allocate PAM conversation response memory %m");
-					*resp = NULL;
-					goto err;
-				}
+			if (c_info->writefd != -1) { /* cross zone prompting */
+				r->resp = prompt_in_global_zone(c_info,
+						utf8_msg, "u");
+				if (!strncmp (r->resp, "RESPONSE_CANCELLED",18))
+					goto cancel;
 			} else {
+				/*Pop up a dialog to get user id from the user*/
+				gnome_tsol_password_dialog_set_input_prompt (GNOME_TSOL_PASSWORD_DIALOG (pamdialog), utf8_msg);
+				gnome_tsol_password_dialog_set_input_visibility (GNOME_TSOL_PASSWORD_DIALOG (pamdialog), TRUE);
+				gnome_tsol_password_dialog_set_message (GNOME_TSOL_PASSWORD_DIALOG (pamdialog), c_info->echoonmsg ? c_info->echoonmsg : "");
+				response=gtk_dialog_run(GTK_DIALOG (pamdialog));
+
+				if (response == GTK_RESPONSE_OK) {
+					g_object_get (G_OBJECT (pamdialog), "input-text", &password, NULL);
+					r->resp = g_strdup (password);
+				} else goto cancel;
+			}
+
+			if (r->resp == NULL) {
+				syslog (LOG_AUTH | LOG_ERR, "libgnometsol: unable "
+					"to allocate PAM conversation response memory %m");
+				*resp = NULL;
 				goto err;
 			}
 
@@ -201,28 +219,32 @@
 			break;
 
 		case PAM_PROMPT_ECHO_OFF:
-			/*
-			 * Pop up a dialog to get the password from
-			 * the user. Zap anything in the input field.
-			 */
-			gnome_tsol_password_dialog_set_input_prompt (GNOME_TSOL_PASSWORD_DIALOG (pamdialog),
-							    utf8_msg);
-			gnome_tsol_password_dialog_set_input_visibility (GNOME_TSOL_PASSWORD_DIALOG (pamdialog), FALSE);
-			gnome_tsol_password_dialog_set_message (GNOME_TSOL_PASSWORD_DIALOG (pamdialog),
-								c_info->echooffmsg ? c_info->echooffmsg : "");
-			response = gtk_dialog_run (GTK_DIALOG (pamdialog));
-
-			if (response == GTK_RESPONSE_OK) {
-				g_object_get (G_OBJECT (pamdialog), "input-text", &password, NULL);
-				r->resp = g_strdup (password);
-				if (r->resp == NULL) {
-					syslog (LOG_AUTH | LOG_ERR, "libgnometsol: unable "
-						"to allocate PAM conversation response memory %m");
-					*resp = NULL;
-					goto err;
-				}
+			if (c_info->writefd != -1) { /* cross zone prompting */
+				r->resp = prompt_in_global_zone(c_info,
+						utf8_msg, "p");
+				if (!strncmp (r->resp, "RESPONSE_CANCELLED",18))
+					goto cancel;
 			} else {
-				goto cancel;
+				/*
+			 	* Pop up a dialog to get the password from
+			 	* the user. Zap anything in the input field.
+			 	*/
+				gnome_tsol_password_dialog_set_input_prompt (GNOME_TSOL_PASSWORD_DIALOG (pamdialog), utf8_msg);
+				gnome_tsol_password_dialog_set_input_visibility (GNOME_TSOL_PASSWORD_DIALOG (pamdialog), FALSE);
+				gnome_tsol_password_dialog_set_message (GNOME_TSOL_PASSWORD_DIALOG (pamdialog), c_info->echooffmsg ? c_info->echooffmsg : "");
+				response = gtk_dialog_run (GTK_DIALOG (pamdialog));
+
+				if (response == GTK_RESPONSE_OK) {
+					g_object_get (G_OBJECT (pamdialog), "input-text", &password, NULL);
+					r->resp = g_strdup (password);
+				} else goto cancel;
+			}
+
+			if (r->resp == NULL) {
+				syslog (LOG_AUTH | LOG_ERR, "libgnometsol: unable "
+					"to allocate PAM conversation response memory %m");
+				*resp = NULL;
+				goto err;
 			}
 
 			if (strlen (r->resp) > PAM_MAX_RESP_SIZE) {
@@ -243,26 +265,40 @@
 			/* ensure newline for message */
 			utf8_msg = g_renew (char, utf8_msg,  m_len + 2);
 			g_strlcat (utf8_msg , "\n", m_len + 2);
-			/*
-			 * Write information dialogue "utf8_msg" to user
-			 */
-			g_object_set (G_OBJECT (msgdialog), "message-type", GTK_MESSAGE_ERROR, NULL);
-			gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (msgdialog), utf8_msg);
-			gtk_widget_hide (GTK_WIDGET (pamdialog));
-			gtk_dialog_run (GTK_DIALOG (msgdialog));
+			if (c_info->writefd != -1) { /* cross zone prompting */
+				gchar *tmp;
+				tmp = prompt_in_global_zone(c_info, 
+							    utf8_msg, "e");
+				g_free (tmp);
+			} else {
+				/*
+			 	* Write information dialogue "utf8_msg" to user
+			 	*/
+				g_object_set (G_OBJECT (msgdialog), "message-type", GTK_MESSAGE_ERROR, NULL);
+				gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (msgdialog), utf8_msg);
+				gtk_widget_hide (GTK_WIDGET (pamdialog));
+				gtk_dialog_run (GTK_DIALOG (msgdialog));
+			}
 			break;
 
 		case PAM_TEXT_INFO:
 			/* ensure newline for message */
 			utf8_msg = g_renew (char, utf8_msg,  m_len + 2);
 			g_strlcat (utf8_msg , "\n", m_len + 2);
-			/*
-			 * write information dialogue "utf8_msg" to user
-			 */
-			g_object_set (G_OBJECT (msgdialog), "message-type", GTK_MESSAGE_INFO, NULL);
-			gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (msgdialog), utf8_msg);
-			gtk_widget_hide (GTK_WIDGET (pamdialog));
-			gtk_dialog_run (GTK_DIALOG (msgdialog));
+			if (c_info->writefd != -1) { /* cross zone prompting */
+				gchar *tmp;
+				tmp = prompt_in_global_zone(c_info, 
+							    utf8_msg, "i");
+				g_free (tmp);
+			} else {
+				/*
+			 	* write information dialogue "utf8_msg" to user
+			 	*/
+				g_object_set (G_OBJECT (msgdialog), "message-type", GTK_MESSAGE_INFO, NULL);
+				gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (msgdialog), utf8_msg);
+				gtk_widget_hide (GTK_WIDGET (pamdialog));
+				gtk_dialog_run (GTK_DIALOG (msgdialog));
+			}
 			break;
 
 		default:
@@ -287,21 +323,27 @@
 		r++;
 	}
 
-	gtk_widget_hide (pamdialog);
-	gtk_widget_destroy (pamdialog);
-	gtk_widget_destroy (msgdialog);
+	if (c_info->writefd == -1) {
+		gtk_widget_hide (pamdialog);
+		gtk_widget_destroy (pamdialog);
+		gtk_widget_destroy (msgdialog);
+	}
 	return GNOME_TSOL_PAM_SUCCESS;
 cancel:
-	gtk_widget_hide (pamdialog);
-	gtk_widget_destroy (pamdialog);
-	gtk_widget_destroy (msgdialog);
+	if (c_info->writefd == -1) {
+		gtk_widget_hide (pamdialog);
+		gtk_widget_destroy (pamdialog);
+		gtk_widget_destroy (msgdialog);
+	}
 	free_resp (i, r);
 	*resp = NULL;
 	return GNOME_TSOL_PAM_CANCEL;
 err:
-	gtk_widget_hide (pamdialog);
-	gtk_widget_destroy (pamdialog);
-	gtk_widget_destroy (msgdialog);
+	if (c_info->writefd == -1) {
+		gtk_widget_hide (pamdialog);
+		gtk_widget_destroy (pamdialog);
+		gtk_widget_destroy (msgdialog);
+	}
 	free_resp (i, r);
 	*resp = NULL;
 	return GNOME_TSOL_PAM_CONV_ERR;
diff -urN libgtsol.orig/src/pam_conv.h libgtsol.new/src/pam_conv.h
--- libgtsol.orig/src/pam_conv.h	2010-03-29 01:07:54.523438607 +0100
+++ libgtsol.new/src/pam_conv.h	2010-03-29 01:08:09.960626355 +0100
@@ -37,6 +37,8 @@
 	char *echoonmsg;			/* Extra message to display to user during PAM_PROMPT_ECHO_ON */
 	char *echooffmsg;			/* Extra message to display to user during PAM_PROMPT_ECHO_OFF */
 	GdkScreen *screen;  	 /* screen on which to display the dialog */
+	int writefd;	 /* write file descriptor for cross zone prompting */
+	int readfd;	 /* read  file descriptor for cross zone prompting */
 } conv_info_t;
 
 int
diff -urN libgtsol.orig/src/pam_dialog.c libgtsol.new/src/pam_dialog.c
--- libgtsol.orig/src/pam_dialog.c	2010-03-29 01:07:54.522629231 +0100
+++ libgtsol.new/src/pam_dialog.c	2010-03-29 01:08:19.512882368 +0100
@@ -298,6 +298,8 @@
 
 	gtk_window_set_position (GTK_WINDOW (password_dialog), GTK_WIN_POS_CENTER);
 
+	gtk_window_set_title (GTK_WINDOW (password_dialog), " ");
+
 	gtk_container_set_border_width (GTK_CONTAINER (password_dialog), DIALOG_BORDER_WIDTH);
 
 	gtk_dialog_set_default_response (GTK_DIALOG (password_dialog), GTK_RESPONSE_OK);
@@ -337,7 +339,7 @@
 
 	/* Set up the dialog's icon */
 	hbox = gtk_hbox_new (FALSE, 12);
-	dialog_icon = gtk_image_new_from_stock (GNOME_STOCK_AUTHENTICATION, GTK_ICON_SIZE_DIALOG);
+	dialog_icon = gtk_image_new_from_stock (GTK_STOCK_DIALOG_AUTHENTICATION, GTK_ICON_SIZE_DIALOG);
 	gtk_misc_set_alignment (GTK_MISC (dialog_icon), 0.5, 0.0);
 	gtk_box_pack_start (GTK_BOX (hbox), dialog_icon, FALSE, FALSE, 0);
 
