Commit Graph

11127 Commits

Author SHA1 Message Date
msaitoh
abce3ee962 Update CPUID signature values from the latest Intel SDM.
- Core M-5xxx
- Core i7 extreme
- Future Core (0x4e)
- Future Xeon (0x56)
2014-09-09 15:14:39 +00:00
martin
3c93e210ff Make msdosfs time conversion use the y/m/d/h/m/s conversion functions
from clock_subr.c and compile that into the userland (and tools)
makefs as well.
2014-09-01 09:09:47 +00:00
manu
5b31193998 read and write commands for pcictl, from riastradh@ and wiz@
http://mail-index.netbsd.org/tech-kern/2014/08/26/msg017572.html
2014-09-01 07:11:19 +00:00
wiz
12e2372174 Sort options. 2014-08-31 09:59:08 +00:00
mrg
8865fe7c92 add -N option to print the driver name as returned by pci_drvname(3). 2014-08-31 09:16:54 +00:00
wiz
23f0d17f09 Use more appropriate macro for command line command argument. 2014-08-26 16:21:15 +00:00
martin
551f6cb995 Make sure to not dereference a NULL pointer. 2014-08-19 13:44:31 +00:00
martin
7a7d59f635 Cosmetic changes trying to appease coverity scan. 2014-08-19 13:41:08 +00:00
martin
722a22e445 Check return values from stat before comparing contents of the result
structures. Pointed out by coverity scan.
2014-08-19 13:36:04 +00:00
martin
3221cb6f7f if chdir() fails, try chdir / 2014-08-19 13:30:32 +00:00
martin
ffc1983074 Make an invariant more clear to avoid fals positives from coverity scan 2014-08-19 13:26:27 +00:00
martin
fe0740f823 Check return value from getenv() before using the value. Pointed out by
coverity scan.
2014-08-19 13:04:45 +00:00
martin
14d42b6c1e Make sure the interface name is 0 terminated, pointed out by coverity scan. 2014-08-19 13:01:48 +00:00
martin
36f4a5867f Remove (accidently) duplicated code - pointed out by coverity scan. 2014-08-19 06:49:21 +00:00
martin
eee31b641f Remove duplicate fclose(), pointed out by coverity scan. 2014-08-19 06:47:15 +00:00
jnemeth
e0eccc7b53 - when checking hostname of incoming remote messages, fallback to checking
remote host if the message doesn't contain a hostname
- don't truncate IP addresses when reading syslogd.conf
2014-08-18 05:21:16 +00:00
manu
440aad5bad Remove a warning that happens when the filesystem cleanly exits. Just
display a message when running in debug mode.
2014-08-16 16:32:04 +00:00
jmcneill
6fcbb74223 remove trailing colon from "addusername" msg 2014-08-15 22:58:11 +00:00
skrll
46ef4b0409 Report super speed devices. From Takahiro HAYASHI. 2014-08-12 13:40:07 +00:00
apb
94b079ef04 In get_makevar, ask make to recursively expand the variable,
not just print the unexpanded value.  This is done by
using make -V '${VAR}' instead of make -V 'VAR'.
2014-08-12 09:12:18 +00:00
apb
02561653c9 Quoting fixes in several eval commands. 2014-08-12 08:32:43 +00:00
apb
1bbb38d5f6 Check for and delete ${DEST_DIR}/@RUNDIR@, not /@RUNDIR@.
Also remove an unnecessary eval in do_dhcpcdrundir and
fix a typo in the description.
2014-08-12 08:28:04 +00:00
rmind
670c10ba87 - Add and use npf_alg_export().
- npf_conn_import: handle NAT metadata correctly.
- npf_nat_newpolicy: restore the policy ID.
- npfctl_load: fix error code handling for the limit cases.
- npf_config_import: fix the inverted logic.
- npfctl_load: improve error handling.
2014-08-11 23:48:01 +00:00
roy
f356508f3e FONTCONFIG_DIR not existing does not need to be fixed. 2014-08-11 12:49:01 +00:00
riz
db9fae484c Use installboot to install bootblocks for i386/amd64, now that
they are included on all boot media.

Some of the previous method of setting the console (and conspeed, when
using serial console) is retained, but it should probably be reworked.

Also, adapt to the fact that we may be installing to a disk wedge.

With this change, it is now possible (but still ugly) for sysinst to
create a bootable GPT-labeled disk.
2014-08-11 00:31:22 +00:00
rmind
d0850273a2 - Add npf_ruleset_export(), npf_rule_export() and npf_nat_policyexport().
- Split off npf_conn_export().  Add npf_ifmap_getname() and use it to save
  the interface name; pick it up on npf_conn_import().
- Misc fixes.  Bump NPF_VERSION.
2014-08-10 19:09:43 +00:00
tls
ea6af427bd Merge tls-earlyentropy branch into HEAD. 2014-08-10 16:44:32 +00:00
riz
ede85da57f Clean up comments. No functional changes. 2014-08-08 20:59:35 +00:00
riz
6a3b8676d9 Most GPT fields are 64-bit quantities, so use 64-bit types to store.
Don't try to assign negative values to unsigned quantities.
Use strtouq(), not atoi(), to read 64-bit values.

Booting from an installed GPT-labelled disk still doesn't work,
but at least sysinst doesn't crash as soon as a GPT is created.
2014-08-08 20:24:27 +00:00
joerg
0d704fc1a2 Make it a warning, otherwise the missing noreturn will fail the build. 2014-08-06 12:34:42 +00:00
martin
8b3edf2fa9 Do not install message catalogs 2014-08-06 12:16:12 +00:00
martin
169405fcaa Remove a few menu entries if raid/lvm/cgd/gpt are not available. 2014-08-06 10:03:49 +00:00
martin
438e08f560 Make sysinst use the catalog files installed in /usr/share/sysinst (if
available), fall back to . if not, or use build-in english otherwise.
2014-08-06 09:11:46 +00:00
martin
50357e6f8b Install language files 2014-08-05 18:46:04 +00:00
martin
e0a0745c3d Avoid comparision between array and NULL 2014-08-05 08:39:39 +00:00
apb
f80058aa23 Synchronise several shell_quote implementations, and:
* Elide some unnecessary pairs of quotation marks, to improve readability.
  For example, shell_quote "''" is now \'\' instead of ''\'''\'''.
