Skip to content

Commit

Permalink
OpenZFS 7019 - zfsdev_ioctl skips secpolicy when FKIOCTL is set
Browse files Browse the repository at this point in the history
Authored by: Alex Wilson <[email protected]>
Reviewed by: Robert Mustacchi <[email protected]>
Reviewed by: Richard Lowe <[email protected]>
Reviewed by: Matthew Ahrens <[email protected]>
Approved by: Dan McDonald <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Ported-by: George Melikov <[email protected]>

OpenZFS-issue: https://www.illumos.org/issues/7019
OpenZFS-commit: openzfs/openzfs@45b1747
Closes openzfs#5709
  • Loading branch information
gmelikov authored and behlendorf committed Jan 31, 2017
1 parent 6325e48 commit 005e27e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/zfs/zfs_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* Portions Copyright 2011 Martin Matuska
* Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
* Portions Copyright 2012 Pawel Jakub Dawidek <[email protected]>
* Copyright (c) 2012, Joyent, Inc. All rights reserved.
* Copyright (c) 2014, 2016 Joyent, Inc. All rights reserved.
* Copyright 2016 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2014, Joyent, Inc. All rights reserved.
* Copyright (c) 2011, 2015 by Delphix. All rights reserved.
Expand Down Expand Up @@ -6291,7 +6291,7 @@ zfsdev_ioctl(struct file *filp, unsigned cmd, unsigned long arg)
}


if (error == 0 && !(flag & FKIOCTL)) {
if (error == 0) {
cookie = spl_fstrans_mark();
error = vec->zvec_secpolicy(zc, innvl, CRED());
spl_fstrans_unmark(cookie);
Expand Down

0 comments on commit 005e27e

Please sign in to comment.