summaryrefslogtreecommitdiffstats
path: root/usr.sbin
Commit message (Collapse)AuthorAgeFilesLines
* Don't use sys/nfs/rpcv2.h - it is part of the old kernel RPC implementationdfr2009-06-247-77/+74
| | | | and will be removed.
* Add libjail, a (somewhat) simpler interface to the jail_set and jail_getjamie2009-06-246-637/+176
| | | | | | system calls and the security.jail.param sysctls. Approved by: bz (mentor)
* Fix end-of-line issues that can come up when `lpq' reads informationgad2009-06-241-1/+102
| | | | | | | | | | | | | | about a queue from a remote host. That remote host may use \r, \r\n, or \n\r as the line-ending character. In some cases the remote host will write a single line of information without *any* EOL sequence. Translate all the non-unix EOL's to the standard newline, and make sure the final line includes a terminating newline. Logic is also added to translate all unprintable characters to '?', but that is #if-ed out for now. PR: bin/104731 MFC after: 3 weeks
* Add detection of UFS filesystems.cperciva2009-06-242-4/+61
| | | | | | | PR: bin/135565 Submitted by: Daniel O'Connor Reviewed by: randi MFC after: 1 month
* When mountd.c parses the nfsv4 root line(s) in /etc/exports, itrmacklem2009-06-231-1/+13
| | | | | | | | allocates data structures that are never linked into the tree or free'd. As such, mountd would leak memory every time it parsed an nfsv4 root line. This patch frees up those structures to plug the leak. Approved by: kib (mentor)
* Add a limit for child jails via the "children.cur" and "children.max"jamie2009-06-231-8/+15
| | | | | | parameters. This replaces the simple "allow.jails" permission. Approved by: bz (mentor)
* Whitespace fix.jamie2009-06-231-1/+1
| | | | Approved by: bz (mentor)
* Remove obsolete comment describing how the command line isjamie2009-06-231-5/+0
| | | | | | no longer parsed. Approved by: bz (mentor)
* o Fix usage() prototype [1] and correct its call.maxim2009-06-231-2/+2
| | | | Submitted by: ed [1]
* o style(9) usage() definition: it doesn't need an argument.maxim2009-06-231-3/+2
|
* o Remove unneeded argument in fprintf(3) call in usage().maxim2009-06-231-1/+1
| | | | Submitted by: Pawel Worach
* If the label being printed by getpmac(8) is empty, then don't print arwatson2009-06-201-1/+2
| | | | | | | carriage return. Obtained from: TrustedBSD Project MFC after: 3 days
* - Include rpcv2.h before other NFS includes. That allows nfscbd tostas2009-06-201-1/+1
| | | | compile.
* Rework the credential code to support larger values of NGROUPS andbrooks2009-06-192-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* When running pkg_add -r, check & install our dependencies for eachbrian2009-06-196-44/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* In preparation for raising NGROUPS and NGROUPS_MAX, change basebrooks2009-06-195-11/+33
| | | | | | | | | | | | | | | | | | | | | | 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
* Re-do r192913 in less intrusive way. Only do IP_RECVDSTADDR/IP_SENDSRCADDRkan2009-06-181-7/+0
| | | | | | | | | | | | | 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
* Use the right jail parameters for -v (cpuset has changed to cpuset.id).jamie2009-06-171-1/+1
| | | | | Reported by: netchild Approved by: bz (mentor)
* Add cas(4).marius2009-06-151-0/+1
| | | | | Approved by: re (kib) MFC after: 2 weeks
* Add volatile to sig_atomic_t where it was missing.des2009-06-142-2/+2
| | | | MFC after: 1 week
* Include <sys/wait.h> and <signal.h> for wait() and kill().ed2009-06-141-0/+2
|
* Add -m and -t options.brian2009-06-142-2/+13
| | | | | | PR: 129554 Submitted by: gavin MFC after: 3 weeks
* Remove "extern" from function prototypes, and fix some (but not all)des2009-06-1315-196/+154
| | | | | | style(9) violations. MFC after: 1 week
* Wrap some macros that needed wrapping.des2009-06-131-8/+14
| | | | MFC after: 1 week
* Remove casts from {c,m,re}alloc() and simplify sizeof().des2009-06-1313-87/+87
| | | | MFC after: 1 week
* nscd builds cleanly at WARNS level 3.des2009-06-131-2/+1
| | | | MFC after: 1 week
* Explain to the compiler why the aliasing we're doing is OK.des2009-06-137-38/+33
| | | | MFC after: 1 week
* Fix a large number of signed - unsigned comparison warnings.des2009-06-136-34/+43
| | | | MFC after: 1 week
* Change hashtable_index_t to unsigned.des2009-06-132-5/+3
| | | | | | Generate prototypes for our hash table. MFC after: 1 week
* #include the right header so we get prototypes for our own functions.des2009-06-131-1/+1
| | | | MFC after: 1 week
* Further #include cleanup.des2009-06-1310-12/+25
| | | | MFC after: 1 week
* Make the debugging macros expand to (void)0 instead of simply nothingdes2009-06-132-36/+36
| | | | | | | when debugging is turned off. Rename debugging functions due to namespace violation. MFC after: 1 week
* #include cleanupdes2009-06-1313-22/+28
| | | | MFC after: 1 week
* Provide correct prototypes for functions with no arguments.des2009-06-1212-34/+34
| | | | MFC after: 1 week
* _nss_cache_cycle_prevention_function doesn't actually need to be a function,des2009-06-121-10/+10
| | | | | | it just needs to have external linkage. MFC after: 1 week
* Update the content of the nfsv4.4 man page to reflect the finalrmacklem2009-06-121-42/+56
| | | | | | | | | 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)
* syslog.conf(5): correct exampleavg2009-06-111-4/+4
| | | | | | | security.* and console.* are moved out of ftpd program block Approved by: jhb (mentor) MFC after: 2 weeks
* - Make pstat(8) WARNS=6 safe.stas2009-06-112-22/+33
| | | | | | | - 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)
* Lower WARNS due to alignment issues on sparc64.des2009-06-111-1/+1
|
* Correct my previous commit to pstat(8).ed2009-06-111-1/+1
| | | | | | | 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
* Make most of pstat(8) build with WARNS=6.ed2009-06-111-6/+7
| | | | | 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.
* As of sam's r175206, arp builds cleanly at WARNS level 6, but the Makefiledes2009-06-112-4/+8
| | | | | was never updated. Also, clean up the macro that caused the warning in the first place (no functional changes, just wrapped and reindented).
* In the old-style jail command line, explicitly set parameters from thejamie2009-06-101-2/+39
| | | | | | security.jail.* sysctls since jail_set(2) doesn't do it implicitly. Approved by: bz (mentor)
* Fix typo.yongari2009-06-101-1/+1
|
* Add alc(4) to the list of supported network interface.yongari2009-06-101-0/+1
|
* 1. Update the message that prints out for -U when the mtree database doesdougb2009-06-091-7/+7
| | | | | | | | | | | 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.
* Get the other NG_PATHLEN while I'm here too :(.imp2009-06-091-1/+1
|
* Use NG_PATHSIZ instead of NG_PATHLEN + 1.imp2009-06-091-1/+1
|
* Fix grammar.jkoshy2009-06-081-1/+1
| | | | Submitted by: richardtoohey at paradise dot net dot nz on -doc
* The change r192913 has added dependency on IP_RECVDSTADDR beingkan2009-06-081-0/+7
| | | | | | 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.
OpenPOWER on IntegriCloud