Whamcloud - gitweb
LU-3866 hsm: permission checks on HSM operations
[fs/lustre-release.git] / lustre / llite / dir.c
index c90c543..04cf9d2 100644 (file)
@@ -1899,6 +1899,9 @@ out_rmdir:
                RETURN(rc);
        }
        case LL_IOC_HSM_CT_START:
+               if (!cfs_capable(CFS_CAP_SYS_ADMIN))
+                       RETURN(-EPERM);
+
                rc = copy_and_ioctl(cmd, sbi->ll_md_exp, (void *)arg,
                                    sizeof(struct lustre_kernelcomm));
                RETURN(rc);