aboutsummaryrefslogtreecommitdiff
path: root/tests/mock_guest.h
blob: 2c1753640f49a9fadbc5e1f29d71aafd781adca0 (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
/*
 * Copyright © 2012 Canonical Ltd. All rights reserved.
 *
 * Author(s): 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