Enlightenment CVS committal Author : raster Project : e17 Module : apps/entrance
Dir : e17/apps/entrance/src/daemon Modified Files: auth.c Log Message: nicks' patch seems innocuous enough :) =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/daemon/auth.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -3 -r1.15 -r1.16 --- auth.c 17 May 2004 05:31:49 -0000 1.15 +++ auth.c 7 Jul 2005 04:15:16 -0000 1.16 @@ -424,6 +424,7 @@ d->client.authfile = strdup(buf); } + seteuid(d->client.uid); /* Make sure the file can be written to */ if((auth_file = fopen(d->client.authfile, "a+"))) fclose(auth_file); @@ -432,6 +433,7 @@ entranced_debug("entranced_auth_user_add: Unable to write auth file %s\n", d->client.authfile); free(d->client.authfile); d->client.authfile = NULL; + seteuid(0); return FALSE; } /* TODO: May need a permissions/paranoia check */ @@ -446,6 +448,7 @@ free(d->client.authfile); d->client.authfile = NULL; + seteuid(0); umask (022); } else @@ -453,6 +456,7 @@ } /* Open file and write auth entries */ + seteuid(d->client.uid); if(!(auth_file = fopen(d->client.authfile, "r+"))) { syslog(LOG_CRIT, "entranced_auth_user_add: Open auth file %s failed after lock", d->client.authfile); @@ -460,6 +464,7 @@ free(d->client.authfile); d->client.authfile = NULL; + seteuid(0); umask (022); return FALSE; @@ -483,10 +488,11 @@ fclose(auth_file); XauUnlockAuth(d->client.authfile); - chown(d->client.authfile, d->client.uid, d->client.gid); - + /*chown(d->client.authfile, d->client.uid, d->client.gid);*/ + entranced_debug("entranced_auth_user_add: Finished writing auth entries to %s\n", d->client.authfile); - + seteuid(0); + return ret; } ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs