2.) Add a wrapper function __findenv() which implements the previous
*internal* interface. It turns out that ld.elf_so(1) and pthread(3)
both use it.
Stripping e.g. "LD_LIBRARY_PATH" from the environment while running
setuid binaries works again now.
Change the initialization state of gtagsmode to 0, (unset).
This brings about least astonishment for users, permittings tags
functionality to work as expected.
same output as they should:
line='#define bindir "/usr/bin" /* comment */'
echo "${line%%/\**}"
echo ${line%%/\**}
1. ISDBLQUOTE() was not working properly for non VSNORMAL expansions because
varnest was incremented before the variable was completely parsed. Add
an insub adjustment to keep track of that.
2. When we have a quoted backslash, we need to escape twice, because one
level of escaping will be stripped later. (XXX: Do that when insub == 1
only?)
- Make macros statements
- Introduce randomness into "t_setenv" to avoid freeing environment
variables exactly in the order they have been allocated.
Also call unsetenv(3) twice to make sure it behaves well if the
environment variable doesn't exist.
- "t_getenv" is no longer a known failure after getenv(3) and getenv_r(3)
have been fixed.
- Use RB tree to keep track of memory allocated via setenv(3) as
suggested by Enami Tsugutomo in private e-mail.
This simplifies the code a lot as we no longer need to keep the size
of "environ" in sync with an array of allocated environment variables.
It also makes it possible to free environment variables in unsetenv(3)
if something has changed the order of the "environ" array.
- Fix a bug in getenv(3) and getenv_r(3) which would return bogus
results e.g. for " getenv("A=B") " if an environment variable "A"
with value "B=C" exists.
- Clean up the internal functions:
- Don't expose the read/write lock for the environment to other parts
of "libc". Provide locking functions instead.
- Use "bool" to report success or failure.
- Use "ssize_t" or "size_t" instead of "int" for indexes.
- Provide internal functions with simpler interfaces e.g. don't
combine return values and reference arguments.
- Don't copy "environ" into an allocated block unless we really need
to grow it.
Code reviewed by Joerg Sonnenberger and Christos Zoulas, tested by
Joerg Sonnenberger and me. These changes also fix problems in
zsh 4.3.* and pam_ssh according to Joerg.
Maintain an array of pointer to struct vm_physseg, instead of struct
array. So that VM subsystem can take its pointer safely. Pointer
to this struct will replace raw paddr_t usage in the future.
Dynamic removal is not supported yet.
Only MD data structure changes, no kernel bump needed.
Tested on i386, amd64, powerpc/ibm40x, arm11.
handled by the hypervisor and all CPUs are running when the dom0 is started.
In addition, we don't have a reliable way to determine the boot CPU as
- we may not be running on the boot CPU
- we don't have access to the lapic id
So simplify by ignoring the information and assign phycpu_info_primary to the
first attached CPU.
Reason is that ifm_data does not store BMCR data but a media index
that gets poked into the BMCR register.
Setting the BMCR and ANAR registers is correctly handled by the
generic function mii_phy_setmedia.
it's used only by pmap. vmparam.h has definitions for wider
audience.
All GENERIC kernels build tested, except ia64.
powerpc/include/booke/vmparam.h has one too, but it has no pmap.h,
so it's left as is.
1.) Always check the return value of setenv(3) and unsetenv(3).
2.) Test that calling setenv(..., ..., 0) doesn't overwrite environment
variables.
3.) Add a new test which mixes putenv(3) and setenv(3).