Commit Graph

6102 Commits

Author SHA1 Message Date
Diomidis Spinellis
b7bb894067 Add two test cases from PR 130504.
An additional one coming from http://www.research.att.com/~gsf/testregex/
was not added; at some point the entire AT&T regression test harness
should be imported here.
But that would also mean commitment to fix the uncovered errors.

PR:		130504
Submitted by:	Chris Kuklewicz
2009-09-15 21:15:29 +00:00
Edwin Groothuis
8a1df0ef4e Improve the way failure of pthread_key_create() gets detected.
PR:		threads/138603
Submitted by:	Mikulas Patocka
MFC after:	1 week
2009-09-14 11:20:45 +00:00
Daniel Eischen
e89666a9ed Bump our namespace version for 9.0.
Add a comment about keeping the private namespace at the end of
the dependency chain.
2009-09-13 13:15:36 +00:00
Ed Schouten
4522791bb4 Make the description of `b' a little better.
If you have a one-byte sequence, `w', `b' is the second character. Not
the third.

Submitted by:	Christoph Mallon
2009-09-09 19:38:19 +00:00
Poul-Henning Kamp
aa3e6183ce Revert r196976, now that <machine/param.h> behaves predictably. 2009-09-09 10:31:20 +00:00
Poul-Henning Kamp
0901106030 Add necessary include 2009-09-08 15:18:25 +00:00
Pawel Jakub Dawidek
cfef209a71 Synchornize description in manual page with strerror() output. 2009-09-06 07:22:09 +00:00
Konstantin Belousov
1ecc75dfe3 Handle zero size for posix_memalign. Return NULL or unique address
according to the 'V' option.

PR:	standards/138307
MFC after:	1 week
2009-09-05 13:32:05 +00:00
Dag-Erling Smørgrav
ae02066b83 Let the armchair generals handle this one. 2009-09-04 07:44:58 +00:00
Dag-Erling Smørgrav
5b1237b600 Document the need for a cast when passing a char to a ctype function.
MFC after:	2 weeks
2009-09-03 10:06:37 +00:00
Andrey A. Chernov
b9a10b5810 Use (unsigned char) cast for ctype macro 2009-09-02 04:56:30 +00:00
Edward Tomasz Napierala
59831d7595 Fix regression introduced with NFSv4 ACL support - make acl_to_text(3)
and acl_calc_mask(3) return error instead of crashing when acl passed
to them is NULL.

Submitted by:	markus
Reviewed by:	rwatson
MFC after:	3 days
2009-09-01 18:30:17 +00:00
Tim Kientzle
e0fdd85ff7 Style: Remove trailing whitespace. 2009-08-29 03:17:24 +00:00
Xin LI
4f0d3f44e0 Consider flag == 0 as the same of flag == R_NEXT. This change will restore
a historical behavior that has been changed by revision 190491, and has seen
to break exim.
2009-08-24 23:44:07 +00:00
Ed Schouten
00ee13a0af Our implementation of granpt(3) could be valid in the future.
When I wrote the pseudo-terminal driver for the MPSAFE TTY code, Robert
Watson and I agreed the best way to implement this, would be to let
posix_openpt() create a pseudo-terminal with proper permissions in place
and let grantpt() and unlockpt() be no-ops.

This isn't valid behaviour when looking at the spec. Because I thought
it was an elegant solution, I filed a bug report at the Austin Group
about this. In their last teleconference, they agreed on this subject.
This means that future revisions of POSIX may allow grantpt() and
unlockpt() to be no-ops if an open() on /dev/ptmx (if the implementation
has such a device) and posix_openpt() already do the right thing.

I'd rather put this in the manpage, because simply mentioning we don't
comply to any standard makes it look worse than it is. Right now we
don't, but at least we took care of it.

Approved by:	re (kib)
MFC after:	3 days
2009-08-24 11:16:44 +00:00
Robert Watson
3a67af38ba Update posix1e-related man pages, especially as relates to MAC, to more
accurately reflect the last ten years of work.

Approved by:	re (kib)
2009-08-12 10:46:48 +00:00
Alan Cox
5592fb2f9b Eliminate a stale paragraph from the BUGS section. This "bug" was
eliminated in r195693.

Approved by:	re (kensmith)
2009-07-26 06:38:56 +00:00
Ken Smith
764eca2591 It is believed the last subsystem that limited ID sizes to something
other than the current system-wide size (32-bits) has been updated so
for now just cautiously turn the check off.  While here fix the check
for IDs being too large which doesn't work due to type mis-matches.

Reviewed by:    jhb (previous version)
Approved by:	re (kib)
MFC after:	1 month (type mis-match fixes only)
2009-07-22 20:46:17 +00:00
Jilles Tjoelker
22e4c1c47c Correct AT_SYMLINK_FOLLOW flag name in linkat(2) man page.
Approved by:	re (kib), ed (mentor)
2009-07-19 16:48:25 +00:00
Konstantin Belousov
49e8c06b45 Implement RTLD_NOLOAD flag for dlopen(3).
Requested and tested by:	jkim
Reviewed by:	kan
Approved by:	re (kensmith)
2009-07-17 19:45:42 +00:00
Alexander Kabaev
2286fe7635 Second attempt at eliminating .text relocations in shared libraries
compiled with stack protector.

