Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106076531
D5853.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D5853.diff
View Options
Index: head/sbin/dhclient/dhclient.c
===================================================================
--- head/sbin/dhclient/dhclient.c
+++ head/sbin/dhclient/dhclient.c
@@ -2275,6 +2275,17 @@
{
int i, j, namelen;
+ /* No `` or $() command substitution allowed in environment values! */
+ for (j=0; j < strlen(value); j++)
+ switch (value[j]) {
+ case '`':
+ case '$':
+ warning("illegal character (%c) in value '%s'",
+ value[j], value);
+ /* Ignore this option */
+ return;
+ }
+
namelen = strlen(name);
for (i = 0; client->scriptEnv[i]; i++)
@@ -2311,16 +2322,6 @@
strlen(value) + 1);
if (client->scriptEnv[i] == NULL)
error("script_set_env: no memory for variable assignment");
-
- /* No `` or $() command substitution allowed in environment values! */
- for (j=0; j < strlen(value); j++)
- switch (value[j]) {
- case '`':
- case '$':
- error("illegal character (%c) in value '%s'", value[j],
- value);
- /* not reached */
- }
snprintf(client->scriptEnv[i], strlen(prefix) + strlen(name) +
1 + strlen(value) + 1, "%s%s=%s", prefix, name, value);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 26, 12:14 AM (11 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15599820
Default Alt Text
D5853.diff (1 KB)
Attached To
Mode
D5853: dhclient: Log a warning instead of bailing upon "illegal" options
Attached
Detach File
Event Timeline
Log In to Comment