Ignore:
Timestamp:
11/04/13 14:04:44 (14 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
b6cbe03
Parents:
7257d51
Message:

Add in the xhost authentication routine when logging in a user. This will allow the user access to the display. Also fix the authorization file cleanup between sessions of PCDM.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/PCDM/src/pcdm-xprocess.cpp

    ref8b856 r6449f61  
    9595  // Get the environment before we drop priv 
    9696  QProcessEnvironment environ = QProcessEnvironment::systemEnvironment(); //current environment 
    97  
     97  //Now allow this user access to the Xserver 
     98  QString xhostcmd = "xhost si:localuser:"+xuser; 
     99  system(xhostcmd.toUtf8()); 
     100   
    98101  //QWidget *wid = new QWidget(); 
    99102  if (setgid(pw->pw_gid) < 0) { 
     
    164167 
    165168void XProcess::slotCleanup(int exitCode, QProcess::ExitStatus status){ 
    166   pam_shutdown(); //make sure that PAM shuts down properly       
     169  pam_shutdown(); //make sure that PAM shuts down properly 
     170  //Now remove this user's access to the Xserver 
     171  QString xhostcmd = "xhost -si:localuser:"+xuser; 
     172  system(xhostcmd.toUtf8()); 
    167173} 
    168174 
Note: See TracChangeset for help on using the changeset viewer.