Page MenuHomeFreeBSD

D25649.diff
No OneTemporary

D25649.diff

diff --git a/lib/libutil/login_class.c b/lib/libutil/login_class.c
--- a/lib/libutil/login_class.c
+++ b/lib/libutil/login_class.c
@@ -231,12 +231,17 @@
while (*set_env != NULL) {
char *p = strchr(*set_env, '=');
- if (p != NULL) { /* Discard invalid entries */
+ if (p != NULL && p != *set_env) { /* Discard invalid entries */
+ const char *ep;
char *np;
*p++ = '\0';
+ /* Strip leading spaces from variable name */
+ ep = *set_env;
+ while (*ep == ' ' || *ep == '\t')
+ ep++;
if ((np = substvar(p, pwd, hlen, pch, nlen)) != NULL) {
- setenv(*set_env, np, 1);
+ setenv(ep, np, 1);
free(np);
}
}

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 22, 6:21 AM (21 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15551200
Default Alt Text
D25649.diff (675 B)

Event Timeline