Commit Graph

13547 Commits

Author SHA1 Message Date
Isabell Long
7c6257cffe Document all of the options that wpa_supplicant accepts.
PR:		docs/171755
Reviewed by:	gavin
Approved by:	gabor (mentor)
MFC after:	5 days
2012-11-07 15:47:36 +00:00
Xin LI
652c42600b Replace log(3) with flsll(3) for watchdogd(8) and drop libm dependency.
MFC after:	2 weeks
2012-11-03 18:38:28 +00:00
Simon J. Gerraty
31c0b21fed If no contents keyword is specified, the default for files is
the named file.

Approved by:	marcel (mentor)
2012-11-03 00:10:30 +00:00
Baptiste Daroussin
fb2db03194 Teach pw(8) about how to use pw/gr API to reduce code duplication
MFC after:	2 months
2012-10-30 08:00:53 +00:00
Tim Kientzle
5db4d6779f Clarify a warning message. 2012-10-29 03:31:22 +00:00
Devin Teske
c0d1bdc0b4 Fix bug introduced by r241902 (MANIFEST uses TAB delimiter).
PR:		bin/173140
Approved by:	adrian (co-mentor)
2012-10-27 19:56:57 +00:00
Eitan Adler
e8c6172f10 While 'make universe' passed this didn't work with clang.
This reverts r242120

Submitted by:	Jan Beich
Approved by: cperciva (implicit)
2012-10-26 20:25:05 +00:00
Devin Teske
724b4bfdf1 Resurrect and integrate stable/9/usr.sbin/sysinstall/help/usermgmt.hlp
Approved by:	adrian (co-mentor) (implicit)
2012-10-26 03:20:04 +00:00
Eitan Adler
b28f446886 This utility builds without NO_WCAST_ALIGN
Tested with make universe

No objections from:	stas
Approved by:	cperciva
MFC after:	3 days
2012-10-26 02:50:16 +00:00
Devin Teske
ffb5f4541b Remove unnecessary quotation to clean things up.
Approved by:	adrian (co-mentor) (implicit)
2012-10-26 02:50:14 +00:00
Devin Teske
04308bcd13 Don't mask fwe(4) lp(4) or plip(4) devices from ifconfig(8) list.
Approved by:	adrian (co-mentor) (implicit)
2012-10-26 02:49:12 +00:00
Devin Teske
198a44b55d Resurrect and integrate stable/9/sysinstall/help/tcp.hlp
Approved by:	adrian (co-mentor) (implicit)
2012-10-26 02:45:29 +00:00
Devin Teske
de8fd13b91 Tighten-up displays that use a NULL prompt (e.g., networking and usermgmt).
Approved by:	adrian (co-mentor) (implicit)
2012-10-26 01:47:59 +00:00
Devin Teske
254917d4fe Fix copy/paste error.
Approved by:	adrian (co-mentor) (implicit)
2012-10-26 00:46:09 +00:00
Devin Teske
40dfc82d35 Switch from using a msgbox to display help files to a textbox instead. The
problem with using a msgbox was one of truncation in the case of Xdialog(1)
and lack of screen real-estate (since the msgbox is not scrollable in X11
while a textbox is).

The textbox renders the text much better and is more appropriate for this
type of data display.

Approved by:	adrian (co-mentor) (implicit)
2012-10-26 00:31:25 +00:00
Maxim Sobolev
7a5c30c5b6 Second attempt to add @every_second keyword support. Due to multiple
requests, default to the previous 60-seconds scheduling method
unless there is any @every_second entries to conserve CPU cycles and
power.

This change also improves scheduling in the default mode by running
as close to the beginning of the minnute as possible by replacing
sleep(3) with nanosleep(2). Previously, the tasks would run anywhere
within the first second of the minute and that offset drifted back
and forth each time cron(8) was engaged.

