Enlightenment CVS committal

Author  : xcomputerman
Project : e17
Module  : apps/entrance

Dir     : e17/apps/entrance/src/daemon


Modified Files:
        auth.c 
Added Files:
        auth.h 


Log Message:
- Add auth.h
- Use configure-specified location instead of hardcoded /var/lib
- Small fixups

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/daemon/auth.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- auth.c      22 Mar 2004 22:41:13 -0000      1.5
+++ auth.c      23 Mar 2004 00:29:43 -0000      1.6
@@ -4,17 +4,10 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
-#include <X11/Xlib.h>
-#include <X11/Xauth.h>
-#include <X11/extensions/security.h>
-#include <X11/Xos.h>
-
-#include <Ecore_X.h>
-#include <Ecore_Ipc.h>
-
-#include "Entranced.h"
+#include "auth.h"
 #include "util.h"
 #include "md5.h"
+#include "../config.h"
 
 #define BUFSIZE 512
 
@@ -251,7 +244,7 @@
       free(d->authfile);
 
    /* FIXME: Config-ize */
-   snprintf(buf, PATH_MAX, "/var/lib/entrance/%s%s", d->name, ".Xauth");
+   snprintf(buf, PATH_MAX, PACKAGE_STATE_DIR"/%s%s", d->name, ".Xauth");
    d->authfile = strdup(buf);
    unlink(d->authfile);
 
@@ -273,9 +266,9 @@
       XauDisposeAuth(tmp);
    }
    
+   memset(hostname, 0, sizeof(hostname));
    if (!gethostname(hostname, 1023))
    {
-      hostname[1023] = '\0';
       if (d->hostname)
          free(d->hostname);
       d->hostname = strdup(hostname);




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to