aboutsummaryrefslogtreecommitdiff
path: root/tests/mock_guest.h
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-09-19 14:35:36 -0500
committerTed Gould <ted@gould.cx>2012-09-19 14:35:36 -0500
commit2704e3ffc83bba8f7aedd39799468c35402584e9 (patch)
tree5395da7dda8a54c0a871ea4350daa5c62d54583a /tests/mock_guest.h
parentb7d9fbfb09f346f8d597b00daca797b2812de5ac (diff)
downloadlibpam-freerdp2-2704e3ffc83bba8f7aedd39799468c35402584e9.tar.gz
libpam-freerdp2-2704e3ffc83bba8f7aedd39799468c35402584e9.tar.bz2
libpam-freerdp2-2704e3ffc83bba8f7aedd39799468c35402584e9.zip
Steal a bunch of test infrastructure from libpam-icaclient
Diffstat (limited to 'tests/mock_guest.h')
-rw-r--r--tests/mock_guest.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/mock_guest.h b/tests/mock_guest.h
new file mode 100644
index 0000000..c4179b9
--- /dev/null
+++ b/tests/mock_guest.h
@@ -0,0 +1,24 @@
+/*
+ * 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);
+
+#endif