Index: include/libroar/config.h
===================================================================
--- include/libroar/config.h	(revision 5828)
+++ include/libroar/config.h	(revision 5832)
@@ -181,4 +181,11 @@
 char * roar_libroar_get_path(const char * name, int null_as_universal, const char * product, const char * provider) _LIBROAR_ATTR_USE_RESULT;
 
+// This is similar roar_libroar_get_path() with the following diffrences:
+// * No product, provider or universal attribute can be passed.
+//   The result is as if they were 0, NULL, NULL.
+// * The returned buffer is some read-only memory which does not need to be
+//   freed.
+const char * roar_libroar_get_path_static(const char * name);
+
 // list all known paths:
 ssize_t roar_libroar_list_path(const char ** list, size_t len, size_t offset) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL_ALL;
Index: libroar/basic.c
===================================================================
--- libroar/basic.c	(revision 5823)
+++ libroar/basic.c	(revision 5832)
@@ -108,5 +108,5 @@
      dup2(socks[1], ROAR_STDIN );
      dup2(socks[1], ROAR_STDOUT);
-     execl("/bin/sh", "/bin/sh", "-c", daemonimage, (_LIBROAR_GOOD_CAST char*)NULL);
+     execl(roar_libroar_get_path_static("bin-sh"), roar_libroar_get_path_static("bin-sh"), "-c", daemonimage, (_LIBROAR_GOOD_CAST char*)NULL);
      execlp("sh", "sh", "-c", daemonimage, (_LIBROAR_GOOD_CAST char*)NULL);
     break;
@@ -321,5 +321,5 @@
 
 #if !defined(ROAR_TARGET_WIN32) && !defined(ROAR_TARGET_MICROCONTROLLER)
