Remoto - VFS: VFS_pam.h Source File
Remoto - VFS
VFS_pam.h
Go to the documentation of this file.
1 #ifndef VFS_PAM_H
2 #define VFS_PAM_H
3 
4 #include "VFS_auth/VFS_auth.h"
5 
6 struct passwd;
7 
8 class VFS_pam : public VFS_auth
9 {
10  Q_OBJECT
11 
12  public:
13  Q_INVOKABLE explicit VFS_pam(QString service, QString group, bool debug=false);
14  virtual ~VFS_pam();
15 
16  virtual QString reportDetails();
17 
18  protected:
19  virtual void ls(VFS_request *r);
20  virtual void read(VFS_request *r);
21 
22  private:
23  QString _service;
24  QString _group;
25  bool _debug;
26 
27  bool validUserPass(QString user, QString password);
28  QJsonArray getGroups(passwd *pw);
29 
30  signals:
31 
32  public slots:
33 };
34 
35 #endif // PAM_H
The base class for authenticating users.
Definition: VFS_auth.h:7
Definition: VFS_pam.h:9
virtual void read(VFS_request *r)
Return the data contents of this node, or if it's a container call ls()
Definition: VFS_pam.cpp:34
QJsonArray getGroups(passwd *pw)
Definition: VFS_pam.cpp:267
Q_INVOKABLE VFS_pam(QString service, QString group, bool debug=false)
Definition: VFS_pam.cpp:12
virtual void ls(VFS_request *r)
List the contents of this node.
Definition: VFS_pam.cpp:96
bool validUserPass(QString user, QString password)
Definition: VFS_pam.cpp:221
QString _service
the pam service file name
Definition: VFS_pam.h:23
virtual QString reportDetails()
Additional details for a generated report.
Definition: VFS_pam.cpp:315
bool _debug
Definition: VFS_pam.h:25
QString _group
the group (or empty) a user must belong to and also the group whose members will be returned by ls()
Definition: VFS_pam.h:24
virtual ~VFS_pam()
Definition: VFS_pam.cpp:30
The base class for all requests between nodes.
Definition: VFS_node.h:54