language = (char *)cupsArrayNext(languages))
{
if (iccfile)
- attr = _ppdLocalizedAttr(ppd, "cupsICCProfile", name, language);
+ {
+ if ((attr = _ppdLocalizedAttr(ppd, "cupsICCProfile", name,
+ language)) == NULL)
+ attr = _ppdLocalizedAttr(ppd, "APTiogaProfile", name, language);
+ }
else
attr = _ppdLocalizedAttr(ppd, "ColorModel", name, language);
ppd_file_t *ppd; /* PPD file */
ppd_attr_t *attr, /* cupsICCProfile attributes */
*profileid_attr;/* cupsProfileID attribute */
+ const char *profile_key; /* Profile keyword */
ppd_option_t *cm_option; /* Color model option */
ppd_choice_t *cm_choice, /* Color model choice */
*q1_choice, /* ColorModel (or other) qualifier */
* See if we have any profiles...
*/
- for (num_profiles = 0, attr = ppdFindAttr(ppd, "cupsICCProfile", NULL);
- attr;
- attr = ppdFindNextAttr(ppd, "cupsICCProfile", NULL))
+ if ((attr = ppdFindAttr(ppd, "APTiogaProfile", NULL)) != NULL)
+ profile_key = "APTiogaProfile";
+ else
+ {
+ attr = ppdFindAttr(ppd, "cupsICCProfile", NULL);
+ profile_key = "cupsICCProfile";
+ }
+
+ for (num_profiles = 0; attr; attr = ppdFindNextAttr(ppd, profile_key, NULL))
if (attr->spec[0] && attr->value && attr->value[0])
{
if (attr->value[0] != '/')
num_profiles ++;
}
+
/*
* If we have profiles, add them...
*/
languages = _ppdGetLanguages(ppd);
for (profile = profiles->profiles,
- attr = ppdFindAttr(ppd, "cupsICCProfile", NULL);
+ attr = ppdFindAttr(ppd, profile_key, NULL);
attr;
- attr = ppdFindNextAttr(ppd, "cupsICCProfile", NULL))
+ attr = ppdFindNextAttr(ppd, profile_key, NULL))
if (attr->spec[0] && attr->value && attr->value[0])
{
/*
if (access(iccfile, 0))
continue;
- cupsArraySave(ppd->sorted_attrs);
+ if (profile_key[0] == 'c')
+ {
+ cupsArraySave(ppd->sorted_attrs);
- if ((profileid_attr = ppdFindAttr(ppd, "cupsProfileID",
- attr->spec)) != NULL &&
- profileid_attr->value && isdigit(profileid_attr->value[0] & 255))
- profile_id = (unsigned)strtoul(profileid_attr->value, NULL, 10);
- else
- profile_id = _ppdHashName(attr->spec);
+ if ((profileid_attr = ppdFindAttr(ppd, "cupsProfileID",
+ attr->spec)) != NULL &&
+ profileid_attr->value && isdigit(profileid_attr->value[0] & 255))
+ profile_id = (unsigned)strtoul(profileid_attr->value, NULL, 10);
+ else
+ profile_id = _ppdHashName(attr->spec);
- cupsArrayRestore(ppd->sorted_attrs);
+ cupsArrayRestore(ppd->sorted_attrs);
+ }
+ else
+ profile_id = atoi(attr->spec);
apple_init_profile(ppd, languages, profile, profile_id, attr->spec,
attr->text[0] ? attr->text : attr->spec, iccfile);
*/
#ifdef HAVE_MBR_UID_TO_UUID
- if ((mbr_err = mbr_group_name_to_uuid((char *)p->users[i] + 1,
- grp_uuid)) != 0)
+ if (p->users[i][1] == '#')
+ {
+ if (uuid_parse((char *)p->users[i] + 2, grp_uuid))
+ uuid_clear(grp_uuid);
+ }
+ else if ((mbr_err = mbr_group_name_to_uuid((char *)p->users[i] + 1,
+ grp_uuid)) != 0)
{
/*
* Invalid ACL entries are ignored for matching; just record a
"Access control entry \"%s\" not a valid group name; "
"entry ignored", p->users[i]);
}
- else
- {
- if ((mbr_err = mbr_check_membership(usr_uuid, grp_uuid,
- &is_member)) != 0)
- {
- /*
- * At this point, there should be no errors, but check anyways...
- */
-
- cupsdLogMessage(CUPSD_LOG_DEBUG,
- "check_quotas: group \"%s\" membership check "
- "failed (err=%d)", p->users[i] + 1, mbr_err);
- is_member = 0;
- }
- /*
- * Stop if we found a match...
+ if ((mbr_err = mbr_check_membership(usr_uuid, grp_uuid,
+ &is_member)) != 0)
+ {
+ /*
+ * At this point, there should be no errors, but check anyways...
*/
- if (is_member)
- break;
+ cupsdLogMessage(CUPSD_LOG_DEBUG,
+ "check_quotas: group \"%s\" membership check "
+ "failed (err=%d)", p->users[i] + 1, mbr_err);
+ is_member = 0;
}
+
+ /*
+ * Stop if we found a match...
+ */
+
+ if (is_member)
+ break;
+
#else
if (cupsdCheckGroup(username, pw, p->users[i] + 1))
break;
#ifdef HAVE_MBR_UID_TO_UUID
else
{
- if ((mbr_err = mbr_user_name_to_uuid((char *)p->users[i],
- usr2_uuid)) != 0)
+ if (p->users[i][0] == '#')
+ {
+ if (uuid_parse((char *)p->users[i] + 1, usr2_uuid))
+ uuid_clear(usr2_uuid);
+ }
+ else if ((mbr_err = mbr_user_name_to_uuid((char *)p->users[i],
+ usr2_uuid)) != 0)
{
/*
* Invalid ACL entries are ignored for matching; just record a
"Access control entry \"%s\" not a valid user name; "
"entry ignored", p->users[i]);
}
- else
- {
- if ((mbr_err = mbr_check_membership(usr_uuid, usr2_uuid,
- &is_member)) != 0)
- {
- cupsdLogMessage(CUPSD_LOG_DEBUG,
- "check_quotas: User \"%s\" identity check failed "
- "(err=%d)", p->users[i], mbr_err);
- is_member = 0;
- }
- if (is_member)
- break;
+ if ((mbr_err = mbr_check_membership(usr_uuid, usr2_uuid,
+ &is_member)) != 0)
+ {
+ cupsdLogMessage(CUPSD_LOG_DEBUG,
+ "check_quotas: User \"%s\" identity check failed "
+ "(err=%d)", p->users[i], mbr_err);
+ is_member = 0;
}
+
+ if (is_member)
+ break;
}
#else
else if (!strcasecmp(username, p->users[i]))