summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2016-03-24 12:41:50 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2016-03-24 12:41:50 +0000
commit4bbe81f0977c3edf0a0b743f9041ea25c7119ca1 (patch)
tree57d581e52c694c9b02cfa2014535fa44b138e548 /usr/src
parentabd1eeaaab35f319c5e5d60cc9db4c19d389ecb8 (diff)
parent23db4d6f668fd45f22b6b1fb668988cdf671a67b (diff)
downloadillumos-joyent-4bbe81f0977c3edf0a0b743f9041ea25c7119ca1.tar.gz
[illumos-gate merge]
commit 23db4d6f668fd45f22b6b1fb668988cdf671a67b 6686 import missing ipf manual pages commit 54207fd2e1e7ed01d0416da8cf296dbef920fbfc 4242 file rename event fires before the rename happens commit 28614c54e31c80fa6afc3ca7035a9eaa79fbaa63 6769 bop_printf internal buffer is too small commit 7be29260103110981d73ce525891934e1cdf4374 6687 icmp(7P) and icmp6(7P) should mention that you need PRIV_NET_ICMPACCESS Conflicts: usr/src/uts/common/sys/vnode.h usr/src/uts/common/fs/zfs/zfs_vnops.c usr/src/uts/common/fs/ufs/ufs_vnops.c usr/src/uts/common/fs/udfs/udf_vnops.c usr/src/uts/common/fs/tmpfs/tmp_vnops.c usr/src/uts/common/fs/pcfs/pc_dir.c usr/src/man/man7p/icmp6.7p usr/src/man/man7p/icmp.7p usr/src/man/man4/ippool.4 usr/src/man/man4/ipnat.4 usr/src/man/man4/ipmon.4 usr/src/man/man4/ipf.4
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/man/man4/ipf.42
-rw-r--r--usr/src/man/man4/ipmon.42
-rw-r--r--usr/src/man/man4/ipnat.42
-rw-r--r--usr/src/man/man4/ippool.42
-rw-r--r--usr/src/man/man7p/icmp.7p2
-rw-r--r--usr/src/man/man7p/icmp6.7p2
-rw-r--r--usr/src/pkg/manifests/network-ipfilter.mf9
-rw-r--r--usr/src/uts/common/fs/pcfs/pc_dir.c17
-rw-r--r--usr/src/uts/common/fs/tmpfs/tmp_vnops.c20
-rw-r--r--usr/src/uts/common/fs/udfs/udf_vnops.c20
-rw-r--r--usr/src/uts/common/fs/ufs/ufs_vnops.c12
-rw-r--r--usr/src/uts/common/fs/zfs/zfs_vnops.c14
-rw-r--r--usr/src/uts/i86pc/os/fakebop.c5
13 files changed, 69 insertions, 40 deletions
diff --git a/usr/src/man/man4/ipf.4 b/usr/src/man/man4/ipf.4
index e93753881b..3bed42e1b1 100644
--- a/usr/src/man/man4/ipf.4
+++ b/usr/src/man/man4/ipf.4
@@ -4,7 +4,7 @@
.\" environment has been installed anywhere other than the default, modify the
.\" given path to access the file at the installed location.
.\" Portions Copyright (c) 2015, Joyent, Inc.
-.TH IPF 4
+.TH IPF 4 "Mar 18, 2015"
.SH NAME
ipf, ipf.conf, ipf6.conf \- IP packet filter rule syntax
.SH DESCRIPTION
diff --git a/usr/src/man/man4/ipmon.4 b/usr/src/man/man4/ipmon.4
index 9f38eb0551..22b46ee3e8 100644
--- a/usr/src/man/man4/ipmon.4
+++ b/usr/src/man/man4/ipmon.4
@@ -4,7 +4,7 @@
.\" environment has been installed anywhere other than the default, modify the
.\" given path to access the file at the installed location.
.\" Portions Copyright (c) 2015, Joyent, Inc.
-.TH IPMON 4
+.TH IPMON 4 "Mar 18, 2015"
.SH NAME
ipmon, ipmon.conf \- ipmon configuration file format
.SH DESCRIPTION
diff --git a/usr/src/man/man4/ipnat.4 b/usr/src/man/man4/ipnat.4
index d7f6143de0..6c3f0f85cf 100644
--- a/usr/src/man/man4/ipnat.4
+++ b/usr/src/man/man4/ipnat.4
@@ -4,7 +4,7 @@
.\" environment has been installed anywhere other than the default, modify the
.\" given path to access the file at the installed location.
.\" Portions Copyright (c) 2015, Joyent, Inc.
-.TH IPNAT 4
+.TH IPNAT 4 "Mar 18, 2015"
.SH NAME
ipnat, ipnat.conf \- IP NAT file format
.SH DESCRIPTION
diff --git a/usr/src/man/man4/ippool.4 b/usr/src/man/man4/ippool.4
index 1ff0e79129..419515db8e 100644
--- a/usr/src/man/man4/ippool.4
+++ b/usr/src/man/man4/ippool.4
@@ -4,7 +4,7 @@
.\" environment has been installed anywhere other than the default, modify the
.\" given path to access the file at the installed location.
.\" Portions Copyright (c) 2015, Joyent, Inc.
-.TH IPPOOL 4
+.TH IPPOOL 4 "Mar 18, 2015"
.SH NAME
ippool, ippool.conf \- IP Pool file format
.SH DESCRIPTION
diff --git a/usr/src/man/man7p/icmp.7p b/usr/src/man/man7p/icmp.7p
index 1935b49f89..21a9fc164b 100644
--- a/usr/src/man/man7p/icmp.7p
+++ b/usr/src/man/man7p/icmp.7p
@@ -31,7 +31,7 @@ parameter to the socket call, can be obtained from
connectionless, and are normally used with the \fBt_sndudata\fR /
\fBt_rcvudata\fR and the \fBsendto()\fR / \fBrecvfrom()\fR calls. In order to
send \fBICMP\fR packets, a process needs the \fBPRIV_NET_ICMPACCESS\fR
-privilege. (See \fBprivileges\fR(5) for more on privileges.)
+privilege. (See \fBprivileges\fR(5) for more information on privileges.)
.sp
.LP
Outgoing packets automatically have an Internet Protocol (\fBIP\fR) header
diff --git a/usr/src/man/man7p/icmp6.7p b/usr/src/man/man7p/icmp6.7p
index 30134f5e9b..d00493040d 100644
--- a/usr/src/man/man7p/icmp6.7p
+++ b/usr/src/man/man7p/icmp6.7p
@@ -42,7 +42,7 @@ descriptors and sockets are connectionless and are normally used with the
calls. They may also be used with the \fBsendmsg()\fR/\fBrecvgmsg()\fR calls
when sending or receiving ancillary data. In order to send \fBICMP6\fR packets,
a process needs the \fBPRIV_NET_ICMPACCESS\fR privilege. (See
-\fBprivileges\fR(5) for more on privileges.)
+\fBprivileges\fR(5) for more information on privileges.)
.sp
.LP
Outgoing packets automatically have an Internet Protocol Version 6 (\fBIPv6\fR)
diff --git a/usr/src/pkg/manifests/network-ipfilter.mf b/usr/src/pkg/manifests/network-ipfilter.mf
index 2af86b92df..6f38df0179 100644
--- a/usr/src/pkg/manifests/network-ipfilter.mf
+++ b/usr/src/pkg/manifests/network-ipfilter.mf
@@ -115,6 +115,10 @@ file path=usr/share/man/man1m/ipfstat.1m
file path=usr/share/man/man1m/ipmon.1m
file path=usr/share/man/man1m/ipnat.1m
file path=usr/share/man/man1m/ippool.1m
+file path=usr/share/man/man4/ipf.4
+file path=usr/share/man/man4/ipmon.4
+file path=usr/share/man/man4/ipnat.4
+file path=usr/share/man/man4/ippool.4
file path=usr/share/man/man5/ipfilter.5
file path=usr/share/man/man7i/ipnat.7i
hardlink path=usr/lib/ipf/ipftest target=../../../usr/lib/isaexec
@@ -131,3 +135,8 @@ legacy pkg=SUNWipfu desc="IP Filter Utilities" \
license cr_Sun license=cr_Sun
license usr/src/cmd/ipf/tools/IPFILTER.LICENCE \
license=usr/src/cmd/ipf/tools/IPFILTER.LICENCE
+link path=usr/share/man/man4/ipf.conf.4 target=./ipf.4
+link path=usr/share/man/man4/ipf6.conf.4 target=./ipf.4
+link path=usr/share/man/man4/ipmon.conf.4 target=./ipmon.4
+link path=usr/share/man/man4/ipnat.conf.4 target=./ipnat.4
+link path=usr/share/man/man4/ippool.conf.4 target=./ippool.4
diff --git a/usr/src/uts/common/fs/pcfs/pc_dir.c b/usr/src/uts/common/fs/pcfs/pc_dir.c
index c28c9c6345..74bae634db 100644
--- a/usr/src/uts/common/fs/pcfs/pc_dir.c
+++ b/usr/src/uts/common/fs/pcfs/pc_dir.c
@@ -22,6 +22,7 @@
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ * Copyright 2015 Joyent, Inc.
*/
/*
@@ -645,7 +646,6 @@ top:
newisdir = tpcp->pc_entry.pcd_attr & PCA_DIR;
brelse(slot.sl_bp);
- vnevent_pre_rename_dest(PCTOV(tpcp), PCTOV(tdp), tnm, ctp);
/*
* Error cases (from rename(2)):
@@ -661,6 +661,8 @@ top:
error = pc_dirremove(tdp, tnm,
(struct vnode *)NULL, VREG, ctp);
if (error == 0) {
+ vnevent_rename_dest(PCTOV(tpcp),
+ PCTOV(tdp), tnm, ctp);
VN_RELE(PCTOV(tpcp));
tpcp = NULL;
VN_RELE(PCTOV(pcp));
@@ -672,6 +674,8 @@ top:
error = pc_dirremove(tdp, tnm,
(struct vnode *)NULL, VDIR, ctp);
if (error == 0) {
+ vnevent_rename_dest(PCTOV(tpcp), PCTOV(tdp),
+ tnm, ctp);
VN_RELE(PCTOV(tpcp));
tpcp = NULL;
VN_RELE(PCTOV(pcp));
@@ -775,11 +779,6 @@ top:
goto done;
}
- if (dp != tdp)
- vnevent_pre_rename_dest_dir(PCTOV(tdp), PCTOV(pcp),
- tnm, ctp);
- vnevent_pre_rename_src(PCTOV(pcp), PCTOV(dp), snm, ctp);
-
error = pc_makedirentry(tdp, direntries, ndirentries, NULL,
offset);
kmem_free(direntries, ndirentries * sizeof (struct pcdir));
@@ -830,10 +829,10 @@ top:
}
if (error == 0) {
- if (tpcp != NULL)
- vnevent_rename_dest(PCTOV(tpcp), PCTOV(tdp), tnm, ctp);
vnevent_rename_src(PCTOV(pcp), PCTOV(dp), snm, ctp);
- vnevent_rename_dest_dir(PCTOV(tdp), PCTOV(pcp), tnm, ctp);
+ if (dp != tdp)
+ vnevent_rename_dest_dir(PCTOV(tdp), PCTOV(pcp), tnm,
+ ctp);
}
done:
diff --git a/usr/src/uts/common/fs/tmpfs/tmp_vnops.c b/usr/src/uts/common/fs/tmpfs/tmp_vnops.c
index bab4623abe..254940a6a3 100644
--- a/usr/src/uts/common/fs/tmpfs/tmp_vnops.c
+++ b/usr/src/uts/common/fs/tmpfs/tmp_vnops.c
@@ -25,7 +25,7 @@
*/
/*
- * Copyright 2015, Joyent, Inc.
+ * Copyright (c) 2015, Joyent, Inc. All rights reserved.
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
*/
@@ -1200,7 +1200,7 @@ tmp_rename(
struct tmpnode *fromparent;
struct tmpnode *toparent;
struct tmpnode *fromtp = NULL; /* source tmpnode */
- struct tmpnode *totp = NULL; /* target tmpnode */
+ struct tmpnode *totp; /* target tmpnode */
struct tmount *tm = (struct tmount *)VTOTM(odvp);
int error;
int samedir = 0; /* set if odvp == ndvp */
@@ -1259,14 +1259,18 @@ tmp_rename(
goto done;
}
- if (tdirlookup(toparent, nnm, &totp, cred) == 0)
+ if (tdirlookup(toparent, nnm, &totp, cred) == 0) {
vnevent_pre_rename_dest(TNTOV(totp), ndvp, nnm, ct);
+ tmpnode_rele(totp);
+ }
/* Notify the target dir. if not the same as the source dir. */
if (ndvp != odvp) {
vnevent_pre_rename_dest_dir(ndvp, TNTOV(fromtp), nnm, ct);
}
+ vnevent_pre_rename_src(TNTOV(fromtp), odvp, onm, ct);
+
/*
* Link source to new target
*/
@@ -1287,8 +1291,6 @@ tmp_rename(
goto done;
}
- vnevent_pre_rename_src(TNTOV(fromtp), odvp, onm, ct);
-
/*
* Unlink from source.
*/
@@ -1313,8 +1315,12 @@ tmp_rename(
if (error == 0) {
vnevent_rename_src(TNTOV(fromtp), odvp, onm, ct);
- /* vnevent_rename_dest event emitted in tdirenter(). */
- vnevent_rename_dest_dir(ndvp, TNTOV(fromtp), nnm, ct);
+ /*
+ * vnevent_rename_dest is called in tdirenter().
+ * Notify the target dir if not same as source dir.
+ */
+ if (ndvp != odvp)
+ vnevent_rename_dest_dir(ndvp, TNTOV(fromtp), nnm, ct);
}
done:
diff --git a/usr/src/uts/common/fs/udfs/udf_vnops.c b/usr/src/uts/common/fs/udfs/udf_vnops.c
index ad9d835594..77ef3cecf4 100644
--- a/usr/src/uts/common/fs/udfs/udf_vnops.c
+++ b/usr/src/uts/common/fs/udfs/udf_vnops.c
@@ -917,7 +917,7 @@ udf_rename(
int32_t error = 0;
struct udf_vfs *udf_vfsp;
struct ud_inode *sip; /* source inode */
- struct ud_inode *tip = NULL; /* target inode */
+ struct ud_inode *tip; /* target inode */
struct ud_inode *sdp, *tdp; /* source and target parent inode */
struct vnode *realvp;
@@ -979,16 +979,19 @@ udf_rename(
goto errout;
}
- if (ud_dirlook(tdp, tnm, &tip, cr, 0) == 0)
+ rw_exit(&sip->i_contents);
+ rw_exit(&sdp->i_contents);
+
+ if (ud_dirlook(tdp, tnm, &tip, cr, 0) == 0) {
vnevent_pre_rename_dest(ITOV(tip), tdvp, tnm, ct);
+ VN_RELE(ITOV(tip));
+ }
/* Notify the target dir. if not the same as the source dir. */
if (sdvp != tdvp)
vnevent_pre_rename_dest_dir(tdvp, ITOV(sip), tnm, ct);
- rw_exit(&sip->i_contents);
- rw_exit(&sdp->i_contents);
-
+ vnevent_pre_rename_src(ITOV(sip), sdvp, snm, ct);
/*
* Link source to the target.
@@ -1007,7 +1010,6 @@ udf_rename(
rw_exit(&tdp->i_rwlock);
goto errout;
}
- vnevent_pre_rename_src(ITOV(sip), sdvp, snm, ct);
rw_exit(&tdp->i_rwlock);
rw_enter(&sdp->i_rwlock, RW_WRITER);
@@ -1026,8 +1028,10 @@ udf_rename(
if (error == 0) {
vnevent_rename_src(ITOV(sip), sdvp, snm, ct);
- /* vnevent_rename_dest event emitted in ud_direnter() */
- vnevent_rename_dest_dir(tdvp, ITOV(sip), tnm, ct);
+ /*
+ * vnevent_rename_dest and vnevent_rename_dest_dir are called
+ * in ud_direnter().
+ */
}
errout:
diff --git a/usr/src/uts/common/fs/ufs/ufs_vnops.c b/usr/src/uts/common/fs/ufs/ufs_vnops.c
index 021cd7042e..afc417d7af 100644
--- a/usr/src/uts/common/fs/ufs/ufs_vnops.c
+++ b/usr/src/uts/common/fs/ufs/ufs_vnops.c
@@ -3715,6 +3715,9 @@ retry_firstlock:
goto errout;
}
+ if (error == 0 && tvp != NULL)
+ vnevent_rename_dest(tvp, tdvp, tnm, ct);
+
/*
* Unlink the source.
* Remove the source entry. ufs_dirremove() checks that the entry
@@ -3728,9 +3731,12 @@ retry_firstlock:
if (error == 0) {
vnevent_rename_src(ITOV(sip), sdvp, snm, ct);
- if (tvp != NULL)
- vnevent_rename_dest(tvp, tdvp, tnm, ct);
- vnevent_rename_dest_dir(tdvp, ITOV(sip), tnm, ct);
+ /*
+ * Notify the target directory of the rename event
+ * if source and target directories are not the same.
+ */
+ if (sdvp != tdvp)
+ vnevent_rename_dest_dir(tdvp, ITOV(sip), tnm, ct);
}
errout:
diff --git a/usr/src/uts/common/fs/zfs/zfs_vnops.c b/usr/src/uts/common/fs/zfs/zfs_vnops.c
index b0c34cb395..6b8387806b 100644
--- a/usr/src/uts/common/fs/zfs/zfs_vnops.c
+++ b/usr/src/uts/common/fs/zfs/zfs_vnops.c
@@ -24,6 +24,7 @@
* Copyright 2014 Nexenta Systems, Inc. All rights reserved.
* Copyright 2015 Joyent, Inc. All rights reserved.
* Copyright (c) 2014 Integros [integros.com]
+ * Copyright 2015 Joyent, Inc.
*/
/* Portions Copyright 2007 Jeremy Teo */
@@ -3456,7 +3457,7 @@ zfs_rename(vnode_t *sdvp, char *snm, vnode_t *tdvp, char *tnm, cred_t *cr,
dmu_tx_t *tx;
zfs_zlock_t *zl;
int cmp, serr, terr;
- int error = 0;
+ int error = 0, rm_err = 0;
int zflg = 0;
boolean_t waited = B_FALSE;
@@ -3721,7 +3722,7 @@ top:
}
if (tzp) /* Attempt to remove the existing target */
- error = zfs_link_destroy(tdl, tzp, tx, zflg, NULL);
+ error = rm_err = zfs_link_destroy(tdl, tzp, tx, zflg, NULL);
if (error == 0) {
error = zfs_link_create(tdl, szp, tx, ZRENAMING);
@@ -3764,11 +3765,14 @@ top:
dmu_tx_commit(tx);
+ if (tzp && rm_err == 0)
+ vnevent_rename_dest(ZTOV(tzp), tdvp, tnm, ct);
+
if (error == 0) {
vnevent_rename_src(ZTOV(szp), sdvp, snm, ct);
- if (tzp)
- vnevent_rename_dest(ZTOV(tzp), tdvp, tnm, ct);
- vnevent_rename_dest_dir(tdvp, ZTOV(szp), tnm, ct);
+ /* notify the target dir if it is not the same as source dir */
+ if (tdvp != sdvp)
+ vnevent_rename_dest_dir(tdvp, ZTOV(szp), tnm, ct);
}
out:
if (zl != NULL)
diff --git a/usr/src/uts/i86pc/os/fakebop.c b/usr/src/uts/i86pc/os/fakebop.c
index 50690ae67d..060b89ee3c 100644
--- a/usr/src/uts/i86pc/os/fakebop.c
+++ b/usr/src/uts/i86pc/os/fakebop.c
@@ -99,7 +99,7 @@ static paddr_t high_phys = -(paddr_t)1; /* last used physical address */
/*
* buffer for vsnprintf for console I/O
*/
-#define BUFFERSIZE 256
+#define BUFFERSIZE 512
static char buffer[BUFFERSIZE];
/*
* stuff to store/report/manipulate boot property settings.
@@ -1981,7 +1981,8 @@ scan_rsdp(paddr_t start, paddr_t end)
* Refer to ACPI 3.0 Spec, section 5.2.5.1 to understand this function
*/
static struct rsdp *
-find_rsdp() {
+find_rsdp()
+{
struct rsdp *rsdp;
uint16_t *ebda_seg;
paddr_t ebda_addr;