lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20060729135837.GB28712@leiferikson.dystopia.lan>
Date:	Sat, 29 Jul 2006 15:58:37 +0200
From:	Johannes Weiner <hnazfoo@...glemail.com>
To:	linux-kernel@...r.kernel.org
Subject: Re: [RFC] #define rwxr_xr_x 0755

Hi,

On Fri, Jul 28, 2006 at 12:59:11AM +0400, Alexey Dobriyan wrote:
> Every time I try to decipher S_I* combos I cry in pain. Often I just
> refer to include/linux/stat.h defines to find out what mode it is
> because numbers are actually quickier to understand.
> 
> Compare and contrast:
> 
> 	0644 vs S_IRUGO|S_IWUSR vs rw_r__r__
> 
> I'd say #2 really sucks.

I understood the octal notation at once. #2 took a second, I'd prefer
writing it  S_IRUGO | S_IWUSR  which makes it slightly more obvious.
#3 is even better than #2 but still sucks. What against octals?

> What people think? Should folks at Moscow call 03 ASAP?
> 
> --- a/fs/smbfs/inode.c
> +++ b/fs/smbfs/inode.c
> @@ -575,10 +575,8 @@ static int smb_fill_super(struct super_b
>  		mnt->flags = (oldmnt->file_mode >> 9) | SMB_MOUNT_UID |
>  			SMB_MOUNT_GID | SMB_MOUNT_FMODE | SMB_MOUNT_DMODE;
>  	} else {
> -		mnt->file_mode = S_IRWXU | S_IRGRP | S_IXGRP |
> -				S_IROTH | S_IXOTH | S_IFREG;
> -		mnt->dir_mode = S_IRWXU | S_IRGRP | S_IXGRP |
> -				S_IROTH | S_IXOTH | S_IFDIR;
> +		mnt->file_mode = rwxr_xr_x | S_IFREG;

0755 | S_IFREG is more readable I think.

> +		mnt->dir_mode = rwxr_xr_x | S_IFDIR;

0755 | S_IFDIR ; same here

Hannes
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