diff -Nru esound-0.2.29/esd_config.c esound-0.2.29.new/esd_config.c --- esound-0.2.29/esd_config.c Wed Jun 19 12:14:24 2002 +++ esound-0.2.29.new/esd_config.c Mon Mar 10 13:18:20 2003 @@ -41,12 +41,18 @@ fclose(fh); } free(fn); - - tmpenv = getenv("HOME"); + tmpenv = getenv("HOME_ETC"); if(tmpenv) { - fn = malloc(strlen(tmpenv) + sizeof("/.esd.conf")); - sprintf(fn, "%s/.esd.conf", tmpenv); - + fn = malloc(strlen(tmpenv) + sizeof("/.esd.conf")); + sprintf(fn, "%s/.esd.conf", tmpenv); + } else { + tmpenv = getenv("HOME"); + if(tmpenv) { + fn = malloc(strlen(tmpenv) + sizeof("/.esd.conf")); + sprintf(fn, "%s/.esd.conf", tmpenv); + } + } + if(tmpenv) { fh = fopen(fn, "r"); if(fh) diff -Nru esound-0.2.29/esddsp.c esound-0.2.29.new/esddsp.c --- esound-0.2.29/esddsp.c Mon Aug 26 16:39:55 2002 +++ esound-0.2.29.new/esddsp.c Mon Mar 10 12:58:56 2003 @@ -122,6 +122,13 @@ { use_mixer = 1; + str = getenv ("HOME_ETC"); + if (str) + { + mixer = malloc (strlen (str) + strlen (ident) + 10); + sprintf (mixer, "%s/.esddsp_%s", str, ident); + } + else { str = getenv ("HOME"); if (str) { @@ -133,7 +140,7 @@ fprintf (stderr, "esddsp: can't get home directory\n"); exit (1); } - + } DPRINTF ("mixer settings file: %s\n", mixer); } } --- esound-0.2.36/esdlib.c.orig 2005-05-26 02:25:10.000000000 +0200 +++ esound-0.2.36/esdlib.c 2005-06-11 20:40:11.772845792 +0200 @@ -166,6 +166,7 @@ char *auth_filename = NULL; unsigned char auth_key[ESD_KEY_LEN]; const char *home = NULL; + char *etc_dir = NULL; int namelen, retval; void (*phandler)(int); @@ -175,6 +176,18 @@ phandler = signal( SIGPIPE, dummy_signal ); /* for closed esd conns */ /* assemble the authorization filename */ + etc_dir = getenv("HOME_ETC"); + if (etc_dir) { + namelen = strlen(etc_dir) + sizeof("/.esd_auth"); + if ((auth_filename = malloc(namelen + 1)) == 0) { + fprintf( stderr, "Memory exhausted\n" ); + signal( SIGPIPE, phandler ); + return -1; + } + + strcpy( auth_filename, etc_dir ); + strcat( auth_filename, "/.esd_auth" ); + } else { home = getenv( "HOME" ); if ( !home ) { fprintf( stderr, "HOME environment variable not set?\n" ); @@ -191,7 +204,7 @@ strcpy( auth_filename, home ); strcat( auth_filename, "/.esd_auth" ); - + } retval = 0; /* open the authorization file */ if ( -1 == (auth_fd = open( auth_filename, O_RDONLY ) ) ) {