<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openslx-ng/ipxe.git/src/core/settings.c, branch v0.9.7</title>
<subtitle>Fork of ipxe; additional commands and features</subtitle>
<id>https://git.openslx.org/openslx-ng/ipxe.git/atom/src/core/settings.c?h=v0.9.7</id>
<link rel='self' href='https://git.openslx.org/openslx-ng/ipxe.git/atom/src/core/settings.c?h=v0.9.7'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/openslx-ng/ipxe.git/'/>
<updated>2009-02-17T11:57:31+00:00</updated>
<entry>
<title>[settings] Allow store_setting() to access the root settings block</title>
<updated>2009-02-17T11:57:31+00:00</updated>
<author>
<name>Michael Brown</name>
</author>
<published>2009-02-17T11:57:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/openslx-ng/ipxe.git/commit/?id=bea828b9ed07a48d273e47c4fa434a1ee477becc'/>
<id>urn:sha1:bea828b9ed07a48d273e47c4fa434a1ee477becc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[settings] Handle errors in fetchf_uristring()</title>
<updated>2009-02-12T09:16:53+00:00</updated>
<author>
<name>Michael Brown</name>
</author>
<published>2009-02-12T09:16:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/openslx-ng/ipxe.git/commit/?id=4e6b62c94627d1e05aa986f66054df5f841fe53b'/>
<id>urn:sha1:4e6b62c94627d1e05aa986f66054df5f841fe53b</id>
<content type='text'>
fetchf_uristring() was failing to handle error values from
fetch_setting(), resulting in its attempting to allocate extremely
large temporary buffers on the stack (and so overrunning the stack and
locking up the machine).

Problem reported by Shao Miller &lt;Shao.Miller@yrdsb.edu.on.ca&gt;.
</content>
</entry>
<entry>
<title>[settings] Avoid duplicate settings block names</title>
<updated>2009-01-31T07:32:20+00:00</updated>
<author>
<name>Michael Brown</name>
</author>
<published>2009-01-31T07:32:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/openslx-ng/ipxe.git/commit/?id=d2b0081740de9e31fb28f7c6761bbf78835c07d7'/>
<id>urn:sha1:d2b0081740de9e31fb28f7c6761bbf78835c07d7</id>
<content type='text'>
Automatically unregister any settings with the same name (and position
within the settings tree) as a newly registered settings block.

This functionality is generalised out from dhcp.c.
</content>
</entry>
<entry>
<title>[settings] Add fetch_string_setting_copy()</title>
<updated>2009-01-27T19:13:47+00:00</updated>
<author>
<name>Michael Brown</name>
</author>
<published>2009-01-27T19:13:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/openslx-ng/ipxe.git/commit/?id=a128973ecbc3bc98d0140436e80ef8ee1030dc7c'/>
<id>urn:sha1:a128973ecbc3bc98d0140436e80ef8ee1030dc7c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[settings] Ensure fetch_string_setting() returns a NUL-terminated string</title>
<updated>2008-11-07T03:48:29+00:00</updated>
<author>
<name>Michael Brown</name>
</author>
<published>2008-11-07T03:46:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/openslx-ng/ipxe.git/commit/?id=ed196a3ed26cc9aaa034a6451ee1c789c93dfb68'/>
<id>urn:sha1:ed196a3ed26cc9aaa034a6451ee1c789c93dfb68</id>
<content type='text'>
This fixes a regression introduced in commit 612f4e7:

  [settings] Avoid returning uninitialised data on error in fetch_xxx_setting()

in which the memset() was moved from fetch_string_setting() to
fetch_setting(), in order that it would be useful for non-string
setting types.  However, this neglects to take into account the fact
that fetch_string_setting() shrinks its buffer by one byte (to allow
for the NUL) before calling fetch_setting().

Restore the memset() in fetch_string_setting(), so that the
terminating NUL is guaranteed to actually be a NUL.
</content>
</entry>
<entry>
<title>[settings] Add the notion of a "tag magic" to numbered settings</title>
<updated>2008-10-30T21:47:14+00:00</updated>
<author>
<name>Michael Brown</name>
</author>
<published>2008-10-29T18:17:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/openslx-ng/ipxe.git/commit/?id=0a6c66a83018c64d961ee4e8601ae8950cbee00b'/>
<id>urn:sha1:0a6c66a83018c64d961ee4e8601ae8950cbee00b</id>
<content type='text'>
Settings can be constructed using a dotted-decimal notation, to allow
for access to unnamed settings.  The default interpretation is as a
DHCP option number (with encapsulated options represented as
"&lt;encapsulating option&gt;.&lt;encapsulated option&gt;".

In several contexts (e.g. SMBIOS, Phantom CLP), it is useful to
interpret the dotted-decimal notation as referring to non-DHCP
options.  In this case, it becomes necessary for these contexts to
ignore standard DHCP options, otherwise we end up trying to, for
example, retrieve the boot filename from SMBIOS.

Allow settings blocks to specify a "tag magic".  When dotted-decimal
notation is used to construct a setting, the tag magic value of the
originating settings block will be ORed in to the tag number.
Store/fetch methods can then check for the magic number before
interpreting arbitrarily-numbered settings.
</content>
</entry>
<entry>
<title>[settings] Avoid returning uninitialised data on error in fetch_xxx_setting()</title>
<updated>2008-10-22T21:07:13+00:00</updated>
<author>
<name>Michael Brown</name>
</author>
<published>2008-10-22T20:18:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/openslx-ng/ipxe.git/commit/?id=612f4e7a990272f67dc1461e6cf1c5ad3b83dd14'/>
<id>urn:sha1:612f4e7a990272f67dc1461e6cf1c5ad3b83dd14</id>
<content type='text'>
Callers (e.g. usr/autoboot.c) may not check the return values from
fetch_xxx_setting(), assuming that in error cases the returned setting
value will be "empty" (for some sensible value of "empty").

In particular, if the DHCP server did not specify a next-server
address, this would result in gPXE using uninitialised data for the
TFTP server IP address.
</content>
</entry>
<entry>
<title>[settings] Allow for setting fetchers to fail in fetchf_hex()</title>
<updated>2008-09-26T02:39:35+00:00</updated>
<author>
<name>Michael Brown</name>
</author>
<published>2008-09-26T02:39:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/openslx-ng/ipxe.git/commit/?id=6936c40fef84ab61fa57b7a5ec3f84e9c26f9829'/>
<id>urn:sha1:6936c40fef84ab61fa57b7a5ec3f84e9c26f9829</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[settings] Add the uristring setting type</title>
<updated>2008-09-24T06:22:42+00:00</updated>
<author>
<name>Michael Brown</name>
</author>
<published>2008-09-24T06:22:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/openslx-ng/ipxe.git/commit/?id=35b7658877967e0f0a647a53e3b11497268efbb5'/>
<id>urn:sha1:35b7658877967e0f0a647a53e3b11497268efbb5</id>
<content type='text'>
This allows settings to be expanded in a way that is safe to include
within a URI string, such as

  kernel http://10.0.0.1/boot.php?mf=${manufacturer:uristring}

where the ${manufacturer} setting may contain characters that are not
permitted (or have reserved purposes) within a URI.

Since whitespace characters will be URI-encoded (e.g. "%20" for a
space character), this also works around the problem that spaces
within an expanded setting would cause the shell to split command-line
arguments incorrectly.
</content>
</entry>
<entry>
<title>[settings] Avoid overwriting the start of .text in fetch_string_setting()</title>
<updated>2008-08-14T02:03:53+00:00</updated>
<author>
<name>Michael Brown</name>
</author>
<published>2008-08-14T02:03:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/openslx-ng/ipxe.git/commit/?id=8f8f5acf0930710f8974af8a644305c3b3afabdf'/>
<id>urn:sha1:8f8f5acf0930710f8974af8a644305c3b3afabdf</id>
<content type='text'>
fetch_string_setting() was subtracting one from the length of the
to-be-NUL-terminated buffer in order to obtain the length of the
unterminated buffer to be passed to fetch_setting().  This works
extremely well unless the length of the to-be-NUL-terminated buffer is
zero, at which point we end up giving fetch_setting() a buffer of
length -1UL, thereby inviting it to overwrite as much memory as it
wants...
</content>
</entry>
</feed>