* Don't add quotes around words that contain only safe characters,
  to improve readability.
* LC_COLLATE=C to prevent [a-zA-Z] from matching non-ASCII characters.
* Use ${SED} if defined.
2014-08-04 21:56:30 +00:00
martin
037e685afe Adapt to extended partitioning support 2014-08-04 08:59:28 +00:00
martin
c5d76a21ae Rename the "exit" option in the "select your installation" menu into
"Abandon installation" to make clear it is fatal - suggested by
Andreas Gustafsson.
2014-08-04 08:50:13 +00:00
mrg
dba5edb2f6 for the !tmpfs case, ensure that pm_with_swap is initialised. 2014-08-04 04:20:01 +00:00
martin
4b2364d962 (Finally) merge a slightly modified version of the 2012 GSoC results
from Eugene Lozovoy: add extended partitioning options to sysinst.
Still needs some testing and polishing, but it now is possible to use GPT
or to create a RAID set from scratch and install onto it.
2014-08-03 16:09:38 +00:00
rmind
c2b1c6cc23 Cross-link npf(7). 2014-08-03 00:02:56 +00:00
rmind
b8d1dbad64 NPF: add a general npf(7) manual page. Improved by wiz@. 2014-08-02 23:57:40 +00:00
wiz
fc7115c3f4 Fix an off by one bug in apropos.
The bug is in the html output where some garbage characters are
seen in the context match output.

From Abhinav Upadhyay in PR 49058.
2014-08-01 12:55:00 +00:00
dholland
e3566c1bef Fix illegal snprintf usage noted in PR 47976 by simplifying it away:
instead of consing up a string and printing it to stdout, just print
to stdout. Not as compositionally tidy, but much simpler and perfectly
adequate here.
2014-07-27 04:46:48 +00:00
dholland
d78881479c Fix broken snprintf usage; noted in PR 47976 from Henning Petersen.
As a bonus, this removes the nonliteral format arguments.
2014-07-27 04:38:03 +00:00
dholland
4808d892e4 Add a dummy sysinst architecture for ports that don't have their own yet.
This makes the presence of sysinst in /usr/sbin MI (as intended) --
remember that one of the goals is for sysinst to be able to install
chroots, and installing a chroot is a sensible operation on all ports,
even those for which an installer per se might not make sense.

Currently this dummy architecture fails instead of doing anything, but
as they say, one thing at a time.
2014-07-26 19:56:30 +00:00
dholland
29ed33b85f Descend into sysinst. 2014-07-26 19:32:37 +00:00
dholland
e52187bbbb Update for building in usr.sbin. 2014-07-26 19:32:22 +00:00
dholland
50dbef1a09 Move sysinst sources to usr.sbin.
This commit only physically moves the sources - there are no other
changes, to maximize the probability that this will be treated as a
rename if we ever do manage to migrate away from CVS.

Moving sysinst has been discussed on and off for years and has two
goals: making it easier to work on sysinst, and also making sysinst
available on running systems for use installing chroots and VM images
and other such things. None of the latter is possible yet, but as they
say, one thing at a time.

Doing this now was approved in an impromptu fashion by mrg, riz,
riastradh, me, and groo.
2014-07-26 19:30:39 +00:00
msaitoh
128822ca6e More update:
- Future Atom E3000, Z3000 (0x4a, 0x5a, 0x5d)
- Atom C2000 (0x4d)
2014-07-25 14:18:49 +00:00
msaitoh
3d4f4e180c Update table for processor families and processor number series from the
latest Intel SDM.
- Atom Z3000 (0x37)
- Core M based on Broadwell (0x3d)
- Next gen Xeon based on Haswell (0x3f)
2014-07-25 13:52:26 +00:00
htodd
c1a007a161 Build fix (use error when defined). 2014-07-23 05:00:38 +00:00
rmind
a02b7176fb NPF: rework of the connection saving and restoring:
- Add support for saving a snapshot of the current connections together
  with a full configuration.  Support a reverse load operation.  Eliminate
  the old 'sess-save' and 'sess-load' in favour of the new mechanism.
- Share code between load and reload operations: the latter performs
  load from npf.conf without affecting the connections.
- Simplify and fix races with connection loading.
- Bump NPF_VERSION.
2014-07-23 01:25:34 +00:00
rmind
903939e342 formatting 2014-07-20 00:48:51 +00:00
rmind
a7d2a60827 NPF: add nbuf_t * into npf_cache_t and remove unnecessary carrying by argument. 2014-07-20 00:37:41 +00:00
maxv
ca657fc91e What a terrible use-after-free 2014-07-09 06:04:16 +00:00
dholland
b7b7574d3b Reorg docs, part 1:
Move all the reference manuals to subdirs of /usr/share/doc/reference.
We have subdirs ref1-ref9, corresponding to man page sections 1-9.

Everything that's the reference manual for a program (sections 1, 6,
8), C interface (sections 2, 3), driver or file system (section 4),
format or configuration (section 5), or kernel internal interface
(section 9) belongs in here.

Section 7 is a little less clear: some things that might go in section
7 if they were a man page aren't really reference manuals. So I'm only
putting things in reference section 7 that are (to me) clearly
reference material, rather than e.g. tutorials, guides, FAQs, etc.
This obviously leaves some room for debate, especially without first
editing the docs with this distinction in mind, but if people hate
what I've done things can always be moved again.

Note also that while roff macro man pages traditionally go in section
7, I have put all the roff documentation (macros, tools, etc.) in one
place in reference/ref1/roff. This will make it easier to find and
also easier to edit it into some kind of coherent form.
2014-07-05 19:22:41 +00:00
dholland
c3ab26950f Rework /usr/share/doc.
Update the <bsd.doc.mk> infrastructure, and update the docs to match
the new infrastructure.

- Build and install text, ps, pdf, and/or html, not roff sources.

- Don't wire the chapter numbers into the build system, or use them in
the installed pathnames. This didn't matter much when the docs were a
museum, but now that we're theoretically going to start maintaining
them again, we're going to add and remove documents periodically and
having the chapter numbers baked in creates a lot of thrashing for no
purpose.

- Specify the document name explicitly, rather than implicitly in a
path. Use this name (instead of other random strings) as the name
of the installed files.

- Specify the document section, which is the subdirectory of
/usr/share/doc to install into.

- Allow multiple subdocuments. (That is, multiple documents in one
output directory.)

- Enumerate the .png files groff emits along with html so they can be
installed.

- Remove assorted hand-rolled rules for running roff and roff widgetry
and add enough variable settings to make these unnecessary. This
includes support for
   - explicit use of soelim
   - refer
   - tbl
   - pic
   - eqn

- Forcibly apply at least minimal amounts of sanity to certain
autogenerated roff files.

- Don't exclude USD.doc, SMM.doc, and PSD.doc directories from the
build, as they now actually do stuff.

Note: currently we can't generate pdf. This turns out to be a
nontrivial problem with no immediate solution forthcoming. So for now,
as a workaround, install compressed .ps as the printable form.
2014-07-05 19:22:02 +00:00
msaitoh
74aebcc5ae Exclude descriptor 0xff of CPUID leaf 2. 0xff means the cacheinfo is in leaf 4. 2014-07-03 04:11:37 +00:00
rmind
9c7a886e44 NPF:
- Populate the BPF external memory store with L3 information.
- Eliminate NPF_COP_L3 call and just use the data in the memstore.
- Bump NPF_VERSION.
2014-06-29 00:05:24 +00:00
szptvlfn
20e418f0d1 s/stavfs/statvfs/ 2014-06-25 23:22:18 +00:00
rmind
c3d5721647 npftest: add an example in the README, fix the total in npf_test_conc(). 2014-06-25 00:21:42 +00:00
rmind
263d30c43e Adjust NPF to the recent BPF / BPF JIT changes and make it work again.
All regression tests are happy now (hi alnsn!).
2014-06-25 00:20:06 +00:00
alnsn
19fed70d36 Implement copfuncs and external memory in bpfjit. 2014-06-24 10:53:30 +00:00
christos
2cab074098 add NOTREACHED comment 2014-06-21 17:50:01 +00:00
christos
0ff5eeabb1 add notreached comment 2014-06-21 17:48:07 +00:00
apb
52a5651c02 Use extra="${2-/,}" to use $2 if defined, else default to "/,". 2014-06-16 22:12:30 +00:00
apb
9b3ba6dbb0 Delete trailing slash with "${1%/}", not "${1#/}". 2014-06-16 22:04:39 +00:00
apb
0f5a92d284 Add a new obsolete_stand target, disabled by default,
to delete old files and subdirectories under /stand/${MACHINE}.
2014-06-16 08:59:13 +00:00
apb
7fc31c82f1 Remove stray quotation mark 2014-06-16 08:39:56 +00:00
apb
080bff1a9f In do_sendmail, use unprefix to fix up paths that will be
processed by obsolete_paths.
2014-06-16 08:29:18 +00:00
apb
4478f1a2eb Clarify wording in a comment for obsolete_paths. 2014-06-16 08:28:08 +00:00
apb
dc6efbc769 Add bre_quote (copied from etcupdate), and unprefix functions. 2014-06-16 08:21:20 +00:00
apb
d7be6cf067 Add SORT and SED variables, in case a host environment needs them. 2014-06-16 07:08:06 +00:00
wiz
88090ea395 Use more markup. 2014-06-15 07:24:32 +00:00
dholland
3c8bd4a957 Document exponential backoff behavior and SIGHUP support, plus a couple
other minor edits.
2014-06-15 01:37:48 +00:00
joerg
0142924a4e Use asysctl. 2014-06-13 16:00:55 +00:00
apb
ca69835d41 Update date for previous, and fix some small errors. 2014-06-12 14:07:13 +00:00
apb
6a34214686 Add "-d destdir" option to etcupdate.
This has been only lightly tested.
2014-06-12 13:56:32 +00:00
apb
24cced9eb7 Keep track of whether anything was changed (or needs to be changed),
and print a message at the end if nothing needs to be done.
2014-06-12 13:42:05 +00:00
apb
d735b9de0e When populating ${TEMPROOT} from ${SRCDIR} by copying, use the mtree set
files from ${BINARYDIR}/etc/mtree/set.{etc,xetc} as a list of files to
copy (and copy using pax instead of cp).

This prevents unnecessary copying of extraneous files, such as in the
case that BINARYDIR refers to a directory where everything has been
unpacked, instead of a directory where only the etc and xetc sets have
been unpacked.

