Enlightenment CVS committal

Author  : xcomputerman
Project : e17
Module  : apps/entrance

Dir     : e17/apps/entrance/src/client


Modified Files:
        entrance_config.c entrance_session.c main.c 


Log Message:
Segfault protection from people who don't read instructions, and prevent 
respawning on certain errors

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_config.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -3 -r1.27 -r1.28
--- entrance_config.c   27 Dec 2004 04:11:31 -0000      1.27
+++ entrance_config.c   15 Mar 2005 22:07:59 -0000      1.28
@@ -197,7 +197,7 @@
                 "/etc/shadow was found but couldn't be read. Run entrance as 
root.");
          if (getuid() == 0)
          {
-            exit(-1);
+            exit(EXITCODE);
          }
       }
    }
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_session.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -3 -r1.67 -r1.68
--- entrance_session.c  27 Dec 2004 06:45:14 -0000      1.67
+++ entrance_session.c  15 Mar 2005 22:07:59 -0000      1.68
@@ -47,7 +47,14 @@
 
    openlog("entrance", LOG_NOWAIT, LOG_DAEMON);
    if (!display)
+   {
+      if (!getenv("DISPLAY"))
+      {
+         syslog(LOG_CRIT, "entrance_session_new: Unexpected error occured." );
+         exit(EXITCODE);
+      }
       e->display = strdup(getenv("DISPLAY"));
+   }
    else
       e->display = strdup(display);
 
@@ -57,7 +64,7 @@
    {
       fprintf(stderr, "Could not load %s\n", db);
       syslog(LOG_CRIT, "Fatal Error: Unable to read config file %s.", db);
-      exit(1);
+      exit(EXITCODE);
    }
    e->session = strdup("");
    e->testing = testing;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/main.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -3 -r1.70 -r1.71
--- main.c      10 Mar 2005 05:17:12 -0000      1.70
+++ main.c      15 Mar 2005 22:07:59 -0000      1.71
@@ -1000,7 +1000,7 @@
    else
    {
       fprintf(stderr, "Fatal error: Could not initialize ecore_evas!\n");
-      exit(1);
+      exit(EXITCODE);
    }
    return (0);
 }




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to