mirror of https://github.com/ericonr/sndio.git
remove unused AUCAT_COOKIE environment variable
This commit is contained in:
parent
7062d226ac
commit
6ddedf6c9f
|
@ -245,21 +245,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)
|
||||
home = issetugid() ? NULL : getenv("HOME");
|
||||
if (home == NULL)
|
||||
goto bad_gen;
|
||||
snprintf(buf, PATH_MAX, "%s/.aucat_cookie", path);
|
||||
path = buf;
|
||||
}
|
||||
snprintf(path, PATH_MAX, "%s/.aucat_cookie", home);
|
||||
fd = open(path, O_RDONLY);
|
||||
if (fd < 0) {
|
||||
if (errno != ENOENT)
|
||||
|
@ -301,7 +297,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) {
|
||||
|
|
|
@ -198,10 +198,6 @@ If a session needs to be shared between multiple users, they
|
|||
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.
|
||||
|
|
Loading…
Reference in New Issue