Also convert a relative TEMOROOT to an absolute path.
2014-06-12 13:40:43 +00:00
apb
4961886ca5 There is a file named "._etcupdate_${TEMPROOT}${1}" was
never created, so don't try to delete it.  Delete "$B" instead.
2014-06-12 13:33:43 +00:00
apb
53c50ef02d When processing the -s option, the variable used is ${arg},
not ${ARG}.  Also adjust an error message to say
"Nonexistent or invalid file or directory", not just
"Nonexistent file or directory".
2014-06-12 13:31:47 +00:00
joerg
24bd8eb084 Remove KVM related options. 2014-06-11 17:01:04 +00:00
joerg
671b0aebb8 Use hw.iostats and not kvm. 2014-06-11 14:51:49 +00:00
joerg
49cf844ece Add a const for the oid list. 2014-06-11 14:05:28 +00:00
dholland
d7edebe630 Log state transitions. 2014-06-10 17:19:48 +00:00
dholland
106e29fe05 Add a SIGHUP handler; upon SIGHUP do an extra nag_servers on any
domain that's in DEAD state. This lets you explicitly rescue ypbind
from its exponential backoff when you know the world's back up.
2014-06-10 17:19:36 +00:00
dholland
f69eb308e3 Instead of using magic numbers in what looks like a boolean
(dom_alive), create a state enumeration (domainstates) and use it
instead.

Instead of three states (new, alive, and, effectively, 'troubled') go
to five: new, alive, pinging, lost, and dead.

Domains start in the NEW state. When we get a reply from a server, the
state goes to ALIVE. The state is set to PINGING when we ping the
server (once a minute normally) and if the ping times out, it goes to
LOST. If we stay lost for a minute, go to DEAD, and in DEAD, do
exponential backoff of nag_servers calls.

Getting rid of the broken logic attached to the 'troubled' state fixes
PR 15355 (ypbind defeats disk idle spindown) -- it will now only
rewrite the binding file when the binding changes.

Also, fix the HEURISTIC code so it doesn't trigger except in ALIVE
state. I think this was the source of a lot of the spamming behavior
seen in PR 32519, which is now fixed.

Might also fix PR 23135 (broadcast ypbind sometimes fails to find
servers).
2014-06-10 17:19:22 +00:00
dholland
ff58b21755 Load up with comments. 2014-06-10 17:19:12 +00:00
dholland
aed51c4afc Don't rake up the default domain until after processing arguments.
Processing arguments just sets flags -- may as well do it first, and
this way detection of silly errors isn't contingent on having things
fully configured and operating.
2014-06-10 17:19:00 +00:00
dholland
af0d2ab5da While there are times it's appropriate to call a state variable
"evil", this isn't one of them. Since the logic involved is to wait
until the default domain binds before backgrounding, call the variable
"started" instead.
2014-06-10 17:18:45 +00:00
dholland
acc6243e9f Factor out some rpc validation code. 2014-06-10 17:18:18 +00:00
dholland
4363781772 Don't store the default domain name in a global. While running we
really don't care which domain is the system's default domain.
2014-06-10 17:18:02 +00:00
joerg
539332ecd5 Introduce new sysctls for obtaining interface-specific addresses:
- net.sdl for the active link-layer adddress (the MAC)
- net.ether.multicast for the Ethernet multicast addresses
- net.inet6.multicast for the IPv6 multicast groups
- net.inet6.multicast_kludge for temporarily removed multicast groups

Use this sysctls for replacing the kmem grovelling in ifmcstat(8).
2014-06-10 09:38:30 +00:00
roy
0398025216 Add IPV6CTL_AUTO_LINKLOCAL and ND6_IFF_AUTO_LINKLOCAL toggles which
control the automatic creation of IPv6 link-local addresses when an
interface is brought up.

Taken from FreeBSD.
2014-06-05 16:06:49 +00:00
wiz
82d04f72be Fix a bug that caused an error about a UNIQUE constraint violation.
Patch from Abhinav Upadhyay.
2014-06-03 14:42:41 +00:00
rmind
410bae3ffd npfctl_build_code: generate TCP/UDP check for ports case when other blocks
do not imply L4 check; add an assert in npfctl_bpf_proto() and elsewhere.
2014-05-31 22:41:37 +00:00
rmind
5866b12dae npfctl: allow group of zeroes in IPv6 address; noted by spz@. 2014-05-31 22:37:05 +00:00
joerg
74b1011998 Inline trivial helper function. 2014-05-30 22:20:48 +00:00
martin
4bc697a5ef PR kern/48852 (which should have been bin/ in retrospect): apply patch
from Thomas Schmitt to fix rockridge encoding of device nodes.
2014-05-30 13:14:47 +00:00
joerg
79c2ddee71 Kill __P. Use static. 2014-05-30 02:31:40 +00:00
joerg
4c68dd0971 Remove !NetBSD code. 2014-05-30 02:28:07 +00:00
joerg
e553fe2cbd No need for libkvm here. 2014-05-30 02:16:10 +00:00
rmind
2286cc983b netstat(1) and ifmcstat(8): ifnet was renamed to ifnet_list, PR/48850. 2014-05-30 01:44:21 +00:00
msaitoh
cb672750d7 If -v is set and unknown cacheinfo desc is found, print it. 2014-05-27 04:18:00 +00:00
dholland
e1383560ba Don't check lfs flags on ffs vnodes. 2014-05-26 20:07:25 +00:00
wiz
6dc3f341a8 Replace non-breaking space with hyphen, and call hyphen replacement
from one more place.
Improves 'man -k midi' output.

