Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105823768
D25649.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
675 B
Referenced Files
None
Subscribers
None
D25649.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D25649: setclassenvironment: trim leading spaces in variable names
Attached
Detach File
Event Timeline
Log In to Comment