Use libssp_nonshared library to pull __stack_chk_fail_local symbol into
each library that needs it instead of pulling it from libc. GCC
generates local calls to this function which result in absolute
relocations put into position-independent code segment, making dynamic
loader do extra work every time given shared library is being relocated
and making affected text pages non-shareable.

Reviewed by:        kib
Approved by:        re (kib)
2009-07-14 21:19:13 +00:00
John Baldwin
0fe0ed8bf8 - Change mmap() to fail requests with EINVAL that pass a length of 0. This
behavior is mandated by POSIX.
- Do not fail requests that pass a length greater than SSIZE_MAX
  (such as > 2GB on 32-bit platforms).  The 'len' parameter is actually
  an unsigned 'size_t' so negative values don't really make sense.

Submitted by:	Alexander Best  alexbestms at math.uni-muenster.de
Reviewed by:	alc
Approved by:	re (kib)
MFC after:	1 week
2009-07-14 19:45:36 +00:00
Edward Tomasz Napierala
ec71a417a8 Add missing MLINKS for acl_{get,set}_link_fd(3).
Approved by:	re (kib)
2009-07-14 19:37:53 +00:00
Edward Tomasz Napierala
e64e7115aa Move msg{snd,recv,get,ctl} manual pages from section 3 to 2.
Approved by:	re (kib)
2009-07-13 12:53:43 +00:00
Ed Schouten
77822acff7 Fix fwrite() to return 0 when size or nmemb are zero.
Right now nmemb is returned when size is 0. In newer versions of the
standards, it is explicitly required that fwrite() should return 0.

Submitted by:	Christoph Mallon
Approved by:	re (kib)
2009-07-12 13:09:43 +00:00
Edward Tomasz Napierala
c38898116a There is an optimization in chmod(1), that makes it not to call chmod(2)
if the new file mode is the same as it was before; however, this
optimization must be disabled for filesystems that support NFSv4 ACLs.
Chmod uses pathconf(2) to determine whether this is the case - however,
pathconf(2) always follows symbolic links, while the 'chmod -h' doesn't.

This change adds lpathconf(3) to make it possible to solve that problem
in a clean way.

Reviewed by:	rwatson (earlier version)
Approved by:	re (kib)
2009-07-08 15:23:18 +00:00
Pawel Jakub Dawidek
69a789b985 - Don't suggest opening file for writing in preparation for fexecve(2).
- execve(2)/fexecve(2) won't return ETXTBSY if file is open for reading.

Approved by:	re (kib)
2009-07-05 20:20:09 +00:00
Edward Tomasz Napierala
bc8036862b Make it clear where to look for for protocol-specific socket options.
Reviewed by:	rwatson
Approved by:	re (kib)
2009-06-30 20:53:56 +00:00
Konstantin Belousov
8c8484d103 Make the structure definitions in the man pages match the real code, and
remove no longer valid caution.

Approved by:	re (kensmith)
2009-06-29 18:54:17 +00:00
Alexander Kabaev
d48890cfb8 Back out previous revision until better tested fix is ready.
Approved by: re (impliciti, by approving previos check-in)
2009-06-29 01:33:59 +00:00
Alexander Kabaev
a162c9ae9c Eliminate .text relocations in shared libraries compiled with stack protector.
Use libssp_nonshared library to pull __stack_chk_fail_local symbol into
each library that needs it instead of pulling it from libc. GCC generates
local calls to this function which result in absolute relocations put into
position-independent code segment, making dynamic loader do extra work everys
time given shared library is being relocated and making affected text pages
non-shareable.

Reviewed by:        kib
Approved by:        re (kensmith)
2009-06-28 23:51:39 +00:00
Xin LI
40523da708 Implement %z for strptime.
PR:		kern/63064
Submitted by:	Stefan `Sec` Zehl <sec 42 org> (with some small changes)
MFC after:	1 month
2009-06-25 23:59:23 +00:00
Edward Tomasz Napierala
c3380d406a Fix acl_set_fd(3) and acl_get_fd(3) for cases where the kernel doesn't know
anything about _PC_ACL_NFS4.
2009-06-25 20:57:53 +00:00
Edward Tomasz Napierala
b372d0d8bc Manual page tweaks. 2009-06-25 16:34:29 +00:00
Edward Tomasz Napierala
85e71e24c5 Fix c194955 - somehow I managed all the new files, tripling their
contents.
2009-06-25 13:08:02 +00:00
Edward Tomasz Napierala
ca48e73a18 Bump manual page timestamps. 2009-06-25 12:53:50 +00:00
Edward Tomasz Napierala
aa015c8e4a Add NFSv4 ACL support to libc.
This adds the following functions to the acl(3) API: acl_add_flag_np,
acl_clear_flags_np, acl_create_entry_np, acl_delete_entry_np,
acl_delete_flag_np, acl_get_extended_np, acl_get_flag_np, acl_get_flagset_np,
acl_set_extended_np, acl_set_flagset_np, acl_to_text_np, acl_is_trivial_np,
acl_strip_np, acl_get_brand_np.  Most of them are similar to what Darwin
does.  There are no backward-incompatible changes.

