summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorratchov <ratchov@openbsd.org>2015-10-01 06:38:19 +0000
committerratchov <ratchov@openbsd.org>2015-10-01 06:38:19 +0000
commit217983a9cf25d5ff0a3cd1d10080294a42d1569e (patch)
tree527c4e2bf785a11d82d3f900e6c4e0b7398da814
parentAnother s/M_ASN1_INTEGER_free/ASN1_INTEGER_free/. (diff)
downloadwireguard-openbsd-217983a9cf25d5ff0a3cd1d10080294a42d1569e.tar.xz
wireguard-openbsd-217983a9cf25d5ff0a3cd1d10080294a42d1569e.zip
Remove support for the AUCAT_COOKIE environment variable.
-rw-r--r--lib/libsndio/aucat.c18
-rw-r--r--lib/libsndio/sndio.78
2 files changed, 9 insertions, 17 deletions
diff --git a/lib/libsndio/aucat.c b/lib/libsndio/aucat.c
index a1e3f8d5b0e..36215f07c84 100644
--- a/lib/libsndio/aucat.c
+++ b/lib/libsndio/aucat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aucat.c,v 1.63 2015/05/05 13:36:22 jsg Exp $ */
+/* $OpenBSD: aucat.c,v 1.64 2015/10/01 06:38:19 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -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) {
diff --git a/lib/libsndio/sndio.7 b/lib/libsndio/sndio.7
index 580ad9e6e10..c5bf96b436d 100644
--- a/lib/libsndio/sndio.7
+++ b/lib/libsndio/sndio.7
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sndio.7,v 1.14 2015/08/01 10:30:52 ratchov Exp $
+.\" $OpenBSD: sndio.7,v 1.15 2015/10/01 06:38:19 ratchov Exp $
.\"
.\" Copyright (c) 2007 Alexandre Ratchov <alex@caoua.org>
.\"
@@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: August 1 2015 $
+.Dd $Mdocdate: October 1 2015 $
.Dt SNDIO 7
.Os
.Sh NAME
@@ -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.