freebsd-dev/tools/build/cross-build/secure_getenv.c

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
257 B
C
Raw Normal View History

/*-
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2023 Mark Johnston <markj@FreeBSD.org>
*/
#include <stdlib.h>
#include <unistd.h>
char *
secure_getenv(const char *name)
{
if (issetugid() != 0)
return (NULL);
return (getenv(name));
}