Enlightenment CVS committal

Author  : xcomputerman
Project : e17
Module  : apps/entrance

Dir     : e17/apps/entrance/src/daemon


Modified Files:
        Entranced.h ipc.c spawner.c 


Log Message:
I still haven't found time to sit down and debug this xauth bug, so here's
a command line option for you guys to disable it (--disable-xauth).


===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/daemon/Entranced.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- Entranced.h 1 May 2004 21:30:04 -0000       1.3
+++ Entranced.h 12 May 2004 19:24:16 -0000      1.4
@@ -47,6 +47,7 @@
    char        *xprog;          /* the X execution string */
    int         attempts;
    int         status;
+   int         auth_en;         /* Enable XAuth access control */
    pid_t       pid;
    Ecore_List  *auths;
    char        *authfile;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/daemon/ipc.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ipc.c       1 May 2004 21:30:04 -0000       1.2
+++ ipc.c       12 May 2004 19:24:16 -0000      1.3
@@ -65,7 +65,7 @@
       if (_display->client.uid && _display->client.gid 
             && _display->client.homedir)
       {
-         if (entranced_auth_user_add(_display, (const char 
*)_display->client.homedir))
+         if (!(_display->auth_en) || entranced_auth_user_add(_display, (const char 
*)_display->client.homedir))
          {
             ecore_ipc_client_send(e->client, E_XAUTH_ACK, 0, 0, 0, 0, NULL, 0);
             entranced_debug("_entranced_ipc_client_data: All tokens received; wrote 
cookie to user dir %s\n", _display->client.homedir);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/daemon/spawner.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- spawner.c   1 May 2004 20:44:52 -0000       1.16
+++ spawner.c   12 May 2004 19:24:16 -0000      1.17
@@ -78,6 +78,7 @@
    d->xprog = strdup(X_SERVER);
    d->attempts = 5;
    d->status = NOT_RUNNING;
+   d->auth_en = 1;
    d->auths = ecore_list_new();
    return d;
 }
@@ -127,13 +128,21 @@
    x_ready = 0;
 
    /* Create server auth cookie */
-   if (!entranced_auth_display_secure(d))
+
+   if(d->auth_en)
    {
-      syslog(LOG_CRIT, "Failed to generate auth cookie for X Server.");
-      return -1;
-   }
+      if (!entranced_auth_display_secure(d))
+      {
+         syslog(LOG_CRIT, "Failed to generate auth cookie for X Server.");
+         return -1;
+      }
    
-   snprintf(x_cmd, PATH_MAX, "%s -auth %s %s", X_SERVER, d->authfile, d->name);
+      snprintf(x_cmd, PATH_MAX, "%s -auth %s %s", X_SERVER, d->authfile, d->name);
+   }
+   else
+   {
+      snprintf(x_cmd, PATH_MAX, "%s %s", X_SERVER, d->name);
+   }
    entranced_debug("Entranced_Start_Server_Once: Executing %s\n", x_cmd);
 
    /* x_exe = ecore_exe_run(d->xprog, d); */
@@ -384,6 +393,7 @@
       {"display", 1, 0, 'd'},
       {"nodaemon", 0, 0, 'n'},
       {"help", 0, 0, 'h'},
+      {"disable-xauth", 0, 0, 'a'},
       {"verbose", 0, 0, 'v'},
       {0, 0, 0, 0}
    };
@@ -413,6 +423,9 @@
         case 'd':
            d->name = strdup(optarg);
            break;
+        case 'a':
+           d->auth_en = 0;
+           break;
         case 'n':
            nodaemon = 1;
            break;




-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to