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

[Minios-devel] [UNIKRAFT PATCH 2/3] lib/posix-user: Add getgrnam stub



Signed-off-by: Mihai Pogonaru <pogonarumihai@xxxxxxxxx>
---
 lib/posix-user/exportsyms.uk |  1 +
 lib/posix-user/user.c        | 12 ++++++++++++
 2 files changed, 13 insertions(+)

diff --git a/lib/posix-user/exportsyms.uk b/lib/posix-user/exportsyms.uk
index 5a7a0a59..7b4d0ca6 100644
--- a/lib/posix-user/exportsyms.uk
+++ b/lib/posix-user/exportsyms.uk
@@ -23,3 +23,4 @@ issetugid
 setregid
 setgroups
 initgroups
+getgrnam
diff --git a/lib/posix-user/user.c b/lib/posix-user/user.c
index 4134d6b7..c019b8f3 100644
--- a/lib/posix-user/user.c
+++ b/lib/posix-user/user.c
@@ -34,11 +34,13 @@
  */
 
 #include <unistd.h>
+#include <grp.h>
 #include <pwd.h>
 #include <string.h>
 #include <sys/types.h>
 #include <uk/essentials.h>
 #include <uk/list.h>
+#include <uk/print.h>
 #include <uk/user.h>
 
 static struct passwd_entry {
@@ -220,3 +222,13 @@ int setgroups(size_t size __unused, const gid_t *list 
__unused)
 {
        return 0;
 }
+
+struct group *getgrnam(const char *name __unused)
+{
+       WARN_STUBBED();
+       static struct group g__ = {
+               .gr_gid = 0
+       };
+
+       return &g__;
+}
-- 
2.11.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®.