summaryrefslogtreecommitdiff
path: root/scheduler
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2019-02-14 11:53:23 -0500
committerMichael R Sweet <michael.r.sweet@gmail.com>2019-02-14 11:53:23 -0500
commitfa26ab9573afab69475d60c3eb3e38be3b5a0587 (patch)
tree761925dce8611b283b37d8370bb92bf239ed73c6 /scheduler
parentec7e5bddc7494ad40158b88711f6d2a37cd8c0c8 (diff)
downloadcups-fa26ab9573afab69475d60c3eb3e38be3b5a0587.tar.gz
Eliminate use of private macOS security headers/APIs (Issue #5516)
Eliminate use of deprecated cssmErrorString function. Switch to using SecCertificateCreateWithData. Clean out unused private header availability checks.
Diffstat (limited to 'scheduler')
-rw-r--r--scheduler/auth.c13
-rw-r--r--scheduler/ipp.c7
2 files changed, 3 insertions, 17 deletions
diff --git a/scheduler/auth.c b/scheduler/auth.c
index 0774ae3cf..e4c9157f5 100644
--- a/scheduler/auth.c
+++ b/scheduler/auth.c
@@ -1,7 +1,7 @@
/*
* Authorization routines for the CUPS scheduler.
*
- * Copyright © 2007-2018 by Apple Inc.
+ * Copyright © 2007-2019 by Apple Inc.
* Copyright © 1997-2007 by Easy Software Products, all rights reserved.
*
* This file contains Kerberos support code, copyright 2006 by
@@ -35,11 +35,6 @@
#endif /* HAVE_MEMBERSHIP_H */
#ifdef HAVE_AUTHORIZATION_H
# include <Security/AuthorizationTags.h>
-# ifdef HAVE_SECBASEPRIV_H
-# include <Security/SecBasePriv.h>
-# else
-extern const char *cssmErrorString(int error);
-# endif /* HAVE_SECBASEPRIV_H */
#endif /* HAVE_AUTHORIZATION_H */
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
@@ -344,7 +339,7 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
if ((status = AuthorizationCreateFromExternalForm((AuthorizationExternalForm *)authdata, &con->authref)) != 0)
{
- cupsdLogClient(con, CUPSD_LOG_ERROR, "AuthorizationCreateFromExternalForm returned %d (%s)", (int)status, cssmErrorString(status));
+ cupsdLogClient(con, CUPSD_LOG_ERROR, "AuthorizationCreateFromExternalForm returned %d", (int)status);
return;
}
@@ -1925,9 +1920,7 @@ check_authref(cupsd_client_t *con, /* I - Connection */
kAuthorizationEmptyEnvironment,
authflags, NULL)) != 0)
{
- cupsdLogMessage(CUPSD_LOG_ERROR,
- "AuthorizationCopyRights(\"%s\") returned %d (%s)",
- authright.name, (int)status, cssmErrorString(status));
+ cupsdLogMessage(CUPSD_LOG_ERROR, "AuthorizationCopyRights(\"%s\") returned %d", authright.name, (int)status);
return (0);
}
diff --git a/scheduler/ipp.c b/scheduler/ipp.c
index 2e3d33a51..d519b85c0 100644
--- a/scheduler/ipp.c
+++ b/scheduler/ipp.c
@@ -19,19 +19,12 @@
#include <cups/ppd-private.h>
#ifdef __APPLE__
-/*# include <ApplicationServices/ApplicationServices.h>
-extern CFUUIDRef ColorSyncCreateUUIDFromUInt32(unsigned id);
-# include <CoreFoundation/CoreFoundation.h>*/
# ifdef HAVE_MEMBERSHIP_H
# include <membership.h>
# endif /* HAVE_MEMBERSHIP_H */
-# ifdef HAVE_MEMBERSHIPPRIV_H
-# include <membershipPriv.h>
-# else
extern int mbr_user_name_to_uuid(const char* name, uuid_t uu);
extern int mbr_group_name_to_uuid(const char* name, uuid_t uu);
extern int mbr_check_membership_by_id(uuid_t user, gid_t group, int* ismember);
-# endif /* HAVE_MEMBERSHIPPRIV_H */
#endif /* __APPLE__ */