Commit Graph

14271 Commits

Author SHA1 Message Date
Devin Teske
0e30bd5b2e Add mustberoot.subr to the list of includes for scripts, exposing the helper
function f_mustberoot_init() to make it easy to write scripts that can more
easily transition to the super-user via sudo(8).
2013-07-05 01:37:35 +00:00
Devin Teske
dbc750a529 Remove separate processing of dependent packages from the "Review" screen
since f_package_add (packageAdd resword) processes dependencies itself.
NOTE: This is in preparation for incoming package management code.
2013-07-05 01:32:39 +00:00
Devin Teske
447dfc41b5 Get rid of place-holder in preparation for incoming package mgmt code. 2013-07-05 01:30:13 +00:00
Devin Teske
996caf2185 Comments. 2013-07-05 01:28:30 +00:00
Devin Teske
76ab5f3d5a Allow global default as general fall-back for package management routines. 2013-07-05 01:21:01 +00:00
Devin Teske
a0f49bbab3 Set name of device to directory path (displayed during package operations). 2013-07-05 01:18:54 +00:00
Rui Paulo
f05cddf940 Merge hostapd / wpa_supplicant 2.0.
Reviewed by:	adrian (driver_bsd + usr.sbin/wpa)
2013-07-04 21:12:58 +00:00
Devin Teske
424d0bad55 Implement $probe_only for the media access modules. sysinstall(8) was
allowed to ignore the probe_only argument of its member functions solely
because in the C language, the file accessor methods open and return a file
descriptor and reading of the data is optional. In shell, the file accessor
methods return data on stdout and that data should not be ignored (large
files could block execution).

So, we must adhere to the probe_only flags and in some cases (in the case of
FTP, for example) change the `get' strategy to simply test existence and
return an appropriate status.

This was required because the up-coming package management stuff makes heavy
use of the probe_only argument to try different package suffixes. Every
media access module must implement $probe_only for the `get' accessor.
2013-07-04 20:12:12 +00:00
Warren Block
3e01326432 Whitespace fixes: remove tabs on blank links, spaces following content,
tabs after spaces.

Reviewed by:	gjb
MFC after:	1 week
2013-07-04 18:59:58 +00:00
Warren Block
27f90bebef Put the power modes in a list to make them easier to find.
Reviewed by:	joel
MFC after:	1 week
2013-07-04 12:24:39 +00:00
Dag-Erling Smørgrav
d28832a05e Fall back to sha512 if passwd_format is not set.
MFC after:	3 days
2013-07-04 07:59:11 +00:00
Peter Grehan
a38e2a64dc Support an optional "mac=" parameter to virtio-net config, to allow
users to set the MAC address for a device.

Clean up some obsolete code in pci_virtio_net.c

Allow an error return from a PCI device emulation's init routine
to be propagated all the way back to the top-level and result in
the process exiting.

Submitted by:	Dinakar Medavaram    dinnu sun at gmail (original version)
2013-07-04 05:35:56 +00:00
Pawel Jakub Dawidek
6f691f7ee1 Sandbox rwhod(8) receiver process using capability mode and Capsicum
capabilities.

rwhod(8) receiver can now only receive packages, write to /var/rwho/ directory
and log to syslog.

Submitted by:	Mariusz Zaborski <oshogbo@FreeBSD.org>
Sponsored by:	Google Summer of Code 2013
Reviewed by:	pjd
MFC after:	1 month
2013-07-03 21:07:02 +00:00
Pawel Jakub Dawidek
223eee088f The whole sending functionality was implemented within signal handler,
which is very bad idea. Split sending and receiving in two processes,
which fixes this problem and will help to sandbox rwhod.

