Commit 7727d7fb authored by Jiri (George) Lebl's avatar Jiri (George) Lebl Committed by George Lebl

use shell quoting more properly


Wed May 26 17:01:16 2004  George Lebl <jirka@5z.com>

	* gui/gdmsetup.c, daemon/misc.c: use shell quoting more properly
parent af7781d9
Wed May 26 17:01:16 2004 George Lebl <jirka@5z.com>
* gui/gdmsetup.c, daemon/misc.c: use shell quoting more properly
Wed May 12 20:36:33 2004 James M. Cape <jcape@ignore-your.tv>
* */.cvsignore: Updates.
......
......@@ -492,7 +492,13 @@ gdm_text_message_dialog (const char *msg)
if (access (EXPANDED_LIBEXECDIR "/gdmopen", X_OK) != 0)
return FALSE;
msg_quoted = g_shell_quote (msg);
if (msg[0] == '-') {
char *tmp = g_strconcat (" ", msg, NULL);
msg_quoted = g_shell_quote (tmp);
g_free (tmp);
} else {
msg_quoted = g_shell_quote (msg);
}
dialog = g_find_program_in_path ("dialog");
if (dialog == NULL)
......@@ -559,7 +565,13 @@ gdm_text_yesno_dialog (const char *msg, gboolean *ret)
if (ret != NULL)
*ret = FALSE;
msg_quoted = g_shell_quote (msg);
if (msg[0] == '-') {
char *tmp = g_strconcat (" ", msg, NULL);
msg_quoted = g_shell_quote (tmp);
g_free (tmp);
} else {
msg_quoted = g_shell_quote (msg);
}
dialog = g_find_program_in_path ("dialog");
if (dialog == NULL)
......
......@@ -85,7 +85,6 @@ unsetup_window_cursor (void)
gdk_window_set_cursor (setup_dialog->window, NULL);
}
static void
update_greeters (void)
{
......@@ -1755,7 +1754,8 @@ get_archive_dir (const char *filename, char **untar_cmd, char **error)
return NULL;
}
quoted = g_shell_quote (filename);
/* Note that this adds './' In front to avoid troubles */
quoted = ve_shell_quote_filename (filename);
tar = find_tar ();
unzip = find_unzip (filename);
......@@ -1956,7 +1956,7 @@ install_response (GtkWidget *chooser, gint response, gpointer data)
if (chdir (theme_dir) == 0) {
if (system (untar_cmd) == 0) {
char *cmd;
char *quoted = g_shell_quote (dir);
char *quoted = ve_shell_quote_filename (dir);
char *chown = find_chown ();
char *chmod = find_chmod ();
success = TRUE;
......@@ -2138,7 +2138,7 @@ delete_theme (GtkWidget *button, gpointer data)
/* HACK! */
DIR *dp;
GtkTreeIter *select_iter = NULL;
char *quoted = g_shell_quote (dir);
char *quoted = ve_shell_quote_filename (dir);
char *cmd = g_strdup_printf ("/bin/rm -fR %s", quoted);
system (cmd);
g_free (cmd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment