diff --git a/lib/stub/getpwnam.c b/lib/stub/getpwnam.c index 472b42aa..0c2e9383 100644 --- a/lib/stub/getpwnam.c +++ b/lib/stub/getpwnam.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright © 2018 Jan (janneke) Nieuwenhuizen + * Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -22,12 +22,13 @@ #include struct passwd * -getpwnam (const char *NAME) +getpwnam (const char *name) { static int stub = 0; if (__mes_debug () && !stub) eputs ("getpwnam stub\n"); stub = 1; errno = 0; - return 0; + static struct passwd root = {"root", "*", 0, 0, "", "/root", "/bin/sh"}; + return &root; } diff --git a/lib/stub/getpwuid.c b/lib/stub/getpwuid.c index 647fd54e..62b1d578 100644 --- a/lib/stub/getpwuid.c +++ b/lib/stub/getpwuid.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright © 2018 Jan (janneke) Nieuwenhuizen + * Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -29,5 +29,6 @@ getpwuid () eputs ("getpwuid stub\n"); stub = 1; errno = 0; - return 0; + static struct passwd root = {"root", "*", 0, 0, "", "/root", "/bin/sh"}; + return &root; }