Changeset 630

Show
Ignore:
Timestamp:
05/09/05 13:43:34 (20 years ago)
Author:
jerome
Message:

Fix for empty username (test pages launched from CUPS' web interface)

Location:
tea4cups/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • tea4cups/trunk/NEWS

    r627 r630  
    2222Tea4CUPS News : 
    2323    
     24  * 2.12alpha : 
     25   
     26    - When printing test pages from CUPS' web interface, the empty username 
     27      is now overwritten with the username CUPS is running as. 
     28     
    2429  * 2.11 : 
    2530   
  • tea4cups/trunk/tea4cups

    r629 r630  
    2525import sys 
    2626import os 
     27import pwd 
    2728import popen2 
    2829import errno 
     
    3738from struct import unpack 
    3839 
    39 version = "2.11_unofficial" 
     40version = "2.12alpha_unofficial" 
    4041 
    4142class TeeError(Exception): 
     
    406407         
    407408        self.JobId = sys.argv[1].strip() 
    408         self.UserName = sys.argv[2].strip() or "root" 
     409        self.UserName = sys.argv[2].strip() or pwd.getpwuid(os.geteuid())[0] # use CUPS' user when printing test pages from CUPS' web interface 
    409410        self.Title = sys.argv[3].strip() 
    410411        self.Copies = int(sys.argv[4].strip())