From Abhinav Upadhyay.
2014-05-24 21:01:58 +00:00
dholland
ecb4fe8383 PR bin/48829 Thomas Schmitt: vnconfig pretends to succeed on
nonexistent files
2014-05-23 20:50:16 +00:00
kardel
54c2251d60 add HYT-221/271/939 humidity/temperature I2C sensor
extend envsys(4) framework by %rH (relative humidity)
2014-05-18 11:46:23 +00:00
wiz
8f7d248eb8 Wording, typo fixes. 2014-05-15 23:52:32 +00:00
rmind
e05005e0b3 NPF: imply SYN-only check for the stateful rules by default (when inspecting
TCP packets).  Many users trip here.  This behaviour can be overriden with the
explicit "flags" keyword, but other configuration does not really make sense.
2014-05-15 02:34:29 +00:00
rmind
7da3b338d7 npftest: fix the example in the README file. 2014-05-14 21:46:50 +00:00
mrg
4460048395 don't apply "ptyfsoldnodes" if /dev/pts does not exist, even if ptyfs
is listed in /etc/fstab.  without this, postinstall happily removes
all your ptys leaving you with none at all.  return an error if we
have ptyfs in /etc/fstab, but no /dev/pts.
2014-04-25 00:23:26 +00:00
christos
5f78e43780 Pass a file pointer to write data instead of writing to stdout.
No functional change.
2014-04-24 17:22:41 +00:00
christos
29f735df08 remove -v no/op 2014-04-22 15:55:16 +00:00
khorben
fa8ee723bd Use base 10 when logging the exit status or exit signal for sub-processes,
instead of hexadecimal.
2014-04-05 23:36:10 +00:00
gson
815d09e5bc When daemonizing, delay the parent exit until the daemon is ready to
provide service.  Fixes a race that is a third possible cause of
PR misc/48282, in addition to the ones in rpc.rquotad and nfsd that
were fixed earlier.
2014-04-04 12:45:59 +00:00
christos
ef020f85b5 say why we can't use the password or the group databases. 2014-03-31 00:00:22 +00:00
skrll
217c0eb552 Build everything on all arm variants 2014-03-30 07:29:22 +00:00
joerg
d101c0e239 Fix syntax (hi apb!) 2014-03-29 22:45:31 +00:00
apb
34bb1ddc72 Add a statuslen argument to get_pr_status(), and use it
as the length in a call to strlcpy().  The previous code would
have used the size of a pointer as the length.
2014-03-29 18:54:36 +00:00
apb
a88920f53c sizeof(pointer) is not a good buffer length to pass to strlcat.
Introduce a new variable, clntpathmaxlen, to hold the correct
buffer length, and pass that to strlcat.

The incorrect buffer length would have caused <filename>.<hostname>
lookups to fail.
2014-03-29 18:23:00 +00:00
gson
da700ef1b2 When daemonizing, delay the parent exit until the daemon is
ready to provide service.  Fixes one of the race conditions
of PR misc/48282.
2014-03-29 13:50:53 +00:00
skrll
3cebbec2c7 Simplify 2014-03-29 09:36:18 +00:00
joerg
778b2846d2 Don't modify format string, use asprintf to format the original msg and
syslog the result.
2014-03-25 21:07:59 +00:00
joerg
005b3ff4b3 Don't cast to time_t just to implicitly cast to uint32_t next. 2014-03-25 17:17:44 +00:00
hannken
f3cf481632 - Make VI_XLOCK, VI_CLEAN and VI_LOCKSHARE private to kern/vfs_*.c.
- Make vwait() static.
- Add  vdead_check() to check a vnode for being or becoming dead.

Discussed on tech-kern.

Welcome to 6.99.38
2014-03-24 13:42:40 +00:00
riastradh
c14008e496 Don't choke on an assertion for an RSDT with a null address entry. 2014-03-20 14:39:43 +00:00
roy
263486c97b If IPv6 is disabled for an interface, mark all addresses as tentative.
If enabled, check for a duplicated link-local address and abort enabling
as per RFC 4862, section 5.4.5. If allowed to enable, perform DAD
on the tentative addresses.

Taken from FreeBSD.
2014-03-20 13:34:35 +00:00
dsl
0f00e137a7 Change previous to use uint32_t for 'interval'.
The value is a random interval in usec obtained by reducing a uint32_t
  value modulo 1000000 (multiplied by a delay in seconds of 1).
The value is then being split into secs+usec and assigned to a timeval
  (and an interval).
With -Wsign-conversion the type has to be either an unsigned 32bit
  type, or a signed 64bit one.  This is just plain stupid.
Warning about conversions between signed and unsigned types really
  only makes sense if the compiler is dynamically tracking the domain
  of the value.
2014-03-18 20:39:55 +00:00
christos
23b7b4606f use time_t for time 2014-03-18 19:30:09 +00:00
riastradh
6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
christos
5fe0c59dd8 KNF, bump warns, fix warnings to print the program name. 2014-03-18 00:16:49 +00:00
riastradh
4ec7cf26b7 Convert right-recursive rules to left-recursive ones.
This should obviate the need for the workaround of a large stack in
order to handle many rules.

No change in the resulting plists.

ok rmind
2014-03-15 15:22:37 +00:00
rmind
f1567f86d3 npfctl_bpf_cidr: another buf fix in handling IPv6 masks (bug found on ARM). 2014-03-15 08:46:01 +00:00
rmind
167f6f25d6 NPF: add support for "stateful-ends". 2014-03-14 11:29:44 +00:00
martin
4765e08d28 Fix wrong variable name, PR bin/48647 from Jim Bernard. 2014-03-08 16:36:24 +00:00
joerg
5c4c6caf71 Make the abs() use check non-fatal for a bogus use in the LFS cleanerd. 2014-03-04 21:06:47 +00:00
joerg
4f76b089a9 Don't use abs on unsigned values. 2014-02-27 17:43:35 +00:00
joerg
33ddbd4a4d Expect long long to be larger than uint32_t and use llabs after casting
the uint32_t.
2014-02-27 17:43:02 +00:00
skrll
6d3ceb1d61 Rename NetBSD/hp700 to NetBSD/hppa.
Unfortunately our VCS isn't very helpful here.
2014-02-24 07:23:38 +00:00
szptvlfn
4893e5b805 Update URL 2014-02-19 09:13:21 +00:00
rmind
27b83b3d9e npfctl_print_nat: fix the byte-order of the port. 2014-02-19 01:43:16 +00:00
rmind
247d861365 npfctl: take into account all addresses when multiple interfaces are
specified in a set of elements.
2014-02-17 00:45:24 +00:00
jmmv
d90ac76afc Fix path to atf-run.hooks after import of atf-0.19.
Problem found by martin@.  Not spotted by me, I think, because I always use
postinstall on an etc.tgz file and forgot about this code path.
2014-02-15 01:54:17 +00:00
rmind
a732dba5fc G/C some todo items 2014-02-14 02:01:12 +00:00
rmind
d199f930bb Document NAT algorithm option in the grammar of "map". 2014-02-14 01:52:58 +00:00
rmind
068cee2998 NPF: add support for IPv6-to-IPv6 Network Prefix Translation (NPTv6),
as per RFC 6296.  Add a unit test.  Also, bump NPF_VERSION.