Submitted by:	Mariusz Zaborski <oshogbo@FreeBSD.org>
Sponsored by:	Google Summer of Code 2013
Reviewed by:	pjd
MFC after:	1 month
2013-07-03 21:04:20 +00:00
Pawel Jakub Dawidek
90173d7dc6 Style cleanups.
Submitted by:	Mariusz Zaborski <oshogbo@FreeBSD.org>
Sponsored by:	Google Summer of Code 2013
Reviewed by:	pjd
MFC after:	1 month
2013-07-03 20:58:58 +00:00
Dag-Erling Smørgrav
a05aa38cb1 There is no reason to disallow setting the password or account expiry
date to the current date.

MFC after:	3 days
2013-07-03 09:48:24 +00:00
Mikolaj Golub
7f87e7c276 hastResourceWorkerPid is read-only.
Submitted by:	jilles
MFC after:	3 days
2013-07-03 05:54:23 +00:00
Mikolaj Golub
e338dbe453 Add a mib for worker process ID.
MFC after:	3 days
2013-07-02 18:54:39 +00:00
Peter Grehan
34d244edb2 Fix up option parsing to allow a colon in the config section.
Clean up some other unnecessary code.

Submitted by:	Dinakar Medavaram    dinnu sun at gmail
Reviewed by:	neel
2013-07-01 23:53:22 +00:00
Rick Macklem
62869df0c8 Document the fact that an NFSv4 mount uses the host uuid to uniquely
identify the client to the server. As such, NFSv4 mounts
will break if host_enable="NO" is specified.
This is a content change.

Suggested by:	lars@netapp.com
MFC after:	3 days
2013-07-01 21:41:12 +00:00
Tim Kientzle
8f95d0d822 Fix -Wunsequenced
Submitted by:	dt71@gmx.com
2013-06-29 15:58:03 +00:00
Tim Kientzle
1d47232e08 Fix -Wunsequenced warning
Submitted by:	  dt71@gmx.com
2013-06-29 15:54:17 +00:00
David E. O'Brien
fd50eef304 sysconf(3) returns a long, not an int. 2013-06-29 00:37:49 +00:00
Davide Italiano
237abf0c56 - Trim an unused and bogus Makefile for mount_smbfs.
- Reconnect with some minor modifications, in particular now selsocket()
internals are adapted to use sbintime units after recent'ish calloutng
switch.
2013-06-28 21:00:08 +00:00
David E. O'Brien
c7328a9506 sysconf(3) returns a long, not an int. 2013-06-28 17:18:28 +00:00
Peter Grehan
4dfaf1bc08 Allow 8259 registers to be read. This is a transient condition
during Linux boot.

Submitted by:	tycho nightingale at pluribusnetworks com
Reviewed by:	neel
2013-06-28 06:25:04 +00:00
Peter Grehan
7554303627 Allow the PCI config address register to be read. The Linux
kernel does this. Also remove an unused header file.

Submitted by:	tycho nightingale at pluribusnetworks com
Reviewed by:	neel
2013-06-28 05:01:25 +00:00
Jung-uk Kim
0c10b85a19 Consistently cast ACPICA 64-bit integer types when we print them. 2013-06-26 23:52:10 +00:00
Devin Teske
c9c67103c3 More whitespace. 2013-06-24 20:58:54 +00:00
Devin Teske
b19b201996 Whitespace. 2013-06-24 20:39:07 +00:00
Eitan Adler
b3ff5e4561 Remove request to email suggestions and fixes to the author.
He is no longer involved with the FreeBSD project.

While here: remove "no known bugs" and related.  This isn't present in other manual pages.

PR:		docs/179914
2013-06-24 19:57:25 +00:00
Rick Macklem
d51dbb7a98 Document the "-o" option added by r252138.
MFC after:	10 days
2013-06-24 02:24:22 +00:00
Rick Macklem
c323438205 Add a new "-o" option to the gssd which forces gss_init_sec_context()
to use DES and the associated old style GSS initialization token.
This appears to be required for some non-FreeBSD servers to
get a kerberized NFS mount to work. Also, ignore some signals when daemonized,
which might fix the gssd from "disappearing" without leaving a core dump.
Given the tight timeframe for the FreeBSD9.2 release, I have
committed this while waiting for code review. I will commit
changes recommended by the review in a separate commit.

