You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
Repository navigation
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
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
michaelrsweet commentedon Jul 6, 2007
CUPS.org User: mike
Fixed in Subversion repository.
michaelrsweet commentedon Jul 6, 2007
"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)
}
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)
return (0);
/*