1 diff -Nru esound-0.2.29/esd_config.c esound-0.2.29.new/esd_config.c
2 --- esound-0.2.29/esd_config.c Wed Jun 19 12:14:24 2002
3 +++ esound-0.2.29.new/esd_config.c Mon Mar 10 13:18:20 2003
9 - tmpenv = getenv("HOME");
10 + tmpenv = getenv("HOME_ETC");
12 - fn = malloc(strlen(tmpenv) + sizeof("/.esd.conf"));
13 - sprintf(fn, "%s/.esd.conf", tmpenv);
15 + fn = malloc(strlen(tmpenv) + sizeof("/.esd.conf"));
16 + sprintf(fn, "%s/.esd.conf", tmpenv);
18 + tmpenv = getenv("HOME");
20 + fn = malloc(strlen(tmpenv) + sizeof("/.esd.conf"));
21 + sprintf(fn, "%s/.esd.conf", tmpenv);
28 diff -Nru esound-0.2.29/esddsp.c esound-0.2.29.new/esddsp.c
29 --- esound-0.2.29/esddsp.c Mon Aug 26 16:39:55 2002
30 +++ esound-0.2.29.new/esddsp.c Mon Mar 10 12:58:56 2003
35 + str = getenv ("HOME_ETC");
38 + mixer = malloc (strlen (str) + strlen (ident) + 10);
39 + sprintf (mixer, "%s/.esddsp_%s", str, ident);
42 str = getenv ("HOME");
46 fprintf (stderr, "esddsp: can't get home directory\n");
51 DPRINTF ("mixer settings file: %s\n", mixer);
54 --- esound-0.2.36/esdlib.c.orig 2005-05-26 02:25:10.000000000 +0200
55 +++ esound-0.2.36/esdlib.c 2005-06-11 20:40:11.772845792 +0200
57 char *auth_filename = NULL;
58 unsigned char auth_key[ESD_KEY_LEN];
59 const char *home = NULL;
60 + char *etc_dir = NULL;
62 void (*phandler)(int);
65 phandler = signal( SIGPIPE, dummy_signal ); /* for closed esd conns */
67 /* assemble the authorization filename */
68 + etc_dir = getenv("HOME_ETC");
70 + namelen = strlen(etc_dir) + sizeof("/.esd_auth");
71 + if ((auth_filename = malloc(namelen + 1)) == 0) {
72 + fprintf( stderr, "Memory exhausted\n" );
73 + signal( SIGPIPE, phandler );
77 + strcpy( auth_filename, etc_dir );
78 + strcat( auth_filename, "/.esd_auth" );
80 home = getenv( "HOME" );
82 fprintf( stderr, "HOME environment variable not set?\n" );
85 strcpy( auth_filename, home );
86 strcat( auth_filename, "/.esd_auth" );
90 /* open the authorization file */
91 if ( -1 == (auth_fd = open( auth_filename, O_RDONLY ) ) ) {