Reviewed by:	dfr (pending)
MFC after:	10 days
2013-06-24 02:19:23 +00:00
Devin Teske
edc9198c33 Add a newline character to the end of the "Check URL again" error message
because long URLs do not induce extra height despite wrapping by dialog(1).
NOTE: For even longer lines, the cursor up/down keys work to scroll through
2013-06-23 10:51:26 +00:00
Devin Teske
47b73aa2c1 Merge r248313 from stable/9 sysinstall(8) to head bsdconfig(8):
Add support for installation directly via HTTP.

While we're here, remove the menu-item for Passive FTP (since moving to
ftp(1) and switching FTPMODE to `auto' by default -- see r251613 -- the
single remaining FTP menu-item works for both ftp.f.o and ftp-archive.f.o;
previously each requiring separately active versus passive both work with
the `auto' setting). In scripting you still have mediaSetFTPActive and
mediaSetFTPPassive but the remaining FTP menu-item uses mediaSetFTP which
defaults to `auto' (aforementioned SVN r251613).
2013-06-23 10:48:26 +00:00
Devin Teske
5ffdcd4c61 Implement the $probe_only parameter (previously unimplemented). 2013-06-23 10:04:23 +00:00
Devin Teske
6a18711a00 Fine-tune the parsing of the URL. Re-order, comment, and add debugging to
each case of unique URL format.
2013-06-23 09:41:47 +00:00
Devin Teske
a7408e5cc1 Fix a code typo that prevented the probing of the current defaultrouter
in-order to pre-populate the editor.
2013-06-22 03:54:17 +00:00
Devin Teske
24365ecc72 Oops, previous revision (r252084) broke non-full-path resolution (e.g.,
ftp://ftp.freebsd.org or ftp://ftp.freebsd.org/). Now both full-path and
non-full resolution is working regardless of trailing-slash.
2013-06-22 03:50:14 +00:00
Devin Teske
ffd2e04e32 Trim the trailing `/' from the ftp_dir when validating that the directory
exists on the FTP server. This now means that when you specify a full-path
to the repository on the FTP server that it doesn't matter whether you have
a trailing `/' or not.
2013-06-22 03:44:49 +00:00
Devin Teske
2c2a50fde6 Take advantage of the fact that f_getvar evaluates the $var_to_get parameter
within braces, allowing all manner of parameter expansions (properly quoted
or escaped, of course).
2013-06-22 02:57:52 +00:00
Devin Teske
4ef0123eb7 Fix a regression introduced by r251967, resulting in:
/usr/libexec/bsdconfig/110.mouse/mouse: 134:
Syntax error: ";;" unexpected (expecting "fi")
2013-06-22 02:51:22 +00:00
Devin Teske
a0d3f1e5bc Fix a regression introduced by r251967, resulting in:
/usr/libexec/bsdconfig/080.console/console: 136:
Syntax error: ";;" unexpected (expecting "fi")
2013-06-22 02:47:54 +00:00
Devin Teske
03104918fe Add missing local declaration. 2013-06-21 23:21:16 +00:00
Devin Teske
bb470eb314 Remove unused library include. 2013-06-21 23:18:29 +00:00
Devin Teske
1de60ff0f4 Alphabetize library includes. 2013-06-21 23:13:55 +00:00
Devin Teske
66badff968 Style. 2013-06-21 22:53:51 +00:00
Devin Teske
5b3821c01c Typo and grammar fixes to comments. 2013-06-21 22:47:31 +00:00
Devin Teske
403c4b46e0 Fix a code typo in a case-statement match expression that prevented IPv6
URLs with port designator from working properly (e.g. http://[::1]:80/).
2013-06-20 07:29:42 +00:00
Devin Teske
e269422b91 When the fall-back of a case-statement is the last thing executed in a
while-loop _and_ all prior matches in the same case-statement either break
or continue, we can safely break the fall-back out of the case-statement.
This should improve readability and allow for longer-lines by reducing the
level of indentation by-one for the fall-back case.
(a continuation of SVN r252019)
2013-06-20 05:51:44 +00:00
Devin Teske
fd3d4fec40 When the fall-back of a case-statement is the last thing executed in a
while-loop _and_ all prior matches in the same case-statement either break
or continue, we can safely break the fall-back out of the case-statement.
This should improve readability and allow for longer-lines by reducing the
level of indentation by-one for the fall-back case.
2013-06-20 05:48:08 +00:00
Devin Teske
a0b423e1f7 Remove pedanticism and consolidate some logic. 2013-06-20 05:42:21 +00:00
Devin Teske
3b1f7d9e5d Add debugging (for a case that shouldn't arise, but makes it more obvious
if a menu addition is made in one plce but forgotten in another).
2013-06-20 05:40:11 +00:00
Devin Teske
1a13494575 Style -- no ;; needed on fallback clause within case-statement. 2013-06-19 18:44:55 +00:00
Devin Teske
ba44a0d54a Whitespace. 2013-06-19 18:32:18 +00:00
Devin Teske
f4a3220ca1 Whitespace and comments. 2013-06-19 18:13:58 +00:00
Devin Teske
3daac03bb7 Alphabetize reserved-word (resword) registration. 2013-06-19 17:14:59 +00:00
Devin Teske
fa8b43c808 Alphabetize includes. 2013-06-19 17:13:16 +00:00
Devin Teske
e52257af13 Remove extra whitespace lines. 2013-06-19 00:24:08 +00:00
Devin Teske
9cd8fcc642 Change a humongous if-statement at the end of f_install_zoneinfo_file() into
an early return, allowing a huge chunk of code to be indented one-level less
2013-06-19 00:13:54 +00:00
Devin Teske
b17d3670ee Take advantage of newly updated f_dialog_{yesno,noyes}() functions from
SVN r251977 (adding an $hline parameter).
2013-06-19 00:09:21 +00:00
Devin Teske
b4dc08d45d When I first wrote the timezone module, it was in sysutils/tzdialog and it
pre-dates bsdconfig. Update the code to take advantage of f_dialog_msgbox().
2013-06-19 00:08:29 +00:00
Devin Teske
68d5c9afb9 Change the f_dialog_{yesno,noyes}() function-arguments in `dialog.subr' to
accomodate an $hline value for overriding the default. This change does
not effect any current modules as it turns out that not one single usage of
either f_dialog_yesno() or f_dialog_noyes() relied on accepting more than a
first argument (read: all occurrences quoted the first parameter; so $* was
never depended upon).