Thanks to S.P.Zeidler for the help with NPTv6 work!
2014-02-13 03:34:40 +00:00
rmind
82f6ff32b1 npfctl_bpf_cidr: fix a bug in handling of smaller IPv6 masks. 2014-02-13 00:42:01 +00:00
rmind
1e2389ed0b npfctl_print_table: add a "cdb" type. 2014-02-12 01:42:50 +00:00
chs
49d6a7c368 in update_db(), extract the full list of files to update from the db
before actually updating anything, since changing the db while the query
that extracts the list of files is still in progress results in
the extraction query failing before it finds everything.
2014-02-10 00:23:36 +00:00
rmind
8b83480d27 NPF:
- Adjust the syntax - remove "inet" keyword in favour of more explicit
  "inet4" for the address family.  Consistent with "inet6" for IPv6.
- Adjust and improve the man page a little bit.
2014-02-08 01:20:09 +00:00
rmind
8274d601f9 NPF: add support for static (stateless) NAT. 2014-02-07 23:45:22 +00:00
christos
61a4b10e07 fix vax build. 2014-02-06 18:48:09 +00:00
wiz
83d796ca12 Update count. Add serial comma. 2014-02-06 07:36:36 +00:00
rmind
ffcdc4af8d Add support for CDB based NPF tables. 2014-02-06 02:51:28 +00:00
rmind
e43f79569a npftest: fix previous harder - pass and use libc's random(3). 2014-02-05 03:49:48 +00:00
rmind
bb1fedd189 npftest: fix the failure of NAT test -- adjust for RUMP's conversion to
the in-kernel CPRNG (hi pooka!).
2014-02-05 03:30:13 +00:00
rmind
55b0c96054 - npfctl: fix table IDs (breakage since the table naming was added).
- libnpf: remove npf_table_exists_p() from public API.
2014-02-03 02:21:52 +00:00
skrll
69d52dbe21 Remove harmful whitespace. Now the /var/shm check can succeed quietly. 2014-01-29 12:56:28 +00:00
plunky
bb39753de6 spelling correction - recieved -> received 2014-01-26 08:31:17 +00:00
christos
9cfdbcfd93 Fix the "separate root" test. If we get a permission error check for separate
root. But if we get ENOENT, always succeed. Otherwise if someone removes
the db files or they get corrupted, you can never recreate them.
2014-01-26 01:57:04 +00:00
martin
319a65afc2 Add a check to remove the temporarily (eroneously) created /@RUNDIR@
(PR bin/48529)
2014-01-17 19:06:57 +00:00
christos
2b043c75b6 eliminate use of bsd.sys.mk from Makefiles 2014-01-16 01:15:32 +00:00
joerg
12f8f2b852 Sync with interface change in mdocml 1.12.3. 2014-01-05 19:26:44 +00:00
msaitoh
e84a097d09 - Rename x86_print_cacheinfo() to x86_print_cache_and_tlb_info() because
this function prints TLB info, too.
- Remove an extra printf when verbose flag is set.
- Print the highest extended info level as the basic info level.
- Sort function.
2014-01-04 18:13:48 +00:00
christos
1497d945c9 smbfs has moved. 2013-12-25 23:35:17 +00:00
wiz
3acb5aa34e Use more common phrasing. 2013-12-23 12:39:55 +00:00
msaitoh
e05de3375f Add verbose flag.
On x86 cpu, cpuctl -v identify dumps the return values of the cpuid
functions. The max levels are taken from CPUID 0 and CPUID 8000_0000.
It's useful for the future CPU.
2013-12-23 12:35:33 +00:00
msaitoh
2620370891 CPUID leaf 2 and 4 are only for Intel processors. 2013-12-23 11:17:20 +00:00
msaitoh
1c10986642 Add comments. Remove comments. No functional change. 2013-12-23 10:13:59 +00:00
joerg
0850b0cc3c long_ad is a mix of struct and union, so use memset to initialise in the
one place it is used.
2013-12-19 23:00:50 +00:00
christos
1985c705e9 initialize dummy_ref 2013-12-19 22:10:03 +00:00
martin
261edc5997 Simplify code to print the router/prefix list: use memcpy and local structs
properly aligned on the stack to decode the binary format passed by the
kernel - instead of (bogusly) assuming the format will obey all local
alignement requirements.
2013-12-17 20:26:46 +00:00
njoly
b0550d75f0 Skip varshm check if there is no fstab (like in chroots). 2013-12-17 12:51:26 +00:00
christos
6e404ef791 Add extra rpcgen flags. 2013-12-15 06:10:33 +00:00
martin
fe15878cd5 Cosmetics: use "msg" instead of "echo" 2013-12-13 07:37:50 +00:00
wiz
d860f590d4 Fix typo ("then" instead of "than") 2013-12-09 09:35:16 +00:00
martin
0c88e27e4c Add a "varshm" check/fix to make sure /var/shm is mentioned in /etc/fstab
(and add a default of tmpfs with 25% of available ram limit if not).
To avoid the warning but not mount the tmpfs, just comment out the line
for /var/shm.

