diff -urN xmms-infopipe-orig/src/infopipe.c xmms-infopipe-1.3/src/infopipe.c --- xmms-infopipe-orig/src/infopipe.c Sun May 19 13:08:40 2002 +++ xmms-infopipe-1.3/src/infopipe.c Wed May 22 00:00:15 2002 @@ -49,6 +49,8 @@ gchar *fifo_file = NULL; /* Current user's name. */ gchar *user_name; +/* Temporary dir and prefix */ +gchar * fifo_file_pfx; /* The data structure that holds the information about this plugin... @@ -102,6 +104,9 @@ Possible Buffer Overflow Sploit =) */ + /* Set proper temp dir */ + fifo_file_pfx = g_strdup_printf("%s/%s",g_get_tmp_dir(),FIFO_PREFIX); + /* Get user's name */ user_info = getpwuid(geteuid()); /* Note: should not be free()d! */ user_name = g_strdup(user_info->pw_name); @@ -110,7 +115,7 @@ fifo_file = g_strdup_printf("%s_%s.%d", - FIFO_FILE_PFX, + fifo_file_pfx, user_name, SESSIONID); @@ -155,7 +160,7 @@ */ if(param.create_symlinks) { - if(unlink(FIFO_FILE_PFX)!=0 && + if(unlink(fifo_file_pfx)!=0 && (errno != ENOENT && errno != EPERM && errno != EACCES) ) { /* Oops, we did something wrong. */ perror("Unable to reasonably remove the symbolic link"); @@ -163,7 +168,7 @@ return; } else { /* We succeeded. Let's try to create the link. */ - if(symlink(fifo_file,FIFO_FILE_PFX)!=0) { + if(symlink(fifo_file,fifo_file_pfx)!=0) { perror("Unable to create symbolic link"); xmms_quit(); return; @@ -203,7 +208,7 @@ /* remove the symlink */ if(param.delete_symlinks) { - if(unlink(FIFO_FILE_PFX)!=0) { + if(unlink(fifo_file_pfx)!=0) { perror("Unable to remove the symlink in the cleanup phase"); xmms_quit(); } diff -urN xmms-infopipe-orig/src/infopipe.h xmms-infopipe-1.3/src/infopipe.h --- xmms-infopipe-orig/src/infopipe.h Sun May 19 12:38:03 2002 +++ xmms-infopipe-1.3/src/infopipe.h Tue May 21 23:56:21 2002 @@ -38,7 +38,7 @@ This should be defined in the configuration dialog, but we don't have one.. yet... */ -#define FIFO_FILE_PFX "/tmp/xmms-info" +#define FIFO_PREFIX "xmms-info" /* FIFO name-outfigurance buffer size. Keep this ample enough. .