mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-23 07:31:31 +00:00
limits calls setenv("name=value", "value", 1); which violates POSIX:
"The setenv( ) function shall fail if: [EINVAL] The name argument is a null pointer, points to an empty string, or points to a string containing an '=' character." The fix (like all others in this subject) is backward-compatible.
This commit is contained in:
parent
fad6917924
commit
35e4f24d23
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=169147
@ -399,8 +399,8 @@ main(int argc, char *argv[])
|
||||
login_close(lc);
|
||||
|
||||
/* set leading environment variables, like eval(1) */
|
||||
while (*argv && (p = strchr(*argv, '=')))
|
||||
(void)setenv(*argv++, ++p, 1);
|
||||
while (*argv && strchr(*argv, '=') != NULL)
|
||||
(void)putenv(strdup(*argv++));
|
||||
|
||||
/* Set limits */
|
||||
for (rcswhich = 0; rcswhich < RLIM_NLIMITS; rcswhich++) {
|
||||
|
Loading…
Reference in New Issue
Block a user