summaryrefslogtreecommitdiffstats
path: root/sbin
Commit message (Collapse)AuthorAgeFilesLines
* Check the return error of set[ug]id. While this can never fail in theeadler2012-10-222-3/+6
| | | | | | | | | | | | | | current version of FreeBSD, this isn't guarenteed by the API. Custom security modules, or future implementations of the setuid and setgid may fail. PR: bin/172289 PR: bin/172290 PR: bin/172291 Submittud by: Erik Cederstrand <erik@cederstrand.dk> Discussed by: freebsd-security Approved by: cperciva MFC after: 1 week
* Check the return error of set[e][ug]id. While this can never fail in theeadler2012-10-222-4/+11
| | | | | | | | | | current version of FreeBSD, this isn't guarenteed by the API. Custom security modules, or future implementations of the setuid and setgid may fail. Submitted by: Erik Cederstrand Approved by: cperciva MFC after: 3 days
* remove duplicate semicolons where possible.eadler2012-10-222-2/+2
| | | | | Approved by: cperciva MFC after: 1 week
* Add support for gjournal to dumpfseadler2012-10-221-0/+2
| | | | | | | PR: 165821 Submitted by: Andreas Longwitz <longwitz@incore.de> Approved by: cperciva MFC after: 3 days
* Make fsck and fsck_msdosfs WARNS=6 cleanuqs2012-10-218-17/+16
| | | | | | | | | - sprinkle const - add volatile qualifier to avoid vfork clobbering Inspired by: NetBSD PR: bin/139802 Reviewed by: ed
* sbin/fsck: s/perror/perr/ to avoid shadowinguqs2012-10-218-79/+74
| | | | | | | | | - rename some other vars too - merge NetBSD license changes Obtained from: NetBSD PR: bin/139802 Reviewed by: ed
* document acpi_cpu devd notification about _CST changeavg2012-10-201-0/+2
| | | | | | Based on prodding and a submission by Lars Engels <lars.engels@0x20.net>. MFC after: 5 days
* More -Wmissing-variable-declarations fixes.ed2012-10-195-15/+16
| | | | | | | | | | | | | | | | In addition to adding `static' where possible: - bin/date: Move `retval' into extern.h to make it visible to date.c. - bin/ed: Move globally used variables into ed.h. - sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings. - usr.bin/calendar: Remove unneeded variables. - usr.bin/chat: Make `line' local instead of global. - usr.bin/elfdump: Comment out unneeded function. - usr.bin/rlogin: Use _Noreturn instead of __dead2. - usr.bin/tset: Pull `Ospeed' into extern.h. - usr.sbin/mfiutil: Put global variables in mfiutil.h. - usr.sbin/pkg: Remove unused `os_corres'. - usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.
* Add missing const keywords.ed2012-10-191-1/+1
|
* Fix warnings found by -Wmising-variable-declarations.ed2012-10-197-18/+13
| | | | | | | | | | | This self-written compiler warning, which is hopefully going to be committed into LLVM sources soon, warns about potentially missing `static' keywords, similar to -Wmissing-prototypes. - bin/pax: Move external declaration of chdname and s_mask into extern.h. - bin/setfacl: Move setfacl.c-specific stuff out of setfacl.h. - sbin/mount_fusefs: Remove char *progname; use getprogname(). - others: add `static' where possible.
* Disconnect non-MPSAFE SMBFS from the build in preparation for droppingattilio2012-10-182-3/+1
| | | | | | | | | | | | | GIANT from VFS. In addition, disconnect also netsmb, which is a base requirement for SMBFS. In the while SMBFS regular users can use FUSE interface and smbnetfs port to work with their SMBFS partitions. Also, there are ongoing efforts by vendor to support in-kernel smbfs, so there are good chances that it will get relinked once properly locked. This is not targeted for MFC.
* Disconnect non-MPSAFE NTFS from the build in preparation for droppingattilio2012-10-173-4/+1
| | | | | | | | | | | | | | GIANT from VFS. This code is particulary broken and fragile and other in-kernel implementations around, found in other operating systems, don't really seem clean and solid enough to be imported at all. If someone wants to reconsider in-kernel NTFS implementation for inclusion again, a fair effort for completely fixing and cleaning it up is expected. In the while NTFS regular users can use FUSE interface and ntfs-3g port to work with their NTFS partitions. This is not targeted for MFC.
* Disconnect non-MPSAFE NWFS from the build in preparation for droppingattilio2012-10-172-3/+1
| | | | | | | | | | | | GIANT from VFS. In addition, disconnect also netncp, which is a base requirement for NWFS. In the possibility of a future maintenance of the code and later readd to the FreeBSD base, maybe we should think about a better location for netncp. I'm not entirely sure the / top location is actually right, however I will let network people to comment on that more specifically. This is not targeted for MFC.
* Disconnect non-MPSAFE PORTALFS from the build in preparation for droppingattilio2012-10-162-3/+1
| | | | | | GIANT from VFS. This is not targeted for MFC.
* Fix minor nits:eadler2012-10-152-3/+4
| | | | | | | | | | use a comma after "i.e." sentences begin on new lines. No .Dd bump for trivial modification. Approved by: wblock MFC after: 3 days
* Remove trailing whitespace.joel2012-10-141-8/+8
|
* Minor mdoc and language fixes.joel2012-10-141-11/+11
|
* getopt_long() returns an int. Use the return value accordingly.attilio2012-10-141-1/+1
| | | | | | Pointy hat to: me MFC after: 2 months X-MFC: r241519,241521
* Import a FreeBSD port of the FUSE Linux module.attilio2012-10-134-0/+901
| | | | | | | | | | | | | | | | | | | | | | | | | This has been developed during 2 summer of code mandates and being revived by gnn recently. The functionality in this commit mirrors entirely content of fusefs-kmod port, which doesn't need to be installed anymore for -CURRENT setups. In order to get some sparse technical notes, please refer to: http://lists.freebsd.org/pipermail/freebsd-fs/2012-March/013876.html or to the project branch: svn://svn.freebsd.org/base/projects/fuse/ which also contains granular history of changes happened during port refinements. This commit does not came from the branch reintegration itself because it seems svn is not behaving properly for this functionaly at the moment. Partly Sponsored by: Google, Summer of Code program 2005, 2011 Originally submitted by: ilya, Csaba Henk <csaba-ml AT creo DOT hu > In collabouration with: pho Tested by: flo, gnn, Gustau Perez, Kevin Oberman <rkoberman AT gmail DOT com> MFC after: 2 months
* - Get rid of #ifdef __FreeBSD__.glebius2012-09-291-21/+8
| | | | - Use correct format when printing uint64_t.
* Fix some nearby type and style errors.mdf2012-09-283-17/+14
| | | | Pointed out by: bde
* Fix sbin/ build with a 64-bit ino_t.mdf2012-09-2714-66/+84
| | | | Original code by: Gleb Kurtsou
* Fix fsck_ffs build with a 64-bit ino_t.mdf2012-09-278-85/+103
| | | | Original code by: Gleb Kurtsou
* Whitespace fixesmelifaro2012-09-241-13/+13
| | | | MFC after: 2 weeks
* Permit table to be used as IPv6 address.melifaro2012-09-241-2/+26
| | | | | Reported by: Serhiy Popov <sergiuspso@ukr.net> MFC after: 2 weeks
* Use O_CLOEXEC for open instead of separate fcntl(2) call.pjd2012-09-221-3/+1
|
* Fix grammar in the portion about FIBs. Also, cross-referencebjk2012-09-181-9/+11
| | | | | | | setfib(2) instead of setfib(1) for the 16-FIB limit. PR: docs/157452 Approved by: hrs (mentor)
* mdoc: remove superfluous paragraph macro.joel2012-09-181-1/+0
|
* Whitespace cleanup for ipfw.8 -- start each sentence on a new line,bjk2012-09-181-33/+58
| | | | | | | and put a comma after e.g. and i.e.. While here, wrap long lines. PR: docs/157452 Approved by: hrs (mentor)
* Integrate nvmecontrol(8) into the amd64 and i386 builds.jimharris2012-09-172-0/+2
| | | | | | This includes adding NVMe header files to /usr/include/dev/nvme. Sponsored by: Intel
* Add nvmecontrol(8) source code and beginnings of a man page to the tree.jimharris2012-09-173-0/+693
| | | | | Sponsored by: Intel Contributions from: Joe Golio/EMC <joseph dot golio at emc dot com>
* Minor mdoc fix.joel2012-09-141-2/+2
|
* o Create directory sys/netpfil, where all packet filters shouldglebius2012-09-1425-2261/+17366
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reside, and move there ipfw(4) and pf(4). o Move most modified parts of pf out of contrib. Actual movements: sys/contrib/pf/net/*.c -> sys/netpfil/pf/ sys/contrib/pf/net/*.h -> sys/net/ contrib/pf/pfctl/*.c -> sbin/pfctl contrib/pf/pfctl/*.h -> sbin/pfctl contrib/pf/pfctl/pfctl.8 -> sbin/pfctl contrib/pf/pfctl/*.4 -> share/man/man4 contrib/pf/pfctl/*.5 -> share/man/man5 sys/netinet/ipfw -> sys/netpfil/ipfw The arguable movement is pf/net/*.h -> sys/net. There are future plans to refactor pf includes, so I decided not to break things twice. Not modified bits of pf left in contrib: authpf, ftp-proxy, tftp-proxy, pflogd. The ipfw(4) movement is planned to be merged to stable/9, to make head and stable match. Discussed with: bz, luigi
* Add global and per-module sysctls/tunables to enable/disable metadata taste.mav2012-09-131-1/+5
| | | | | | | That should help to handle some cases when disk has some RAID metadata that should be ignored, especially during boot. MFC after: 3 days
* - Fix a typo in debug message.zont2012-09-131-1/+1
| | | | | Approved by: kib (mentor) MFC after: 3 days
* Remove needless (int) casts of write(2)'s 3rd argument.obrien2012-09-122-5/+5
| | | | | Also change blwrite() 'size' parameter to a ssize_t to better match write(2).
* Simply printf-like strings and outdent strings so that it is easy to seeobrien2012-09-121-20/+18
| | | | if they fit on a standard terminal.
* Remove unused valueskevlo2012-09-111-3/+3
|
* Rework all non-contributed files that use `struct timezone'.ed2012-09-011-4/+1
| | | | | | | | | | | | | | This structure is not part of POSIX. According to POSIX, gettimeofday() has the following prototype: int gettimeofday(struct timeval *restrict tp, void *restrict tzp); Also, POSIX states that gettimeofday() shall return 0 (as long as tzp is not used). Remove dead error handling code. Also use NULL for a nul-pointer instead of integer 0. While there, change all pieces of code that only use tv_sec to use time(3), as this provides less overhead.
* Change the gptboot example so the boot partition is aligned on a 4 kBdes2012-08-291-2/+3
| | | | | | boundary. MFC after: 3 days
* Don't overwrite the global default CFLAGS when setting include paths.brooks2012-08-281-1/+1
| | | | MFC after: 3 days
* Link ipfilter(4) and ipfilter(5) to the build to stop the wrong man pageissyl02012-08-281-2/+2
| | | | | | | | displaying for 'man 4 ipfilter'. PR: docs/118020 Approved by: gjb (mentor) MFC after: 5 days
* Check the return value of sbuf_finish().jh2012-08-231-2/+8
|
* Revert r239356 and use an alternate algorithm.jhb2012-08-222-6/+11
| | | | | | | | | | | | | | | | | First, don't exit when the link goes down on an interface. Instead, teach dhclient to track changes in link state and to enter the reboot state when the link on an interface goes up causing dhclient to attempt to renew its existing lease. Second, remove the change I added to clear the old lease when dhclient exits due to an error (such as ifconfig down). If an interface is using autoconfiguration it should keep its autoconfiguration as much as possible. If the next time it needs a configuration it is able to reuse the previous autoconfiguration, then leaving the settings intact allows existing connections to survive temporary outages, etc. PR: bin/166656 MFC after: 1 month
* Avoid segfault in the 'smpphylist' subcommand.pluknet2012-08-201-1/+1
| | | | | | | | | Initialize devlist.dev_queue tail queue early enough before its any potential traversal in freebusdevlist() when in smpphylist error path. Reported by: Pavel Polyakov <bsd kobyla org> (on irc) Reviewed by: ken MFC after: 5 days
* Fix dhclient to properly exit and teardown the configured lease whenjhb2012-08-171-0/+7
| | | | | | | | | | link is lost. devd will start a new dhclient instance when link is restored. PR: bin/166656 Submitted by: Peter Jeremy (mostly) Reviewed by: brooks (earlier version from Peter) MFC after: 1 month
* Make sure the compiler knows g_gate_xvlog() and g_gate_xlog() do notdim2012-08-061-2/+2
| | | | | | | | return. This silences a warning from clang 3.2 about uninitialized use of the variable 'mediasize' in sbin/ggate/shared/ggate.c. Reviewed by: pjd MFC after: 1 week
* In sbin/camcontrol/camcontrol.c, function smpcmd(), initialize thedim2012-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'error' variable to zero, to avoid returning garbage in several cases. This fixes the following clang 3.2 warnings: sbin/camcontrol/camcontrol.c:4634:8: warning: variable 'error' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (amt_written == -1) { ^~~~~~~~~~~~~~~~~ sbin/camcontrol/camcontrol.c:4656:10: note: uninitialized use occurs here return (error); ^~~~~ sbin/camcontrol/camcontrol.c:4619:7: warning: variable 'error' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (fd_response == 0) { ^~~~~~~~~~~~~~~~ sbin/camcontrol/camcontrol.c:4656:10: note: uninitialized use occurs here return (error); ^~~~~ sbin/camcontrol/camcontrol.c:4617:6: warning: variable 'error' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sbin/camcontrol/camcontrol.c:4656:10: note: uninitialized use occurs here return (error); ^~~~~ MFC after: 1 week
* Document "destroy" as an alias for "stop".jimharris2012-08-031-1/+8
|
* New command "gmultipath prefer" to force selection of a specifiedthomas2012-08-032-1/+34
| | | | | | | provider in an Active/Passive configuration. Reviewed by: mav MFC after: 4 weeks
OpenPOWER on IntegriCloud