Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
credentials.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License version 2.1 as published by the Free Software Foundation.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16  */
17 
24 #ifndef LXCPP_CREDENTIALS_HPP
25 #define LXCPP_CREDENTIALS_HPP
26 
27 #include <sys/types.h>
28 
29 #include <vector>
30 
31 namespace lxcpp {
32 
33 void setgroups(const std::vector<gid_t>& groups);
34 
35 void setregid(const gid_t rgid, const gid_t egid);
36 
37 void setreuid(const uid_t ruid, const uid_t euid);
38 
39 pid_t setsid();
40 
41 } // namespace lxcpp
42 
43 #endif // LXCPP_CREDENTIALS_HPP
void setgroups(const std::vector< gid_t > &gids)
Definition: credentials.cpp:35
pid_t setsid()
Definition: credentials.cpp:65
void setreuid(const uid_t ruid, const uid_t euid)
Definition: credentials.cpp:55
void setregid(const gid_t rgid, const gid_t egid)
Definition: credentials.cpp:45