No echo password entry patch
- From: Gnome Lists <gnomelists xyrodian net>
- To: GDM Mailing List <gdm sunsite dk>
- Subject: No echo password entry patch
- Date: 11 Sep 2002 19:22:40 -0600
Hello everyone,
I could not find anything on no echo password entries in the gdm-help
archives, so I assume that this has not been tried or discussed
recently. Being paranoid, I patched the latest cvs to support this. I
am unsure of how to do the translations for gdmsetup correctly, but
everything else should work. I am also unfamiliar with procedure for
posting patches, so if I have done anything wrong, please tell me.
The patch adds a UseSecureEntry option to gdm.conf.in and a
corresponding checkbox in gdmsetup. If set to true, all password entry
fields should have no echo. This was patched and tested against cvs
gdm2 @ Thu Sep 12 01:21:06 UTC 2002. It also works against
gdm-2.4.0.11. Use the standard 'cat gdm-cvs-1031793673+noecho.diff |
patch -p0'.
- Nathanael Law <gnomelist at xyrodian dot net>
diff -r -C 3 ./config/gdm.conf.in ../gdm2.patched/config/gdm.conf.in
*** ./config/gdm.conf.in Fri Aug 23 11:59:57 2002
--- ../gdm2.patched/config/gdm.conf.in Wed Sep 11 18:54:17 2002
***************
*** 230,235 ****
--- 230,237 ----
Use24Clock=false
# Use circles in the password field. Looks kind of cool actually
UseCirclesInEntry=false
+ # Set no echo for password fields. If true, it takes precedence over circles
+ UseSecureEntry=false
# These two keys are for the new greeter. Circles is the standard
# shipped theme
GraphicalTheme=circles
diff -r -C 3 ./daemon/gdm.h ../gdm2.patched/daemon/gdm.h
*** ./daemon/gdm.h Fri Aug 23 11:59:58 2002
--- ../gdm2.patched/daemon/gdm.h Wed Sep 11 18:54:17 2002
***************
*** 228,233 ****
--- 228,234 ----
#define GDM_KEY_POSITIONY "greeter/PositionY=0"
#define GDM_KEY_USE_24_CLOCK "greeter/Use24Clock=false"
#define GDM_KEY_ENTRY_CIRCLES "greeter/UseCirclesInEntry=false"
+ #define GDM_KEY_ENTRY_SECURE "greeter/UseSecureEntry=false"
#define GDM_KEY_GRAPHICAL_THEME "greeter/GraphicalTheme=circles"
#define GDM_KEY_GRAPHICAL_THEME_DIR "greeter/GraphicalThemeDir=" EXPANDED_DATADIR "/gdm/themes/"
diff -r -C 3 ./gui/gdmlogin.c ../gdm2.patched/gui/gdmlogin.c
*** ./gui/gdmlogin.c Fri Aug 23 11:59:59 2002
--- ../gdm2.patched/gui/gdmlogin.c Wed Sep 11 18:54:17 2002
***************
*** 135,140 ****
--- 135,141 ----
static gboolean GdmShowLastSession;
static gboolean GdmUseCirclesInEntry;
+ static gboolean GdmSecureEntry;
static GtkWidget *login;
static GtkWidget *logo_frame = NULL;
***************
*** 889,894 ****
--- 890,896 ----
GdmIconMaxHeight = ve_config_get_int (config, GDM_KEY_ICONHEIGHT);
GdmXineramaScreen = ve_config_get_int (config, GDM_KEY_XINERAMASCREEN);
GdmUseCirclesInEntry = ve_config_get_bool (config, GDM_KEY_ENTRY_CIRCLES);
+ GdmSecureEntry = ve_config_get_bool (config, GDM_KEY_ENTRY_SECURE);
GdmLockPosition = ve_config_get_bool (config, GDM_KEY_LOCK_POSITION);
GdmSetPosition = ve_config_get_bool (config, GDM_KEY_SET_POSITION);
GdmPositionX = ve_config_get_int (config, GDM_KEY_POSITIONX);
***************
*** 3289,3294 ****
--- 3291,3298 ----
entry = gtk_entry_new ();
if (GdmUseCirclesInEntry)
gtk_entry_set_invisible_char (GTK_ENTRY (entry), 0x25cf);
+ if (GdmSecureEntry)
+ gtk_entry_set_invisible_char (GTK_ENTRY (entry), 0x0000);
gtk_entry_set_max_length (GTK_ENTRY (entry), 32);
gtk_widget_set_size_request (entry, 250, -1);
gtk_widget_ref (entry);
diff -r -C 3 ./gui/gdmsetup-strings.c ../gdm2.patched/gui/gdmsetup-strings.c
*** ./gui/gdmsetup-strings.c Tue Jul 16 16:26:37 2002
--- ../gdm2.patched/gui/gdmsetup-strings.c Wed Sep 11 18:54:17 2002
***************
*** 51,56 ****
--- 51,57 ----
gchar *s = N_("copyright");
gchar *s = N_("_Install new theme");
gchar *s = N_("Graphical greeter");
+ gchar *s = N_("Enable no echo for _password entry");
gchar *s = N_("Allow _root to login with GDM");
gchar *s = N_("Allow root to login r_emotely with GDM");
gchar *s = N_("Allow remote _timed logins");
diff -r -C 3 ./gui/gdmsetup.c ../gdm2.patched/gui/gdmsetup.c
*** ./gui/gdmsetup.c Mon Aug 19 17:41:34 2002
--- ../gdm2.patched/gui/gdmsetup.c Wed Sep 11 18:54:17 2002
***************
*** 1813,1818 ****
--- 1813,1821 ----
GDM_KEY_TIMED_LOGIN_ENABLE,
NULL /* notify_key */);
+ setup_notify_toggle ("secureentry",
+ GDM_KEY_ENTRY_SECURE,
+ GDM_KEY_ENTRY_SECURE /* notify_key */);
setup_notify_toggle ("allowroot",
GDM_KEY_ALLOWROOT,
GDM_KEY_ALLOWROOT /* notify_key */);
diff -r -C 3 ./gui/gdmsetup.glade ../gdm2.patched/gui/gdmsetup.glade
*** ./gui/gdmsetup.glade Tue Jul 16 16:26:37 2002
--- ../gdm2.patched/gui/gdmsetup.glade Wed Sep 11 18:54:17 2002
***************
*** 1460,1465 ****
--- 1460,1483 ----
<property name="homogeneous">False</property>
<property name="spacing">4</property>
+ <child>
+ <widget class="GtkCheckButton" id="secureentry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Enable no echo for _password entry</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
<child>
<widget class="GtkCheckButton" id="allowroot">
<property name="visible">True</property>
diff -r -C 3 ./gui/greeter/greeter.c ../gdm2.patched/gui/greeter/greeter.c
*** ./gui/greeter/greeter.c Fri Aug 23 12:00:00 2002
--- ../gdm2.patched/gui/greeter/greeter.c Wed Sep 11 18:54:17 2002
***************
*** 55,60 ****
--- 55,61 ----
gint GdmTimedLoginDelay;
gboolean GdmUseCirclesInEntry = FALSE;
+ gboolean GdmSecureEntry = FALSE;
static gboolean used_defaults = FALSE;
gint greeter_current_delay = 0;
***************
*** 92,97 ****
--- 93,99 ----
}
GdmXineramaScreen = ve_config_get_int (config, GDM_KEY_XINERAMASCREEN);
GdmUseCirclesInEntry = ve_config_get_bool (config, GDM_KEY_ENTRY_CIRCLES);
+ GdmSecureEntry = ve_config_get_bool (config, GDM_KEY_ENTRY_SECURE);
GdmShowXtermFailsafeSession = ve_config_get_bool (config, GDM_KEY_SHOW_XTERM_FAILSAFE);
GdmShowGnomeFailsafeSession = ve_config_get_bool (config, GDM_KEY_SHOW_GNOME_FAILSAFE);
***************
*** 827,832 ****
--- 829,837 ----
GdmUseCirclesInEntry,
GDM_KEY_ENTRY_CIRCLES) ||
! bool_same (config,
+ GdmSecureEntry,
+ GDM_KEY_ENTRY_SECURE) ||
+ ! bool_same (config,
GdmShowXtermFailsafeSession,
GDM_KEY_SHOW_XTERM_FAILSAFE) ||
! bool_same (config,
diff -r -C 3 ./gui/greeter/greeter_canvas_item.c ../gdm2.patched/gui/greeter/greeter_canvas_item.c
*** ./gui/greeter/greeter_canvas_item.c Wed Aug 14 13:10:50 2002
--- ../gdm2.patched/gui/greeter/greeter_canvas_item.c Wed Sep 11 18:54:17 2002
***************
*** 294,299 ****
--- 294,301 ----
gtk_entry_set_has_frame (GTK_ENTRY (entry), FALSE);
if (GdmUseCirclesInEntry)
gtk_entry_set_invisible_char (GTK_ENTRY (entry), 0x25cf);
+ if (GdmSecureEntry)
+ gtk_entry_set_invisible_char (GTK_ENTRY (entry), 0x0000);
if (item->id != NULL && strcmp (item->id, "user-pw-entry") == 0) {
/* HACK! Add a menubar, this is kind of evil isn't it */
diff -r -C 3 ./gui/greeter/greeter_configuration.h ../gdm2.patched/gui/greeter/greeter_configuration.h
*** ./gui/greeter/greeter_configuration.h Thu Jul 11 11:42:26 2002
--- ../gdm2.patched/gui/greeter/greeter_configuration.h Wed Sep 11 18:54:17 2002
***************
*** 1,5 ****
--- 1,6 ----
extern gboolean GdmUseCirclesInEntry;
+ extern gboolean GdmSecureEntry;
extern gboolean GdmShowGnomeChooserSession;
extern gboolean GdmShowGnomeFailsafeSession;
extern gboolean GdmShowXtermFailsafeSession;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]