Commit Graph

12056 Commits

Author SHA1 Message Date
Robert Watson
5e1f7b807d If the label being printed by getpmac(8) is empty, then don't print a
carriage return.

Obtained from:	TrustedBSD Project
MFC after:	3 days
2009-06-20 20:22:11 +00:00
Stanislav Sedov
65a570613a - Include rpcv2.h before other NFS includes. That allows nfscbd to
compile.
2009-06-20 08:46:40 +00:00
Brooks Davis
838d985825 Rework the credential code to support larger values of NGROUPS and
NGROUPS_MAX, eliminate ABI dependencies on them, and raise the to 1024
and 1023 respectively.  (Previously they were equal, but under a close
reading of POSIX, NGROUPS_MAX was defined to be too large by 1 since it
is the number of supplemental groups, not total number of groups.)

The bulk of the change consists of converting the struct ucred member
cr_groups from a static array to a pointer.  Do the equivalent in
kinfo_proc.

Introduce new interfaces crcopysafe() and crsetgroups() for duplicating
a process credential before modifying it and for setting group lists
respectively.  Both interfaces take care for the details of allocating
groups array. crsetgroups() takes care of truncating the group list
to the current maximum (NGROUPS) if necessary.  In the future,
crsetgroups() may be responsible for insuring invariants such as sorting
the supplemental groups to allow groupmember() to be implemented as a
binary search.

Because we can not change struct xucred without breaking application
ABIs, we leave it alone and introduce a new XU_NGROUPS value which is
always 16 and is to be used or NGRPS as appropriate for things such as
NFS which need to use no more than 16 groups.  When feasible, truncate
the group list rather than generating an error.

Minor changes:
  - Reduce the number of hand rolled versions of groupmember().
  - Do not assign to both cr_gid and cr_groups[0].
  - Modify ipfw to cache ucreds instead of part of their contents since
    they are immutable once referenced by more than one entity.

Submitted by:	Isilon Systems (initial implementation)
X-MFC after:	never
PR:		bin/113398 kern/133867
2009-06-19 17:10:35 +00:00
Brian Somers
f345b422d1 When running pkg_add -r, check & install our dependencies for each
package rather than expecting our top level package to get all of
the dependencies correct.

Previously, the code depended on the top level package having all
of the pkgdep lines in +CONTENTS correct and in the right order,
but that doesn't always happen due to code such as this (in
security/gnutls/Makefile):

    .if (defined(WITH_LZO) || exists(${LOCALBASE}/lib/liblzo2.so)) && !defined(WITHOUT_LZO)
    LIB_DEPENDS+=           lzo2:${PORTSDIR}/archivers/lzo2
    ....

With such conditional dependencies, my 'sophox-packages' package won't
install.  The dependency tree looks like this:

    sophox-packages
      ...
      x11/gnome2
        x11/gnome-applets
          net/libgweather
            devel/libsoup
              security/gnutls
                security/libgcrypt
                  security/libgpg-error
      ...
      x11/gnome2
        archivers/file-roller
          archivers/gtar
            archivers/lzop
              archivers/lzo2
      ...

gnutls doesn't depend on lzo2 initially, but lzo2 is dragged into the
mix via other dependencies and is built by the initial 'make'.  The
subsequent package generation for gnutls adds a pkgdep line for lzo2
to gnutls' +CONTENTS but the pkgdeps in sophox-packages' +CONTENTS
has gnutls *before* lzo2.

As a result, sophox-packages cannot install; gnutls fails because lzo2
is missing, 82 more packages fail because gnutls is missing and the
whole thing spirals into a super-confusing mess!

MFC after:	3 weeks
2009-06-19 17:07:38 +00:00
Brooks Davis
54404cfb13 In preparation for raising NGROUPS and NGROUPS_MAX, change base
system callers of getgroups(), getgrouplist(), and setgroups() to
allocate buffers dynamically.  Specifically, allocate a buffer of size
sysconf(_SC_NGROUPS_MAX)+1 (+2 in a few cases to allow for overflow).

