Commit Graph

194774 Commits

Author SHA1 Message Date
agc 451e742596 Use a regular expression to match the various ASCII-armoured headers we
may encounter - fixes PR 44074 from Peter Pentchev in a different way.
2010-11-15 08:27:40 +00:00
agc 05e6b0bbe6 Changes to help with netpgp key generation and interoperability:
+ use plain SHA1 for session key s2k negotiation
+ don't warn on some conditions when inflating (reading a compressed file)
  since the conditions don't hold for partial block lengths
+ prompt for a passphrase when generating a new key - used in the upcoming
  secret-sharing functionality for netpgp
2010-11-15 08:03:39 +00:00
uebayasi 8bbc6ea8fa struct lwp * deref needs sys/lwp.h. 2010-11-15 06:32:38 +00:00
uebayasi ef857263a0 sys/lwp.h for lwp0, sh3/proc.h for sh_proc0_init. 2010-11-15 06:30:04 +00:00
uebayasi bb929f4da3 struct cpu_info * deref needs sys/cpu.h. 2010-11-15 06:26:58 +00:00
uebayasi 525cd4cf6c curlwp needs sys/lwp.h. 2010-11-15 06:25:42 +00:00
uebayasi e3c8dccbb4 struct proc * deref needs sys/proc.h. 2010-11-15 06:24:53 +00:00
uebayasi 88fecc841c struct cpu_info * deref needs sys/cpu.h. 2010-11-15 06:22:13 +00:00
uebayasi 28d601e89c struct lwp * deref (for kauth). 2010-11-15 06:14:02 +00:00
uebayasi b2c6fd2c4d struct proc * deref. 2010-11-15 06:13:16 +00:00
uebayasi b60ff11a9a struct lwp * and struct proc * derefs. 2010-11-15 06:12:28 +00:00
uebayasi ed146b11a1 curlwp needs sys/lwp.h. 2010-11-15 06:08:32 +00:00
uebayasi 8bbd8c35e8 lwp0 needs sys/lwp.h. 2010-11-15 06:07:41 +00:00
uebayasi b72bb4dfdd struct proc * and struct lwp * derefs. 2010-11-15 06:06:51 +00:00
uebayasi 5d2c6eda11 Dereferencing struct proc * and struct lwp *, include them 2010-11-15 06:05:27 +00:00
uebayasi 2d479f916f Dereferencing struct lwp * needs sys/lwp.h. 2010-11-15 06:01:07 +00:00
uebayasi 15158cd1c7 This doesn't use uvm(9) API. 2010-11-15 05:59:57 +00:00
uebayasi 1d247bb84c wakeup needs sys/proc.h. 2010-11-15 05:58:18 +00:00
uebayasi e379b4b16c tsleep needs sys/proc.h. 2010-11-15 05:57:07 +00:00
uebayasi ce4b9e0990 Socket ioctl definitions need sys/sockio.h. 2010-11-15 05:56:29 +00:00
uebayasi 0666f65e61 curlwp needs sys/lwp.h. 2010-11-15 05:52:41 +00:00
tron 103af04b49 Don't use internal libc function __findenv(). 2010-11-14 22:25:23 +00:00
tron 1fbd900608 Don't use internal libc function __findenv(). 2010-11-14 22:09:16 +00:00
tron 2f85740ecc 1.) Rename internal function __findvar() to __findenvvar().
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.
2010-11-14 22:04:36 +00:00
schnoebe 041d7f637f bin/44088
Change the initialization state of gtagsmode to 0, (unset).

This brings about least astonishment for users, permittings tags
functionality to work as expected.
2010-11-14 20:53:54 +00:00
tron 268c79e4cc Set errno to ENOENT if we reject the environment variable name in
getenv_r() instead of leaving it unchanged.
2010-11-14 20:37:02 +00:00
christos af7c6886fd revert previous. breaks other stuff. 2010-11-14 19:49:16 +00:00
christos 082c42cb76 - Fix a couple of bugs to make the following two echo statements print the
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
2010-11-14 19:43:38 +00:00
christos 232829f42f don't core-dump if we cannot open the trace file. 2010-11-14 19:36:07 +00:00
tron 91e8290e88 Add a new regression test "t_threaded" which tests using getenv_r(3),
putenv(3), setenv(3) and unsetenv(3) concurrently.
2010-11-14 19:19:24 +00:00
tron 18217b5088 Update tests for *env(3):
- 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.
2010-11-14 18:15:08 +00:00
tron fbf4aa1699 Improve and simplify implementation of *env(3) functions:
- 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.
2010-11-14 18:11:42 +00:00
uebayasi dff67e454b Include dependencies directly. 2010-11-14 15:47:20 +00:00
uebayasi 01fb76730e Include sys/ioccom.h directly because it's used. 2010-11-14 15:36:47 +00:00
christos 0c40d420be recognize isysroot 2010-11-14 15:18:24 +00:00
uebayasi 2bc2c4def2 ... and another. 2010-11-14 15:18:07 +00:00
uebayasi 12d4db54c0 Fix build caused by a last minute change. 2010-11-14 15:16:53 +00:00
uebayasi 26dd1e598f Be a little more friendly to dynamic physical segment registration.
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.
2010-11-14 15:06:34 +00:00
bouyer 4621c0ed04 Boot vs AP processors don't make sense for physical CPUs, these are
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.
2010-11-14 13:43:04 +00:00
mlelstv f9c11ac3ae rlphy fails to work without autonegotiation.
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.
2010-11-14 13:40:36 +00:00
bouyer fd46720a12 Explain why we hardwire lapic_cpu_number() to 0 on Xen. 2010-11-14 13:40:31 +00:00
uebayasi 5d7952a5d1 Move struct vm_page_md definition from vmparam.h to pmap.h, because
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.
2010-11-14 13:33:20 +00:00
kiyohara de5ebce146 Add myself. 2010-11-14 11:19:49 +00:00
uebayasi b76221069a This actually uses only PAGE_SIZE, remove uvm/uvm_extern.h again. 2010-11-14 06:30:59 +00:00
uebayasi 7caa83525a According to nxr.netbsd.org nothing uses CTL_NAMES now. 2010-11-14 05:34:56 +00:00
uebayasi af8968bc24 Avoid pointless use of a sysctl definition, CTL_NAMES. Clean up whitespace. 2010-11-14 05:31:59 +00:00
uebayasi 1674b65491 Oops. Fix thinko. 2010-11-14 04:31:02 +00:00
uebayasi c9ff0b160b Platforms that dynamically set PAGE_{SIZE,MASK,SHIFT}, those values are
saved in struct uvmexp.  Expose only the relevant part for symbol users,
so that they don't need to include the whole uvm(9) API.
2010-11-14 04:25:16 +00:00
uebayasi 4bbd14ce50 Yet another hidden uvmexp user. 2010-11-14 04:01:50 +00:00
uebayasi d877842fbf Direct/indirect uses of sys/device.h and prop/proplib.h. 2010-11-14 03:57:17 +00:00