Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

cupsaddsmb goes into an infinite loop when no adobe/microsoft drivers are available #2407

Closed

Description

@michaelrsweet

Version: 1.2.11
CUPS.org User: vapier

i installed the latest CUPS PostScript Driver for Windows (6.0) into /usr/share/cups/drivers/:

$ ls -l /usr/share/cups/drivers/
-rw-r--r-- 1 root root 803 Jun 5 17:51 cups6.inf
-rw-r--r-- 1 root root 72 Jun 5 17:51 cups6.ini
-rw-r--r-- 1 root root 12568 Jun 5 17:51 cupsps6.dll
-rw-r--r-- 1 root root 13672 Jun 5 17:51 cupsui6.dll

however, after attempting to install this driver, cupsaddsmb goes into an infinite loop:
$ cupsaddsmb -v -H smbhost -U smbadmin printer
Password for smbadmin required to access smbhost via SAMBA:
No Windows printer drivers are installed!
No Windows printer drivers are installed!
No Windows printer drivers are installed!
No Windows printer drivers are installed!
... goes on forever until i CTRL+C ...

running this through strace i see a pretty basic loop:
getuid() = 0
open("/var/spool/cups/tmp/4665db6e4c946", O_RDWR|O_CREAT|O_EXCL, 0600) = 6
fcntl(6, F_GETFD) = 0
fcntl(6, F_SETFD, FD_CLOEXEC) = 0
write(6, "username = smbadmin\npassword = ."..., 34) = 34
close(6) = 0
access("/usr/share/cups/drivers/pscript5.dll", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/cups/drivers/ADOBEPS4.DRV", F_OK) = -1 ENOENT (No such file or directory)
write(2, "No Windows printer drivers are i"..., 42) = 42
getuid() = 0
open("/var/spool/cups/tmp/4665db6e4cbe5", O_RDWR|O_CREAT|O_EXCL, 0600) = 6
fcntl(6, F_GETFD) = 0
fcntl(6, F_SETFD, FD_CLOEXEC) = 0
write(6, "username = smbadmin\npassword = ."..., 34) = 34
close(6) = 0
access("/usr/share/cups/drivers/pscript5.dll", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/cups/drivers/ADOBEPS4.DRV", F_OK) = -1 ENOENT (No such file or directory)
write(2, "No Windows printer drivers are i"..., 42) = 42

once i obtained the adobe postscript drivers (ps5ui.dll pscript.hlp pscript.ntf pscript5.dll), the process ran quickly, registered the drivers, and things seem to work ok now (i can print to the machine from Windows at least and drivers are installed automatically)

Activity

  1. michaelrsweet commented on Jul 6, 2007

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Fixed in Subversion repository.

  2. michaelrsweet commented on Jul 6, 2007

    @michaelrsweet
    ContributorAuthor

    "str2407.patch":

    Index: systemv/cupsaddsmb.c

    --- systemv/cupsaddsmb.c (revision 6617)
    +++ systemv/cupsaddsmb.c (working copy)
    @@ -263,6 +263,9 @@
    status = cupsAdminExportSamba(dest, ppdfile, SAMBAServer,
    SAMBAUser, SAMBAPassword,
    Verbosity ? stderr : NULL);
    +

    • if (!status && cupsLastError() == IPP_NOT_FOUND)

    •  break;
      

      }

      unlink(ppdfile);

      Index: cups/adminutil.c

      --- cups/adminutil.c (revision 6617)
      +++ cups/adminutil.c (working copy)
      @@ -676,12 +676,15 @@
      "are installed!")),
      sizeof(message));

    • _cupsSetError(IPP_INTERNAL_ERROR, message);

    • _cupsSetError(IPP_NOT_FOUND, message);
      _cupsLangPrintf(logfile, "%s\n", message);
      }

    if (have_drivers == 0)

    • {
    • _cupsSetError(IPP_NOT_FOUND, message);
      return (0);
    • }

    /*

    • Finally, associate the drivers we just added with the queue...
  3. added this to the Stable milestone on Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions