Changeset 2241

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

Fixed username when printing test pages from CUPS' web interface : use
the user CUPS is running as, instead of "root"

Location:
pykota/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/NEWS

    r2239 r2241  
    2424    - 1.23alpha1 :    
    2525     
     26        - Sets current username to the user CUPS runs as instead of "root" 
     27          when printing test pages from CUPS' web interface (because 
     28          the username is empty in this case). 
     29           
    2630        - Fix for strange values in job-originating-hostname 
    2731         
  • pykota/trunk/pykota/tool.py

    r2229 r2241  
    654654        self.logdebug(_("Printing system %s, args=%s") % (str(self.printingsystem), arguments)) 
    655655         
    656         self.username = self.username or 'root' # when printing test page from CUPS web interface, username is empty 
     656        self.username = self.username or pwd.getpwuid(os.geteuid())[0] # use CUPS' user when printing test page from CUPS web interface, otherwise username is empty 
    657657         
    658658        # do we want to strip out the Samba/Winbind domain name ?