mirror of
https://github.com/ericonr/sndio.git
synced 2024-02-18 04:45:21 -06:00
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)
|
aucat_mkcookie(unsigned char *cookie)
|
||||||
{
|
{
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
char buf[PATH_MAX], tmp[PATH_MAX], *path;
|
char *home, path[PATH_MAX], tmp[PATH_MAX];
|
||||||
ssize_t len;
|
ssize_t len;
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* try to load the cookie
|
* try to load the cookie
|
||||||
*/
|
*/
|
||||||
path = issetugid() ? NULL : getenv("AUCAT_COOKIE");
|
home = issetugid() ? NULL : getenv("HOME");
|
||||||
if (path == NULL) {
|
if (home == NULL)
|
||||||
path = issetugid() ? NULL : getenv("HOME");
|
|
||||||
if (path == NULL)
|
|
||||||
goto bad_gen;
|
goto bad_gen;
|
||||||
snprintf(buf, PATH_MAX, "%s/.aucat_cookie", path);
|
snprintf(path, PATH_MAX, "%s/.aucat_cookie", home);
|
||||||
path = buf;
|
|
||||||
}
|
|
||||||
fd = open(path, O_RDONLY);
|
fd = open(path, O_RDONLY);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
if (errno != ENOENT)
|
if (errno != ENOENT)
|
||||||
@ -301,7 +297,7 @@ bad_gen:
|
|||||||
/*
|
/*
|
||||||
* try to save the cookie
|
* try to save the cookie
|
||||||
*/
|
*/
|
||||||
if (path == NULL)
|
if (home == NULL)
|
||||||
return 1;
|
return 1;
|
||||||
if (strlcpy(tmp, path, PATH_MAX) >= PATH_MAX ||
|
if (strlcpy(tmp, path, PATH_MAX) >= PATH_MAX ||
|
||||||
strlcat(tmp, ".XXXXXXXX", 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.
|
can connect to the server using the same cookie.
|
||||||
.Sh ENVIRONMENT
|
.Sh ENVIRONMENT
|
||||||
.Bl -tag -width "AUDIODEVICEXXX" -compact
|
.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
|
.It Ev AUDIODEVICE
|
||||||
Audio device to use if the application provides
|
Audio device to use if the application provides
|
||||||
no device chooser.
|
no device chooser.
|
||||||
|
Loading…
Reference in New Issue
Block a user