summaryrefslogtreecommitdiff
path: root/scheduler/auth.h
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2010-11-06 05:13:04 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2010-11-06 05:13:04 +0000
commit10d09e334a4892cd5ed4e2a2a0f5bbe3c8c171ed (patch)
treecb980415b72e93a966ea00d60a18ace75533dcfd /scheduler/auth.h
parent6c48a6cafc078a698d97c82c1dd69ac9f850c0ce (diff)
downloadcups-10d09e334a4892cd5ed4e2a2a0f5bbe3c8c171ed.tar.gz
Merge changes from CUPS 1.5svn-r9352.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@2848 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'scheduler/auth.h')
-rw-r--r--scheduler/auth.h35
1 files changed, 14 insertions, 21 deletions
diff --git a/scheduler/auth.h b/scheduler/auth.h
index 189ca2997..5e7525cbc 100644
--- a/scheduler/auth.h
+++ b/scheduler/auth.h
@@ -1,10 +1,9 @@
/*
* "$Id: auth.h 7317 2008-02-15 22:29:27Z mike $"
*
- * Authorization definitions for the Common UNIX Printing System (CUPS)
- * scheduler.
+ * Authorization definitions for the CUPS scheduler.
*
- * Copyright 2007-2009 by Apple Inc.
+ * Copyright 2007-2010 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -98,12 +97,9 @@ typedef struct
type, /* Type of authentication */
level, /* Access level required */
satisfy; /* Satisfy any or all limits? */
- int num_names; /* Number of names */
- char **names; /* User or group names */
- int num_allow; /* Number of Allow lines */
- cupsd_authmask_t *allow; /* Allow lines */
- int num_deny; /* Number of Deny lines */
- cupsd_authmask_t *deny; /* Deny lines */
+ cups_array_t *names, /* User or group names */
+ *allow, /* Allow lines */
+ *deny; /* Deny lines */
http_encryption_t encryption; /* To encrypt or not to encrypt... */
} cupsd_location_t;
@@ -128,33 +124,30 @@ VAR http_encryption_t DefaultEncryption VALUE(HTTP_ENCRYPT_REQUIRED);
* Prototypes...
*/
-extern cupsd_location_t *cupsdAddLocation(const char *location);
+extern int cupsdAddIPMask(cups_array_t **masks,
+ const unsigned address[4],
+ const unsigned netmask[4]);
+extern void cupsdAddLocation(cupsd_location_t *loc);
extern void cupsdAddName(cupsd_location_t *loc, char *name);
-extern void cupsdAllowHost(cupsd_location_t *loc, char *name);
-extern void cupsdAllowIP(cupsd_location_t *loc,
- const unsigned address[4],
- const unsigned netmask[4]);
+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,
- int num_masks, cupsd_authmask_t *masks);
+ cups_array_t *masks);
extern int cupsdCheckGroup(const char *username,
struct passwd *user,
const char *groupname);
#ifdef HAVE_GSSAPI
extern krb5_ccache cupsdCopyKrb5Creds(cupsd_client_t *con);
#endif /* HAVE_GSSAPI */
-extern cupsd_location_t *cupsdCopyLocation(cupsd_location_t **loc);
+extern cupsd_location_t *cupsdCopyLocation(cupsd_location_t *loc);
extern void cupsdDeleteAllLocations(void);
-extern void cupsdDeleteLocation(cupsd_location_t *loc);
-extern void cupsdDenyHost(cupsd_location_t *loc, char *name);
-extern void cupsdDenyIP(cupsd_location_t *loc,
- const unsigned address[4],
- const unsigned netmask[4]);
extern cupsd_location_t *cupsdFindBest(const char *path, http_state_t state);
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);
/*