This (or similar gymnastics) is required for the code to actually follow
the POSIX.1-2008 specification where {NGROUPS_MAX} may differ at runtime
and where getgroups may return {NGROUPS_MAX}+1 results on systems like
FreeBSD which include the primary group.

In id(1), don't pointlessly add the primary group to the list of all
groups, it is always the first result from getgroups().  In principle
the old code was more portable, but this was only done in one of the two
places where getgroups() was called to the overall effect was pointless.

Document the actual POSIX requirements in the getgroups(2) and
setgroups(2) manpages.  We do not yet support a dynamic NGROUPS, but we
may in the future.

MFC after:	2 weeks
2009-06-19 15:58:24 +00:00
Alexander Kabaev
e7733ffa39 Re-do r192913 in less intrusive way. Only do IP_RECVDSTADDR/IP_SENDSRCADDR
dace for UPDv4 sockets bound to INADDR_ANY. Move the code to set
IP_RECVDSTADDR/IP_SENDSRCADDR into svc_dg.c, so that both TLI and non-TLI
users will be using it.

Back out my previous commit to mountd. Turns out the problem was affecting
more than one binary so it needs to me addressed in generic rpc code in
libc in order to fix them all.

Reported by:	lstewart
Tested by:	lstewart
2009-06-18 17:10:43 +00:00
Jamie Gritton
baab20bd4e Use the right jail parameters for -v (cpuset has changed to cpuset.id).
Reported by:	netchild
Approved by:	bz (mentor)
2009-06-17 14:32:08 +00:00
Marius Strobl
2f577b0166 Add cas(4).
Approved by:	re (kib)
MFC after:	2 weeks
2009-06-15 18:27:27 +00:00
Dag-Erling Smørgrav
c540146463 Add volatile to sig_atomic_t where it was missing.
MFC after:	1 week
2009-06-14 21:39:52 +00:00
Ed Schouten
32cf31fa52 Include <sys/wait.h> and <signal.h> for wait() and kill(). 2009-06-14 12:44:09 +00:00
Brian Somers
a0347c7148 Add -m and -t options.
PR:		129554
Submitted by:	gavin
MFC after:	3 weeks
2009-06-14 06:47:21 +00:00
Dag-Erling Smørgrav
d2432adb9a Remove "extern" from function prototypes, and fix some (but not all)
style(9) violations.

MFC after:	1 week
2009-06-13 14:12:55 +00:00
Dag-Erling Smørgrav
da77297b1e Wrap some macros that needed wrapping.
MFC after:	1 week
2009-06-13 13:54:03 +00:00
Dag-Erling Smørgrav
8eeaaffaac Remove casts from {c,m,re}alloc() and simplify sizeof().
MFC after:	1 week
2009-06-13 13:07:56 +00:00
Dag-Erling Smørgrav
ef39345566 nscd builds cleanly at WARNS level 3.
MFC after:	1 week
2009-06-13 01:23:34 +00:00
Dag-Erling Smørgrav
27f2bc9e1b Explain to the compiler why the aliasing we're doing is OK.
MFC after:	1 week
2009-06-13 01:22:56 +00:00
Dag-Erling Smørgrav
51d6ddb5d1 Fix a large number of signed - unsigned comparison warnings.
MFC after:	1 week
2009-06-13 00:56:17 +00:00
Dag-Erling Smørgrav
2bdde973dd Change hashtable_index_t to unsigned.
Generate prototypes for our hash table.

MFC after:	1 week
2009-06-13 00:54:52 +00:00
Dag-Erling Smørgrav
006fb8efc3 #include the right header so we get prototypes for our own functions.
MFC after:	1 week
2009-06-13 00:46:07 +00:00
Dag-Erling Smørgrav
a5a5d924d2 Further #include cleanup.
MFC after:	1 week
2009-06-13 00:43:56 +00:00
Dag-Erling Smørgrav
570706f8ad Make the debugging macros expand to (void)0 instead of simply nothing
when debugging is turned off.
Rename debugging functions due to namespace violation.

