cvs commit: src/lib/libutil Makefile clean_environment.3
clean_environment.c
Tim Kientzle
kientzle at FreeBSD.org
Thu Feb 26 14:41:47 PST 2004
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)
More information about the cvs-src
mailing list