Index: mail/em-composer-prefs.c
===================================================================
--- mail/em-composer-prefs.c	(revision 35440)
+++ mail/em-composer-prefs.c	(working copy)
@@ -167,8 +167,11 @@ sig_load_preview (EMComposerPrefs *prefs
 	else
 		str = e_msg_composer_get_sig_file_content (
 			signature->filename, signature->html);
-	if (!str)
-		str = g_strdup ("");
+	if (!str || !*str) {
+		/* make html stream happy and write at least one character */
+		g_free (str);
+		str = g_strdup (" ");
+	}
 
 	if (signature->html) {
 		gtk_html_load_from_string (html, str, strlen (str));
@@ -1044,7 +1047,7 @@ em_composer_prefs_construct (EMComposerP
 	prefs->sig_add = GTK_BUTTON (widget);
 
 	widget = glade_xml_get_widget (gui, "cmdSignatureAddScript");
-	gtk_widget_set_sensitive (widget, sensitive);
+	gtk_widget_set_sensitive (widget, sensitive && !gconf_client_get_bool (client, "/desktop/gnome/lockdown/disable_command_line", NULL));
 	g_signal_connect (
 		widget, "clicked",
 		G_CALLBACK (sig_add_script_cb), prefs);
Index: mail/ChangeLog
===================================================================
--- mail/ChangeLog	(revision 35440)
+++ mail/ChangeLog	(working copy)
@@ -1,3 +1,15 @@
+2008-04-29  Milan Crha  <mcrha@redhat.com>
+
+	** Fix for bug #322553
+
+	* em-composer-prefs.c: (sig_load_preview):
+	Write to html stream at least one character.
+	* em-composer-prefs.c: (em_composer_prefs_construct): Disable
+	signature's Add Script button when not approved running scripts.
+	* mail-config.c: (mail_config_get_gconf_client): Ensure init.
+	* mail-config.c: (mail_config_signature_run_script): Do not run
+	script when disabled in /desktop/gnome/lockdown/disable_command_line.
+
 2008-04-29  Milan Crha  <mcrha@redhat.com>
 
 	* em-utils.c: (em_utils_snoop_type):
Index: mail/mail-config.c
===================================================================
--- mail/mail-config.c	(revision 35440)
+++ mail/mail-config.c	(working copy)
@@ -616,6 +616,9 @@ mail_config_write_on_exit (void)
 GConfClient *
 mail_config_get_gconf_client (void)
 {
+	if (!config)
+		mail_config_init ();
+
 	return config->gconf;
 }
 
@@ -1194,6 +1197,9 @@ mail_config_signature_run_script (const 
 	int in_fds[2];
 	pid_t pid;
 
+	if (gconf_client_get_bool (mail_config_get_gconf_client (), "/desktop/gnome/lockdown/disable_command_line", NULL))
+		return NULL;
+
 	if (pipe (in_fds) == -1) {
 		g_warning ("Failed to create pipe to '%s': %s", script, g_strerror (errno));
 		return NULL;
