Date: Thu, 26 Feb 2004 14:41:47 -0800 (PST) From: Tim Kientzle <kientzle@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libutil Makefile clean_environment.3 clean_environment.c Message-ID: <200402262241.i1QMflw2023800@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
kientzle 2004/02/26 14:41:47 PST FreeBSD src repository Modified files: lib/libutil Makefile Added files: lib/libutil clean_environment.3 clean_environment.c Log: Add a clean_environment call to libutil. This function removes all environment variables except the ones listed on a "whitelist." The function accepts two whitelist arguments. If the first is NULL, a built-in default list will be used. This allows callers to get a variety of behaviors: * Default screening: provide NULL for both lists * Custom screening: provide a custom list for the first argument * Modified default screening: provide NULL for first arg, list of additional variables to preserve in the second arg Idea from: Jacques Vidrine MFC after: 2 weeks Revision Changes Path 1.54 +4 -4 src/lib/libutil/Makefile 1.1 +86 -0 src/lib/libutil/clean_environment.3 (new) 1.1 +121 -0 src/lib/libutil/clean_environment.c (new)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200402262241.i1QMflw2023800>