MFC after:	1 week
2009-06-13 00:13:44 +00:00
Dag-Erling Smørgrav
28f805cece #include cleanup
MFC after:	1 week
2009-06-13 00:06:52 +00:00
Dag-Erling Smørgrav
34ecf97a64 Provide correct prototypes for functions with no arguments.
MFC after:	1 week
2009-06-12 23:39:05 +00:00
Dag-Erling Smørgrav
0309c35e84 _nss_cache_cycle_prevention_function doesn't actually need to be a function,
it just needs to have external linkage.

MFC after:	1 week
2009-06-12 23:27:31 +00:00
Rick Macklem
924823491e Update the content of the nfsv4.4 man page to reflect the final
choice of variable names for rc.conf and option name for the
experimental server.
Also replace the inaccurate description of the nfsv4 root lines
in /etc/exports, mostly with a reference to exports(5).

Approved by:	kib (mentor)
2009-06-12 14:18:13 +00:00
Andriy Gapon
5cd1d3ff17 syslog.conf(5): correct example
security.* and console.* are moved out of ftpd program block

Approved by:	jhb (mentor)
MFC after:	2 weeks
2009-06-11 18:42:31 +00:00
Stanislav Sedov
52074d389f - Make pstat(8) WARNS=6 safe.
- While here, eliminate the check for len > 0 in ttymode_sysctl
  as the code is able to handle this case well.

Reviewed by:	ed (initial version)
2009-06-11 17:03:28 +00:00
Dag-Erling Smørgrav
aebbf030e5 Lower WARNS due to alignment issues on sparc64. 2009-06-11 10:30:30 +00:00
Ed Schouten
493f0f1709 Correct my previous commit to pstat(8).
Not only mark the strings inside the array as const, but do the same for
the elements of the array itself.

Submitted by:	Christoph Mallon
2009-06-11 09:59:47 +00:00
Ed Schouten
777e045cb5 Make most of pstat(8) build with WARNS=6.
There is still an issue with the nlists, which I'm not quite sure how to
solve, so I'm leaving WARNS set to 3 right now.
2009-06-11 09:02:22 +00:00
Dag-Erling Smørgrav
be5d11dcb0 As of sam's r175206, arp builds cleanly at WARNS level 6, but the Makefile
was never updated.  Also, clean up the macro that caused the warning in the
first place (no functional changes, just wrapped and reindented).
2009-06-11 07:50:36 +00:00
Jamie Gritton
029cb9c79d In the old-style jail command line, explicitly set parameters from the
security.jail.* sysctls since jail_set(2) doesn't do it implicitly.

Approved by:	bz (mentor)
2009-06-10 15:26:35 +00:00
Pyun YongHyeon
8e8d8e38ed Fix typo. 2009-06-10 03:26:21 +00:00
Pyun YongHyeon
ed664481fe Add alc(4) to the list of supported network interface. 2009-06-10 02:10:35 +00:00
Doug Barton
119d24adab 1. Update the message that prints out for -U when the mtree database does
not exist to let the user know that it will be created for the next run.

2. Delete more stuff we're not going to use from the temproot prior to
creating the mtree database to dramatically reduce its size (162K -> 37K).