Approved by:    rwatson@
2009-06-25 12:46:59 +00:00
Xin LI
5f4faf74cb Lock around access to nc_file and netconfig_info ("ni"). The RPC
part of libc is still not thread safe but this would at least
reduce the problems we have.

PR:		threads/118544
Submitted by:	Changming Sun <snnn119 gmail com>
MFC after:	2 weeks
2009-06-24 23:17:16 +00:00
John Baldwin
b648d4806b Change the ABI of some of the structures used by the SYSV IPC API:
- The uid/cuid members of struct ipc_perm are now uid_t instead of unsigned
  short.
- The gid/cgid members of struct ipc_perm are now gid_t instead of unsigned
  short.
- The mode member of struct ipc_perm is now mode_t instead of unsigned short
  (this is merely a style bug).
- The rather dubious padding fields for ABI compat with SV/I386 have been
  removed from struct msqid_ds and struct semid_ds.
- The shm_segsz member of struct shmid_ds is now a size_t instead of an
  int.  This removes the need for the shm_bsegsz member in struct
  shmid_kernel and should allow for complete support of SYSV SHM regions
  >= 2GB.
- The shm_nattch member of struct shmid_ds is now an int instead of a
  short.
- The shm_internal member of struct shmid_ds is now gone.  The internal
  VM object pointer for SHM regions has been moved into struct
  shmid_kernel.
- The existing __semctl(), msgctl(), and shmctl() system call entries are
  now marked COMPAT7 and new versions of those system calls which support
  the new ABI are now present.
- The new system calls are assigned to the FBSD-1.1 version in libc.  The
  FBSD-1.0 symbols in libc now refer to the old COMPAT7 system calls.
- A simplistic framework for tagging system calls with compatibility
  symbol versions has been added to libc.  Version tags are added to
  system calls by adding an appropriate __sym_compat() entry to
  src/lib/libc/incldue/compat.h. [1]

PR:		kern/16195 kern/113218 bin/129855
Reviewed by:	arch@, rwatson
Discussed with:	kan, kib [1]
2009-06-24 21:10:52 +00:00
Xin LI
47f8598e50 Update SCCS IDs for Berkeley DB 1.86 merge. 2009-06-24 01:15:10 +00:00
Xin LI
fc35a18481 style: operators should appear at the line end if we have to wrap. 2009-06-24 01:14:17 +00:00
Xin LI
eb4bd20c17 Use const instead of __const, and merge the license change from NetBSD.
Obtained from:	NetBSD
2009-06-23 23:52:12 +00:00
Edwin Groothuis
9cf330555a Remove duplicate if-statement on gmt_is_set in gmtsub().
MFC after:	1 week
2009-06-23 22:28:44 +00:00
Konstantin Belousov
c9253e931d Usermode portion of the support for swap allocation accounting:
- update for getrlimit(2) manpage;
- support for setting RLIMIT_SWAP in login class;
- addition to the limits(1) and sh and csh limit-setting builtins;
- tuning(7) documentation on the sysctls controlling overcommit.

In collaboration with:	pho
Reviewed by:	alc
Approved by:	re (kensmith)
2009-06-23 20:57:27 +00:00
Jamie Gritton
b97457e2e6 Add a limit for child jails via the "children.cur" and "children.max"
parameters.  This replaces the simple "allow.jails" permission.

Approved by:	bz (mentor)
2009-06-23 20:35:51 +00:00
Ed Schouten
dc428c2ffe Remove unneeded stdlib directories.
It's not necessary to add stdlib directories for each architecture, even
if the architecture doesn't implement any files of its own.

Submitted by:	Christoph Mallon
2009-06-23 14:11:41 +00:00
Ed Schouten
87fbd35f4f Simplify. We can just use .sinclude here.
Submitted by:	Christoph Mallon
2009-06-23 14:10:46 +00:00
Ed Schouten
e71280c7bc Remove hand-written labs/abs implementations. GCC is smart enough.
It turns out GCC generates code that's a couple of bytes big bigger, but
performs no branching whatsoever.

Submitted by:	Christoph Mallon
2009-06-23 09:04:59 +00:00
Ed Schouten
f863f9cbd9 Remove unneeded stores back into the function arguments.
Submitted by:	Christoph Mallon
2009-06-22 10:56:08 +00:00
Stanislav Sedov
c61860f8a6 - Eliminate extra subcs instruction. I have not noticed before that we
always perform substraction now, so no instruction could be rordered
  to eliminate the conditional substraction.
2009-06-21 13:15:56 +00:00