Changeset 2007

Show
Ignore:
Timestamp:
01/07/05 00:23:35 (20 years ago)
Author:
jalet
Message:

Regain priviledge the time to read the job control file to extract the client
hostname

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/cupspykota

    r2006 r2007  
    2424# 
    2525# $Log$ 
     26# Revision 1.83  2005/01/06 23:23:35  jalet 
     27# Regain priviledge the time to read the job control file to extract the client 
     28# hostname 
     29# 
    2630# Revision 1.82  2005/01/06 22:52:53  jalet 
    2731# Implemented the dropping of priviledges. Beware, beware... 
     
    438442            ippmessagefile = os.path.join(requestroot, ippmessagefile) 
    439443            ippmessage = {} 
     444            self.regainPriv() 
    440445            try : 
    441446                ippdatafile = open(ippmessagefile) 
     
    451456                    self.logdebug("Parsing of IPP message file %s ends." % ippmessagefile) 
    452457                ippdatafile.close() 
    453                  
     458            self.dropPriv()     
    454459            clienthost = ippmessage.get("job-originating-host-name") \ 
    455460                         or self.getJobOriginatingHostnameFromPageLog(cupsdconf, printer.Name, user.Name, self.jobid) 
     
    544549                self.printMoreInfo(user, printer, _("Job size forced to 0 because printing is denied.")) 
    545550            else :     
    546                 jobsize = self.accounter.getJobSize(printer)  
     551                jobsize = self.accounter.getJobSize(printer) 
    547552                if self.softwareJobSize and (jobsize != self.softwareJobSize) : 
    548553                    self.printInfo(_("Beware : computed job size (%s) != precomputed job size (%s)") % (jobsize, self.softwareJobSize), "error") 
    549                 jobsize += bannersize 
     554                jobsize += bannersize     
    550555            self.printMoreInfo(user, printer, _("Job size : %i") % jobsize) 
    551556