mescc: Mes C Library: Support GNU Tar: Fix getpwnam, getpwuid stubs.
* lib/stub/getpwnam.c (getpwnam): Return pointer to static struct passwd. * lib/stub/getpwuid.c (getpwuid): Likewise.
This commit is contained in:
parent
e81e48c701
commit
4d6084b20b
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -22,12 +22,13 @@
|
|||
#include <pwd.h>
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue