Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cupsGetDests2() lists local printers even if remote server specified #5135

Closed
MarekKasik opened this issue Oct 3, 2017 · 8 comments
Closed

Comments

@MarekKasik
Copy link

cupsGetDests2 function lists local printers even if it get "http_t *" parameter which points to a remote server. It seems to me that this is caused by the fix of the issue #4993. The new implementation does not use the "http" parameter at all.
Was it intentional?

@michaelrsweet michaelrsweet self-assigned this Oct 3, 2017
@michaelrsweet
Copy link
Collaborator

The pointer should still be used, but keep in mind that support for non-local CUPS servers has been deprecated since 2.0 due to sandboxing and other security "features" preventing clients from accessing network printers directly - that's one of the reasons we added the new CUPS-Create-Local-Printer operation so that cupsd did all of the communications for you...

Investigating...

@michaelrsweet
Copy link
Collaborator

OK, I see how cupsGetDests2 is calling cupsEnumDests, which doesn't have a http_t * argument... Will fix this for 2.2.5...

@zdohnal
Copy link
Contributor

zdohnal commented Oct 4, 2017

I'll just want to mention this issue breaks searching for remote printers in gnome (in control-center package).

@zdohnal
Copy link
Contributor

zdohnal commented Oct 4, 2017

I created patch, which does the trick (but it changes cupsEnumDests() and cupsEnumDestsBlock() API - it adds new parameter http_t *http - so I am not sure if it is right way to do it). #5136 After applying this patch searching for printers in control-center works.

@michaelrsweet
Copy link
Collaborator

[master 9554d4e] cupsGetDests2 was not using the supplied HTTP connection (Issue #5135)

@zdohnal
Copy link
Contributor

zdohnal commented Oct 12, 2017

Mike, I think commit didn't propagate to github master.

michaelrsweet added a commit that referenced this issue Oct 12, 2017
- Make a local cups_enum_dests function that accepts a http_t *.
- Have both cupsEnumDests and cupsGetDests2 call cups_enum_dests.
@MarekKasik
Copy link
Author

Thank you for the fix.

@zdohnal
Copy link
Contributor

zdohnal commented Oct 12, 2017

Oh, nice, I can see it now - thank you for the fix Mike!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants