1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: package/.../gnomesu/features.patch
5 # Copyright (C) 2004 - 2007 The T2 SDE Project
7 # More information can be found in the files COPYING and README.
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
15 # --- T2-COPYRIGHT-NOTE-END ---
17 This feature patch was primarily developed for the Archivista Scan Server Box,
18 however it should be useful for others as well.
20 First we do not want to let the joe user see cryptic commands to be executed
21 when asked for authentication (always done when a command was supplied now)
23 Second for some special cases (like setting passwords) we want to retrieve the
24 current password to injet into e.g. MySQL and co (-p).
26 - Rene Rebe <rene@exactcode.de>
28 diff -u gnomesu-0.3.1/src/xsu.c gnomesu-0.3.1-fixed/src/xsu.c
29 --- gnomesu-0.3.1/src/xsu.c 2003-04-10 14:03:14.000000000 +0000
30 +++ gnomesu-0.3.1-fixed/src/xsu.c 2005-09-05 22:58:12.000000000 +0000
32 buffer = g_strdup_printf("%s%s;%s", SET_DISPL_ENV, displ_host, command);
36 + else if (show_password) {
37 + buffer = g_strdup_printf("PASSWD=\"%s\" %s", password, command);
41 buffer = g_strdup_printf("%s", command);
44 if(g_strdup(argv[1])) // there was a first argument
46 /* As long as the first item is not a switch set the first item as the command */
47 - if ((strcmp(argv[1], "-u")) && (strcmp(argv[1], "--username")) && (strcmp(argv[1], "-m")) && (strcmp (argv[1], "-c")) && (strcmp (argv[1], "--command")) && (strcmp(argv[1], "--message")) && (strcmp(argv[1], "-t")) && (strcmp(argv[1], "--title")))
48 + if ((strcmp(argv[1], "-u")) && (strcmp(argv[1], "--username")) && (strcmp(argv[1], "-m")) && (strcmp (argv[1], "-c")) && (strcmp (argv[1], "--command")) && (strcmp(argv[1], "--message")) && (strcmp(argv[1], "-t")) && (strcmp(argv[1], "--title")) && (strcmp(argv[1], "-p")))
50 arg_command = g_strdup(argv[1]);
55 + if (!strcmp (argv[x], "-p"))
58 // -c switch for backwards compatibility with xsu
59 if ((!strcmp (argv[x], "-c")) || (!strcmp (argv[x], "--command")))
64 gtk_entry_set_text(GTK_ENTRY(gtk_command_textbox),arg_command);
65 - //gtk_entry_set_editable(GTK_ENTRY(gtk_command_textbox), FALSE);
66 + gtk_entry_set_editable(GTK_ENTRY(gtk_command_textbox), FALSE);
67 + gtk_widget_hide (gtk_commandtxt_label);
68 + gtk_widget_hide (gtk_command_textbox);
69 gtk_widget_grab_focus (gtk_password_textbox);
71 gtk_widget_grab_focus (gtk_command_textbox);
72 diff -u gnomesu-0.3.1/src/xsu.h gnomesu-0.3.1-fixed/src/xsu.h
73 --- gnomesu-0.3.1/src/xsu.h 2003-01-07 21:01:09.000000000 +0000
74 +++ gnomesu-0.3.1-fixed/src/xsu.h 2005-09-05 22:27:38.000000000 +0000
76 GtkTooltips *tooltips;
78 gchar *arg_message, *arg_title, *displ_host;
79 +gboolean show_password=FALSE;
81 gboolean message_in=FALSE,