source: src-qt4/PCDM/src/pcdm-xprocess.h @ 72c9698

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3
Last change on this file since 72c9698 was 72c9698, checked in by Ken Moore <ken@…>, 11 months ago

Fix up PCDM compilation on 10.x

  • 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, xshell;
47        bool startXSession();
48       
49        // Session environment setup
50        void setupSessionEnvironment();
51 
52        // PAM stuff and simplification functions
53        pam_handle_t *pamh;  //handle for the PAM process structure
54        bool pam_started, pam_session_open;
55        bool pam_checkPW();
56        bool pam_startSession();
57        bool pam_stopSession();
58        void pam_logFailure(int);
59        void pam_shutdown(); //cleanly close all the PAM stuff
60       
61 
62  private slots:
63        void slotCleanup();
64
65  signals:
66        void ValidLogin();
67        void InvalidLogin();
68
69};
70#endif
Note: See TracBrowser for help on using the repository browser.