-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathspc.h
executable file
·43 lines (37 loc) · 852 Bytes
/
spc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef SPC_H
#define SPC_H
#include <QtGui/QtGui>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <cstddef>
#include <algorithm>
#include <iostream>
#include <iterator>
#include <stdlib.h>
#include <string.h>
#include <paths.h>
#include <grp.h>
static int orig_ngroups = -1;
static gid_t orig_gid = -1;
static uid_t orig_uid = -1;
static gid_t orig_groups[NGROUPS_MAX];
class Spc : public QObject
{
Q_OBJECT
protected:
Spc();
~Spc();
void spc_drop_privilleges(int permanent);
void spc_restore_privileges(void);
void spc_sanitize(std::string &stringValue);
int clearenv(void);
int clenv(void);
char *canonicalize_path(QByteArray di);
friend class GroupProperties;
friend class UserProperties;
friend class Groups;
friend class MainWindow;
friend class EditProperties;
};
#endif