pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/libfetch/files EAUTH and ENEEDAUTH might not exist...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ae3ced9dddf3
branches:  trunk
changeset: 538393:ae3ced9dddf3
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu Feb 07 16:24:01 2008 +0000

description:
EAUTH and ENEEDAUTH might not exist, so use them conditionally.
To flag HTTP authentication errors, fallback to EPERM.

diffstat:

 net/libfetch/files/common.c |  6 +++++-
 net/libfetch/files/http.c   |  6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diffs (43 lines):

diff -r d760e019d0a7 -r ae3ced9dddf3 net/libfetch/files/common.c
--- a/net/libfetch/files/common.c       Thu Feb 07 16:14:44 2008 +0000
+++ b/net/libfetch/files/common.c       Thu Feb 07 16:24:01 2008 +0000
@@ -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 @@
        case EPERM:
        case EACCES:
        case EROFS:
+#ifdef EAUTH
        case EAUTH:
+#endif
+#ifdef ENEEDAUTH
        case ENEEDAUTH:
+#endif
                fetchLastErrCode = FETCH_AUTH;
                break;
        case ENOENT:
diff -r d760e019d0a7 -r ae3ced9dddf3 net/libfetch/files/http.c
--- a/net/libfetch/files/http.c Thu Feb 07 16:14:44 2008 +0000
+++ b/net/libfetch/files/http.c Thu Feb 07 16:24:01 2008 +0000
@@ -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 @@
            fetch_ssl(conn, verbose) == -1) {
                fetch_close(conn);
                /* grrr */
+#ifdef EAUTH
                errno = EAUTH;
+#else
+               errno = EPERM;
+#endif
                fetch_syserr();
                return (NULL);
        }



Home | Main Index | Thread Index | Old Index