diff --git a/lib/stub/getpwnam.c b/lib/stub/getpwnam.c index 2820251d..fc82c916 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. * @@ -23,12 +23,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 aa1b8617..b8bdea02 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. * @@ -30,5 +30,6 @@ getpwuid (uid_t uid) eputs ("getpwuid stub\n"); stub = 1; errno = 0; - return 0; + static struct passwd root = { "root", "*", 0, 0, "", "/root", "/bin/sh" }; + return &root; }