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:
Andrey A. Chernov 2007-04-30 20:10:10 +00:00
parent fad6917924
commit 35e4f24d23

View File

@ -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++) {