3. We've been deleting the zero-size files from temproot for a long time
now, so remove the spurious "-size +0" from the find command in the
comparison loop, and remove what is now a really stale comment.
2009-06-09 20:20:08 +00:00
Warner Losh
367316d5ff Get the other NG_PATHLEN while I'm here too :(. 2009-06-09 05:24:06 +00:00
Warner Losh
c402ff5910 Use NG_PATHSIZ instead of NG_PATHLEN + 1. 2009-06-09 05:18:14 +00:00
Joseph Koshy
0fe7ed0085 Fix grammar.
Submitted by:	richardtoohey at paradise dot net dot nz on -doc
2009-06-08 03:37:25 +00:00
Alexander Kabaev
4b119b6669 The change r192913 has added dependency on IP_RECVDSTADDR being
set for RPC UDP sockets. Mountd uses internal libc fuctions
directly and bypasses generic socket initialization completely,
so we need to set IP_RECVDSTADDR here to match the libc behavior.
2009-06-08 03:15:27 +00:00
Jung-uk Kim
990651167b Import ACPICA 20090521. 2009-06-05 18:50:45 +00:00
Sam Leffler
a4327a3b75 Do not force the mtu to 2290; this was done to insure large EAPOL frames
could be handled w/o fragmentation but clobbers user-specified values
such as those required when the interface is bridged.

Submitted by:	jim@netgate.com
Reviewed by:	Jouni Malinen
MFC after:	3 days
2009-06-05 17:19:55 +00:00
Rick Macklem
35f2eba009 Re-format the nfsv4.4 man page so that all sentences start on a
new line.

Approved by:	kib (mentor)
2009-06-03 21:50:26 +00:00
Joseph Koshy
a2c0b3aead Catch up with the times: "mozilla" -> "firefox". 2009-06-02 04:45:56 +00:00
Doug Barton
536613bc35 Add support for the build options that are currently in the port:
WITH_BIND_IDN
	WITH_BIND_LARGE_FILE
	WITH_BIND_SIGCHASE
	WITH_BIND_XML
2009-06-01 21:58:59 +00:00
Jilles Tjoelker
75cf69394b Fix segfault when giving invalid long option to pkg_info.
PR:		bin/133473
Submitted by:	Rafal Grodzinski
Approved by:	ed (mentor)
MFC after:	1 week
2009-06-01 21:26:52 +00:00
Juli Mallett
ba33818dce o) Restructure tcpdrop(8) to provide a facility to try to drop all established
connections.  Including a flag to instead output a sequence of tcpdrop(8)
   invocations that would accomplish the same thing, which is convenient for
   scripting.
o) Make tcpdrop complain if the addresses given to it are entirely in different
   address families, rather than failing silently.
o) When cross-referencing httpd(8), do not explicitly specify the apache2 port,
   since the example in question is generic.
2009-06-01 06:49:09 +00:00
Ed Schouten
6f8f50af89 Several cleanups to ipfwpcap(8).
- Enable WARNS?=6.
- Include missing headers.
- Mark prog and pidfile as static. Remove unneeded initializer.
- Use ANSI prototypes.
- Remove unneeded fp variable.
- snprintf() guarantees the buffer to be null terminated. Remove
  unneeded - 1 and bzero call.
- Remove unneeded casting.

Submitted by:	Pawel Worach, Christoph Mallon
2009-05-31 20:59:20 +00:00
Nathan Whitehorn
ebcc3763a8 Teach powerd how to query the PMU AC line state on PowerPC. 2009-05-31 10:27:24 +00:00
Doug Barton
6318052d9e Update BIND to version 9.6.1rc1. This version has better performance and
lots of new features compared to 9.4.x, including:

	Full NSEC3 support
	Automatic zone re-signing
	New update-policy methods tcp-self and 6to4-self
	DHCID support.
	More detailed statistics counters including those supported in BIND 8.
	Faster ACL processing.
	Efficient LRU cache-cleaning mechanism.
	NSID support.
2009-05-31 05:42:58 +00:00
Xin LI
9964058e79 Code cleanup for nfs4 utilities:
- Mark internal routines as static;
 - Eliminate unused parameters where possible, mark __unused for others;
 - Remove unused variables;
 - Use %jd for int64_t values in printf();
 - Add appropriate %d for printf to match its parameter;
 - Rename a variable to resolve conflict with revoke(2);

Reviewed by:	rmacklem
Tested with:	make universe (bugs are mine)
2009-05-29 22:19:45 +00:00