Lost of authentification in CUPS 1.2rc3

Goffioul Michael goffioul at imec.be
Wed Apr 26 08:58:14 CEST 2006


> Comments in file kmcupsmanager.cpp make me suspect
> 	else
> 	{
> 		req.setOperation(CUPS_ADD_PRINTER);
> 		// only set the device-uri if needed, otherwise 
> you may loose          
> authentification           <---------???
> 		// data (login/password in URI's like smb or ipp).
> 		KMPrinter	*otherP = findPrinter(p->printerName());
> 		if (!otherP || otherP->device() != p->device())
> 
> is anyone here, who wrote this? What it means?

This means that during a CUPS_ADD_PRINTER request to the server,
the device-uri attribute is not defined if it does not need to.
The reason is that this operation is also used to modify an existing
printer. Redefining the device-uri attribute would overwrite the
existing one, and potentially loose authentication data.

Here's the scenario:
1) you create a SMB printer, which requires authentication, hence
you used a device-uri like smb://username:password@GROUP/PRINTER
2) later on, you request the printer list from the CUPS server, for
the printer above, you get as device-uri smb://GROUP/PRINTER; you don't
get back the username and password
3) when modifying the printer (but not its name or device), you can't
include the device-uri of step 2, because you would loose the
authentication
data from step 1; and the information of step 2 is the one you have
available at the time you want to modify the printer.

I doubt this is the cause of your problem, because this only makes
sense when modifying a printer, not when creating a new one. In the
latter,
the device-uri attribute must be there, and according to the debug
output,
it is there.

Michael.


More information about the kde-print mailing list