The AUCAT_COOKIE environment variable was never used. It doesn't allow the cookie to be shared between users or to have a "group" cookie (because permissions are checked by the library). On the other hand sometimes people loose time trying to use it.
OK to remove it? Index: aucat.c =================================================================== RCS file: /cvs/src/lib/libsndio/aucat.c,v retrieving revision 1.63 diff -u -p -r1.63 aucat.c --- aucat.c 5 May 2015 13:36:22 -0000 1.63 +++ aucat.c 30 Sep 2015 17:02:44 -0000 @@ -206,21 +206,17 @@ static int aucat_mkcookie(unsigned char *cookie) { struct stat sb; - char buf[PATH_MAX], tmp[PATH_MAX], *path; + char *home, path[PATH_MAX], tmp[PATH_MAX]; ssize_t len; int fd; /* * try to load the cookie */ - path = issetugid() ? NULL : getenv("AUCAT_COOKIE"); - if (path == NULL) { - path = issetugid() ? NULL : getenv("HOME"); - if (path == NULL) - goto bad_gen; - snprintf(buf, PATH_MAX, "%s/.aucat_cookie", path); - path = buf; - } + home = issetugid() ? NULL : getenv("HOME"); + if (home == NULL) + goto bad_gen; + snprintf(path, PATH_MAX, "%s/.aucat_cookie", home); fd = open(path, O_RDONLY); if (fd < 0) { if (errno != ENOENT) @@ -257,7 +253,7 @@ bad_gen: /* * try to save the cookie */ - if (path == NULL) + if (home == NULL) return 1; if (strlcpy(tmp, path, PATH_MAX) >= PATH_MAX || strlcat(tmp, ".XXXXXXXX", PATH_MAX) >= PATH_MAX) { Index: sndio.7 =================================================================== RCS file: /cvs/src/lib/libsndio/sndio.7,v retrieving revision 1.14 diff -u -p -r1.14 sndio.7 --- sndio.7 1 Aug 2015 10:30:52 -0000 1.14 +++ sndio.7 30 Sep 2015 17:02:44 -0000 @@ -198,10 +198,6 @@ If a session needs to be shared between can connect to the server using the same cookie. .Sh ENVIRONMENT .Bl -tag -width "AUDIODEVICEXXX" -compact -.It Ev AUCAT_COOKIE -Path to file containing the session cookie to be used -when connecting to -.Xr sndiod 1 . .It Ev AUDIODEVICE Audio device to use if the application provides no device chooser.