Also move "obsolete" to the end of the list again, as it should be run
last.
2013-12-05 15:41:23 +00:00
wiz
4a591a0994 Wording improvements from Abhinav Upadhyay <er.abhinav.upadhyay@gmail.com> 2013-11-29 23:58:23 +00:00
joerg
ed478d1345 Mark usage as dead. 2013-11-29 23:01:05 +00:00
christos
1d7c1fad3f Remove pppd 2013-11-28 22:38:59 +00:00
christos
09c7a4bf31 Unhook pppd 2013-11-28 22:34:44 +00:00
christos
fc0ed55151 CID 1132759: Abort on dehumanize_number error on constant built-in string. 2013-11-27 20:48:28 +00:00
mlelstv
ffb41b3a17 Fix fallout from circleq->tailq transition. 2013-11-24 13:13:12 +00:00
rmind
1e9541dade npftest: adjust for the npf_bpf_filter() change. 2013-11-23 19:40:11 +00:00
rmind
e636c1e87f npfctl: need to rewind the list after calling print_table(). XXX libnpf. 2013-11-22 18:42:02 +00:00
rmind
805a41fbfe Add npf_tableset_syncdict() to sync the table IDs in the proplib dictionary,
as they can change on reload now.  Also, fix table name checking in npfctl.
2013-11-22 00:25:51 +00:00
christos
905fa31223 From Brooks Davis:
When comparing a directory to an mtree file NetBSD mtree has output like
this:

xxx:	size (4, 5)
	md5digest (0x6de9439834c9147569741d3c9c9fc010, 0xa5d119ab8edcda0ef7f381da8=
f52f92f)
=2E/yyy missing

FreeBSD's historical behavior is this:

xxx changed
	size expected 4 found 5
	md5digest expected 6de9439834c9147569741d3c9c9fc010 found a5d119ab8edcda0e=
f7f381da8f52f92f
=2E/yyy missing

FreeBSD's mergemaster -U command depends on the latter behavior so
the following patch alters the freebsd9 mode of mtree to output
that format.  I don't think programs should rely on this output one way
or another since it's clearly meant for humans, but this seems like the
easiest short term fix.
2013-11-21 18:39:50 +00:00
christos
8216c37c22 CID 1129614: dereference after null 2013-11-19 17:01:45 +00:00
christos
12768cae83 CVE 1129617: negative arg 2013-11-19 16:42:16 +00:00
rmind
d116583e69 Simplify parsing of npf.conf elements, create the npfvar_t when a value is
parsed (to be used as a general structured for variables and inlined values),
few misc improvements.
2013-11-19 00:28:41 +00:00
rmind
3fb1890bf5 Rename some tokens, use more accurate names (the current ones are incorrect
or missleading) and add few comments in the parser code.
2013-11-18 21:39:03 +00:00
rmind
2566fe9fff Add bsd.own.mk for MKSLJIT, reorder some vars. 2013-11-16 17:12:35 +00:00
alnsn
a36c412b37 Link to -lrumpnet_bpfjit and -lrumpkern_sljit iff MKSLJIT != "no". 2013-11-16 15:58:30 +00:00
rmind
467de1619d Enable bpfjit for npftest. 2013-11-16 01:41:43 +00:00
hannken
30f40cbb12 Describe the differences between file system internal and external snapshots. 2013-11-15 09:13:57 +00:00
msaitoh
b1a32cacda Modify some macros and add some new macros for CPU family and model
to reduce code duplication and to avoid bug.

CPUID_TO_STEPPING(cpuid)	(not changed)

CPUID_TO_FAMILY(cpuid)		(new)
CPUID_TO_MODEL(cpuid)		(new)

	Return the display family and the display model.
	The macro names are the same as FreeBSD.

CPUID_TO_BASEFAMILY(cpuid)	(The old name was CPUID2FAMILY)
CPUID_TO_BASEMODEL(cpuid)	(The old name was CPUID2MODEL)

	Only for the base field.

CPUID_TO_EXTFAMILY(cpuid)	(The old name was CPUID2EXTFAMILY)
CPUID_TO_EXTMODEL(cpuid)	(The old name was CPUID2EXTMODEL)

	Only for the extended field.

See http://mail-index.netbsd.org/port-amd64/2013/11/12/msg001978.html
2013-11-15 08:47:55 +00:00
christos
3d281e09f8 CID 1125875: Fix memory leak 2013-11-13 21:22:46 +00:00
christos
04ffc4cd1c CID 1125876: File descriptor leak 2013-11-13 21:20:21 +00:00
christos
a0e4a7ac42 CID 1125882: Don't use unitialized variable; move code inside conditional
where it was intended.
2013-11-13 21:19:17 +00:00
wiz
0f54719895 Skip files of size 0 from indexing.
From Abhinav Upadhyay <er.abhinav.upadhyay@gmail.com>.
2013-11-13 18:46:33 +00:00
wiz
d8099589ae Remove trailing whitespace. 2013-11-12 06:07:30 +00:00
rmind
1e7342c150 NPF: add support for table naming and remove NPF_TABLE_SLOTS (there is
just an arbitrary sanity limit of NPF_MAX_TABLES currently set to 128).

