1145519Sdarrenr// 2145510Sdarrenr// Automated Testing Framework (atf) 331183Speter// 431183Speter// Copyright (c) 2007 The NetBSD Foundation, Inc. 531183Speter// All rights reserved. 631183Speter// 780486Sdarrenr// Redistribution and use in source and binary forms, with or without 831183Speter// modification, are permitted provided that the following conditions 931183Speter// are met: 1031183Speter// 1. Redistributions of source code must retain the above copyright 1131183Speter// notice, this list of conditions and the following disclaimer. 1231183Speter// 2. Redistributions in binary form must reproduce the above copyright 1331183Speter// notice, this list of conditions and the following disclaimer in the 1431183Speter// documentation and/or other materials provided with the distribution. 1531183Speter// 1631183Speter// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND 1731183Speter// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 1831183Speter// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 1931183Speter// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2031183Speter// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY 2131183Speter// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2231183Speter// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 2331183Speter// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2431183Speter// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 2531183Speter// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 2631183Speter// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 2731183Speter// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2831183Speter// 2931183Speter 3031183Speter#if !defined(_ATF_RUN_USER_HPP_) 3131183Speter#define _ATF_RUN_USER_HPP_ 3231183Speter 3331183Speterextern "C" { 3431183Speter#include <sys/types.h> 3531183Speter} 3631183Speter 3731183Speter#include <utility> 3831183Speter 3931183Speternamespace atf { 4031183Speternamespace atf_run { 4131183Speter 4231183Speteruid_t euid(void); 4331183Spetervoid drop_privileges(const std::pair< int, int >); 4431183Speterstd::pair< int, int > get_user_ids(const std::string&); 4531183Speterbool is_member_of_group(gid_t); 4631183Speterbool is_root(void); 4731183Speterbool is_unprivileged(void); 4831183Speter 4953024Sguido} // namespace atf_run 5031183Speter} // namespace atf 5131183Speter 5231183Speter#endif // !defined(_ATF_RUN_USER_HPP_) 5331183Speter