[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT/LIBEIGEN PATCH 4/5] lib/ukunistd: Add user related stubs



Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
---
 lib/ukunistd/exportsyms.uk | 14 +++++++
 lib/ukunistd/user.c        | 77 +++++++++++++++++++++++++++++++++++++-
 2 files changed, 90 insertions(+), 1 deletion(-)

diff --git a/lib/ukunistd/exportsyms.uk b/lib/ukunistd/exportsyms.uk
index 11bdffc2..c27ec216 100644
--- a/lib/ukunistd/exportsyms.uk
+++ b/lib/ukunistd/exportsyms.uk
@@ -1 +1,15 @@
 getuid
+geteuid
+getresuid
+getlogin
+setuid
+seteuid
+setreuid
+setresuid
+getpwnam
+getpwuid
+getpwnam_r
+getpwuid_r
+getpwent
+setpwent
+endpwent
diff --git a/lib/ukunistd/user.c b/lib/ukunistd/user.c
index d8ad7c86..0d673c0f 100644
--- a/lib/ukunistd/user.c
+++ b/lib/ukunistd/user.c
@@ -34,8 +34,83 @@
  */
 
 #include <unistd.h>
+#include <pwd.h>
 #include <sys/types.h>
+#include <uk/essentials.h>
 
-uid_t getuid(void) {
+uid_t getuid(void)
+{
        return 0;
 }
+
+int setuid(uid_t uid __unused)
+{
+       return 0;
+}
+
+uid_t geteuid(void)
+{
+       return 0;
+}
+
+int seteuid(uid_t euid __unused)
+{
+       return 0;
+}
+
+int getresuid(uid_t *ruid __unused, uid_t *euid __unused, uid_t *suid __unused)
+{
+       return 0;
+}
+
+int setresuid(uid_t ruid __unused, uid_t euid __unused, uid_t suid __unused)
+{
+       return 0;
+}
+
+int setreuid(uid_t ruid __unused, uid_t euid __unused)
+{
+       return 0;
+}
+
+char *getlogin(void)
+{
+       return 0;
+}
+
+struct passwd *getpwnam(const char *name __unused)
+{
+       return NULL;
+}
+
+struct passwd *getpwuid(uid_t uid __unused)
+{
+       return NULL;
+}
+
+int getpwnam_r(const char *name __unused, struct passwd *pwd __unused,
+       char *buf __unused, size_t buflen __unused,
+       struct passwd **result __unused)
+{
+       return 0;
+}
+
+int getpwuid_r(uid_t uid __unused, struct passwd *pwd __unused,
+       char *buf __unused, size_t buflen __unused,
+       struct passwd **result __unused)
+{
+       return 0;
+}
+
+struct passwd *getpwent(void)
+{
+       return NULL;
+}
+
+void setpwent(void)
+{
+}
+
+void endpwent(void)
+{
+}
-- 
2.21.0

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.