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("CONFIG_DIR");
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 ("CONFIG_DIR");
38 + mixer = malloc (strlen (str) + strlen (ident) + 9);
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 diff -Nru esound-0.2.29/esdlib.c esound-0.2.29.new/esdlib.c
55 --- esound-0.2.29/esdlib.c Mon Jul 15 09:28:26 2002
56 +++ esound-0.2.29.new/esdlib.c Mon Mar 10 13:02:41 2003
58 char *auth_filename = 0;
59 unsigned char auth_key[ESD_KEY_LEN];
61 + char *config_dir = NULL;
63 void (*phandler)(int);
66 phandler = signal( SIGPIPE, dummy_signal ); /* for closed esd conns */
68 /* assemble the authorization filename */
69 + config_dir = getenv("CONFIG_DIR");
71 + namelen = strlen(config_dir) + sizeof("/esd_auth");
72 + if ((auth_filename = malloc(namelen + 1)) == 0) {
73 + fprintf( stderr, "Memory exhausted\n" );
74 + signal( SIGPIPE, phandler );
78 + strcpy( auth_filename, config_dir );
79 + strcat( auth_filename, "/esd_auth" );
81 home = getenv( "HOME" );
83 fprintf( stderr, "HOME environment variable not set?\n" );
86 strcpy( auth_filename, home );
87 strcat( auth_filename, "/.esd_auth" );
91 /* open the authorization file */
92 if ( -1 == (auth_fd = open( auth_filename, O_RDONLY ) ) ) {