- if ( (server == NULL || *server == 0) && (i = readlink("/etc/roarserver", user_sock, sizeof(user_sock)-1)) != -1 ) {
+ if ( (server == NULL || *server == 0) && (i = readlink(roar_libroar_get_path_static("sysconf-roarserver"), user_sock, sizeof(user_sock)-1)) != -1 ) {
    user_sock[i] = 0;
    server = user_sock;
@@ -352,5 +352,5 @@
 #if !defined(ROAR_TARGET_WIN32) && !defined(ROAR_TARGET_MICROCONTROLLER)
    if ( (pwd = getpwuid(getuid())) == NULL ) {
-    roar_server = "/NX-HOME-DIR";
+    roar_server = roar_libroar_get_path_static("dir-nx-home");
    } else {
     roar_server = pwd->pw_dir;
Index: libroar/cdrom.c
===================================================================
--- libroar/cdrom.c	(revision 5823)
+++ libroar/cdrom.c	(revision 5832)
@@ -91,5 +91,5 @@
  close(fh[1]);
 
- execl(ROAR_HAVE_BIN_CDPARANOIA, "cdparanoia", "--force-cdrom-device", "/dev/stdin", "-q",
+ execl(roar_libroar_get_path_static("bin-cdparanoia"), roar_libroar_get_path_static("bin-cdparanoia"), "--force-cdrom-device", roar_libroar_get_path_static("dev-stdin"), "-q",
                 ROAR_CDROM_CDPARANOIA_OUTPUTFORMAT, pos, "-", NULL);
 
Index: libroar/config.c
===================================================================
--- libroar/config.c	(revision 5831)
+++ libroar/config.c	(revision 5832)
@@ -436,5 +436,5 @@
 }
 
-static const struct {
+static const struct pathinfo {
  const char * name;
  const char * path;
@@ -487,13 +487,14 @@
  {"bin-pinentry",       ROAR_HAVE_BIN_PINENTRY, 0, 0},
  {"bin-ssh_askpass",    ROAR_HAVE_BIN_SSH_ASKPASS, 0, 0},
- {"bin-gtk_led_askpass", ROAR_HAVE_BIN_GTK_LED_ASKPASS, 0, 0},
- {"bin-x11_ssh_askpass", ROAR_HAVE_BIN_X11_SSH_ASKPASS, 0, 0},
- {"bin-gnome_ssh_askpass", ROAR_HAVE_BIN_GNOME_SSH_ASKPASS, 0, 0},
+ {"bin-gtk-led-askpass", ROAR_HAVE_BIN_GTK_LED_ASKPASS, 0, 0},
+ {"bin-x11-ssh-askpass", ROAR_HAVE_BIN_X11_SSH_ASKPASS, 0, 0},
+ {"bin-gnome-ssh-askpass", ROAR_HAVE_BIN_GNOME_SSH_ASKPASS, 0, 0},
  {"bin-gpg",            ROAR_HAVE_BIN_GPG, 0, 0},
  {"bin-eject",          ROAR_HAVE_BIN_EJECT, 0, 0},
 
  // devices:
- {"dev-stdin",          ROAR_PREFIX_DEV "/stdin", 0, 0},
+ {"dev-stdin",                  ROAR_PREFIX_DEV "/stdin", 0, 0},
  {"dev-default-pwmled",         ROAR_PREFIX_DEV "/ttyS0", 0, 0},
+ {"dev-default-dmx4linux",      ROAR_PREFIX_DEV "/dmx", 0, 0},
 
 #ifdef ROAR_DEFAULT_CDROM
@@ -512,19 +513,19 @@
  // proc:
 #ifdef ROAR_PROC_NET_DECNET
- {"proc-net-decnet",     ROAR_PROC_NET_DECNET, 0, 0},
+ {"proc-net-decnet",            ROAR_PROC_NET_DECNET, 0, 0},
 #endif
 #ifdef ROAR_PROC_NET_DECNET_NEIGH
- {"proc-net-decnet-neigh", ROAR_PROC_NET_DECNET_NEIGH, 0, 0},
+ {"proc-net-decnet-neigh",      ROAR_PROC_NET_DECNET_NEIGH, 0, 0},
 #endif
 #ifdef ROAR_PROC_NET_ARP
- {"proc-net-arp",        ROAR_PROC_NET_ARP, 0, 0},
+ {"proc-net-arp",               ROAR_PROC_NET_ARP, 0, 0},
 #endif
 
  // sysconf:
- {"sysconf-hosts",       ROAR_PREFIX_SYSCONF "/hosts", 0, 0},
- {"sysconf-roarserver",  ROAR_PREFIX_SYSCONF "/roarserver", 0, 0},
+ {"sysconf-hosts",              ROAR_PREFIX_SYSCONF "/hosts", 0, 0},
+ {"sysconf-roarserver",         ROAR_PREFIX_SYSCONF "/roarserver", 0, 0},
 
  // special dirs:
- {"dir-nx-home",         "/NX-HOME-DIR", 0, 0}
+ {"dir-nx-home",                "/NX-HOME-DIR", 0, 0}
 };
 
@@ -606,58 +607,75 @@
 }
 
+static const struct pathinfo * __lookup_path(const char * name) {
+ size_t i;
+
+ if ( name == NULL ) {
+  roar_err_set(ROAR_ERROR_FAULT);
+  return NULL;
+ }
+
+ for (i = 0; i < (sizeof(__paths)/sizeof(*__paths)); i++)
+  if ( !strcmp(__paths[i].name, name) )
+   return &(__paths[i]);
+
+ roar_err_set(ROAR_ERROR_NOENT);
+ return NULL;
+}
+
 char * roar_libroar_get_path(const char * name, int null_as_universal, const char * product, const char * provider) {
+ const struct pathinfo * path;
  char buf_product[384];
  char buf_provider[384];
  ssize_t len_prefix, len_product, len_provider;
- size_t i;
  char * ret, * p;
 
  ROAR_DBG("roar_libroar_get_path(name='%s', null_as_universal=%i, product='%s', provider='%s') = ?", name, null_as_universal, product, provider);
 
- if ( name == NULL ) {
-  roar_err_set(ROAR_ERROR_FAULT);
-  return NULL;
- }
-
- for (i = 0; i < (sizeof(__paths)/sizeof(*__paths)); i++) {
-  if ( !!strcmp(__paths[i].name, name) )
-   continue;
-
-  if ( ((null_as_universal || product != NULL) && !__paths[i].with_product) ||
-       (provider != NULL && !__paths[i].with_provider) ) {
-   roar_err_set(ROAR_ERROR_INVAL);
-   return NULL;
-  }
-
-  if ( __product2path(buf_product, sizeof(buf_product), null_as_universal, product, __paths[i].with_product) == -1 )
-   return NULL;
-
-  if ( __provider2path(buf_provider, sizeof(buf_provider), provider) == -1 )
-   return NULL;
-
-  len_prefix = roar_mm_strlen(__paths[i].path);
-  len_product = roar_mm_strlen(buf_product);
-  len_provider = roar_mm_strlen(buf_provider);
-
-  p = ret = roar_mm_malloc(len_prefix+len_product+len_provider+1);
-  if ( ret == NULL )
-   return NULL;
-
-  memcpy(p, __paths[i].path, len_prefix);
-  p += len_prefix;
-  if ( p[-1] == '/' )
-   p--;
-  memcpy(p, buf_product, len_product);
-  p += len_product;
-  memcpy(p, buf_provider, len_provider);
-  p += len_provider;
-
-  *p = 0;
-
-  return ret;
- }
-
- roar_err_set(ROAR_ERROR_NOENT);
- return NULL;
+ path = __lookup_path(name);
+ if ( path == NULL )
+  return NULL;
+
+ if ( ((null_as_universal || product != NULL) && !path->with_product) ||
+      (provider != NULL && !path->with_provider) ) {
+  roar_err_set(ROAR_ERROR_INVAL);
+  return NULL;
+ }
+
+ if ( __product2path(buf_product, sizeof(buf_product), null_as_universal, product, path->with_product) == -1 )
+  return NULL;
+
+ if ( __provider2path(buf_provider, sizeof(buf_provider), provider) == -1 )
+  return NULL;
+
+ len_prefix = roar_mm_strlen(path->path);
+ len_product = roar_mm_strlen(buf_product);
+ len_provider = roar_mm_strlen(buf_provider);
+
+ p = ret = roar_mm_malloc(len_prefix+len_product+len_provider+1);
+ if ( ret == NULL )
+  return NULL;
+
+ memcpy(p, path->path, len_prefix);
+ p += len_prefix;
+ if ( p[-1] == '/' )
+  p--;
+ memcpy(p, buf_product, len_product);
+ p += len_product;
+ memcpy(p, buf_provider, len_provider);
+ p += len_provider;
+
+ *p = 0;
+
+ return ret;
+}
+
+const char * roar_libroar_get_path_static(const char * name) {
+ const struct pathinfo * path;
+
+ path = __lookup_path(name);
+ if ( path == NULL )
+  return NULL;
+
+ return path->path;
 }
 
Index: libroar/enumdev.c
===================================================================
--- libroar/enumdev.c	(revision 5823)
+++ libroar/enumdev.c	(revision 5832)
@@ -145,5 +145,5 @@
 
 #if !defined(ROAR_TARGET_WIN32) && !defined(ROAR_TARGET_MICROCONTROLLER)
-  if ( (i = readlink("/etc/roarserver", buf, sizeof(buf)-1)) != -1 ) {
+  if ( (i = readlink(roar_libroar_get_path_static("sysconf-roarserver"), buf, sizeof(buf)-1)) != -1 ) {
     buf[i] = 0;
     _add(buf);
@@ -230,5 +230,5 @@
   {ROAR_PROC_NET_ARP, NULL, 1},
 #endif
-//  {"/etc/hosts", NULL, 0},
+//  {roar_libroar_get_path_static("sysconf-hosts"), NULL, 0},
   {NULL, NULL, 0}
  };
Index: libroar/pinentry.c
===================================================================
--- libroar/pinentry.c	(revision 5823)
+++ libroar/pinentry.c	(revision 5832)
@@ -112,5 +112,5 @@
      ROAR_U_EXIT(1);
 
-    execlp(ROAR_HAVE_BIN_PINENTRY, "RoarAudio", "--display", display, "--ttytype", term, "--ttyname", tty, NULL);
+    execlp(roar_libroar_get_path_static("bin-pinentry"), "RoarAudio", "--display", display, "--ttytype", term, "--ttyname", tty, NULL);
 
     ROAR_U_EXIT(1);
Index: libroar/socket.c
===================================================================
--- libroar/socket.c	(revision 5823)
+++ libroar/socket.c	(revision 5832)
@@ -1164,5 +1164,5 @@
  ROAR_DBG("roar_socket_open_ssh(*): proxy_port=%i, user='%s', proxy_addr='%s'", proxy_port, user, proxy_addr);
  ROAR_DBG("roar_socket_open_ssh(*): rcmd: %s", rcmd);
- snprintf(cmd, 1023, ROAR_HAVE_BIN_SSH " -p %i -l '%s' '%s' '%s'", proxy_port, user, proxy_addr, rcmd);
+ snprintf(cmd, 1023, "%s -p %i -l '%s' '%s' '%s'", roar_libroar_get_path_static("bin-ssh"), proxy_port, user, proxy_addr, rcmd);
  cmd[1023] = 0;
 
Index: libroar/vio_cmd.c
===================================================================
--- libroar/vio_cmd.c	(revision 5823)
+++ libroar/vio_cmd.c	(revision 5832)
@@ -185,5 +185,5 @@
      ROAR_U_EXIT(1);
 
-    execlp("/bin/sh", "/bin/sh", "-c", child->cmd, (_LIBROAR_GOOD_CAST char*)NULL);
+    execlp(roar_libroar_get_path_static("bin-sh"), roar_libroar_get_path_static("bin-sh"), "-c", child->cmd, (_LIBROAR_GOOD_CAST char*)NULL);
 
     ROAR_U_EXIT(1);
@@ -644,5 +644,5 @@
    return -1;
 
-  snprintf(command, 1024, "%s --batch --no-verbose --quiet --passphrase-repeat 0 --passphrase-fd %i %s %s", ROAR_HAVE_BIN_GPG, pwpipe[0], para, opts);
+  snprintf(command, 1024, "%s --batch --no-verbose --quiet --passphrase-repeat 0 --passphrase-fd %i %s %s", roar_libroar_get_path_static("bin-gpg"), pwpipe[0], para, opts);
 
   write(pwpipe[1], pw, strlen(pw));
@@ -650,5 +650,5 @@
   close(pwpipe[1]);
  } else {
-  snprintf(command, 1024, "%s --no-verbose --quiet %s %s", ROAR_HAVE_BIN_GPG, para, opts);
+  snprintf(command, 1024, "%s --no-verbose --quiet %s %s", roar_libroar_get_path_static("bin-gpg"), para, opts);
  }
 
Index: roard/driver_dmx.c
===================================================================
--- roard/driver_dmx.c	(revision 5823)
+++ roard/driver_dmx.c	(revision 5832)
@@ -47,5 +47,5 @@
 
   if ( dev == NULL )
-   dev = "/dev/dmx";
+   dev = roar_libroar_get_path_static("dev-default-dmx4linux");
 
   if ( roar_vio_open_dstr(vio, dev, &def, 1) == -1 ) {