MFC after:	1 month
2012-10-25 22:54:29 +00:00
Devin Teske
9c6cbb8aad When Xdialog(1) is passed a NULL argument to its `--help' option, Xdialog(1)
acts like dialog(1) in that it returns exit status 2 when the help button is
chosen.

Approved by:	adri (co-mentor) (implicit)
2012-10-25 21:04:11 +00:00
Ed Schouten
6511bcb8c0 Let lpr build with -Wmissing-variable-declarations.
Mark variables static where possible and place the uid/euid variables in
lp.h, so that we can compile-time enforce that these variables have the
same type.
2012-10-25 20:16:38 +00:00
Jim Harris
ff473561da For PCI Express capability, if max link width is greater than zero, print
the current and max link speed.

Sponsored by:	Intel
Discussed with:	jhb
MFC after:	1 week
2012-10-25 17:22:37 +00:00
Eitan Adler
c47775a2f9 PRIV_START and PRIV_END were reversed.
Submitted by:	KAHO Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>
Approved by:	secteam (simon)
MFC after:	3 days
2012-10-24 16:03:05 +00:00
Eitan Adler
ba8999e989 Avoid changing IFS in a global context as this can sometimes cause
errors later on.

PR:		bin/172715
Submitted by:	Matthew D.Fuller <fullermd@over-yonder.net> (older
version)
Submitted by:	dteske
Approved by:	cperciva
MFC after:	1 week
2012-10-24 12:49:03 +00:00
Ken Smith
16ddaa3467 Add the release package directory for 9.1-RELEASE. 2012-10-24 01:42:46 +00:00
Devin Teske
4ca6fb657e Optimize syntax to use builtins and reduce unnecessary forking where possible.
Reviewed by:	nwhitehorn
Approved by:	adrian (co-mentor)
2012-10-22 18:14:27 +00:00
Devin Teske
1459925049 Resurrect usage.hlp and securelevel.hlp from sysinstall(8) and integrate them
into bsdconfig(8).

Approved by:	adrian (co-mentor) (implicit)
2012-10-22 18:01:38 +00:00
Eitan Adler
1d1d4a4727 Check the return error of set[ug]id. While this can never fail in the
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
2012-10-22 03:31:22 +00:00
Eitan Adler
521aea7c30 Fix typo in error when unable to create TCP socket
PR:		bin/172490
Submitted by:	bdrewery
Approved by:	cperciva
MFC after:	3 days
2012-10-22 03:16:32 +00:00
Eitan Adler
50e04779c4 Check the return error of set[e][ug]id. While this can never fail in the
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
2012-10-22 03:07:05 +00:00
Eitan Adler
db702c59cf remove duplicate semicolons where possible.
Approved by:	cperciva
MFC after:	1 week
2012-10-22 03:00:37 +00:00
Eitan Adler
529d9f352a Warn users when using pkg tools if it looks like they
be be pkgng users.

Reviewed by:	bapt (earlier version)
Reviewed by:	kwm
Approved by:	cperciva
MFC after:	3 days
2012-10-22 02:12:20 +00:00
Eitan Adler
d3522c026f Fix conditional expression: previously a bit vector was being operated
on by a logical not instead of the entire expression.

Approved by:	cperciva
MFC after:	3 days
2012-10-22 02:12:15 +00:00
Ed Schouten
59f3e1891c Move uniq() prototype into extern.h. 2012-10-20 10:34:55 +00:00
Ed Schouten
eccad22277 More -Wmissing-variable-declarations fixes.
In addition to adding missing `static' keywords:
- bin/dd: Pull in `extern.h' to guarantee consistency with source file.
- libexec/rpc.rusersd: Move shared globals into an extern.h.
- libexec/talkd: Move `debug' and `hostname' into extern.h.
- usr.bin/cksum: Put counters in extern.h, as they are used by ckdist/mtree.
- usr.bin/m4: Move `end_result' into extern.h.
- usr.sbin/services_mkdb: Move shared globals into an extern.h.
2012-10-20 10:33:15 +00:00
Ed Schouten
186475e2dd Remove redundant code.
Both mfi_flash.c and mfi_show.c contain very similar functions to print
a list of firmwares. Move these routines into mfiutil.c.

Reported by:	jhb
2012-10-20 10:20:06 +00:00
Warner Losh
db85bb0492 Indent ecaps the same way we indent caps.
MFC after:	3 days
2012-10-19 22:48:22 +00:00
Ed Schouten
bf70becee6 More -Wmissing-variable-declarations fixes.
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'.
2012-10-19 14:49:42 +00:00
Ed Schouten
39893d565a Add missing const keywords. 2012-10-19 14:29:03 +00:00
Devin Teske
6e0adcda1f More-accurately replicate the help system from sysinstall(8). However, also
improve upon the system by giving the user a "Help" button instead of requiring
the user to press F1.

NOTE: In FreeBSD-9 and higher, dialog(1) does not support the F1 hook, so the
      mechanism for providing help to the user had to be changed to a button.

This now means we can resurrect *.hlp files from usr.sbin/sysinstall/help/ as-
is and reusing them as-needed in bsdconfig (holding to the goal of losing as
little functionality from sysinstall as possible).

Reviewed by:	adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-10-18 18:43:54 +00:00
Devin Teske
7fba6f489e Fix a bug where blank lines were not being counted (because awk's split()
function returns zero when $0 is the NULL string).

Reviewed by:	adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-10-18 17:09:45 +00:00
Maksim Yevmenkin
2dcf7e97da make sure that socket's send and receive buffers are properly sized
Submitted by:	Iain Hibbert plunky at rya-online dot net
MFC after:	3 weeks
2012-10-18 16:34:00 +00:00
Attilio Rao
2e564269d0 Disconnect non-MPSAFE SMBFS from the build in preparation for dropping
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.
2012-10-18 12:04:56 +00:00
Devin Teske
7f72bb4405 Fix typo.
Reviewed by:	adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-10-18 07:55:09 +00:00
Maxim Sobolev
27858d0bb4 Fully backout latest changes.
Pointy hat to:	sobomax
2012-10-18 06:27:03 +00:00
Devin Teske
9da4528e6f Ask to become root via sudo(8) and give user ability to save this preference.
Reviewed by:	adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-10-17 21:48:45 +00:00
Maxim Sobolev
8675ac22d6 Remove harmless, but superfluous local change that creeped in along
with the r241649.
2012-10-17 21:26:35 +00:00
Maxim Sobolev
07e9aac098 Revert latest changes to cron, until better version is worked out (I hope).
Requested by:   few
2012-10-17 20:45:48 +00:00
Attilio Rao
e6116d5b8e Disconnect non-MPSAFE NWFS from the build in preparation for dropping
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.
2012-10-17 11:16:17 +00:00
Maxim Sobolev
7bd028861b o Use nanosleep(2) to sleep exact amount of time till the next second,
not multiple of 1 second, which results in actual time to drift back
and forth every run within 1 second of the actual action has
been set for.

Suggested by:   Ian Lepore

o Schedule the first run in 1 second after starting up, not on the
boundary of the next minute, which results in the every_second jobs
not being run.
2012-10-17 00:44:34 +00:00
Maxim Sobolev
890278c188 Properly handle non-keyword case by setting e->second to 0. 2012-10-16 21:34:02 +00:00
Attilio Rao
55793cdccf Disconnect non-MPSAFE PORTALFS from the build in preparation for dropping
GIANT from VFS.

This is not targeted for MFC.
2012-10-16 09:59:10 +00:00
Maxim Sobolev
2543786a37 Add per-second scheduling into the cron(8). Right now it's
only available via the new @every_second shortcut. ENOTIME to
implement crontab(5) format extensions to allow more flexible
scheduling.

In order to address some concerns expressed by Terry Lambert
while discussing the topic few years ago, about per-second cron
possibly causing some bad effects on /etc/crontab by stat()ing
it every second instead of every minute now (i.e. atime update),
only check that database needs to be reloaded on every 60-th
loop run. This should be close enough to the current behaviour.

Add "@every_minute" shortcut while I am here.

MFC after:	1 month
2012-10-15 08:21:49 +00:00