This will allow some custom invocations of --yesno and --noyes to roll over
to these functions (for example, in `timezone/timezone').
2013-06-18 23:48:05 +00:00
Devin Teske
aaeba1c1ea Perform some code consolidation and replace nested case-statements with
more logical if-else statements for each menu selection.
2013-06-18 23:18:32 +00:00
Devin Teske
fcd71b75c9 Fix a regression introduced by r251967, resulting in:
/usr/libexec/bsdconfig/140.startup/startup: 130:
Syntax error: ";;" unexpected (expecting "fi")
2013-06-18 23:14:45 +00:00
Devin Teske
229efb37dc Whitespace. 2013-06-18 23:11:36 +00:00
Devin Teske
df750a6ced Perform some code consolidation and add some additional error
checking/reporting. (similar to SVN revisions 251919 and 251928)
2013-06-18 21:44:35 +00:00
Devin Teske
7cdf48fc2c Comments. 2013-06-18 21:35:38 +00:00
Devin Teske
0071dbd1cd Comments and whitespace. 2013-06-18 09:54:09 +00:00
Devin Teske
997cf00a16 Comments. 2013-06-18 09:45:10 +00:00
Devin Teske
d7d2d8039a Perform some code consolidation and add some additional error
checking/reporting. (similar to SVN revision 251919)
2013-06-18 09:43:10 +00:00
Devin Teske
dee8ed370d Whitespace and comments. 2013-06-18 09:41:34 +00:00
Devin Teske
23fb944196 Perform some code consolidation and add some additional error
checking/reporting. (similar to SVN revisions 251905 and 251915)
2013-06-18 09:28:49 +00:00
Devin Teske
d6abc28bf4 Remove unnecessary loops, perform some code consolidation, and add some
additional error checking/reporting. (same thing going on here as SVN
r251905 -- just this time for the mouse module instead of console)
2013-06-18 09:19:59 +00:00
Devin Teske
f1edae9451 Whitespace. 2013-06-18 09:05:08 +00:00
Devin Teske
131502c303 Use newly enhanced f_dialog_msgbox() from SVN r251912. 2013-06-18 08:59:47 +00:00
Devin Teske
5a97d36067 Change the f_dialog_msgbox() arguments in `dialog.subr' to accomodate an
$hline argument for setting the --hline parameter value. This change does
not effect any current modules as it turns out that not one single usage of
f_dialog_msgbox() relied on accepting more than a first argument (read: all
occurrences quoted the first parameter; so $* was never depended upon).

This will allow some custom invocations of --msgbox to roll over to this
function (for example, in `mouse/disable').
2013-06-18 08:54:02 +00:00
Devin Teske
55bce0c120 Comments. 2013-06-18 08:40:16 +00:00
Devin Teske
c9e7fcd366 Comments. 2013-06-18 08:35:44 +00:00
Devin Teske
274282c82b Fix a typo in a comment. 2013-06-18 08:30:31 +00:00
Devin Teske
97e0eecaf3 Switch bsdconfig Disk Management' from sade(8) to bsdinstall partedit'. 2013-06-18 08:28:03 +00:00
Devin Teske
8de4fc8d23 Oops, in SVN r251905 I forgot that f_die takes the return code as the first
argument (not the format).
2013-06-18 08:22:51 +00:00
Devin Teske
6dcefcac2b Improve the INDEX format. Whitespace improvements, format improvements, typo
and grammatical fixes.
2013-06-18 08:15:56 +00:00
Devin Teske
a67f39c51a Remove unnecessary loops, perform some code consolidation, and add some
additional error checking/reporting.
2013-06-18 07:36:09 +00:00
Devin Teske
c3ffa2ba18 Whitespace improvements. 2013-06-18 07:33:45 +00:00
Baptiste Daroussin
76f8eb196c Fix bindings of keys when in the partition editor. By adding the usual input binding to the "partlist" sub window.
This is a workaround, as for unknown yet reason the keys binded on the Partition Edition window are the one from partlist instead of the one from standard "formfield"

Reported by:	alfred, nwhitehorn
2013-06-17 15:16:14 +00:00
Devin Teske
65c7c08716 Style/comments. 2013-06-15 13:38:21 +00:00
Devin Teske
c6f73e3099 Add skeleton processing of selected packages in the order in which they
should be processed. De-select each package as we "process" (actual
processing still pending) each package so that if we get an error, we can
return to an accurate state of selected packages.
2013-06-14 19:35:30 +00:00
Devin Teske
f184cec5a9 Make the default choice for FTP media access use "auto". 2013-06-11 03:37:29 +00:00
Devin Teske
641cb9ccd9 Fix a bug introduced by r251236; product of bug was the following error in
"Startup"->"View/Edit Startup Configuration"->"Add New"->"Add From List":

[: -eq: unexpected operator

NOTE: Previously mentioned in r251557

Problem caused by removal of $retval to capture exit status of call to
f_dialog_input_rclist().

While we're here, enhance f_dialog_input_rclist() to accept a default-item
to make selecting multiple values to-add more efficient.
2013-06-09 15:36:13 +00:00
Baptiste Daroussin
8ad6d9175c Fix a bad calloc(3) call
MFC after:	2 weeks
2013-06-08 23:48:13 +00:00
Devin Teske
d7b85d2789 Fix a bug introduced with r251190, in which a small hunk was forgotten in
the performance conversion process.

The effect of this was the following error when selecting the menu
"Startup"->"View/Edit Startup Configuration"->"Add New"->"Add From List":

[: -eq: unexpected operator

By running `bsdconfig -d' as root to enable debugging, this turns into:

DEBUG: f_getvar: var=[text] value=[
Error: Expected a number for token 4 of --menu.
Use --help to list options.] r=0
[: -eq: unexpected operator

Indicating that the fourth token for --menu which should be $height was
instead a string (the first item of $menu_list) because it was using the
old size-calculation method and $size was now null (needed to use instead
the new size variables of $height $width and $rows).
2013-06-08 21:45:32 +00:00
Devin Teske
04d380df0c Fix a bug introduced with r249751, in which a small hunk was forgotten in
the performance conversion process.

The effect of this was, when your /etc/defaults/rc.conf file changed
(based on md5(1)) and re-generating the file startup_rcconf_map.cache in
/var/run/bsdconfig/ you would get a screen-dump of its contents before the
menu would appear.
2013-06-08 21:33:09 +00:00
Devin Teske
9039c2f6f7 Fix a typo in comments. 2013-06-08 21:11:26 +00:00
Devin Teske
2d0797c6dd Don't silently ignore errors (found while
testing with `chflags schg /etc/ttys).
2013-06-08 20:47:43 +00:00
Devin Teske
f5e1223b85 Prevent getting hung-up on the following prompt (found while testing with
`chflags schg /etc/ttys'):

override rw-r--r--  root/wheel for /etc/ttys? (y/n [n])

Simply by adding `-f' flag to mv(1).
2013-06-08 20:43:13 +00:00
Devin Teske
5e66bd88c9 Fix a one-character typo. The effects of which were "Console"->"Ttys" menu
would not launch (and gave no error). This was easily diagnosed by running
`bsdconfig -d' as root and seeing the following error right after selecting
the "Ttys" sub-menu:

DEBUG: f_getvar: var=[text] value=[
Error: Expected at least 6 tokens for --menu, have 4.
Use --help to list options.] r=0

Typo was introduced by SVN r251361.
2013-06-08 20:27:16 +00:00
Devin Teske
9b897ae786 Add a prompt to the "Add User" and "Add Group" sub-menu items (under the
"Login Management" module): Use default values for all account details?

If you select "Yes" (the default is "No"), you'll jump past all the prompts
and jump straight to the review screen with all-default values.

Makes adding a lot of users/groups faster/easier if you don't need to
customize more than one or two different values from their defaults.
2013-06-08 19:13:49 +00:00
Devin Teske
528318ae53 Curb another regression (this one introduced by r251545, itself trying to
fix the regression introduced by r251544; which was trying to make things
consistent w/respect to ESC versus YES versus NO in the password disable
prompt in "Login Management".

(need stronger coffee; very sorry for the churn)

With this revision, the "YES", "NO", and implied ESC options all work as-
expected. Choosing "YES" allows you to proceed and the password will be
disabled. Choosing "NO" will bring back around to enter a password for the
account. Pressing ESC will drop you out of either user or group input and
back to the usermgmt screen.
2013-06-08 18:23:41 +00:00
Devin Teske
350db06539 Fix a regression introduced by r251544; if user chooses "NO" when being
asked if they would like to disable password authentication for the account,
loop back to prompt them for the password again.
2013-06-08 18:13:42 +00:00