Few misc fixes.  Bump NPF_VERSION.
2013-11-12 00:46:34 +00:00
christos
ea5463304e CID 1128379: Fix TOCTOU, always open the file first with non-blocking I/O,
do that stat later and leave the file as non-blocking because it does not
make a difference for plain files.
2013-11-11 16:39:21 +00:00
wiz
130f1c4a78 Bump date for FIFO support. 2013-11-10 00:13:50 +00:00
christos
f55ff5e8dd vax specific gcc 4.8.1 hacks 2013-11-09 21:39:27 +00:00
christos
d15656b177 add support for outputting to FIFO's (Anthony Mallet) 2013-11-09 19:00:18 +00:00
christos
06a74ca997 fix two bugs related to queues (Anthony Mallet)
- the default values are in humanized number form so strtol does not work
- fix reversed size tests
2013-11-09 18:58:22 +00:00
christos
f7bfce339d more sh3 hacks. 2013-11-09 00:33:48 +00:00
christos
553f814b0d remove unused variable 2013-11-08 01:10:23 +00:00
rmind
a79812ea10 NPF: add support for specifying the interfaces before they are attached.
If an interface is or gets detached, all associated rules and connections
will be deactivated (it might be useful to have an option to invalidate
the associated connections).  Once the interface is reattached they will
become active.

Bump NPF_VERSION.
2013-11-08 00:38:26 +00:00
msaitoh
3b5f820d76 Fix typo. From jnemeth. 2013-11-07 18:59:01 +00:00
msaitoh
a9491a8185 Update some processor names. 2013-11-07 18:18:59 +00:00
kefren
915c0cd28e sync an example with the latest group syntax change 2013-11-05 13:09:12 +00:00
rmind
05a7a9a52e npfctl: optimise fetch_l3() to avoid unnecessary call to NPF_COP_L3. 2013-11-05 01:50:30 +00:00
christos
2a26fd0cf9 sprinkle vax 2013-11-03 00:48:52 +00:00
mrg
ea1cef97af avoid uninitialised variable use. 2013-10-30 08:42:16 +00:00
mrg
ef05d8864c ensure variables are initialised 2013-10-30 08:41:57 +00:00
msaitoh
c622541618 Support prefetch size. 2013-10-28 05:41:49 +00:00
apb
3d4c34e695 Now that tools/compat/compat_defs.h defones __USE, there's no
need to treat the tools build as a special case.
2013-10-24 14:01:01 +00:00
christos
a74a5abffb XXX: gcc initialize a variable 2013-10-21 15:37:46 +00:00
msaitoh
ea7bd36351 Check cpuid leaf 4 for newer Intel CPU to know the cache information. 2013-10-21 06:33:11 +00:00
msaitoh
0380541841 No functional change:
- Add prototypes.
- Make some function static.
- Sort functions.
2013-10-21 06:28:15 +00:00
mrg
e392147a46 avoid using __USE() in the tools version of this. 2013-10-19 20:49:22 +00:00
christos
0a77b69ab6 fix unused variable warnings. 2013-10-19 17:16:37 +00:00
christos
94a96ec4ae use new scopeid functions 2013-10-19 17:16:25 +00:00
christos
a18b60aecf move all the necessay code inside ifdef 2013-10-19 17:10:17 +00:00
christos
b02f1063c3 using sizeof(char *) to compute the size of a buffer is not going to work
very well.
2013-10-19 17:09:38 +00:00
christos
4013b33b0e move all the unused code inside #if 0 2013-10-19 17:08:15 +00:00
christos
e243964246 move all the code that is unused inside #if 0 2013-10-19 17:06:57 +00:00
christos
5084cd4f69 avoid pointer gymnastics 2013-10-19 17:05:58 +00:00
kefren
2e908c5030 sync behaviour with man page: accept spaces, empty lines and comments 2013-10-18 14:14:14 +00:00
wiz
8447fbb10f Sort SEE ALSO. Grammar consistency. 2013-10-18 12:29:52 +00:00
kefren
eda7476539 Attempt to write a manpage for ldpd.conf 2013-10-18 10:49:19 +00:00
kefren
f86d4fa943 allow setting transport addresses for interfaces into config file
also move passive-interface functionality under interface block
report the correct line for config parsing errors
2013-10-17 18:10:23 +00:00
christos
4d024dddcc Our <sys/param.h> ends up calling header files that define intmax_t. This
should not be the case (but >sys/param.h> is not a standard header so all bets
are off). FreeBSD's does not, so explicitly include <stdint.h> to get it.
2013-10-17 17:22:59 +00:00
christos
db2a5420b4 skip comment lines on password and group databases (Brooks Davis) 2013-10-16 17:27:42 +00:00
christos
7419876865 Default a bare "." with no type to F_DIR. For FreeBSD compatibility (Brooks
Davis)
2013-10-16 17:26:14 +00:00
christos
5c416430fc Restore old behavior of not printing sizes for directories, since it varies
depending on filesystem implementation. (Brooks Davis)
2013-10-16 17:24:20 +00:00
kefren
ee8be8cbb6 zeroize the rest of the comparable struct before adding it to the rb tree 2013-10-12 18:55:40 +00:00
msaitoh
4713a86712 Fix typo in comment (s/XRC0/XCR0/). 2013-10-04 17:12:48 +00:00
joerg
d41a00c8da Add missing dead. 2013-09-24 22:52:14 +00:00
rmind
a99ac6280c npftest: add a choice of "rule" or "state" for -b option. 2013-09-24 02:44:20 +00:00
rmind
a484105289 npftest: add some concurrency testing code. 2013-09-24 02:04:21 +00:00
rmind
5f3b7e2652 Update npftest.conf for the recent syntax adjustments. 2013-09-23 15:30:32 +00:00
wiz
4fe1cb8b61 Remove trailing whitespace. 2013-09-20 21:30:49 +00:00
christos
5b6d718b99 the code specifies package info now. 2013-09-20 19:07:29 +00:00
rmind
f797733a7e - NPF: change the group/ruleset syntax - simplify. Update npf.conf(5) manual.
- Add support for the inline pcap-filter(7) syntax in the rule, e.g.:
	block out final pcap-filter "tcp and dst 10.1.1.252"
2013-09-20 03:03:52 +00:00