From f01b360e67696fff002f5e2b9cf6eedf5ff84f4a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 20 May 2011 10:12:25 -0700 Subject: [PATCH] Pass caller's credential in zfsdev_ioctl() Initially when zfsdev_ioctl() was ported to Linux we didn't have any credential support implemented. So at the time we simply passed NULL which wasn't much of a problem since most of the secpolicy code was disabled. However, one exception is quota handling which does require the credential. Now that proper credentials are supported we can safely start passing the callers credential. This is also an initial step towards fully implemented the zfs secpolicy. --- module/zfs/zfs_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c index cb423e8b89..7fba6e7272 100644 --- a/module/zfs/zfs_ioctl.c +++ b/module/zfs/zfs_ioctl.c @@ -5047,7 +5047,7 @@ zfsdev_ioctl(struct file *filp, unsigned cmd, unsigned long arg) error = EFAULT; if ((error == 0) && !(flag & FKIOCTL)) - error = zfs_ioc_vec[vec].zvec_secpolicy(zc, NULL); + error = zfs_ioc_vec[vec].zvec_secpolicy(zc, CRED()); /* * Ensure that all pool/dataset names are valid before we pass down to