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
@ -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