Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'stable/10' of https://github.com/freebsd/freebsd into s…

…table/10

Conflicts:
	etc/rc
  • Loading branch information...
commit 64f96eccdda0a6701310631304c74dc2186c7f54 2 parents dbff34b + c26ecf0
@kmoore134 kmoore134 authored
Showing with 28,640 additions and 31,037 deletions.
  1. +12 −0 Makefile.inc1
  2. +11 −0 ObsoleteFiles.inc
  3. +9 −0 UPDATING
  4. +9 −8 contrib/mtree/compare.c
  5. +12 −11 contrib/mtree/create.c
  6. +8 −2 contrib/mtree/getid.c
  7. +15 −6 contrib/mtree/spec.c
  8. +5 −0 etc/defaults/rc.conf
  9. +24 −1 etc/rc
  10. +134 −48 etc/rc.d/jail
  11. +125 −0 etc/rc.d/sendmail
  12. +15 −0 etc/sendmail/freebsd.mc
  13. +1 −0  include/pthread.h
  14. +2 −0  lib/libc/iconv/citrus_mapper.c
  15. +1 −0  lib/libvmmapi/vmmapi.c
  16. +3 −8 lib/libyaml/Makefile
  17. +0 −61 lib/libyaml/libbsdyml.3
  18. +18 −1 share/man/man5/rc.conf.5
  19. +20 −1 share/man/man8/rc.8
  20. +37 −1 share/man/man8/rc.sendmail.8
  21. +1 −1  share/mk/bsd.libnames.mk
  22. +2 −0  sys/amd64/amd64/pmap.c
  23. +1 −0  sys/amd64/include/vmm.h
  24. +22 −1 sys/amd64/vmm/intel/vmx.c
  25. +1 −0  sys/amd64/vmm/intel/vmx.h
  26. +1 −0  sys/amd64/vmm/intel/vmx_controls.h
  27. +38 −26 sys/amd64/vmm/vmm_dev.c
  28. +16 −2 sys/amd64/vmm/x86.c
  29. +5 −2 sys/boot/i386/btx/btx/btx.S
  30. +24 −0 sys/cam/ata/ata_all.c
  31. +2 −0  sys/cam/ata/ata_all.h
  32. +0 −2  sys/cam/ata/ata_da.c
  33. +0 −2  sys/cam/ata/ata_pmp.c
  34. +6 −1 sys/cam/cam_periph.c
  35. +1 −0  sys/cam/cam_periph.h
  36. +33 −1 sys/cam/cam_xpt.c
  37. +1 −0  sys/cam/cam_xpt_periph.h
  38. +15 −0 sys/cam/scsi/scsi_all.c
  39. +1 −0  sys/cam/scsi/scsi_all.h
  40. +0 −3  sys/cam/scsi/scsi_cd.c
  41. +0 −5 sys/cam/scsi/scsi_ch.c
  42. +0 −4 sys/cam/scsi/scsi_da.c
  43. +0 −5 sys/cam/scsi/scsi_enc.c
  44. +0 −7 sys/cam/scsi/scsi_pass.c
  45. +0 −3  sys/cam/scsi/scsi_pt.c
  46. +0 −4 sys/cam/scsi/scsi_sa.c
  47. +0 −5 sys/cam/scsi/scsi_sg.c
  48. +1 −1  sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
  49. +2 −3 sys/conf/files
  50. +1 −1  sys/conf/newvers.sh
  51. +0 −164 sys/contrib/rdma/ib_addr.h
  52. +0 −120 sys/contrib/rdma/ib_cache.h
  53. +0 −593 sys/contrib/rdma/ib_cm.h
  54. +0 −97 sys/contrib/rdma/ib_fmr_pool.h
  55. +0 −656 sys/contrib/rdma/ib_mad.h
  56. +0 −55 sys/contrib/rdma/ib_marshall.h
  57. +0 −247 sys/contrib/rdma/ib_pack.h
  58. +0 −386 sys/contrib/rdma/ib_sa.h
  59. +0 −132 sys/contrib/rdma/ib_smi.h
  60. +0 −125 sys/contrib/rdma/ib_umem.h
  61. +0 −328 sys/contrib/rdma/ib_user_cm.h
  62. +0 −136 sys/contrib/rdma/ib_user_mad.h
  63. +0 −60 sys/contrib/rdma/ib_user_sa.h
  64. +0 −688 sys/contrib/rdma/ib_user_verbs.h
  65. +0 −1,854 sys/contrib/rdma/ib_verbs.h
  66. +0 −266 sys/contrib/rdma/iw_cm.h
  67. +9 −8 sys/contrib/rdma/krping/getopt.c
  68. +1,057 −532 sys/contrib/rdma/krping/krping.c
  69. +12 −124 sys/contrib/rdma/krping/krping.h
  70. +95 −44 sys/contrib/rdma/krping/krping_dev.c
  71. +0 −414 sys/contrib/rdma/rdma_addr.c
  72. +0 −411 sys/contrib/rdma/rdma_cache.c
  73. +0 −318 sys/contrib/rdma/rdma_cm.h
  74. +0 −51 sys/contrib/rdma/rdma_cm_ib.h
  75. +0 −3,000 sys/contrib/rdma/rdma_cma.c
  76. +0 −776 sys/contrib/rdma/rdma_device.c
  77. +0 −1,086 sys/contrib/rdma/rdma_iwcm.c
  78. +0 −215 sys/contrib/rdma/rdma_user_cm.h
  79. +0 −822 sys/contrib/rdma/rdma_verbs.c
  80. +0 −123 sys/contrib/rdma/types.h
  81. +2 −1  sys/dev/cxgbe/adapter.h
  82. +1 −1  sys/dev/cxgbe/common/common.h
  83. +0 −8,417 sys/dev/cxgbe/firmware/t4fw-1.8.11.0.bin.uu
  84. +8,705 −0 sys/dev/cxgbe/firmware/t4fw-1.9.12.0.bin.uu
  85. +8 −1 sys/dev/cxgbe/firmware/t4fw_cfg.txt
  86. +23 −14 sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt
  87. +108 −15 sys/dev/cxgbe/firmware/t4fw_interface.h
  88. +0 −8,112 sys/dev/cxgbe/firmware/t5fw-1.8.22.0.bin.uu
  89. +8,417 −0 sys/dev/cxgbe/firmware/t5fw-1.9.12.0.bin.uu
  90. +14 −1 sys/dev/cxgbe/firmware/t5fw_cfg.txt
  91. +23 −6 sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt
  92. +2,458 −0 sys/dev/cxgbe/iw_cxgbe/cm.c
  93. +926 −0 sys/dev/cxgbe/iw_cxgbe/cq.c
  94. +369 −0 sys/dev/cxgbe/iw_cxgbe/device.c
  95. +206 −0 sys/dev/cxgbe/iw_cxgbe/ev.c
  96. +118 −0 sys/dev/cxgbe/iw_cxgbe/id_table.c
  97. +1,046 −0 sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h
  98. +828 −0 sys/dev/cxgbe/iw_cxgbe/mem.c
  99. +498 −0 sys/dev/cxgbe/iw_cxgbe/provider.c
  100. +1,707 −0 sys/dev/cxgbe/iw_cxgbe/qp.c
  101. +342 −0 sys/dev/cxgbe/iw_cxgbe/resource.c
  102. +597 −0 sys/dev/cxgbe/iw_cxgbe/t4.h
  103. +34 −19 sys/{contrib/rdma/core_priv.h → dev/cxgbe/iw_cxgbe/user.h}
  104. +25 −6 sys/dev/cxgbe/t4_main.c
  105. +12 −7 sys/dev/cxgbe/t4_sge.c
  106. +1 −1  sys/dev/cxgbe/tom/t4_cpl_io.c
  107. +1 −34 sys/dev/hyperv/stordisengage/hv_ata_pci_disengage.c
  108. +1 −1  sys/dev/hyperv/vmbus/hv_hv.c
  109. +13 −9 sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
  110. +37 −16 sys/dev/usb/controller/musb_otg.c
  111. +1 −1  sys/dev/usb/controller/musb_otg.h
  112. +19 −0 sys/dev/usb/controller/xhci.c
  113. +1 −0  sys/dev/usb/usbdevs
  114. +1 −0  sys/dev/usb/wlan/if_run.c
  115. +33 −5 sys/dev/xen/blkfront/blkfront.c
  116. +8 −4 sys/fs/devfs/devfs_vnops.c
  117. +14 −0 sys/kern/kern_exec.c
  118. +4 −0 sys/kern/sys_generic.c
  119. +8 −1 sys/modules/cxgbe/Makefile
  120. +27 −0 sys/modules/cxgbe/iw_cxgbe/Makefile
  121. +1 −1  sys/modules/cxgbe/t4_firmware/Makefile
  122. +1 −1  sys/modules/cxgbe/t5_firmware/Makefile
  123. +1 −0  sys/modules/random/Makefile
  124. +0 −4 sys/modules/rdma/Makefile
  125. +0 −10 sys/modules/rdma/addr/Makefile
  126. +0 −10 sys/modules/rdma/cma/Makefile
  127. +0 −12 sys/modules/rdma/core/Makefile
  128. +0 −10 sys/modules/rdma/iwcm/Makefile
  129. +3 −3 sys/ofed/drivers/net/mlx4/en_netdev.c
  130. +3 −3 sys/ofed/include/linux/gfp.h
  131. +31 −29 sys/powerpc/powermac/ata_kauai.c
  132. +16 −12 sys/powerpc/powermac/ata_macio.c
  133. +3 −1 sys/sys/param.h
  134. +3 −1 sys/sys/systm.h
  135. +0 −2  sys/xen/xen-os.h
  136. +0 −1  tools/make_libdeps.sh
  137. +60 −36 usr.sbin/bhyve/bhyverun.c
  138. +2 −0  usr.sbin/bhyve/bhyverun.h
  139. +26 −124 usr.sbin/bhyve/mptbl.c
  140. +4 −5 usr.sbin/bhyve/pci_ahci.c
  141. +16 −0 usr.sbin/bhyve/pci_hostbridge.c
  142. +8 −10 usr.sbin/bhyve/pci_virtio_block.c
  143. +1 −12 usr.sbin/bhyve/pci_virtio_net.c
  144. +1 −1  usr.sbin/bhyve/rtc.c
  145. +1 −16 usr.sbin/bhyve/spinup_ap.c
  146. +1 −0  usr.sbin/bhyvectl/bhyvectl.c
  147. +8 −0 usr.sbin/bsdinstall/bsdinstall.8
  148. 0  usr.sbin/bsdinstall/scripts/docsinstall
  149. 0  usr.sbin/bsdinstall/scripts/entropy
  150. +5 −2 usr.sbin/pkg/Makefile
  151. +1 −1  usr.sbin/pkg/config.c
