summaryrefslogtreecommitdiffstats
path: root/sys/cddl/contrib
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2009-09-08 16:40:08 +0000
committerpjd <pjd@FreeBSD.org>2009-09-08 16:40:08 +0000
commit2ac42cd9f83798839a827a2a3e728228f004a9a5 (patch)
treea7ae2f8320de327636b81e277ffa922f31b5ff70 /sys/cddl/contrib
parentabcc9b4e4ee4aaab6cbdb737804d885e06bf14c1 (diff)
downloadFreeBSD-src-2ac42cd9f83798839a827a2a3e728228f004a9a5.zip
FreeBSD-src-2ac42cd9f83798839a827a2a3e728228f004a9a5.tar.gz
Only log successful commands! Without this fix we log even unsuccessful
commands executed by unprivileged users. Action is not really taken, but it is logged to pool history, which might be confusing. Reported by: Denis Ahrens <denis@h3q.com> MFC after: 3 days
Diffstat (limited to 'sys/cddl/contrib')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
index 69b126e..e25f549 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
@@ -3021,8 +3021,10 @@ zfsdev_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag,
if (error == 0)
error = zfs_ioc_vec[vec].zvec_func(zc);
- if (zfs_ioc_vec[vec].zvec_his_log == B_TRUE)
- zfs_log_history(zc);
+ if (error == 0) {
+ if (zfs_ioc_vec[vec].zvec_his_log == B_TRUE)
+ zfs_log_history(zc);
+ }
return (error);
}
OpenPOWER on IntegriCloud