aboutsummaryrefslogtreecommitdiff
path: root/tests/mock_guest.h
blob: b7c78e82f1358e3ed987a8367aa8c0ae7c428f4a (plain)
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
/*
 * Copyright © 2012-2013 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>.
 * Copyright © 2012 Canonical Ltd. All rights reserved.
 *
 * Author(s): Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
 *            David Barth <david.barth@canonical.com>
 *
 */

#ifndef __MOCK_GUEST_H__
#define __MOCK_GUEST_H__

#include <pwd.h>
#include <unistd.h>
#include <sys/stat.h>

struct passwd *getpwnam (const char *username);
int setgroups(size_t size, const gid_t *list);
int setgid(gid_t gid);
int setuid(uid_t uid);
int setegid(gid_t gid);
int seteuid(uid_t uid);
int chmod(const char *path, mode_t mode);
int chown(const char *path, uid_t owner, gid_t group);
int execvp(const char *file, char *const argv[]);
int socket_sucker();

#endif