summaryrefslogtreecommitdiffstats
path: root/sbin
Commit message (Collapse)AuthorAgeFilesLines
* Add a ${.CURDIR} reference to the previous commit.rpaulo2010-10-291-1/+1
| | | | Submitted by: dim
* Force include ../../libpcap/config.h since privsep.c groks pcap'srpaulo2010-10-291-0/+2
| | | | internals.
* Correct a typo.jh2010-10-271-1/+1
| | | | | | PR: 151321 Submitted by: Simon Walton MFC after: 3 days
* Use fprintf(stderr) instead of gctl_error() to print a warning about toopjd2010-10-261-2/+2
| | | | | | | | big sector size. When gctl error is set gctl_has_param() always returns 'false', which prevents geli(8) from finding some arguments and also masks an error, which is generates in such case. MFC after: 3 days
* Reimplemented "gpart destroy -F". Now it does all work in kernel.ae2010-10-252-84/+99
| | | | | | | | | | | | | | | | | This was needed for recover implementation. Implement the recover command for GPT. Now GPT will marked as corrupt when any of three types of corruption will be detected: 1. Damaged primary GPT header or table 2. Damaged secondary GPT header or table 3. Secondary header is not located in the last LBA Marked GPT becomes read-only. Any changes with corrupt table are prohibited. Only "destroy" and "recover" commands are allowed. Discussed with: geom@ (mostly silence) Tested by: Ilya A. Arhipov Approved by: mav (mentor) MFC after: 2 weeks
* Do some whitespace and `identify` output cleanup.mav2010-10-251-50/+57
| | | | | Submitted by: arundel MFC after: 2 weeks
* Before this change on first connect between primary and secondary wepjd2010-10-242-5/+51
| | | | | | | | | | | | | initialize all the data. This is huge waste of time and resources if there were no writes yet, as there is no real data to synchronize. Optimize this by sending "virgin" argument to secondary, which gives it a hint that synchronization is not needed. In the common case (where noth nodes are configured at the same time) instead of synchronizing everything, we don't synchronize at all. MFC after: 1 week
* Implement nv_exists() function that returns true if argument of the givenpjd2010-10-242-1/+28
| | | | | | name exists. MFC after: 3 days
* Move all NV defines into nv.c, they are not used externally thus there ispjd2010-10-242-27/+27
| | | | | | no need to make then visible from outside. MFC after: 3 days
* Simplify code a bit.pjd2010-10-241-3/+1
| | | | MFC after: 3 days
* Plug memory leak.pjd2010-10-241-0/+2
| | | | MFC after: 3 days
* Plug memory leaks.pjd2010-10-243-0/+27
| | | | | Found with: valgrind MFC after: 3 days
* Load geom_gate.ko module after parsing arguments.pjd2010-10-241-2/+2
| | | | MFC after: 3 days
* mdoc: make pages render with mandocuqs2010-10-213-4/+2
| | | | | | It's a bit more pedantic regarding .Bl list elements. This has an added benefit of unbreaking the ipfw(8) manpage, where groff was silently skipping one list element.
* Use closefrom(2) instead of close(2) in a loop.pjd2010-10-201-21/+8
| | | | MFC after: 1 week
* Bring in geli suspend/resume functionality (finally).pjd2010-10-202-1/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change if you wanted to suspend your laptop and be sure that your encryption keys are safe, you had to stop all processes that use file system stored on encrypted device, unmount the file system and detach geli provider. This isn't very handy. If you are a lucky user of a laptop where suspend/resume actually works with FreeBSD (I'm not!) you most likely want to suspend your laptop, because you don't want to start everything over again when you turn your laptop back on. And this is where geli suspend/resume steps in. When you execute: # geli suspend -a geli will wait for all in-flight I/O requests, suspend new I/O requests, remove all geli sensitive data from the kernel memory (like encryption keys) and will wait for either 'geli resume' or 'geli detach'. Now with no keys in memory you can suspend your laptop without stopping any processes or unmounting any file systems. When you resume your laptop you have to resume geli devices using 'geli resume' command. You need to provide your passphrase, etc. again so the keys can be restored and suspended I/O requests released. Of course you need to remember that 'geli suspend' won't clear file system cache and other places where data from your geli-encrypted file system might be present. But to get rid of those stopping processes and unmounting file system won't help either - you have to turn your laptop off. Be warned. Also note, that suspending geli device which contains file system with geli utility (or anything used by 'geli resume') is not very good idea, as you won't be able to resume it - when you execute geli(8), the kernel will try to read it and this read I/O request will be suspended.
* Stop disallowing device nodes to be passed to camcontrol(8) since libcambrucec2010-10-192-12/+1
| | | | | | already allows both device names and nodes to be specified. Reviewed by: avg
* mdoc: drop even more redundant .Pp callsuqs2010-10-193-6/+0
| | | | | | No change in rendered output, less mandoc lint warnings. Tool provided by: Nobuyuki Koganemaru n-kogane at syd.odn.ne.jp
* Log correct connection when canceling half-open connection.pjd2010-10-171-1/+2
| | | | | Submitted by: Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 3 days
* Use one fprintf() instead of two.pjd2010-10-161-2/+1
| | | | MFC after: 3 days
* Clear signal mask before executing a hook.pjd2010-10-161-0/+3
| | | | | Submitted by: Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 3 days
* document logging through bpfluigi2010-10-131-13/+18
|
* Remove stale reference to wtmp(5).ed2010-10-111-2/+2
| | | | Reported by: pluknet
* - Print the nmount(2) provided error message only when it is set.jh2010-10-101-2/+6
| | | | | | | - Ensure that the error message is NUL-terminated before printing it. PR: bin/147482 MFC after: 2 weeks
* Replace strlen(_PATH_DEV) with sizeof(_PATH_DEV) - 1.ae2010-10-099-21/+21
| | | | | | Suggested by: kib Approved by: kib (mentor) MFC after: 5 days
* Allow the kernel to generate more spacy things and still have devdimp2010-10-091-0/+8
| | | | | | | | cope. Skip multiple spaces in a few contexts. PR: 96854 Submitted by: Shin'ya Kumabuchi MFC after: 1 week
* We can't zero out ggio request, as we have some fields in there we initializepjd2010-10-081-1/+0
| | | | | | | once during start-up. Reported by: Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 3 days
* We close the event socketpair early in the mainloop to prevent spaming withpjd2010-10-081-2/+4
| | | | | | | | error messages, so when we clean up after child process, we have to check if the event socketpair is still there. Submitted by: Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 3 days
* mdoc: drop redundant .Pp and .LP callsuqs2010-10-087-16/+0
| | | | They have no effect when coming in pairs, or before .Bl/.Bd
* Clear ggate structures before using them. We don't initialize all the fieldpjd2010-10-071-1/+4
| | | | | | and there can be some garbage from the stack. MFC after: 1 week
* Log error message when we fail to destroy ggate provider.pjd2010-10-071-1/+2
| | | | MFC after: 3 days
* Start the guard thread first, so we can handle signals from the very begining.pjd2010-10-071-3/+7
| | | | | Reported by: Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 1 week
* Don't close local component on exit as we can hang waiting on g_waitidle.pjd2010-10-071-6/+0
| | | | | | | | | I'm unable to reproduce the race described in comment anymore and also the comment is incorrect - localfd represents local component from configuration file, eg. /dev/da0 and not HAST provider. Reported by: Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 1 week
* Decrease report interval to 5 seconds, as this also means we will check forpjd2010-10-041-1/+1
| | | | | | signals every 5 seconds and not every 10 seconds as before. MFC after: 3 days
* hook_check() is now only used to report about long-running hooks, so thepjd2010-10-043-13/+3
| | | | | | argument is redundant, remove it. MFC after: 3 days
* We can't mask ignored signal, so install dummy signal hander for SIGCHLD beforepjd2010-10-041-0/+11
| | | | | | | | | | masking it. This fixes bogus reports about hooks running for too long and other problems related to garbage-collecting child processes. Reported by: Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 3 days
* Fix printing of the "rw" mount option in fstab(5) format (-p option).jh2010-09-301-12/+12
| | | | | | | | | fstab(5) format requires that one of "rw", "rq" or "ro" is always specified. PR: bin/123021 Reviewed by: keramida, rodrigc MFC after: 2 weeks
* Document recently added GPT attributes (bootme, bootonce, bootfailed) andpjd2010-09-281-1/+104
| | | | | | | list other schemes attributes. Reviewed by: simon, rpaulo MFC after: 2 weeks
* Remove superfluous word from "gpart bootcode" usage message.ae2010-09-261-1/+1
| | | | Approved by: kib (mentor)
* Plug memory leak on fork(2) failure.pjd2010-09-261-0/+1
| | | | | Submitted by: Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 3 days
* - Add support for loading passphrase from a file (-J and -j options).pjd2010-09-252-122/+257
| | | | | | | | | | This is especially useful for things like installers, where regular geli prompt can't be used. - Add support for specifing multiple -K or -k options, so there is no need to cat all keyfiles and read them from standard input. Requested by: Kris Moore <kris@pcbsd.org>, thompsa MFC after: 2 weeks
* Reported problem:mckusick2010-09-241-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Large (60GB) filesystems created using "newfs -U -O 1 -b 65536 -f 8192" show incorrect results from "df" for free and used space when mounted immediately after creation. fsck on the new filesystem (before ever mounting it once) gives a "SUMMARY INFORMATION BAD" error in phase 5. This error hasn't occurred in any runs of fsck immediately after "newfs -U -b 65536 -f 8192" (leaving out the "-O 1" option). Solution: The default UFS1 superblock is located at offset 8K in the filesystem partition; the default UFS2 superblock is located at offset 64K in the filesystem partition. For UFS1 filesystems with a blocksize of 64K, the first alternate superblock resides at 64K which is the the location used for the default UFS2 superblock. By default, the system first checks for a valid superblock at the default location for a UFS2 filoesystem. For a UFS1 filesystem with a blocksize of 64K, there is a valid UFS1 superblock at this location. Thus, even though it is expected to be a backup superblock, the system will use it as its default superblock. So, we have to ensure that all the statistcs on usage are correct in this first alternate superblock as it is the superblock that will actually be used. While tracking down this problem, another limitation of UFS1 became evident. For UFS1, the number of inodes per cylinder group is stored in an int16_t. Thus the maximum number of inodes per cylinder group is limited to 2^15 - 1. This limit can easily be exceeded for block sizes of 32K and above. Thus when building UFS1 filesystems, newfs must limit the number of inodes per cylinder group to 2^15 - 1. Reported by: Guy Helmer<ghelmer@palisadesys.com> Followup by: Bruce Cran <brucec@freebsd.org> PR: 107692 MFC after: 4 weeks
* Implement "force" (-F) option for gpart destroy verb.ae2010-09-242-15/+106
| | | | | | | | | | | | This option doesn't passed to kernel and handled in user-space. With -F option gpart creates new "delete" request for each partition in table. Each request has flags="X" that disables auto-commit feature. Last request is the original "destroy" request. It has own flags and can have disabled or enabled auto-commit feature. If error is occurred when deleting partitions, then new "undo" request is created and all changes will be rolled back. Approved by: kib (mentor)
* - Simplify code by using g_*() API.pjd2010-09-232-83/+62
| | | | | | | | - Don't use u_char and u_int in userland. - Change 'unsigned' to 'unsigned int'. - Update copyright years. MFC after: 1 week
* Update copyright years.pjd2010-09-231-1/+1
| | | | MFC after: 1 week
* Document AES-XTS.pjd2010-09-231-17/+34
| | | | MFC after: 1 week
* - When trashing metadata, repeat overwrite kern.geom.eli.overwrites times.pjd2010-09-231-12/+64
| | | | | | - Flush write cache after each write. MFC after: 1 week
* - Use g_*() API when doing backups.pjd2010-09-231-18/+12
| | | | | | - fsync() created filed. MFC after: 1 week
* Because we first write metadata into new place and then trash old place wepjd2010-09-231-0/+4
| | | | | | | don't want situation where old size is equal to new size, as we will trash newly written metadata. MFC after: 1 week
* - Make use of g_*() API.pjd2010-09-231-18/+13
| | | | | | - Flush cache after writing metadata. MFC after: 1 week
OpenPOWER on IntegriCloud