~ubuntu-branches/debian/sid/cups/sid

« back to all changes in this revision

Viewing changes to .pc/rootbackends-worldreadable.patch/scheduler/job.c

  • Committer: Package Import Robot
  • Author(s): Didier Raboud, Didier Raboud, Brian Potkin
  • Date: 2013-07-18 21:45:15 UTC
  • mfrom: (1.2.19)
  • Revision ID: package-import@ubuntu.com-20130718214515-bkghnw0i7h7seuvr
Tags: 1.6.3-1
* New 1.6.3 upstream release:
  - The lp, lpq, lpr, and lpstat now display an error message advising the
    use of the /version=1.1 ServerName option (<rdar://problem/14290628>)
  - Added documentation about the /version=1.1 option to ServerName in
    client.conf (<rdar://problem/14216262>)
  - httpStatus(HTTP_ERROR) did not return a useful error message
    (Closes: #645436)
  - The lp, lpq, lpr, and lpstat commands incorrectly ignored the default
    printer set in the lpoptions file (Closes: #711848)
  - The USB backend could crash on libusb-based systems if USB was
    disabled in the BIOS (LP: #1108719).
  - Added more USB quirks for the libusb-based backend
  - The scheduler no longer tries to do Kerberos authentication over the
    loopback interface. (Closes: #640939).

[ Didier Raboud ]
* Refresh patches for 1.6.3:
  - usb-backend-more-quirk-rules: Shrink to only Lexmark E238 that
    missed 1.6.3 merge window
  - usb-backend-do-not-crash-if-usb-disabled-in-bios: Shrink to only
    keep the error counting exception.
  - remove-unreal-printers: Drop, was from upstream.
  - more-verbose-http-error-message: Drop, was from upstream.
  - mention-ipp-version-specifier-in-man-and-ref: Drop, differently
    included upstream. (Closes: #711848)
* Invert symlink handling in cups-client's preinst to cope with the
  symlink-to-directory migration for /usr/share/doc. (Closes: #716867)
* Update usb backend quirks to fix Lexmark E238 printer (Closes: #716843)
* Get dpkg-maintscript-helper to delete /e/c/acroread.conf and
  /e/c/pdftops.conf again in 1.6.2-9~ to cleanup upgrades from cups
  1.5. (Closes: #711136)
* Update debian/watch to cope with the new cups.org layout

[ Brian Potkin ]
* Rewrite README.Debian for Jessie (>= 1.6) (Closes: #714852)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * "$Id: job.c 10776 2012-12-17 22:17:08Z mike $"
 
2
 * "$Id: job.c 7902 2008-09-03 14:20:17Z mike $"
3
3
 *
4
4
 *   Job management routines for the CUPS scheduler.
5
5
 *
560
560
                                        /* CONTENT_TYPE env variable */
561
561
                        device_uri[1024],
562
562
                                        /* DEVICE_URI env variable */
563
 
                        final_content_type[1024],
 
563
                        final_content_type[1024] = "",
564
564
                                        /* FINAL_CONTENT_TYPE env variable */
565
565
                        lang[255],      /* LANG env variable */
566
566
#ifdef __APPLE__
637
637
    }
638
638
 
639
639
   /*
 
640
    * Figure out the final content type...
 
641
    */
 
642
 
 
643
    cupsdLogJob(job, CUPSD_LOG_DEBUG, "%d filters for job:",
 
644
                cupsArrayCount(filters));
 
645
    for (filter = (mime_filter_t *)cupsArrayFirst(filters);
 
646
         filter;
 
647
         filter = (mime_filter_t *)cupsArrayNext(filters))
 
648
      cupsdLogJob(job, CUPSD_LOG_DEBUG, "%s (%s/%s to %s/%s, cost %d)",
 
649
                  filter->filter,
 
650
                  filter->src ? filter->src->super : "???",
 
651
                  filter->src ? filter->src->type : "???",
 
652
                  filter->dst ? filter->dst->super : "???",
 
653
                  filter->dst ? filter->dst->type : "???",
 
654
                  filter->cost);
 
655
 
 
656
    if (!job->printer->remote)
 
657
    {
 
658
      for (filter = (mime_filter_t *)cupsArrayLast(filters);
 
659
           filter && filter->dst;
 
660
           filter = (mime_filter_t *)cupsArrayPrev(filters))
 
661
        if (strcmp(filter->dst->super, "printer") ||
 
662
            strcmp(filter->dst->type, job->printer->name))
 
663
          break;
 
664
 
 
665
      if (filter && filter->dst)
 
666
      {
 
667
        if ((ptr = strchr(filter->dst->type, '/')) != NULL)
 
668
          snprintf(final_content_type, sizeof(final_content_type),
 
669
                   "FINAL_CONTENT_TYPE=%s", ptr + 1);
 
670
        else
 
671
          snprintf(final_content_type, sizeof(final_content_type),
 
672
                   "FINAL_CONTENT_TYPE=%s/%s", filter->dst->super,
 
673
                   filter->dst->type);
 
674
      }
 
675
    }
 
676
 
 
677
   /*
640
678
    * Remove NULL ("-") filters...
641
679
    */
642
680
 
1033
1071
  envp[envc ++] = banner_page ? "CUPS_FILETYPE=job-sheet" :
1034
1072
                                "CUPS_FILETYPE=document";
1035
1073
 
1036
 
  if (!job->printer->remote && !job->printer->raw)
1037
 
  {
1038
 
    filter = (mime_filter_t *)cupsArrayLast(filters);
1039
 
 
1040
 
    if (job->printer->port_monitor)
1041
 
      filter = (mime_filter_t *)cupsArrayPrev(filters);
1042
 
 
1043
 
    if (filter && filter->dst)
1044
 
    {
1045
 
      if ((ptr = strchr(filter->dst->type, '/')) != NULL)
1046
 
        snprintf(final_content_type, sizeof(final_content_type),
1047
 
                 "FINAL_CONTENT_TYPE=%s", ptr + 1);
1048
 
      else
1049
 
        snprintf(final_content_type, sizeof(final_content_type),
1050
 
                 "FINAL_CONTENT_TYPE=%s/%s", filter->dst->super,
1051
 
                 filter->dst->type);
1052
 
      envp[envc ++] = final_content_type;
1053
 
    }
1054
 
  }
 
1074
  if (final_content_type[0])
 
1075
    envp[envc ++] = final_content_type;
1055
1076
 
1056
1077
  if (Classification && !banner_page)
1057
1078
  {
1940
1961
 
1941
1962
 
1942
1963
      if (cupsFileGets(fp, line, sizeof(line)) &&
1943
 
          !strcmp(line, "CUPSD-AUTH-V2"))
 
1964
          !strcmp(line, "CUPSD-AUTH-V3"))
1944
1965
      {
1945
1966
        i = 0;
1946
1967
        while (cupsFileGetConf(fp, line, sizeof(line), &value, &linenum))
1949
1970
          * Decode value...
1950
1971
          */
1951
1972
 
1952
 
          bytes = sizeof(data);
1953
 
          httpDecode64_2(data, &bytes, value);
 
1973
          if (strcmp(line, "negotiate") && strcmp(line, "uid"))
 
1974
          {
 
1975
            bytes = sizeof(data);
 
1976
            httpDecode64_2(data, &bytes, value);
 
1977
          }
1954
1978
 
1955
1979
         /*
1956
1980
          * Assign environment variables...
1971
1995
          else if (!strcmp(line, "password"))
1972
1996
            cupsdSetStringf(job->auth_env + i, "AUTH_PASSWORD=%s", data);
1973
1997
          else if (!strcmp(line, "negotiate"))
1974
 
            cupsdSetStringf(job->auth_env + i, "AUTH_NEGOTIATE=%s", data);
 
1998
            cupsdSetStringf(job->auth_env + i, "AUTH_NEGOTIATE=%s", value);
1975
1999
          else
1976
2000
            continue;
1977
2001
 
5097
5121
 
5098
5122
 
5099
5123
/*
5100
 
 * End of "$Id: job.c 10776 2012-12-17 22:17:08Z mike $".
 
5124
 * End of "$Id: job.c 7902 2008-09-03 14:20:17Z mike $".
5101
5125
 */