Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_config.c e_desklock.c e_int_config_desklock.c 
        e_int_config_display.c 


Log Message:


* desklock personal password disabled - security risk.
* desklock tries other comon pam profiles first that are more appropriate
* xrandr detect actually pops up the "no xrandr" dialog now

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_config.c,v
retrieving revision 1.187
retrieving revision 1.188
diff -u -3 -r1.187 -r1.188
--- e_config.c  10 Aug 2006 05:01:07 -0000      1.187
+++ e_config.c  12 Aug 2006 13:25:29 -0000      1.188
@@ -1257,6 +1257,11 @@
    
    /* FIXME: disabled auto apply because it causes problems */
    e_config->cfgdlg_auto_apply = 0;
+   /* FIXME: desklock personalized password id disabled for security reasons */
+   e_config->desklock_auth_method = 0;
+   if (e_config->desklock_personal_passwd)
+     evas_stringshare_del(e_config->desklock_personal_passwd);
+   e_config->desklock_personal_passwd = NULL;
    
    e_config_save_queue();
    
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_desklock.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- e_desklock.c        1 Aug 2006 04:14:34 -0000       1.19
+++ e_desklock.c        12 Aug 2006 13:25:29 -0000      1.20
@@ -584,7 +584,17 @@
        int pamerr;
        E_Desklock_Auth da;
         char *current_user, *p;
-
+       struct sigaction action;
+       
+       action.sa_sigaction = SIG_DFL;
+       action.sa_flags = SA_ONSTACK | SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
+       sigemptyset(&action.sa_mask);
+       sigaction(SIGSEGV, &action, NULL);
+       sigaction(SIGILL, &action, NULL);
+       sigaction(SIGFPE, &action, NULL);
+       sigaction(SIGBUS, &action, NULL);
+       sigaction(SIGABRT, &action, NULL);
+       
        current_user = _desklock_auth_get_current_user();
        strncpy(da.user, current_user, PATH_MAX);
        strncpy(da.passwd, passwd, PATH_MAX);
@@ -635,6 +645,7 @@
 _desklock_pam_init(E_Desklock_Auth *da)
 {
    int pamerr;
+   const char *pam_prof;
    char *current_host;
    char *current_user;
    
@@ -643,8 +654,14 @@
    da->pam.conv.conv = _desklock_auth_pam_conv;
    da->pam.conv.appdata_ptr = da;
    da->pam.handle = NULL;
+
+   /* try other pam profiles - and system-auth is a fallback */
+   pam_prof = "system-auth";
+   if (ecore_file_exists("/etc/pam.d/enlightenment")) pam_prof = 
"enlightenment";
+   if (ecore_file_exists("/etc/pam.d/xscreensaver")) pam_prof = "xscreensaver";
+   if (ecore_file_exists("/etc/pam.d/kscreensaver")) pam_prof = "kscreensaver";
    
-   if ((pamerr = pam_start("system-auth", da->user, &(da->pam.conv),
+   if ((pamerr = pam_start(pam_prof, da->user, &(da->pam.conv),
                           &(da->pam.handle))) != PAM_SUCCESS)
      return pamerr;
 
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_config_desklock.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- e_int_config_desklock.c     12 Aug 2006 12:21:32 -0000      1.26
+++ e_int_config_desklock.c     12 Aug 2006 13:25:29 -0000      1.27
@@ -213,6 +213,7 @@
    //_fill_desklock_data(cfdata);
    o = e_widget_list_add(evas, 0, 0);
 
+/*   
 #ifdef HAVE_PAM
    of = e_widget_framelist_add(evas, _("Password Type"), 0);
    
@@ -249,6 +250,7 @@
    e_widget_framelist_object_append(of, ob);
    
    e_widget_list_object_append(o, of, 1, 1, 0.5);
+*/
    
    of = e_widget_framelist_add(evas, _("Automatic Locking"), 0);
    e_widget_disabled_set(of, !ecore_x_screensaver_event_available_get());
@@ -399,7 +401,8 @@
        e_widget_table_object_append(ot, of, 1, 1, 1, 1, 1, 1, 1, 1);
      }
    /* end: login box options */
-   
+
+   /*
 #ifdef HAVE_PAM
    of = e_widget_framelist_add(evas, _("Password Type"), 0);
    
@@ -439,6 +442,7 @@
 #else
    e_widget_table_object_append(ot, of, 0, 2, 1, 1, 1, 1, 1, 1);
 #endif
+   */
    
    of = e_widget_framelist_add(evas, _("Automatic Locking"), 0);
    
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_config_display.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- e_int_config_display.c      25 Jul 2006 09:54:30 -0000      1.21
+++ e_int_config_display.c      12 Aug 2006 13:25:29 -0000      1.22
@@ -12,6 +12,7 @@
 static Evas_Object *_basic_create_widgets    (E_Config_Dialog *cfd, Evas 
*evas, E_Config_Dialog_Data *cfdata);
 static void         _load_rates              (void *data);
 static void         _ilist_item_change       (void *data);
+static int          _deferred_noxrandr_error (void *data);
 
 Evas_Object *rate_list = NULL;
 Evas_Object *res_list = NULL;
@@ -374,15 +375,9 @@
    sizes = ecore_x_randr_screen_sizes_get(man->root, &s);
    size = ecore_x_randr_current_screen_size_get(man->root);
    
-   if (!sizes)
+   if ((!sizes) || (s == 0))
      {
-       e_util_dialog_show(_("Missing Features"),
-                          _("Your X Display Server is missing support for<br>"
-                            "The <hilight>XRandr</hilight> (X Resize and 
Rotate) extension.<br>"
-                            "You cannot change screen resolutions without<br>"
-                            "The support of this extension. It could also 
be<br>"
-                            "That at the time <hilight>ecore</hilight> was 
built there<br>"
-                            "was no XRandr support detected."));
+       ecore_timer_add(0.5, _deferred_noxrandr_error, NULL);
      }
    else
      {
@@ -443,6 +438,8 @@
          }     
      }
    
+   if (sizes) free(sizes);
+   
    e_widget_ilist_go(ol);
    e_widget_ilist_go(rl);
    
@@ -517,4 +514,17 @@
 _ilist_item_change(void *data) 
 {
    _load_rates(data);
+}
+
+static int
+_deferred_noxrandr_error(void *data)
+{
+   e_util_dialog_show(_("Missing Features"),
+                     _("Your X Display Server is missing support for<br>"
+                       "The <hilight>XRandr</hilight> (X Resize and Rotate) 
extension.<br>"
+                       "You cannot change screen resolutions without<br>"
+                       "The support of this extension. It could also be<br>"
+                       "That at the time <hilight>ecore</hilight> was built 
there<br>"
+                       "was no XRandr support detected."));
+   return 0;
 }



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to