Skip to contentSkip to conversation

staging: lustre: llite: Replace the symbolic file permission mode with the numeric one

PATCH New Roman Storozhenko 3 participants 4 messages Jun 8, 2017 – Jun 11, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: lustre: llite: Replace the symbolic file permission mode with the numeric one

Replaces S_IRWXUGO with 0007. The reason is that symbolic permissions considered harmful:
https://lwn.net/Articles/696229/

---
 drivers/staging/lustre/lustre/llite/dir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/llite/dir.c +1 -1
index 13b3592..de5b4bf 100644
@@ -1141,7 +1141,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		}
 
 #if OBD_OCD_VERSION(2, 9, 50, 0) > LUSTRE_VERSION_CODE
-		mode = data->ioc_type != 0 ? data->ioc_type : S_IRWXUGO;
+		mode = data->ioc_type != 0 ? data->ioc_type : 0777;
 #else
 		mode = data->ioc_type;
 #endif
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 staging: lustre: llite: Replace the symbolic file permission mode with the numeric one

Roman,
You have ?0007? in the description vs. ?0777? in the patch. -Cory

On 6/8/17, 12:25 PM, "lustre-devel on behalf of Roman Storozhenko" <lustre-devel-bounces at lists.lustre.org on behalf of [email protected]> wrote:

Replaces S_IRWXUGO with 0007. The reason is that symbolic permissions

+ mode = data->ioc_type != 0 ? data->ioc_type : 0777;

#2 lore raw

PATCH 1/1 staging: lustre: llite: Replace the symbolic file permission mode with the numeric one

drivers/staging/lustre/lustre/llite/dir.c static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg) · line 1144

Quoted 13 lines · Cory Spitz

Roman,
You have ?0007? in the description vs. ?0777? in the patch. -Cory

On 6/8/17, 12:25 PM, "lustre-devel on behalf of Roman Storozhenko" <lustre-devel-bounces at lists.lustre.org on behalf of [email protected]> wrote:

Replaces S_IRWXUGO with 0007. The reason is that symbolic permissions

drivers/staging/lustre/lustre/llite/dir.c +1 -0
+		mode = data->ioc_type != 0 ? data->ioc_type : 0777;

Thanks that you pointed out that error. I have published the second version of the patch here:
http://lists.lustre.org/pipermail/lustre-devel-lustre.org/2017-June/005727.html

maintainer
#3 lore raw

PATCH v2 1/1 staging: lustre: llite: Replace the symbolic file permission mode with the numeric one

In reply to Roman Storozhenko
Quoted 8 lines · Roman Storozhenko

Replaces S_IRWXUGO with 0777. The reason is that symbolic permissions considered harmful:
https://lwn.net/Articles/696229/

The second version of that patch fixes the mistype in the first version. There were "0007" in the description instead of correct "0777" value. Thanks to Cory Spitz, who pointed out this error here:
http://lists.lustre.org/pipermail/lustre-devel-lustre.org/2017-June/005726.html

This info doesn't need to be in the patch itself, it should go below the --- line.

Please fix up and resend.

And also don't make your v3 of the patch with the same exact message-id of the previous ones. That's ripe for getting automatically deleted by mail filters and email clients.

thanks,

greg k-h