Show
Ignore:
Timestamp:
01/08/08 00:03:01 (16 years ago)
Author:
jerome
Message:

Doesn't drop and regain priviledges anymore : no added security since we could regain them (we needed to regain them for PAM and some end user scripts). This is also more consistent.
Removed SGTERM handling stuff in cupspykota : now only SIGINT can be used.
Now outputs an error message when printing (but doesn't fail) if CUPS is
not v1.3.4 or higher : we need 1.3.4 or higher because it fixes some
problematic charset handling bugs (by only accepting ascii and utf-8,
but this is a different story...)
Now ensures only the supported exit codes are returned by cupspykota :
we used to exit -1 in some cases (see man backend for details).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/pkprinters

    r3275 r3276  
    171171        if uri and (not self.isPrinterCaptured(deviceuri=uri)) : 
    172172             newuri = "cupspykota://%s" % uri 
    173              self.regainPriv() # to avoid having to enter password. 
    174173             os.system('lpadmin -p "%s" -v "%s"' % (printer.Name, newuri)) 
    175174             self.logdebug("Printer %s rerouted to %s" % (printer.Name, newuri)) 
    176              self.dropPriv() 
    177175              
    178176    def deroutePrinterFromPyKota(self, printer) :     
     
    183181             if newuri.startswith("//") : 
    184182                 newuri = newuri[2:] 
    185              self.regainPriv() # to avoid having to enter password. 
    186183             os.system('lpadmin -p "%s" -v "%s"' % (printer.Name, newuri)) 
    187184             self.logdebug("Printer %s rerouted to %s" % (printer.Name, newuri)) 
    188              self.dropPriv()     
    189185                                      
    190186    def main(self, names, options) :