X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fcups.git;a=blobdiff_plain;f=scheduler%2Fauth.h;h=f82253b909eafddf04c5a3f97d84c83a31fa41e4;hp=e836f418cec955fa068e921bc311bf10251cfddd;hb=503b54c9302c8de6207e079a80a89a787eb612ea;hpb=07ed0e9a4385437b52e7195b681e600c2f1c5623 diff --git a/scheduler/auth.h b/scheduler/auth.h index e836f418c..f82253b90 100644 --- a/scheduler/auth.h +++ b/scheduler/auth.h @@ -1,16 +1,14 @@ /* - * "$Id: auth.h 7317 2008-02-15 22:29:27Z mike $" + * Authorization definitions for the CUPS scheduler. * - * Authorization definitions for the CUPS scheduler. + * Copyright 2007-2014 by Apple Inc. + * Copyright 1997-2006 by Easy Software Products, all rights reserved. * - * Copyright 2007-2011 by Apple Inc. - * Copyright 1997-2006 by Easy Software Products, all rights reserved. - * - * These coded instructions, statements, and computer programs are the - * property of Apple Inc. and are protected by Federal copyright - * law. Distribution and use rights are outlined in the file "LICENSE.txt" - * which should have been included with this file. If this file is - * file is missing or damaged, see the license at "http://www.cups.org/". + * These coded instructions, statements, and computer programs are the + * property of Apple Inc. and are protected by Federal copyright + * law. Distribution and use rights are outlined in the file "LICENSE.txt" + * which should have been included with this file. If this file is + * file is missing or damaged, see the license at "http://www.cups.org/". */ /* @@ -27,9 +25,8 @@ #define CUPSD_AUTH_DEFAULT -1 /* Use DefaultAuthType */ #define CUPSD_AUTH_NONE 0 /* No authentication */ #define CUPSD_AUTH_BASIC 1 /* Basic authentication */ -#define CUPSD_AUTH_DIGEST 2 /* Digest authentication */ -#define CUPSD_AUTH_BASICDIGEST 3 /* Basic authentication w/passwd.md5 */ -#define CUPSD_AUTH_NEGOTIATE 4 /* Kerberos authentication */ +#define CUPSD_AUTH_NEGOTIATE 2 /* Kerberos authentication */ +#define CUPSD_AUTH_AUTO 3 /* Kerberos or Basic, depending on configuration of server */ #define CUPSD_AUTH_ANON 0 /* Anonymous access */ #define CUPSD_AUTH_USER 1 /* Must have a valid username/password */ @@ -73,7 +70,7 @@ typedef struct typedef struct { - int length; /* Length of name */ + size_t length; /* Length of name */ char *name; /* Name string */ } cupsd_namemask_t; @@ -90,9 +87,9 @@ typedef struct typedef struct { char *location; /* Location of resource */ + size_t length; /* Length of location string */ ipp_op_t op; /* IPP operation */ int limit, /* Limit for these types of requests */ - length, /* Length of location string */ order_type, /* Allow or Deny */ type, /* Type of authentication */ level, /* Access level required */ @@ -112,8 +109,6 @@ typedef struct cupsd_client_s cupsd_client_t; VAR cups_array_t *Locations VALUE(NULL); /* Authorization locations */ -VAR int DefaultAuthType VALUE(CUPSD_AUTH_BASIC); - /* Default AuthType, if not specified */ #ifdef HAVE_SSL VAR http_encryption_t DefaultEncryption VALUE(HTTP_ENCRYPT_REQUIRED); /* Default encryption for authentication */ @@ -131,10 +126,8 @@ extern void cupsdAddLocation(cupsd_location_t *loc); extern void cupsdAddName(cupsd_location_t *loc, char *name); extern int cupsdAddNameMask(cups_array_t **masks, char *name); extern void cupsdAuthorize(cupsd_client_t *con); -extern int cupsdCheckAccess(unsigned ip[4], char *name, - int namelen, cupsd_location_t *loc); -extern int cupsdCheckAuth(unsigned ip[4], char *name, int namelen, - cups_array_t *masks); +extern int cupsdCheckAccess(unsigned ip[4], const char *name, size_t namelen, cupsd_location_t *loc); +extern int cupsdCheckAuth(unsigned ip[4], const char *name, size_t namelen, cups_array_t *masks); extern int cupsdCheckGroup(const char *username, struct passwd *user, const char *groupname); @@ -145,8 +138,3 @@ extern cupsd_location_t *cupsdFindLocation(const char *location); extern void cupsdFreeLocation(cupsd_location_t *loc); extern http_status_t cupsdIsAuthorized(cupsd_client_t *con, const char *owner); extern cupsd_location_t *cupsdNewLocation(const char *location); - - -/* - * End of "$Id: auth.h 7317 2008-02-15 22:29:27Z mike $". - */