diff options
author | joerg <joerg> | 2008-02-07 16:24:01 +0000 |
---|---|---|
committer | joerg <joerg> | 2008-02-07 16:24:01 +0000 |
commit | b06cf101dc91a81f87d545d4338b92283ab86551 (patch) | |
tree | 27797209b054566386f43f208601af569382ac9e /net | |
parent | 7f1ba3268305d9eca86262ac2baa46b51733176d (diff) | |
download | pkgsrc-b06cf101dc91a81f87d545d4338b92283ab86551.tar.gz |
EAUTH and ENEEDAUTH might not exist, so use them conditionally.
To flag HTTP authentication errors, fallback to EPERM.
Diffstat (limited to 'net')
-rw-r--r-- | net/libfetch/files/common.c | 6 | ||||
-rw-r--r-- | net/libfetch/files/http.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/net/libfetch/files/common.c b/net/libfetch/files/common.c index 91019fef6b2..38a285970d1 100644 --- a/net/libfetch/files/common.c +++ b/net/libfetch/files/common.c @@ -1,4 +1,4 @@ -/* $NetBSD: common.c,v 1.2 2008/02/07 16:14:44 joerg Exp $ */ +/* $NetBSD: common.c,v 1.3 2008/02/07 16:24:01 joerg Exp $ */ /*- * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav * All rights reserved. @@ -109,8 +109,12 @@ fetch_syserr(void) case EPERM: case EACCES: case EROFS: +#ifdef EAUTH case EAUTH: +#endif +#ifdef ENEEDAUTH case ENEEDAUTH: +#endif fetchLastErrCode = FETCH_AUTH; break; case ENOENT: diff --git a/net/libfetch/files/http.c b/net/libfetch/files/http.c index 451d284bfc8..875ee9280d2 100644 --- a/net/libfetch/files/http.c +++ b/net/libfetch/files/http.c @@ -1,4 +1,4 @@ -/* $NetBSD: http.c,v 1.2 2008/02/07 16:14:44 joerg Exp $ */ +/* $NetBSD: http.c,v 1.3 2008/02/07 16:24:01 joerg Exp $ */ /*- * Copyright (c) 2000-2004 Dag-Erling Coïdan Smørgrav * All rights reserved. @@ -712,7 +712,11 @@ http_connect(struct url *URL, struct url *purl, const char *flags) fetch_ssl(conn, verbose) == -1) { fetch_close(conn); /* grrr */ +#ifdef EAUTH errno = EAUTH; +#else + errno = EPERM; +#endif fetch_syserr(); return (NULL); } |