source: src-qt4/PCDM/src/pcdm-xprocess.h @ 1691c6a

9.2-releasereleng/10.0releng/10.0.1
Last change on this file since 1691c6a was 1691c6a, checked in by Ken Moore <ken@…>, 6 months ago

Remove the Xau stuff that I was playing with earlier. This should let PCDM compile again... :-)

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/* PCDM Login Manager:
2*  Written by Ken Moore (ken@pcbsd.org) 2012/2013
3*  Copyright(c) 2013 by the PC-BSD Project
4*  Available under the 3-clause BSD license
5*/
6
7/*
8 Sub-classed widget for starting an XSession process
9*/
10
11#ifndef PCDM_XPROCESS_H
12#define PCDM_XPROCESS_H
13
14#include <QFile>
15#include <QDebug>
16#include <QProcess>
17#include <QProcessEnvironment>
18
19#include <sys/types.h>
20#include <security/pam_appl.h>
21#include <security/openpam.h>
22
23#include "pcdm-backend.h"
24
25class XProcess : public QProcess
26{
27        Q_OBJECT
28
29  public:
30        XProcess();
31        ~XProcess();
32        bool isRunning();
33        void waitForSessionClosed();
34       
35        void startDesktop(); 
36       
37 
38  public slots:
39        void loginToXSession(QString, QString, QString); //user, pwd, desktop
40        void checkPW(QString,QString); //user, pwd
41        void setupDesktop(QString,QString,QString); //user, pwd, desktop
42       
43  private:
44        int fstatus; //fork status
45        pid_t fpid;  //fork pid
46        QString xuser, xcmd, xhome, xpwd, xde;
47        bool startXSession();
48       
49        // PAM stuff and simplification functions
50        pam_handle_t *pamh;  //handle for the PAM process structure
51        bool pam_started, pam_session_open;
52        bool pam_checkPW();
53        bool pam_startSession();
54        bool pam_stopSession();
55        void pam_logFailure(int);
56        void pam_shutdown(); //cleanly close all the PAM stuff
57       
58 
59  private slots:
60        void slotCleanup(int, QProcess::ExitStatus);
61
62  signals:
63        void ValidLogin();
64        void InvalidLogin();
65
66};
67#endif
Note: See TracBrowser for help on using the repository browser.