소스 검색

Staging: ft1000: fix world writable debugfs file

You should not be able to write to a debugfs file from any user.

Cc: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman 14 년 전
부모
커밋
64d74c6cbe
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c

+ 1 - 1
drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c

@@ -173,7 +173,7 @@ int ft1000_create_dev(struct ft1000_device *dev)
 		goto debug_dir_fail;
 	}
 
-	file = debugfs_create_file("device", S_IRUGO | S_IWUGO, dir,
+	file = debugfs_create_file("device", S_IRUGO | S_IWUSR, dir,
 					NULL, &ft1000fops);
 	if (IS_ERR(file)) {
 		result = PTR_ERR(file);