mds/net-print/cups/files/cups-1.4.1-ldap-draft-1.patch

115 lines
4.3 KiB
Diff
Raw Normal View History

Submitted By: Mario Fetka (mario dot fetka at gmail dot com)
Date: 2009-09-27
Initial Package Version: 1.3.9
Origin: me
Upstream Status: unknown
Description: use the oids from the ldap ipp draft
https://datatracker.ietf.org/drafts/draft-ietf-ipp-ldap-printer-schema/
this patch also requres a migration addon schema
http://ftp.disconnected-by-peer.at/mds/printer-cups.schema
diff -Naur cups-1.4.1.orig/scheduler/dirsvc.c cups-1.4.1/scheduler/dirsvc.c
--- cups-1.4.1.orig/scheduler/dirsvc.c 2009-09-27 11:59:13.412880248 +0000
+++ cups-1.4.1/scheduler/dirsvc.c 2009-09-27 12:04:52.581880776 +0000
@@ -181,11 +181,11 @@
#ifdef HAVE_LDAP
static const char * const ldap_attrs[] =/* CUPS LDAP attributes */
{
- "printerDescription",
- "printerLocation",
- "printerMakeAndModel",
- "printerType",
- "printerURI",
+ "printer-info",
+ "printer-location",
+ "printer-make-and-model",
+ "printer-type",
+ "printer-uri",
NULL
};
#endif /* HAVE_LDAP */
@@ -2151,25 +2151,25 @@
*/
if (ldap_getval_firststring(BrowseLDAPHandle, e,
- "printerDescription", info, sizeof(info)) == -1)
+ "printer-info", info, sizeof(info)) == -1)
continue;
if (ldap_getval_firststring(BrowseLDAPHandle, e,
- "printerLocation", location, sizeof(location)) == -1)
+ "printer-location", location, sizeof(location)) == -1)
continue;
if (ldap_getval_firststring(BrowseLDAPHandle, e,
- "printerMakeAndModel", make_model, sizeof(make_model)) == -1)
+ "printer-make-and-model", make_model, sizeof(make_model)) == -1)
continue;
if (ldap_getval_firststring(BrowseLDAPHandle, e,
- "printerType", type_num, sizeof(type_num)) == -1)
+ "printer-type", type_num, sizeof(type_num)) == -1)
continue;
type = atoi(type_num);
if (ldap_getval_firststring(BrowseLDAPHandle, e,
- "printerURI", uri, sizeof(uri)) == -1)
+ "printer-uri", uri, sizeof(uri)) == -1)
continue;
/*
@@ -4423,15 +4423,15 @@
mods[0].mod_type = "cn";
mods[0].mod_values = cn_value;
- mods[1].mod_type = "printerDescription";
+ mods[1].mod_type = "printer-info";
mods[1].mod_values = info;
- mods[2].mod_type = "printerURI";
+ mods[2].mod_type = "printer-uri";
mods[2].mod_values = uri;
- mods[3].mod_type = "printerLocation";
+ mods[3].mod_type = "printer-location";
mods[3].mod_values = location;
- mods[4].mod_type = "printerMakeAndModel";
+ mods[4].mod_type = "printer-make-and-model";
mods[4].mod_values = make_model;
- mods[5].mod_type = "printerType";
+ mods[5].mod_type = "printer-type";
mods[5].mod_values = type;
mods[6].mod_type = "objectClass";
mods[6].mod_values = (char **)objectClass_values;
@@ -4454,25 +4454,25 @@
* Get the required values from this entry...
*/
- if (ldap_getval_firststring(BrowseLDAPHandle, e, "printerDescription",
+ if (ldap_getval_firststring(BrowseLDAPHandle, e, "printer-info",
old_info, sizeof(old_info)) == -1)
old_info[0] = '\0';
- if (ldap_getval_firststring(BrowseLDAPHandle, e, "printerLocation",
+ if (ldap_getval_firststring(BrowseLDAPHandle, e, "printer-location",
old_location, sizeof(old_location)) == -1)
old_info[0] = '\0';
- if (ldap_getval_firststring(BrowseLDAPHandle, e, "printerMakeAndModel",
+ if (ldap_getval_firststring(BrowseLDAPHandle, e, "printer-make-and-model",
old_make_model, sizeof(old_make_model)) == -1)
old_info[0] = '\0';
- if (ldap_getval_firststring(BrowseLDAPHandle, e, "printerType",
+ if (ldap_getval_firststring(BrowseLDAPHandle, e, "printer-type",
old_type_string, sizeof(old_type_string)) == -1)
old_info[0] = '\0';
old_type = atoi(old_type_string);
- if (ldap_getval_firststring(BrowseLDAPHandle, e, "printerURI", old_uri,
+ if (ldap_getval_firststring(BrowseLDAPHandle, e, "printer-uri", old_uri,
sizeof(old_uri)) == -1)
old_info[0] = '\0';