]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/auth.c
Merge changes from CUPS 1.5svn-r9374.
[thirdparty/cups.git] / cups / auth.c
index 63e5ed28250cec1cce7f8c6bdf50d967cc88f515..4d7facf4e1535e065dd9a275c9d1a3d36e10c6eb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * "$Id: auth.c 7720 2008-07-11 22:46:21Z mike $"
  *
- *   Authentication functions for the Common UNIX Printing System (CUPS).
+ *   Authentication functions for CUPS.
  *
  *   Copyright 2007-2010 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products.
  * Include necessary headers...
  */
 
-#include "globals.h"
-#include "debug.h"
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
+#include "cups-private.h"
 #include <fcntl.h>
 #include <sys/stat.h>
 #if defined(WIN32) || defined(__EMX__)
@@ -170,12 +166,6 @@ cupsDoAuthentication(
       return (-1);
     }
 
-    if (!password[0])
-    {
-      http->status = HTTP_AUTHORIZATION_CANCELED;
-      return (-1);
-    }
-
     snprintf(http->userpass, sizeof(http->userpass), "%s:%s", cupsUser(),
              password);
   }
@@ -251,7 +241,7 @@ cupsDoAuthentication(
     authorization = httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE);
 
     authorization += 9;
-    while (*authorization && isspace(*authorization & 255))
+    while (*authorization && _cups_isspace(*authorization))
       authorization ++;
 
     if (*authorization)