since I don't think it is useful to clutter bugzilla with patches for
warning or compil fixes of GDM cvs HEAD, I'm posting my fixes on the
mailing list. If you prefer I always use bugzilla, just shout loud :)
First patch fixes compilation of crypt and shadow authentication on CVS
HEAD.
Second patch fixes some warnings (I already submitted a patch which was
against 2.12 and only got partially merged on HEAD, sorry about that)
and also fix a bug when a function was passed as parameter instead of
function return value (here, you understand why fixing warnings can be
useful ;).
------------------------------------------------------------------------
--- daemon/verify-crypt.c 4 Nov 2005 00:51:21 -0000 1.47
+++ daemon/verify-crypt.c 23 Nov 2005 16:27:22 -0000
@@ -37,12 +37,7 @@
#include "slave.h"
#include "verify.h"
#include "errorgui.h"
-
-/* Configuration option variables */
-extern gboolean GdmAllowRoot;
-extern gboolean GdmAllowRemoteRoot;
-extern gint GdmRetryDelay;
-extern gboolean GdmDisplayLastLogin;
+#include "gdmconfig.h"
static char *selected_user = NULL;
@@ -140,7 +135,7 @@ authenticate_again:
}
gdm_slave_greeter_ctl_no_ret (GDM_MSG, "");
- if (GdmDisplayLastLogin) {
+ if (gdm_get_value_bool (GDM_KEY_DISPLAY_LAST_LOGIN)) {
char *info = gdm_get_last_info (login);
gdm_slave_greeter_ctl_no_ret (GDM_ERRBOX, info);
g_free (info);
@@ -177,7 +172,7 @@ authenticate_again:
gdm_slave_greeter_ctl_no_ret (GDM_STOPTIMER, "");
if (pwent == NULL) {
- gdm_sleep_no_signal (GdmRetryDelay);
+ gdm_sleep_no_signal (gdm_get_value_int (GDM_KEY_RETRY_DELAY));
gdm_error (_("Couldn't authenticate user \"%s\""), login);
print_cant_auth_errbox ();
@@ -191,7 +186,7 @@ authenticate_again:
/* Check whether password is valid */
if (ppasswd == NULL || (ppasswd[0] != '\0' &&
strcmp (crypt (passwd, ppasswd), ppasswd) != 0)) {
- gdm_sleep_no_signal (GdmRetryDelay);
+ gdm_sleep_no_signal (gdm_get_value_int (GDM_KEY_RETRY_DELAY));
gdm_error (_("Couldn't authenticate user \"%s\""), login);
print_cant_auth_errbox ();
@@ -202,8 +197,8 @@ authenticate_again:
return NULL;
}
- if ( ( ! GdmAllowRoot ||
- ( ! GdmAllowRemoteRoot && ! local) ) &&
+ if ( ( ! gdm_get_value_bool (GDM_KEY_ALLOW_ROOT)||
+ ( ! gdm_get_value_bool (GDM_KEY_ALLOW_REMOTE_ROOT) && ! local) ) &&
pwent->pw_uid == 0) {
gdm_error (_("Root login disallowed on display '%s'"), display);
gdm_slave_greeter_ctl_no_ret (GDM_ERRBOX,
Index: daemon/verify-shadow.c
===================================================================
RCS file: /cvs/gnome/gdm2/daemon/verify-shadow.c,v
retrieving revision 1.49
diff -u -p -r1.49 verify-shadow.c
--- daemon/verify-shadow.c 4 Nov 2005 00:51:21 -0000 1.49
+++ daemon/verify-shadow.c 23 Nov 2005 16:27:22 -0000
@@ -38,12 +38,7 @@
#include "slave.h"
#include "verify.h"
#include "errorgui.h"
-
-/* Configuration option variables */
-extern gboolean GdmAllowRoot;
-extern gboolean GdmAllowRemoteRoot;
-extern gint GdmRetryDelay;
-extern gboolean GdmDisplayLastLogin;
+#include "gdmconfig.h"
static char *selected_user = NULL;
@@ -139,7 +134,7 @@ authenticate_again:
}
gdm_slave_greeter_ctl_no_ret (GDM_MSG, "");
- if (GdmDisplayLastLogin) {
+ if (gdm_get_value_bool (GDM_KEY_DISPLAY_LAST_LOGIN)) {
char *info = gdm_get_last_info (login);
gdm_slave_greeter_ctl_no_ret (GDM_ERRBOX, info);
g_free (info);
@@ -195,7 +190,7 @@ authenticate_again:
gdm_slave_greeter_ctl_no_ret (GDM_STOPTIMER, "");
if (pwent == NULL) {
- gdm_sleep_no_signal (GdmRetryDelay);
+ gdm_sleep_no_signal (gdm_get_value_int (GDM_KEY_RETRY_DELAY));
gdm_error (_("Couldn't authenticate user \"%s\""), login);
print_cant_auth_errbox ();
@@ -209,7 +204,7 @@ authenticate_again:
/* Check whether password is valid */
if (ppasswd == NULL || (ppasswd[0] != '\0' &&
strcmp (crypt (passwd, ppasswd), ppasswd) != 0)) {
- gdm_sleep_no_signal (GdmRetryDelay);
+ gdm_sleep_no_signal (gdm_get_value_int (GDM_KEY_RETRY_DELAY));
gdm_error (_("Couldn't authenticate user \"%s\""), login);
print_cant_auth_errbox ();
@@ -220,8 +215,8 @@ authenticate_again:
return NULL;
}
- if ( ( ! GdmAllowRoot ||
- ( ! GdmAllowRemoteRoot && ! local) ) &&
+ if ( ( ! gdm_get_value_bool (GDM_KEY_ALLOW_ROOT)||
+ ( ! gdm_get_value_bool (GDM_KEY_ALLOW_REMOTE_ROOT) && ! local) ) &&
pwent->pw_uid == 0) {
gdm_error (_("Root login disallowed on display '%s'"), display);
gdm_slave_greeter_ctl_no_ret (GDM_ERRBOX,
------------------------------------------------------------------------
--- daemon/choose.c 4 Nov 2005 00:51:20 -0000 1.25
+++ daemon/choose.c 23 Nov 2005 16:27:20 -0000
@@ -41,6 +41,7 @@
#include "misc.h"
#include "choose.h"
#include "xdmcp.h"
+#include "gdmconfig.h"
static gint ipending = 0;
static GSList *indirect = NULL;
Index: daemon/gdm.c
===================================================================
RCS file: /cvs/gnome/gdm2/daemon/gdm.c,v
retrieving revision 1.235
diff -u -p -r1.235 gdm.c
--- daemon/gdm.c 22 Nov 2005 20:59:36 -0000 1.235
+++ daemon/gdm.c 23 Nov 2005 16:27:21 -0000
@@ -1337,8 +1337,8 @@ gdm_make_global_cookie (void)
gdm_cookie_generate (&faked);
- gdm_global_cookie = faked.cookie;
- gdm_global_bcookie = faked.bcookie;
+ gdm_global_cookie = (unsigned char *) faked.cookie;
+ gdm_global_bcookie = (unsigned char *) faked.bcookie;
file = g_build_filename (gdm_get_value_string (GDM_KEY_SERV_AUTHDIR), ".cookie", NULL);
VE_IGNORE_EINTR (unlink (file));
@@ -2575,7 +2575,7 @@ handle_flexi_server (GdmConnection *conn
NEVER_FAILS_seteuid (0);
if (setegid (pw->pw_gid) < 0)
- NEVER_FAILS_setegid (gdm_get_gdmgid);
+ NEVER_FAILS_setegid (gdm_get_gdmgid());
if (seteuid (xnest_uid) < 0) {
if (conn != NULL)
@@ -2838,7 +2838,7 @@ gdm_handle_user_message (GdmConnection *
}
if (gdm_global_cookie != NULL &&
- g_ascii_strcasecmp (gdm_global_cookie, cookie) == 0) {
+ g_ascii_strcasecmp ((char *) gdm_global_cookie, cookie) == 0) {
g_free (cookie);
GDM_CONNECTION_SET_USER_FLAG
(conn, GDM_SUP_FLAG_AUTH_GLOBAL);
@@ -3026,7 +3026,6 @@ gdm_handle_user_message (GdmConnection *
strlen (GDM_SUP_UPDATE_CONFIG " ")) == 0) {
const char *key =
&msg[strlen (GDM_SUP_UPDATE_CONFIG " ")];
- char *val;
if (! gdm_update_config ((gchar *)key))
gdm_connection_printf (conn, "ERROR 50 Unsupported key <%s>\n", key);
Index: daemon/gdmconfig.c
===================================================================
RCS file: /cvs/gnome/gdm2/daemon/gdmconfig.c,v
retrieving revision 1.3
diff -u -p -r1.3 gdmconfig.c
--- daemon/gdmconfig.c 23 Nov 2005 01:37:29 -0000 1.3
+++ daemon/gdmconfig.c 23 Nov 2005 16:27:22 -0000
@@ -1335,7 +1335,6 @@ gdm_config_parse (void)
struct stat statbuf;
gchar *bin;
GList *list, *li;
- int r;
gdm_config_init ();
@@ -1691,7 +1690,6 @@ gdm_print_config_option (gpointer key_in
{
gchar *key = (gchar *)key_in;
gchar *retval;
- GdmConfigType *type = (GdmConfigType *)value_in;
gdm_config_to_string (key, &retval);
if (retval != NULL) {
Index: daemon/misc.c
===================================================================
RCS file: /cvs/gnome/gdm2/daemon/misc.c,v
retrieving revision 1.108
diff -u -p -r1.108 misc.c
--- daemon/misc.c 4 Nov 2005 00:51:20 -0000 1.108
+++ daemon/misc.c 23 Nov 2005 16:27:22 -0000
@@ -124,7 +124,7 @@ have_ipv6_solaris (void)
/* Check the address
*/
if (ioctl (s, SIOCGLIFFLAGS, ifr) < 0) {
- // perror("ioctl SIOCGLIFADDR");
+ /* perror("ioctl SIOCGLIFADDR"); */
continue;
}
@@ -138,7 +138,7 @@ have_ipv6_solaris (void)
/* Check the interface flags
*/
if (ioctl (s, SIOCGLIFFLAGS, (char *) ifr) < 0) {
- // perror("ioctl SIOCGLIFFLAGS");
+ /* perror("ioctl SIOCGLIFFLAGS"); */
continue;
}
Index: gui/gdmXnestchooser.c
===================================================================
RCS file: /cvs/gnome/gdm2/gui/gdmXnestchooser.c,v
retrieving revision 1.31
diff -u -p -r1.31 gdmXnestchooser.c
--- gui/gdmXnestchooser.c 22 Nov 2005 07:48:46 -0000 1.31
+++ gui/gdmXnestchooser.c 23 Nov 2005 16:27:23 -0000
@@ -468,7 +468,6 @@ main (int argc, char *argv[])
const char **args;
char *xnest;
char **execvec;
- gchar *config_file, *config_prefix;
struct sigaction term;
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
Index: gui/gdmconfig.c
===================================================================
RCS file: /cvs/gnome/gdm2/gui/gdmconfig.c,v
retrieving revision 1.81
diff -u -p -r1.81 gdmconfig.c
--- gui/gdmconfig.c 23 Nov 2005 01:59:04 -0000 1.81
+++ gui/gdmconfig.c 23 Nov 2005 16:27:24 -0000
@@ -104,7 +104,7 @@ gdm_config_get_result (gchar *key)
{
gchar *p;
gchar *newkey = g_strdup (key);
- gchar *command = NULL;;
+ gchar *command = NULL;
gchar *result = NULL;
g_strstrip (newkey);
@@ -131,7 +131,6 @@ static gchar *
_gdm_config_get_string (gchar *key, gboolean reload, gboolean *changed, gboolean show_error)
{
gchar **hashretval = NULL;
- gboolean *valueset = NULL;
gchar *result = NULL;
gchar *temp;
@@ -208,7 +207,6 @@ _gdm_config_get_translated_string (gchar
const GList *li;
char *dkey;
char *def;
- char *ret;
/* Strip key */
dkey = g_strdup (key);
@@ -2496,7 +2489,6 @@ gdm_login_gui_init (void)
GtkWidget *stack, *hline1, *hline2, *handle;
GtkWidget *bbox = NULL;
GtkWidget /**help_button,*/ *button_box;
- gchar *greeting;
gint rows;
GdkPixbuf *pb;
GtkWidget *frame;
Index: gui/greeter/greeter_canvas_text.c
===================================================================
RCS file: /cvs/gnome/gdm2/gui/greeter/greeter_canvas_text.c,v
retrieving revision 1.1
diff -u -p -r1.1 greeter_canvas_text.c
--- gui/greeter/greeter_canvas_text.c 25 Apr 2005 19:38:56 -0000 1.1
+++ gui/greeter/greeter_canvas_text.c 23 Nov 2005 16:27:24 -0000
@@ -25,7 +25,7 @@ static void greeter_canvas_text_get_prop
GValue *value,
GParamSpec *pspec);
-G_DEFINE_TYPE (GreeterCanvasText, greeter_canvas_text, GNOME_TYPE_CANVAS_TEXT);
+G_DEFINE_TYPE (GreeterCanvasText, greeter_canvas_text, GNOME_TYPE_CANVAS_TEXT)
static void
greeter_canvas_text_class_init (GreeterCanvasTextClass *greeter_class)
------------------------------------------------------------------------
_______________________________________________
gdm-list mailing list
gdm-list gnome org
http://mail.gnome.org/mailman/listinfo/gdm-list