View
12 Makefile.inc1
@@ -1722,6 +1722,13 @@ delete-old-libs:
chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \
rm ${RM_I} "${DESTDIR}/$${file}" <&3; \
fi; \
+ for ext in debug symbols; do \
+ if ! [ -e "${DESTDIR}/$${file}" ] && [ -f \
+ "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}" ]; then \
+ rm ${RM_I} "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}" \
+ <&3; \
+ fi; \
+ done; \
done
@echo ">>> Old libraries removed"
@@ -1733,6 +1740,11 @@ check-old-libs:
if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
echo "${DESTDIR}/$${file}"; \
fi; \
+ for ext in debug symbols; do \
+ if [ -f "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}" ]; then \
+ echo "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}"; \
+ fi; \
+ done; \
done
delete-old-dirs:
View
11 ObsoleteFiles.inc
@@ -38,6 +38,17 @@
# xargs -n1 | sort | uniq -d;
# done
+# 20131014: libbsdyml becomes private
+OLD_FILES+=usr/lib/libbsdyml.a
+OLD_FILES+=usr/lib/libbsdyml.so
+OLD_LIBS+=usr/lib/libbsdyml.so.0
+OLD_FILES+=usr/lib/libbsdyml_p.a
+OLD_FILES+=usr/lib32/libbsdyml.a
+OLD_FILES+=usr/lib32/libbsdyml.so
+OLD_LIBS+=usr/lib32/libbsdyml.so.0
+OLD_FILES+=usr/lib32/libbsdyml_p.a
+OLD_FILES+=usr/share/man/man3/libbsdyml.3.gz
+OLD_FILES+=usr/include/bsdyml.h
# 20131013: Removal of the ATF tools
OLD_FILES+=etc/atf/FreeBSD.conf
OLD_FILES+=etc/atf/atf-run.hooks
View
9 UPDATING
@@ -16,6 +16,15 @@ from older versions of FreeBSD, try WITHOUT_CLANG to bootstrap to the tip of
stable/10, and then rebuild without this option. The bootstrap process from
older version of current is a bit fragile.
+20131014:
+ libbsdyml has been renamed to libyaml and moved to /usr/lib/private.
+ This will break ports-mgmt/pkg. Rebuild the port, or upgrade to pkg
+ 1.1.4_8 and verify bsdyml not linked in, before running "make
+ delete-old-libs":
+ # make -C /usr/ports/ports-mgmt/pkg build deinstall install clean
+ or
+ # pkg install pkg; ldd /usr/local/sbin/pkg | grep bsdyml
+
20131010:
The rc.d/jail script has been updated to support jail(8)
configuration file. The "jail_<jname>_*" rc.conf(5) variables
View
17 contrib/mtree/compare.c
@@ -1,4 +1,4 @@
-/* $NetBSD: compare.c,v 1.55 2012/10/05 00:59:35 christos Exp $ */
+/* $NetBSD: compare.c,v 1.56 2013/09/09 23:27:43 christos Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: compare.c,v 1.55 2012/10/05 00:59:35 christos Exp $");
+__RCSID("$NetBSD: compare.c,v 1.56 2013/09/09 23:27:43 christos Exp $");
#endif
#endif /* not lint */
@@ -47,6 +47,7 @@ __RCSID("$NetBSD: compare.c,v 1.55 2012/10/05 00:59:35 christos Exp $");
#include <errno.h>
#include <fcntl.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -192,9 +193,9 @@ typeerr: LABEL;
(s->type == F_BLOCK || s->type == F_CHAR) &&
s->st_rdev != p->fts_statp->st_rdev) {
LABEL;
- printf("%sdevice (%#llx, %#llx",
- tab, (long long)s->st_rdev,
- (long long)p->fts_statp->st_rdev);
+ printf("%sdevice (%#jx, %#jx",
+ tab, (uintmax_t)s->st_rdev,
+ (uintmax_t)p->fts_statp->st_rdev);
if (uflag) {
if ((unlink(p->fts_accpath) == -1) ||
(mknod(p->fts_accpath,
@@ -283,9 +284,9 @@ typeerr: LABEL;
}
if (s->flags & F_SIZE && s->st_size != p->fts_statp->st_size) {
LABEL;
- printf("%ssize (%lld, %lld)\n",
- tab, (long long)s->st_size,
- (long long)p->fts_statp->st_size);
+ printf("%ssize (%ju, %ju)\n",
+ tab, (uintmax_t)s->st_size,
+ (uintmax_t)p->fts_statp->st_size);
tab = "\t";
}
/*
View
23 contrib/mtree/create.c
@@ -1,4 +1,4 @@
-/* $NetBSD: create.c,v 1.69 2013/02/03 19:15:17 christos Exp $ */
+/* $NetBSD: create.c,v 1.71 2013/10/16 17:24:20 christos Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: create.c,v 1.69 2013/02/03 19:15:17 christos Exp $");
+__RCSID("$NetBSD: create.c,v 1.71 2013/10/16 17:24:20 christos Exp $");
#endif
#endif /* not lint */
@@ -53,6 +53,7 @@ __RCSID("$NetBSD: create.c,v 1.69 2013/02/03 19:15:17 christos Exp $");
#include <fcntl.h>
#include <grp.h>
#include <pwd.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
@@ -216,22 +217,22 @@ statf(int indent, FTSENT *p)
p->fts_statp->st_mode & MBITS);
if (keys & F_DEV &&
(S_ISBLK(p->fts_statp->st_mode) || S_ISCHR(p->fts_statp->st_mode)))
- output(indent, &offset, "device=%#llx",
- (long long)p->fts_statp->st_rdev);
+ output(indent, &offset, "device=%#jx",
+ (uintmax_t)p->fts_statp->st_rdev);
if (keys & F_NLINK && p->fts_statp->st_nlink != 1)
output(indent, &offset, "nlink=%u", p->fts_statp->st_nlink);
if (keys & F_SIZE &&
- (flavor != F_NETBSD6 || S_ISREG(p->fts_statp->st_mode)))
- output(indent, &offset, "size=%lld",
- (long long)p->fts_statp->st_size);
+ (flavor == F_FREEBSD9 || S_ISREG(p->fts_statp->st_mode)))
+ output(indent, &offset, "size=%ju",
+ (uintmax_t)p->fts_statp->st_size);
if (keys & F_TIME)
#if defined(BSD4_4) && !defined(HAVE_NBTOOL_CONFIG_H)
- output(indent, &offset, "time=%ld.%09ld",
- (long)p->fts_statp->st_mtimespec.tv_sec,
+ output(indent, &offset, "time=%jd.%09ld",
+ (intmax_t)p->fts_statp->st_mtimespec.tv_sec,
p->fts_statp->st_mtimespec.tv_nsec);
#else
- output(indent, &offset, "time=%ld.%09ld",
- (long)p->fts_statp->st_mtime, (long)0);
+ output(indent, &offset, "time=%jd.%09ld",
+ (intmax_t)p->fts_statp->st_mtime, (long)0);
#endif
if (keys & F_CKSUM && S_ISREG(p->fts_statp->st_mode)) {
if ((fd = open(p->fts_accpath, O_RDONLY, 0)) < 0 ||
View
10 contrib/mtree/getid.c
@@ -1,4 +1,4 @@
-/* $NetBSD: getid.c,v 1.7 2008/04/28 20:24:17 martin Exp $ */
+/* $NetBSD: getid.c,v 1.8 2013/10/16 17:27:42 christos Exp $ */
/* from: NetBSD: getpwent.c,v 1.48 2000/10/03 03:22:26 enami Exp */
/* from: NetBSD: getgrent.c,v 1.41 2002/01/12 23:51:30 lukem Exp */
@@ -65,7 +65,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: getid.c,v 1.7 2008/04/28 20:24:17 martin Exp $");
+__RCSID("$NetBSD: getid.c,v 1.8 2013/10/16 17:27:42 christos Exp $");
#include <sys/param.h>
@@ -230,6 +230,9 @@ grscan(int search, gid_t gid, const char *name)
;
continue;
}
+ /* skip comments */
+ if (pwline[0] == '#')
+ continue;
if (grmatchline(search, gid, name))
return 1;
}
@@ -371,6 +374,9 @@ pwscan(int search, uid_t uid, const char *name)
;
continue;
}
+ /* skip comments */
+ if (pwline[0] == '#')
+ continue;
if (pwmatchline(search, uid, name))
return 1;
}
View
21 contrib/mtree/spec.c
@@ -1,4 +1,4 @@
-/* $NetBSD: spec.c,v 1.85 2012/12/20 16:43:16 christos Exp $ */
+/* $NetBSD: spec.c,v 1.87 2013/10/16 17:26:14 christos Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -67,7 +67,7 @@
#if 0
static char sccsid[] = "@(#)spec.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: spec.c,v 1.85 2012/12/20 16:43:16 christos Exp $");
+__RCSID("$NetBSD: spec.c,v 1.87 2013/10/16 17:26:14 christos Exp $");
#endif
#endif /* not lint */
@@ -80,6 +80,7 @@ __RCSID("$NetBSD: spec.c,v 1.85 2012/12/20 16:43:16 christos Exp $");
#include <grp.h>
#include <pwd.h>
#include <stdarg.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -217,6 +218,12 @@ noparent: mtree_err("no parent node");
/*
* empty tree
*/
+ /*
+ * Allow a bare "." root node by forcing it to
+ * type=dir for compatibility with FreeBSD.
+ */
+ if (strcmp(centry->name, ".") == 0 && centry->type == 0)
+ centry->type = F_DIR;
if (strcmp(centry->name, ".") != 0 ||
centry->type != F_DIR)
mtree_err(
@@ -350,16 +357,18 @@ dump_nodes(const char *dir, NODE *root, int pathlast)
appendfield(pathlast, "mode=%#o", cur->st_mode);
if (MATCHFLAG(F_DEV) &&
(cur->type == F_BLOCK || cur->type == F_CHAR))
- appendfield(pathlast, "device=%#llx", (long long)cur->st_rdev);
+ appendfield(pathlast, "device=%#jx",
+ (uintmax_t)cur->st_rdev);
if (MATCHFLAG(F_NLINK))
appendfield(pathlast, "nlink=%d", cur->st_nlink);
if (MATCHFLAG(F_SLINK))
appendfield(pathlast, "link=%s", vispath(cur->slink));
if (MATCHFLAG(F_SIZE))
- appendfield(pathlast, "size=%lld", (long long)cur->st_size);
+ appendfield(pathlast, "size=%ju",
+ (uintmax_t)cur->st_size);
if (MATCHFLAG(F_TIME))
- appendfield(pathlast, "time=%lld.%09ld",
- (long long)cur->st_mtimespec.tv_sec,
+ appendfield(pathlast, "time=%jd.%09ld",
+ (intmax_t)cur->st_mtimespec.tv_sec,
cur->st_mtimespec.tv_nsec);
if (MATCHFLAG(F_CKSUM))
appendfield(pathlast, "cksum=%lu", cur->cksum);
View
5 etc/defaults/rc.conf
@@ -573,6 +573,8 @@ sendmail_enable="NO" # Run the sendmail inbound daemon (YES/NO).
sendmail_pidfile="/var/run/sendmail.pid" # sendmail pid file
sendmail_procname="/usr/sbin/sendmail" # sendmail process name
sendmail_flags="-L sm-mta -bd -q30m" # Flags to sendmail (as a server)
+sendmail_cert_create="YES" # Create a server certificate if none (YES/NO)
+#sendmail_cert_cn="CN" # CN of the generate certificate
sendmail_submit_enable="YES" # Start a localhost-only MTA for mail submission
sendmail_submit_flags="-L sm-mta -bd -q30m -ODaemonPortOptions=Addr=localhost"
# Flags for localhost-only MTA
@@ -619,6 +621,9 @@ quotacheck_flags="-a" # Check all file system quotas (if enabled)
accounting_enable="NO" # Turn on process accounting (or NO).
ibcs2_enable="NO" # Ibcs2 (SCO) emulation loaded at startup (or NO).
ibcs2_loaders="coff" # List of additional Ibcs2 loaders (or NO).
+firstboot_sentinel="/firstboot" # Scripts with "firstboot" keyword are run if
+ # this file exists. Should be on a R/W filesystem so
+ # the file can be deleted after the boot completes.
# Emulation/compatibility services provided by /etc/rc.d/abi
sysvipc_enable="NO" # Load System V IPC primitives at startup (or NO).
View
25 etc/rc
@@ -82,10 +82,15 @@ if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; then
fi
fi
+# If the firstboot sentinel doesn't exist, we want to skip firstboot scripts.
+if ! [ -e ${firstboot_sentinel} ]; then
+ skip_firstboot="-s firstboot"
+fi
+
# Do a first pass to get everything up to $early_late_divider so that
# we can do a second pass that includes $local_startup directories
#
-files=`rcorder ${skip} /etc/rc.d/* 2>/dev/null`
+files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* 2>/dev/null`
_rc_elem_done=' '
for _rc_elem in ${files}; do
@@ -160,6 +165,15 @@ else
files=`rcorder ${skip} /etc/rc.d/* ${local_rc} 2>/dev/null`
for _rc_elem in ${files}; do
+
+ # The firstboot sentinel might be on a newly mounted filesystem; look for it
+ # again and unset skip_firstboot if we find it.
+ if [ -e ${firstboot_sentinel} ]; then
+ skip_firstboot=""
+ fi
+
+ files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} 2>/dev/null`
+ for _rc_elem in ${files}; do
case "$_rc_elem_done" in
*" $_rc_elem "*) continue ;;
esac
@@ -169,6 +183,15 @@ else
fi
+# Remove the firstboot sentinel, and reboot if it was requested.
+if [ -e ${firstboot_sentinel} ]; then
+ rm ${firstboot_sentinel}
+ if [ -e ${firstboot_sentinel}-reboot ]; then
+ rm ${firstboot_sentinel}-reboot
+ kill -INT 1
+ fi
+fi
+
echo ''
date
exit 0
View
182 etc/rc.d/jail
@@ -22,7 +22,7 @@ status_cmd="jail_status"
extra_commands="config console status"
: ${jail_conf:=/etc/jail.conf}
: ${jail_program:=/usr/sbin/jail}
-: ${jail_consolecmd:=/bin/sh}
+: ${jail_consolecmd:=/usr/bin/login -f root}
: ${jail_jexec:=/usr/sbin/jexec}
: ${jail_jls:=/usr/sbin/jls}
@@ -94,7 +94,7 @@ extract_var()
#
parse_options()
{
- local _j
+ local _j _p
_j=$1
_confwarn=0
@@ -132,7 +132,9 @@ parse_options()
#
_confwarn=1
if [ -r "$jail_conf" -o -r "$_jconf" ]; then
- warn "$_conf is created and used for jail $_j."
+ if ! checkyesno jail_parallel_start; then
+ warn "$_conf is created and used for jail $_j."
+ fi
fi
/usr/bin/install -m 0644 -o root -g wheel /dev/null $_conf || return 1
@@ -166,7 +168,7 @@ parse_options()
jail_handle_ips_option $_ip $_interface
alias=0
while : ; do
- eval _x=\"\$jail_${_jail}_ip_multi${alias}\"
+ eval _x=\"\$jail_${_j}_ip_multi${alias}\"
[ -z "$_x" ] && break
jail_handle_ips_option $_x $_interface
@@ -208,6 +210,7 @@ parse_options()
eval : \${jail_${_j}_devfs_enable:=${jail_devfs_enable:-NO}}
if checkyesno jail_${_j}_devfs_enable; then
echo " mount.devfs;"
+ eval _ruleset=\${jail_${_j}_devfs_ruleset:-${jail_devfs_ruleset}}
case $_ruleset in
"") ;;
[0-9]*) echo " devfs_ruleset = \"$_ruleset\";" ;;
@@ -217,7 +220,7 @@ parse_options()
# mount(8) only accepts an integer.
# This should accept a ruleset name.
;;
- *) warn "devfs_ruleset must be integer." ;;
+ *) warn "devfs_ruleset must be an integer." ;;
esac
if [ -r $_fstab ]; then
echo " mount.fstab = \"$_fstab\";"
@@ -234,8 +237,6 @@ parse_options()
"\"procfs ${_rootdir%/}/proc procfs rw 0 0\";"
fi
- echo " ${_parameters};"
-
eval : \${jail_${_j}_mount_enable:=${jail_mount_enable:-NO}}
if checkyesno jail_${_j}_mount_enable; then
echo " allow.mount;" >> $_conf
@@ -243,6 +244,9 @@ parse_options()
extract_var $_j set_hostname_allow allow.set_hostname YN NO
extract_var $_j sysvipc_allow allow.sysvipc YN NO
+ for _p in $_parameters; do
+ echo " ${_p%\;};"
+ done
echo "}"
) >> $_conf
@@ -327,9 +331,9 @@ jail_extract_address()
#
jail_handle_ips_option()
{
- local _x _type _i _iface
+ local _x _type _i _defif
_x=$1
- _iface=$2
+ _defif=$2
if [ -z "${_x}" ]; then
# No IP given. This can happen for the primary address
@@ -353,7 +357,8 @@ jail_handle_ips_option()
_type=""
_addr=""
_mask=""
- jail_extract_address $_i $_iface
+ _iface=""
+ jail_extract_address $_i $_defif
# make sure we got an address.
case $_addr in
@@ -364,10 +369,10 @@ jail_handle_ips_option()
# Append address to list of addresses for the jail command.
case $_type in
inet)
- echo " ip4.addr += \"${_addr}${_mask}\";"
+ echo " ip4.addr += \"${_iface:+${_iface}|}${_addr}${_mask}\";"
;;
inet6)
- echo " ip6.addr += \"${_addr}${_mask}\";"
+ echo " ip6.addr += \"${_iface:+${_iface}|}${_addr}${_mask}\";"
need_dad_wait=1
;;
esac
@@ -376,26 +381,35 @@ jail_handle_ips_option()
jail_config()
{
+ local _j
+
case $1 in
_ALL) return ;;
esac
- for _jail in $@; do
- if parse_options $_jail; then
- echo "$_jail: parameters are in $_conf."
+ for _j in $@; do
+ _j=$(echo $_j | tr /. _)
+ if parse_options $_j; then
+ echo "$_j: parameters are in $_conf."
fi
done
}
jail_console()
{
+ local _j _cmd
+
# One argument that is not _ALL.
case $#:$1 in
- 1:_ALL) err 3 "Specify a jail name." ;;
- 1:*) ;;
- *) err 3 "Specify a jail name." ;;
+ 0:*|1:_ALL) err 3 "Specify a jail name." ;;
+ 1:*) ;;
+ esac
+ _j=$(echo $1 | tr /. _)
+ shift
+ case $# in
+ 0) eval _cmd=\${jail_${_j}_consolecmd:-$jail_consolecmd} ;;
+ *) _cmd=$@ ;;
esac
- eval _cmd=\${jail_$1_consolecmd:-$jail_consolecmd}
- $jail_jexec $1 $_cmd
+ $jail_jexec $_j $_cmd
}
jail_status()
@@ -406,67 +420,139 @@ jail_status()
jail_start()
{
+ local _j _jid _jn _jl
+
if [ $# = 0 ]; then
return
fi
echo -n 'Starting jails:'
case $1 in
_ALL)
- echo -n ' '
command=$jail_program
rc_flags=$jail_flags
command_args="-f $jail_conf -c"
- $command $rc_flags $command_args "*"
+ _tmp=`mktemp -t jail` || exit 3
+ if $command $rc_flags $command_args >> $_tmp 2>&1; then
+ $jail_jls -nq | while read IN; do
+ _jn=$(echo $IN | tr " " "\n" | grep ^name=)
+ _jid=$(echo $IN | tr " " "\n" | grep ^jid=)
+ echo -n " ${_jn#name=}"
+ echo "${_jid#jid=}" \
+ > /var/run/jail_${_jn#name=}.id
+ done
+ else
+ tail -1 $_tmp
+ fi
+ rm -f $_tmp
echo '.'
return
;;
esac
- _tmp=`mktemp -t jail` || exit 3
- for _jail in $@; do
- parse_options $_jail || continue
-
- eval rc_flags=\${jail_${_j}_flags:-$jail_flags}
- eval command=\${jail_${_j}_program:-$jail_program}
- if checkyesno jail_parallel_start; then
- command_args="-i -f $_conf -c $_jail &"
- else
- command_args="-i -f $_conf -c $_jail"
- fi
- if $command $rc_flags $command_args \
- >> $_tmp 2>&1 </dev/null; then
- echo -n " ${_hostname:-${_jail}}"
- else
- echo " cannot start jail \"${_hostname:-${jail}}\": "
- cat $_tmp
- fi
- rm -f $_tmp
- done
+ if checkyesno jail_parallel_start; then
+ #
+ # Start jails in parallel and then check jail id when
+ # jail_parallel_start is YES.
+ #
+ _jl=
+ for _j in $@; do
+ _j=$(echo $_j | tr /. _)
+ parse_options $_j || continue
+
+ _jl="$_jl $_j"
+ eval rc_flags=\${jail_${_j}_flags:-$jail_flags}
+ eval command=\${jail_${_j}_program:-$jail_program}
+ command_args="-i -f $_conf -c $_j"
+ $command $rc_flags $command_args \
+ >/dev/null 2>&1 </dev/null &
+ done
+ sleep 1
+ for _j in $_jl; do
+ echo -n " ${_hostname:-${_j}}"
+ if _jid=$($jail_jls -n -j $_j | tr " " "\n" | \
+ grep ^jid=); then
+ echo "${_jid#jid=}" > /var/run/jail_${_j}.id
+ else
+ rm -f /var/run/jail_${_j}.id
+ echo " cannot start jail " \
+ "\"${_hostname:-${_j}}\": "
+ fi
+ done
+ else
+ #
+ # Start jails one-by-one when jail_parallel_start is NO.
+ #
+ for _j in $@; do
+ _j=$(echo $_j | tr /. _)
+ parse_options $_j || continue
+
+ eval rc_flags=\${jail_${_j}_flags:-$jail_flags}
+ eval command=\${jail_${_j}_program:-$jail_program}
+ command_args="-i -f $_conf -c $_j"
+ _tmp=`mktemp -t jail` || exit 3
+ if $command $rc_flags $command_args \
+ >> $_tmp 2>&1 </dev/null; then
+ echo -n " ${_hostname:-${_j}}"
+ _jid=$($jail_jls -n -j $_j | \
+ tr " " "\n" | grep ^jid=)
+ echo "${_jid#jid=}" > /var/run/jail_${_j}.id
+ else
+ rm -f /var/run/jail_${_j}.id
+ echo " cannot start jail " \
+ "\"${_hostname:-${_j}}\": "
+ cat $_tmp
+ fi
+ rm -f $_tmp
+ done
+ fi
echo '.'
}
jail_stop()
{
+ local _j _jn
+
if [ $# = 0 ]; then
return
fi
echo -n 'Stopping jails:'
case $1 in
_ALL)
- echo -n ' '
command=$jail_program
rc_flags=$jail_flags
command_args="-f $jail_conf -r"
- $command $rc_flags $command_args "*"
+ $jail_jls -nq | while read IN; do
+ _jn=$(echo $IN | tr " " "\n" | grep ^name=)
+ echo -n " ${_jn#name=}"
+ _tmp=`mktemp -t jail` || exit 3
+ $command $rc_flags $command_args ${_jn#name=} \
+ >> $_tmp 2>&1
+ if $jail_jls -j ${_jn#name=} > /dev/null 2>&1; then
+ tail -1 $_tmp
+ else
+ rm -f /var/run/jail_${_jn#name=}.id
+ fi
+ rm -f $_tmp
+ done
echo '.'
return
;;
esac
- for _jail in $@; do
- parse_options $_jail || continue
+ for _j in $@; do
+ _j=$(echo $_j | tr /. _)
+ parse_options $_j || continue
+ if ! $jail_jls -j $_j > /dev/null 2>&1; then
+ continue
+ fi
eval command=\${jail_${_j}_program:-$jail_program}
- if $command -q -f $_conf -r $_jail; then
- echo -n " ${_hostname:-${_jail}}"
+ echo -n " ${_hostname:-${_j}}"
+ _tmp=`mktemp -t jail` || exit 3
+ $command -q -f $_conf -r $_j >> $_tmp 2>&1
+ if $jail_jls -j $_j > /dev/null 2>&1; then
+ tail -1 $_tmp
+ else
+ rm -f /var/run/jail_${_j}.id
fi
+ rm -f $_tmp
done
echo '.'
}
View
125 etc/rc.d/sendmail
@@ -24,6 +24,8 @@ command=${sendmail_program:-/usr/sbin/${name}}
pidfile=${sendmail_pidfile:-/var/run/${name}.pid}
procname=${sendmail_procname:-/usr/sbin/${name}}
+CERTDIR=/etc/mail/certs
+
case ${sendmail_enable} in
[Nn][Oo][Nn][Ee])
sendmail_enable="NO"
@@ -44,6 +46,118 @@ if checkyesno sendmail_submit_enable; then
sendmail_outbound_enable="NO"
fi
+sendmail_cert_create()
+{
+ cnname="${sendmail_cert_cn:-`hostname`}"
+ cnname="${cnname:-amnesiac}"
+
+ # based upon:
+ # http://www.sendmail.org/~ca/email/other/cagreg.html
+ CAdir=`mktemp -d` &&
+ certpass=`(date; ps ax ; hostname) | md5 -q`
+
+ # make certificate authority
+ ( cd "$CAdir" &&
+ chmod 700 "$CAdir" &&
+ mkdir certs crl newcerts &&
+ echo "01" > serial &&
+ :> index.txt &&
+
+ cat <<-OPENSSL_CNF > openssl.cnf &&
+ RANDFILE = $CAdir/.rnd
+ [ ca ]
+ default_ca = CA_default
+ [ CA_default ]
+ dir = .
+ certs = \$dir/certs # Where the issued certs are kept
+ crl_dir = \$dir/crl # Where the issued crl are kept
+ database = \$dir/index.txt # database index file.
+ new_certs_dir = \$dir/newcerts # default place for new certs.
+ certificate = \$dir/cacert.pem # The CA certificate
+ serial = \$dir/serial # The current serial number
+ crlnumber = \$dir/crlnumber # the current crl number
+ crl = \$dir/crl.pem # The current CRL
+ private_key = \$dir/cakey.pem
+ x509_extensions = usr_cert # The extentions to add to the cert
+ name_opt = ca_default # Subject Name options
+ cert_opt = ca_default # Certificate field options
+ default_days = 365 # how long to certify for
+ default_crl_days= 30 # how long before next CRL
+ default_md = default # use public key default MD
+ preserve = no # keep passed DN ordering
+ policy = policy_anything
+ [ policy_anything ]
+ countryName = optional
+ stateOrProvinceName = optional
+ localityName = optional
+ organizationName = optional
+ organizationalUnitName = optional
+ commonName = supplied
+ emailAddress = optional
+ [ req ]
+ default_bits = 2048
+ default_keyfile = privkey.pem
+ distinguished_name = req_distinguished_name
+ attributes = req_attributes
+ x509_extensions = v3_ca # The extentions to add to the self signed cert
+ string_mask = utf8only
+ prompt = no
+ [ req_distinguished_name ]
+ countryName = XX
+ stateOrProvinceName = Some-state
+ localityName = Some-city
+ 0.organizationName = Some-org
+ CN = $cnname
+ [ req_attributes ]
+ challengePassword = foobar
+ unstructuredName = An optional company name
+ [ usr_cert ]
+ basicConstraints=CA:FALSE
+ nsComment = "OpenSSL Generated Certificate"
+ subjectKeyIdentifier=hash
+ authorityKeyIdentifier=keyid,issuer
+ [ v3_req ]
+ basicConstraints = CA:FALSE
+ keyUsage = nonRepudiation, digitalSignature, keyEncipherment
+ [ v3_ca ]
+ subjectKeyIdentifier=hash
+ authorityKeyIdentifier=keyid:always,issuer
+ basicConstraints = CA:true
+ OPENSSL_CNF
+
+ # though we use a password, the key is discarded and never used
+ openssl req -batch -passout pass:"$certpass" -new -x509 \
+ -keyout cakey.pem -out cacert.pem -days 3650 \
+ -config openssl.cnf -newkey rsa:2048 >/dev/null 2>&1 &&
+
+ # make new certificate
+ openssl req -batch -nodes -new -x509 -keyout newkey.pem \
+ -out newreq.pem -days 365 -config openssl.cnf \
+ -newkey rsa:2048 >/dev/null 2>&1 &&
+
+ # sign certificate
+ openssl x509 -x509toreq -in newreq.pem -signkey newkey.pem \
+ -out tmp.pem >/dev/null 2>&1 &&
+ openssl ca -notext -config openssl.cnf \
+ -out newcert.pem -keyfile cakey.pem -cert cacert.pem \
+ -key "$certpass" -batch -infiles tmp.pem >/dev/null 2>&1 &&
+
+ mkdir -p "$CERTDIR" &&
+ chmod 0755 "$CERTDIR" &&
+ chmod 644 newcert.pem cacert.pem &&
+ chmod 600 newkey.pem &&
+ cp -p newcert.pem "$CERTDIR"/host.cert &&
+ cp -p cacert.pem "$CERTDIR"/cacert.pem &&
+ cp -p newkey.pem "$CERTDIR"/host.key &&
+ ln -s cacert.pem "$CERTDIR"/`openssl x509 -hash -noout \
+ -in cacert.pem`.0)
+
+ retVal="$?"
+ rm -rf "$CAdir"
+
+ return "$retVal"
+}
+
sendmail_precmd()
{
# Die if there's pre-8.10 custom configuration file. This check is
@@ -71,6 +185,17 @@ sendmail_precmd()
/usr/bin/newaliases
fi
fi
+
+ if checkyesno sendmail_cert_create && [ ! \( \
+ -f "$CERTDIR/host.cert" -o -f "$CERTDIR/host.key" -o \
+ -f "$CERTDIR/cacert.pem" \) ]; then
+ if ! openssl version >/dev/null 2>&1; then
+ warn "OpenSSL not available, but sendmail_cert_create is YES."
+ else
+ info Creating certificate for sendmail.
+ sendmail_cert_create
+ fi
+ fi
}
run_rc_command "$1"
View
15 etc/sendmail/freebsd.mc
@@ -42,6 +42,11 @@ divert(-1)
# /usr/share/sendmail/cf/README or
# /usr/src/contrib/sendmail/cf/README
#
+#
+# NOTE: If you enable RunAsUser, make sure that you adjust the permissions
+# and owner of the SSL certificates and keys in /etc/mail/certs to be usable
+# by that user.
+#
divert(0)
VERSIONID(`$FreeBSD$')
@@ -54,6 +59,16 @@ FEATURE(local_lmtp)
FEATURE(mailertable, `hash -o /etc/mail/mailertable')
FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')
+dnl Enable STARTTLS for receiving email.
+define(`CERT_DIR', `/etc/mail/certs')dnl
+define(`confSERVER_CERT', `CERT_DIR/host.cert')dnl
+define(`confSERVER_KEY', `CERT_DIR/host.key')dnl
+define(`confCLIENT_CERT', `CERT_DIR/host.cert')dnl
+define(`confCLIENT_KEY', `CERT_DIR/host.key')dnl
+define(`confCACERT', `CERT_DIR/cacert.pem')dnl
+define(`confCACERT_PATH', `CERT_DIR')dnl
+define(`confDH_PARAMETERS', `CERT_DIR/dh.param')dnl
+
dnl Uncomment to allow relaying based on your MX records.
dnl NOTE: This can allow sites to use your server as a backup MX without
dnl your permission.
View
1  include/pthread.h
@@ -175,6 +175,7 @@ int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int);
{
#define pthread_cleanup_pop(execute) \
+ (void)0; \
} \
__pthread_cleanup_pop_imp(execute); \
}
View
2  lib/libc/iconv/citrus_mapper.c
@@ -381,7 +381,9 @@ _citrus_mapper_close(struct _citrus_mapper *cm)
_CITRUS_HASH_REMOVE(cm, cm_entry);
free(cm->cm_key);
}
+ UNLOCK(&cm_lock);
mapper_close(cm);
+ return;
quit:
UNLOCK(&cm_lock);
}
View
1  lib/libvmmapi/vmmapi.c
@@ -415,6 +415,7 @@ static struct {
{ "mtrap_exit", VM_CAP_MTRAP_EXIT },
{ "pause_exit", VM_CAP_PAUSE_EXIT },
{ "unrestricted_guest", VM_CAP_UNRESTRICTED_GUEST },
+ { "enable_invpcid", VM_CAP_ENABLE_INVPCID },
{ 0 }
};
View
11 lib/libyaml/Makefile
@@ -2,15 +2,13 @@
LIBYAML= ${.CURDIR}/../../contrib/libyaml
-LIB= bsdyml
-SHLIB_MAJOR= 0
-INCS= bsdyml.h
+LIB= yaml
+PRIVATELIB= true
+SHLIB_MAJOR= 1
SRCS= api.c dumper.c emitter.c loader.c \
parser.c reader.c scanner.c writer.c
-MAN= libbsdyml.3
.PATH: ${LIBYAML}/src ${LIBYAML}/include
-CLEANFILES= bsdyml.h
WARNS?= 1
CFLAGS+= -I${LIBYAML}/include \
@@ -18,7 +16,4 @@ CFLAGS+= -I${LIBYAML}/include \
-I${.CURDIR} \
-DHAVE_CONFIG_H
-bsdyml.h: yaml.h
- cp -f ${.ALLSRC} ${.TARGET}
-
.include <bsd.lib.mk>
View
61 lib/libyaml/libbsdyml.3
@@ -1,61 +0,0 @@
-.\" Copyright (c) 2013 Baptiste Daroussin <bapt@FreeBSD.org>
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd March 05, 2013
-.Dt LIBBSDYML 3
-.Os
-.Sh NAME
-.Nm libbsdyml
-.Nd LibYAML library for parsing and emitting YAML
-.Sh SYNOPSIS
-.In bsdyml.h
-.Sh DESCRIPTION
-The
-.Nm
-library is a verbatim copy of the LibYAML version 0.1.4
-.Pp
-The
-.Nm
-library is intended to be used within the
-.Fx
-base system only.
-Use of the
-.Nm
-library for other purposes is not supported and discouraged.
-.Pp
-To avoid version and autoconfiguration issues, the library has been
-renamed to
-.Nm
-rather than retain the original LibYAML library and include file names
-to prevent confusion and autoconfiguration issues for 3rd party
-software.
-.Sh SEE ALSO
-For full documentation, please see the LibYAML webpage at
-.Pa http://pyyaml.org/wiki/LibYAML .
-.Sh AUTHORS
-.An -nosplit
-The original LibYAML was written by
-.An Kirill Simonov Aq xi@resolvent.net .
View
19 share/man/man5/rc.conf.5
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 12, 2013
+.Dd October 19, 2013
.Dt RC.CONF 5
.Os
.Sh NAME
@@ -3675,6 +3675,23 @@ and if
is set to
.Dq Li YES ,
this specifies a list of additional iBCS2 loaders to enable.
+.It Va firstboot_sentinel
+.Pq Vt str
+This variable specifies the full path to a
+.Dq first boot
+sentinel file.
+If a file exists with this path,
+.Pa rc.d
+scripts with the
+.Dq firstboot
+keyword will be run on startup and the sentinel file will be deleted
+after the boot process completes.
+The sentinel file must be located on a writable file system which is
+mounted no later than
+.Va early_late_divider
+to function properly.
+The default is
+.Pa /firstboot .
.It Va linux_enable
.Pq Vt bool
Set to
View
21 share/man/man8/rc.8
@@ -35,7 +35,7 @@
.\" @(#)rc.8 8.2 (Berkeley) 12/11/93
.\" $FreeBSD$
.\"
-.Dd September 23, 2013
+.Dd October 19, 2013
.Dt RC 8
.Os
.Sh NAME
@@ -129,6 +129,13 @@ and add
(only allow vnet-enabled jails) to the list of KEYWORDS to skip in
.Xr rcorder 8 .
.It
+If the file
+.Va ${firstboot_sentinel}
+does not exist, add
+.Dq Li firstboot
+to the list of KEYWORDS to skip in
+.Xr rcorder 8 .
+.It
Invoke
.Xr rcorder 8
to order the files in
@@ -156,6 +163,11 @@ Stop processing when the script that is the value of the
.Va $early_late_divider
has been run.
.It
+Check again to see if the file
+.Va ${firstboot_sentinel}
+exists (in case it is located on a newly mounted file system)
+and adjust the list of KEYWORDs to skip appropriately.
+.It
Re-run
.Xr rcorder 8 ,
this time including the scripts in the
@@ -164,6 +176,13 @@ directories.
Ignore everything up to the
.Va $early_late_divider ,
then start executing the scripts as described above.
+.It
+If the file
+.Va ${firstboot_sentinel}
+exists, delete it.
+If the file
+.Va ${firstboot_sentinel}-reboot
+also exists (because it was created by a script), then delete it and reboot.
.El
.Ss Operation of Nm rc.shutdown
.Bl -enum
View
38 share/man/man8/rc.sendmail.8
@@ -26,7 +26,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd March 30, 2002
+.Dd October 19, 2013
.Dt RC.SENDMAIL 8
.Os
.Sh NAME
@@ -119,6 +119,42 @@ The
.Dq Li NONE
option is deprecated and should not be used.
It will be removed in a future release.
+.It Va sendmail_cert_create
+.Pq Vt str
+If
+.Va sendmail_enable
+is set to
+.Dq Li YES ,
+create a signed certificate
+.Pa /etc/mail/certs/host.cert
+representing
+.Pa /etc/mail/certs/host.key
+by the CA certificate in
+.Pa /etc/mail/certs/cacert.pem .
+This will enable connecting hosts to negotiate STARTTLS allowing incoming
+email to be encrypted in transit.
+.Xr sendmail 8
+needs to be configured to use these generated files.
+The default configuration in
+.Pa /etc/mail/freebsd.mc
+has the required options in it.
+.It Va sendmail_cert_cn
+.Pq Vt str
+If
+.Va sendmail_enable
+is set to
+.Dq Li YES
+and
+.Va sendmail_cert_create
+is set to
+.Dq Li YES ,
+this is the Common Name (CN) of the certificate that will be created.
+If
+.Va sendmail_cert_cn
+is not set, the system's hostname will be used.
+If there is no hostname set,
+.Dq Li amnesiac
+will be used.
.It Va sendmail_flags
.Pq Vt str
If
View
2  share/mk/bsd.libnames.mk
@@ -21,7 +21,6 @@ LIBAVL?= ${DESTDIR}${LIBDIR}/libavl.a
LIBBEGEMOT?= ${DESTDIR}${LIBDIR}/libbegemot.a
LIBBLUETOOTH?= ${DESTDIR}${LIBDIR}/libbluetooth.a
LIBBSDXML?= ${DESTDIR}${LIBDIR}/libbsdxml.a
-LIBBSDYML?= ${DESTDIR}${LIBDIR}/libbsdyml.a
LIBBSM?= ${DESTDIR}${LIBDIR}/libbsm.a
LIBBSNMP?= ${DESTDIR}${LIBDIR}/libbsnmp.a
LIBBZ2?= ${DESTDIR}${LIBDIR}/libbz2.a
@@ -166,6 +165,7 @@ LIBWIND?= ${DESTDIR}${LIBDIR}/libwind.a
LIBWRAP?= ${DESTDIR}${LIBDIR}/libwrap.a
LIBXPG4?= ${DESTDIR}${LIBDIR}/libxpg4.a
LIBY?= ${DESTDIR}${LIBDIR}/liby.a
+LIBYAML?= ${DESTDIR}${LIBPRIVATEDIR}/libyaml.a
LIBYPCLNT?= ${DESTDIR}${LIBDIR}/libypclnt.a
LIBZ?= ${DESTDIR}${LIBDIR}/libz.a
LIBZFS?= ${DESTDIR}${LIBDIR}/libzfs.a
View
2  sys/amd64/amd64/pmap.c
@@ -371,6 +371,8 @@ int pmap_pcid_enabled = 1;
SYSCTL_INT(_vm_pmap, OID_AUTO, pcid_enabled, CTLFLAG_RDTUN, &pmap_pcid_enabled,
0, "Is TLB Context ID enabled ?");
int invpcid_works = 0;
+SYSCTL_INT(_vm_pmap, OID_AUTO, invpcid_works, CTLFLAG_RD, &invpcid_works, 0,
+ "Is the invpcid instruction available ?");
static int
pmap_pcid_save_cnt_proc(SYSCTL_HANDLER_ARGS)
View
1  sys/amd64/include/vmm.h
@@ -223,6 +223,7 @@ enum vm_cap_type {
VM_CAP_MTRAP_EXIT,
VM_CAP_PAUSE_EXIT,
VM_CAP_UNRESTRICTED_GUEST,
+ VM_CAP_ENABLE_INVPCID,
VM_CAP_MAX
};
View
23 sys/amd64/vmm/intel/vmx.c
@@ -164,6 +164,7 @@ static int cap_halt_exit;
static int cap_pause_exit;
static int cap_unrestricted_guest;
static int cap_monitor_trap;
+static int cap_invpcid;
static struct unrhdr *vpid_unr;
static u_int vpid_alloc_failed;
@@ -660,6 +661,11 @@ vmx_init(void)
PROCBASED2_UNRESTRICTED_GUEST, 0,
&tmp) == 0);
+ cap_invpcid = (vmx_set_ctlreg(MSR_VMX_PROCBASED_CTLS2,
+ MSR_VMX_PROCBASED_CTLS2, PROCBASED2_ENABLE_INVPCID, 0,
+ &tmp) == 0);
+
+
/* Initialize EPT */
error = ept_init();
if (error) {
@@ -828,6 +834,7 @@ vmx_vminit(struct vm *vm, pmap_t pmap)
vmx->cap[i].set = 0;
vmx->cap[i].proc_ctls = procbased_ctls;
+ vmx->cap[i].proc_ctls2 = procbased_ctls2;
vmx->state[i].lastcpu = -1;
vmx->state[i].vpid = vpid[i];
@@ -1932,6 +1939,10 @@ vmx_getcap(void *arg, int vcpu, int type, int *retval)
if (cap_unrestricted_guest)
ret = 0;
break;
+ case VM_CAP_ENABLE_INVPCID:
+ if (cap_invpcid)
+ ret = 0;
+ break;
default:
break;
}
@@ -1988,11 +1999,21 @@ vmx_setcap(void *arg, int vcpu, int type, int val)
case VM_CAP_UNRESTRICTED_GUEST:
if (cap_unrestricted_guest) {
retval = 0;
- baseval = procbased_ctls2;
+ pptr = &vmx->cap[vcpu].proc_ctls2;
+ baseval = *pptr;
flag = PROCBASED2_UNRESTRICTED_GUEST;
reg = VMCS_SEC_PROC_BASED_CTLS;
}
break;
+ case VM_CAP_ENABLE_INVPCID:
+ if (cap_invpcid) {
+ retval = 0;
+ pptr = &vmx->cap[vcpu].proc_ctls2;
+ baseval = *pptr;
+ flag = PROCBASED2_ENABLE_INVPCID;
+ reg = VMCS_SEC_PROC_BASED_CTLS;
+ }
+ break;
default:
break;
}
View
1  sys/amd64/vmm/intel/vmx.h
@@ -84,6 +84,7 @@ struct vmxctx {
struct vmxcap {
int set;
uint32_t proc_ctls;
+ uint32_t proc_ctls2;
};
struct vmxstate {
View
1  sys/amd64/vmm/intel/vmx_controls.h
@@ -68,6 +68,7 @@
#define PROCBASED2_WBINVD_EXITING (1 << 6)
#define PROCBASED2_UNRESTRICTED_GUEST (1 << 7)
#define PROCBASED2_PAUSE_LOOP_EXITING (1 << 10)
+#define PROCBASED2_ENABLE_INVPCID (1 << 12)
/* VM Exit Controls */
#define VM_EXIT_SAVE_DEBUG_CONTROLS (1 << 2)
View
64 sys/amd64/vmm/vmm_dev.c
@@ -60,7 +60,10 @@ struct vmmdev_softc {
struct vm *vm; /* vm instance cookie */
struct cdev *cdev;
SLIST_ENTRY(vmmdev_softc) link;
+ int flags;
};
+#define VSC_LINKED 0x01
+
static SLIST_HEAD(, vmmdev_softc) head;
static struct mtx vmmdev_mtx;
@@ -104,7 +107,6 @@ vmmdev_rw(struct cdev *cdev, struct uio *uio, int flags)
static char zerobuf[PAGE_SIZE];
error = 0;
- mtx_lock(&vmmdev_mtx);
sc = vmmdev_lookup2(cdev);
if (sc == NULL)
error = ENXIO;
@@ -134,8 +136,6 @@ vmmdev_rw(struct cdev *cdev, struct uio *uio, int flags)
vm_gpa_release(cookie);
}
}
-
- mtx_unlock(&vmmdev_mtx);
return (error);
}
@@ -379,34 +379,28 @@ vmmdev_mmap_single(struct cdev *cdev, vm_ooffset_t *offset,
int error;
struct vmmdev_softc *sc;
- mtx_lock(&vmmdev_mtx);
-
sc = vmmdev_lookup2(cdev);
if (sc != NULL && (nprot & PROT_EXEC) == 0)
error = vm_get_memobj(sc->vm, *offset, size, offset, object);
else
error = EINVAL;
- mtx_unlock(&vmmdev_mtx);
-
return (error);
}
static void
-vmmdev_destroy(struct vmmdev_softc *sc, boolean_t unlink)
+vmmdev_destroy(void *arg)
{
- /*
- * XXX must stop virtual machine instances that may be still
- * running and cleanup their state.
- */
- if (sc->cdev)
+ struct vmmdev_softc *sc = arg;
+
+ if (sc->cdev != NULL)
destroy_dev(sc->cdev);
- if (sc->vm)
+ if (sc->vm != NULL)
vm_destroy(sc->vm);
- if (unlink) {
+ if ((sc->flags & VSC_LINKED) != 0) {
mtx_lock(&vmmdev_mtx);
SLIST_REMOVE(&head, sc, vmmdev_softc, link);
mtx_unlock(&vmmdev_mtx);
@@ -421,27 +415,38 @@ sysctl_vmm_destroy(SYSCTL_HANDLER_ARGS)
int error;
char buf[VM_MAX_NAMELEN];
struct vmmdev_softc *sc;
+ struct cdev *cdev;
strlcpy(buf, "beavis", sizeof(buf));
error = sysctl_handle_string(oidp, buf, sizeof(buf), req);
if (error != 0 || req->newptr == NULL)
return (error);
- /*
- * XXX TODO if any process has this device open then fail
- */
-
mtx_lock(&vmmdev_mtx);
sc = vmmdev_lookup(buf);
- if (sc == NULL) {
+ if (sc == NULL || sc->cdev == NULL) {
mtx_unlock(&vmmdev_mtx);
return (EINVAL);
}
- sc->cdev->si_drv1 = NULL;
+ /*
+ * The 'cdev' will be destroyed asynchronously when 'si_threadcount'
+ * goes down to 0 so we should not do it again in the callback.
+ */
+ cdev = sc->cdev;
+ sc->cdev = NULL;
mtx_unlock(&vmmdev_mtx);
- vmmdev_destroy(sc, TRUE);
+ /*
+ * Schedule the 'cdev' to be destroyed:
+ *
+ * - any new operations on this 'cdev' will return an error (ENXIO).
+ *
+ * - when the 'si_threadcount' dwindles down to zero the 'cdev' will
+ * be destroyed and the callback will be invoked in a taskqueue
+ * context.
+ */
+ destroy_dev_sched_cb(cdev, vmmdev_destroy, sc);
return (0);
}
@@ -462,6 +467,7 @@ sysctl_vmm_create(SYSCTL_HANDLER_ARGS)
{
int error;
struct vm *vm;
+ struct cdev *cdev;
struct vmmdev_softc *sc, *sc2;
char buf[VM_MAX_NAMELEN];
@@ -489,22 +495,28 @@ sysctl_vmm_create(SYSCTL_HANDLER_ARGS)
*/
mtx_lock(&vmmdev_mtx);
sc2 = vmmdev_lookup(buf);
- if (sc2 == NULL)
+ if (sc2 == NULL) {
SLIST_INSERT_HEAD(&head, sc, link);
+ sc->flags |= VSC_LINKED;
+ }
mtx_unlock(&vmmdev_mtx);
if (sc2 != NULL) {
- vmmdev_destroy(sc, FALSE);
+ vmmdev_destroy(sc);
return (EEXIST);
}
- error = make_dev_p(MAKEDEV_CHECKNAME, &sc->cdev, &vmmdevsw, NULL,
+ error = make_dev_p(MAKEDEV_CHECKNAME, &cdev, &vmmdevsw, NULL,
UID_ROOT, GID_WHEEL, 0600, "vmm/%s", buf);
if (error != 0) {
- vmmdev_destroy(sc, TRUE);
+ vmmdev_destroy(sc);
return (error);
}
+
+ mtx_lock(&vmmdev_mtx);
+ sc->cdev = cdev;
sc->cdev->si_drv1 = sc;
+ mtx_unlock(&vmmdev_mtx);
return (0);
}
View
18 sys/amd64/vmm/x86.c
@@ -53,7 +53,7 @@ int
x86_emulate_cpuid(struct vm *vm, int vcpu_id,
uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx)
{
- int error;
+ int error, enable_invpcid;
unsigned int func, regs[4];
enum x2apic_state x2apic_state;
@@ -202,8 +202,22 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id,
regs[0] |= 0x04008000;
break;
- case CPUID_0000_0006:
case CPUID_0000_0007:
+ regs[0] = 0;
+ regs[1] = 0;
+ regs[2] = 0;
+ regs[3] = 0;
+
+ /* leaf 0 */
+ if (*ecx == 0) {
+ error = vm_get_capability(vm, vcpu_id,
+ VM_CAP_ENABLE_INVPCID, &enable_invpcid);
+ if (error == 0 && enable_invpcid)
+ regs[1] |= CPUID_STDEXT_INVPCID;
+ }
+ break;
+
+ case CPUID_0000_0006:
case CPUID_0000_000A:
case CPUID_0000_000D:
/*
View
7 sys/boot/i386/btx/btx/btx.S
@@ -41,6 +41,8 @@
.set PSL_RESERVED_DEFAULT,0x00000002
.set PSL_T,0x00000100 # Trap flag
.set PSL_I,0x00000200 # Interrupt enable flag
+ .set PSL_D,0x00000400 # String instruction direction
+ .set PSL_NT,0x00004000 # Nested task flag
.set PSL_VM,0x00020000 # Virtual 8086 mode flag
.set PSL_AC,0x00040000 # Alignment check flag
/*
@@ -611,8 +613,8 @@ rret_tramp: movw $MEM_ESPR-0x08,%sp # Reset stack pointer
pushl %ds # regs
pushl %es
pushfl # Save %eflags
- cli # Disable interrupts
- std # String ops dec
+ pushl $PSL_RESERVED_DEFAULT|PSL_D # Use clean %eflags with
+ popfl # string ops dec
xorw %ax,%ax # Reset seg
movw %ax,%ds # regs
movw %ax,%es # (%ss is already 0)
@@ -675,6 +677,7 @@ rret_tramp.1: xorl %ecx,%ecx # Zero
testl $V86F_FLAGS,%edx # User wants flags?
jz rret_tramp.3 # No
movl MEM_ESPR-0x3c,%eax # Read real mode flags
+ andl $~(PSL_T|PSL_NT),%eax # Clear unsafe flags
movw %ax,-0x08(%esi) # Update user flags (low 16)
/*
* Return to the user task
View
24 sys/cam/ata/ata_all.c
@@ -297,6 +297,18 @@ ata_print_ident(struct ata_params *ident_data)
}
void
+ata_print_ident_short(struct ata_params *ident_data)
+{
+ char product[48], revision[16];
+
+ cam_strvis(product, ident_data->model, sizeof(ident_data->model),
+ sizeof(product));
+ cam_strvis(revision, ident_data->revision, sizeof(ident_data->revision),
+ sizeof(revision));
+ printf("<%s %s>", product, revision);
+}
+
+void
semb_print_ident(struct sep_identify_data *ident_data)
{
char vendor[9], product[17], revision[5], fw[5], in[7], ins[5];
@@ -311,6 +323,18 @@ semb_print_ident(struct sep_identify_data *ident_data)
vendor, product, revision, fw, in, ins);
}
+void
+semb_print_ident_short(struct sep_identify_data *ident_data)
+{
+ char vendor[9], product[17], revision[5], fw[5];
+
+ cam_strvis(vendor, ident_data->vendor_id, 8, sizeof(vendor));
+ cam_strvis(product, ident_data->product_id, 16, sizeof(product));
+ cam_strvis(revision, ident_data->product_rev, 4, sizeof(revision));
+ cam_strvis(fw, ident_data->firmware_rev, 4, sizeof(fw));
+ printf("<%s %s %s %s>", vendor, product, revision, fw);
+}
+
uint32_t
ata_logical_sector_size(struct ata_params *ident_data)
{
View
2  sys/cam/ata/ata_all.h
@@ -109,6 +109,7 @@ int ata_status_sbuf(struct ccb_ataio *ataio, struct sbuf *sb);
int ata_res_sbuf(struct ccb_ataio *ataio, struct sbuf *sb);
void ata_print_ident(struct ata_params *ident_data);
+void ata_print_ident_short(struct ata_params *ident_data);
uint32_t ata_logical_sector_size(struct ata_params *ident_data);
uint64_t ata_physical_sector_size(struct ata_params *ident_data);
@@ -143,6 +144,7 @@ int ata_identify_match(caddr_t identbuffer, caddr_t table_entry);
int ata_static_identify_match(caddr_t identbuffer, caddr_t table_entry);
void semb_print_ident(struct sep_identify_data *ident_data);
+void semb_print_ident_short(struct sep_identify_data *ident_data);
void semb_receive_diagnostic_results(struct ccb_ataio *ataio,
u_int32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb*),
View
2  sys/cam/ata/ata_da.c
@@ -907,7 +907,6 @@ adaoninvalidate(struct cam_periph *periph)
bioq_flush(&softc->trim_queue, NULL, ENXIO);
disk_gone(softc->disk);
- xpt_print(periph->path, "lost device\n");
}
static void
@@ -917,7 +916,6 @@ adacleanup(struct cam_periph *periph)
softc = (struct ada_softc *)periph->softc;
- xpt_print(periph->path, "removing device entry\n");
cam_periph_unlock(periph);
/*
View
2  sys/cam/ata/ata_pmp.c
@@ -241,7 +241,6 @@ pmponinvalidate(struct cam_periph *periph)
}
}
pmprelease(periph, -1);
- xpt_print(periph->path, "lost device\n");
}
static void
@@ -251,7 +250,6 @@ pmpcleanup(struct cam_periph *periph)
softc = (struct pmp_softc *)periph->softc;
- xpt_print(periph->path, "removing device entry\n");
cam_periph_unlock(periph);
/*
View
7 sys/cam/cam_periph.c
@@ -586,6 +586,8 @@ cam_periph_invalidate(struct cam_periph *periph)
return;
CAM_DEBUG(periph->path, CAM_DEBUG_INFO, ("Periph invalidated\n"));
+ if (periph->flags & CAM_PERIPH_ANNOUNCED)
+ xpt_denounce_periph(periph);
periph->flags |= CAM_PERIPH_INVALID;
periph->flags &= ~CAM_PERIPH_NEW_DEV_FOUND;
if (periph->periph_oninval != NULL)
@@ -648,7 +650,10 @@ camperiphfree(struct cam_periph *periph)
xpt_remove_periph(periph);
xpt_unlock_buses();
- CAM_DEBUG(periph->path, CAM_DEBUG_INFO, ("Periph destroyed\n"));
+ if (periph->flags & CAM_PERIPH_ANNOUNCED) {
+ xpt_print(periph->path, "Periph destroyed\n");
+ } else
+ CAM_DEBUG(periph->path, CAM_DEBUG_INFO, ("Periph destroyed\n"));
if (periph->flags & CAM_PERIPH_NEW_DEV_FOUND) {
union ccb ccb;
View
1  sys/cam/cam_periph.h
@@ -121,6 +121,7 @@ struct cam_periph {
#define CAM_PERIPH_NEW_DEV_FOUND 0x10
#define CAM_PERIPH_RECOVERY_INPROG 0x20
#define CAM_PERIPH_FREE 0x80
+#define CAM_PERIPH_ANNOUNCED 0x100
u_int32_t immediate_priority;
u_int32_t refcount;
SLIST_HEAD(, ccb_hdr) ccb_list; /* For "immediate" requests */
View
34 sys/cam/cam_xpt.c
@@ -1023,6 +1023,7 @@ xpt_announce_periph(struct cam_periph *periph, char *announce_string)
struct cam_path *path = periph->path;
mtx_assert(periph->sim->mtx, MA_OWNED);
+ periph->flags |= CAM_PERIPH_ANNOUNCED;
printf("%s%d at %s%d bus %d scbus%d target %d lun %d\n",
periph->periph_name, periph->unit_number,
@@ -1043,7 +1044,7 @@ xpt_announce_periph(struct cam_periph *periph, char *announce_string)
(struct sep_identify_data *)&path->device->ident_data);
else
printf("Unknown protocol device\n");
- if (bootverbose && path->device->serial_num_len > 0) {
+ if (path->device->serial_num_len > 0) {
/* Don't wrap the screen - print only the first 60 chars */
printf("%s%d: Serial Number %.60s\n", periph->periph_name,
periph->unit_number, path->device->serial_num);
@@ -1071,6 +1072,37 @@ xpt_announce_quirks(struct cam_periph *periph, int quirks, char *bit_string)
}
}
+void
+xpt_denounce_periph(struct cam_periph *periph)
+{
+ struct cam_path *path = periph->path;
+
+ mtx_assert(periph->sim->mtx, MA_OWNED);
+ printf("%s%d at %s%d bus %d scbus%d target %d lun %d\n",
+ periph->periph_name, periph->unit_number,
+ path->bus->sim->sim_name,
+ path->bus->sim->unit_number,
+ path->bus->sim->bus_id,
+ path->bus->path_id,
+ path->target->target_id,
+ path->device->lun_id);
+ printf("%s%d: ", periph->periph_name, periph->unit_number);
+ if (path->device->protocol == PROTO_SCSI)
+ scsi_print_inquiry_short(&path->device->inq_data);
+ else if (path->device->protocol == PROTO_ATA ||
+ path->device->protocol == PROTO_SATAPM)
+ ata_print_ident_short(&path->device->ident_data);
+ else if (path->device->protocol == PROTO_SEMB)
+ semb_print_ident_short(
+ (struct sep_identify_data *)&path->device->ident_data);
+ else
+ printf("Unknown protocol device");
+ if (path->device->serial_num_len > 0)
+ printf(" s/n %.60s", path->device->serial_num);
+ printf(" detached\n");
+}
+
+
int
xpt_getattr(char *buf, size_t len, const char *attr, struct cam_path *path)
{
View
1  sys/cam/cam_xpt_periph.h
@@ -47,6 +47,7 @@ void xpt_announce_periph(struct cam_periph *periph,
char *announce_string);
void xpt_announce_quirks(struct cam_periph *periph,
int quirks, char *bit_string);
+void xpt_denounce_periph(struct cam_periph *periph);
#endif
#endif /* _CAM_CAM_XPT_PERIPH_H */
View
15 sys/cam/scsi/scsi_all.c
@@ -5249,6 +5249,21 @@ scsi_print_inquiry(struct scsi_inquiry_data *inq_data)
dtype, rstr, qtype);
}
+void
+scsi_print_inquiry_short(struct scsi_inquiry_data *inq_data)
+{
+ char vendor[16], product[48], revision[16];
+
+ cam_strvis(vendor, inq_data->vendor, sizeof(inq_data->vendor),
+ sizeof(vendor));
+ cam_strvis(product, inq_data->product, sizeof(inq_data->product),
+ sizeof(product));
+ cam_strvis(revision, inq_data->revision, sizeof(inq_data->revision),
+ sizeof(revision));
+
+ printf("<%s %s %s>", vendor, product, revision);
+}
+
/*
* Table of syncrates that don't follow the "divisible by 4"
* rule. This table will be expanded in future SCSI specs.
View
1  sys/cam/scsi/scsi_all.h
@@ -2313,6 +2313,7 @@ char * scsi_cdb_string(u_int8_t *cdb_ptr, char *cdb_string,
size_t len);
void scsi_print_inquiry(struct scsi_inquiry_data *inq_data);
+void scsi_print_inquiry_short(struct scsi_inquiry_data *inq_data);
u_int scsi_calc_syncsrate(u_int period_factor);
u_int scsi_calc_syncparam(u_int period);
View
3  sys/cam/scsi/scsi_cd.c
@@ -428,7 +428,6 @@ cdoninvalidate(struct cam_periph *periph)
camq_remove(&softc->changer->devq, softc->pinfo.index);
disk_gone(softc->disk);
- xpt_print(periph->path, "lost device, %d refs\n", periph->refcount);
}
static void
@@ -438,8 +437,6 @@ cdcleanup(struct cam_periph *periph)
softc = (struct cd_softc *)periph->softc;
- xpt_print(periph->path, "removing device entry\n");
-
/*
* In the queued, non-active case, the device in question
* has already been removed from the changer run queue. Since this
View
5 sys/cam/scsi/scsi_ch.c
@@ -306,9 +306,6 @@ choninvalidate(struct cam_periph *periph)
* when it has cleaned up its state.
*/
destroy_dev_sched_cb(softc->dev, chdevgonecb, periph);
-
- xpt_print(periph->path, "lost device\n");
-
}
static void
@@ -318,8 +315,6 @@ chcleanup(struct cam_periph *periph)
softc = (struct ch_softc *)periph->softc;
- xpt_print(periph->path, "removing device entry\n");
-
devstat_remove_entry(softc->device_stats);
free(softc, M_DEVBUF);
View
4 sys/cam/scsi/scsi_da.c
@@ -1561,9 +1561,6 @@ daoninvalidate(struct cam_periph *periph)
* done cleaning up its resources.
*/
disk_gone(softc->disk);
-
- xpt_print(periph->path, "lost device - %d outstanding, %d refs\n",
- softc->outstanding_cmds, periph->refcount);
}
static void
@@ -1573,7 +1570,6 @@ dacleanup(struct cam_periph *periph)
softc = (struct da_softc *)periph->softc;
- xpt_print(periph->path, "removing device entry\n");
cam_periph_unlock(periph);
/*
View
5 sys/cam/scsi/scsi_enc.c
@@ -178,8 +178,6 @@ enc_oninvalidate(struct cam_periph *periph)
callout_drain(&enc->status_updater);
destroy_dev_sched_cb(enc->enc_dev, enc_devgonecb, periph);
-
- xpt_print(periph->path, "lost device\n");
}
static void
@@ -189,9 +187,6 @@ enc_dtor(struct cam_periph *periph)
enc = periph->softc;
- xpt_print(periph->path, "removing device entry\n");
-
-
/* If the sub-driver has a cleanup routine, call it */
if (enc->enc_vec.softc_cleanup != NULL)
enc->enc_vec.softc_cleanup(enc);
View
7 sys/cam/scsi/scsi_pass.c
@@ -207,11 +207,6 @@ passoninvalidate(struct cam_periph *periph)
* XXX Handle any transactions queued to the card
* with XPT_ABORT_CCB.
*/
-
- if (bootverbose) {
- xpt_print(periph->path, "lost device\n");
- }
-
}
static void
@@ -221,8 +216,6 @@ passcleanup(struct cam_periph *periph)
softc = (struct pass_softc *)periph->softc;
- if (bootverbose)
- xpt_print(periph->path, "removing device entry\n");
devstat_remove_entry(softc->device_stats);
cam_periph_unlock(periph);
View
3  sys/cam/scsi/scsi_pt.c
@@ -333,8 +333,6 @@ ptoninvalidate(struct cam_periph *periph)
* with XPT_ABORT_CCB.
*/
bioq_flush(&softc->bio_queue, NULL, ENXIO);
-
- xpt_print(periph->path, "lost device\n");
}
static void
@@ -344,7 +342,6 @@ ptdtor(struct cam_periph *periph)
softc = (struct pt_softc *)periph->softc;
- xpt_print(periph->path, "removing device entry\n");
devstat_remove_entry(softc->device_stats);
cam_periph_unlock(periph);
destroy_dev(softc->dev);
View
4 sys/cam/scsi/scsi_sa.c
@@ -1401,9 +1401,6 @@ saoninvalidate(struct cam_periph *periph)
*/
bioq_flush(&softc->bio_queue, NULL, ENXIO);
softc->queue_count = 0;
-
- xpt_print(periph->path, "lost device\n");
-
}
static void
@@ -1414,7 +1411,6 @@ sacleanup(struct cam_periph *periph)
softc = (struct