[linux-cifs-client] Re: [PATCH 5/5] [CIFS] clear sticky bit in default file_mode

Steve French smfrench at gmail.com
Tue Oct 16 17:26:07 GMT 2007


jra,
Any idea why the cifs client has been setting the sticky bit?

I think we simply meant to set the setgroup bit (with group execute
off) in order to indicate mandatory locking is used by the server.

e.g. as described in:
http://www.hackinglinuxexposed.com/articles/20030623.html


On 10/16/07, Jeff Layton <jlayton at redhat.com> wrote:
> The comment says this mode should be 02767, but the code is actually
> setting it to 03767. The sticky bit shouldn't be needed here.
>
> Signed-off-by: Jeff Layton <jlayton at redhat.com>
> ---
>  fs/cifs/connect.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index 5c3cc64..ac62ad2 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -790,7 +790,7 @@ cifs_parse_mount_options(char *options, const char *devname,
>         vol->linux_gid = current->gid;
>         vol->dir_mode = S_IRWXUGO;
>         /* 2767 perms indicate mandatory locking support */
> -       vol->file_mode = S_IALLUGO & ~(S_ISUID | S_IXGRP);
> +       vol->file_mode = S_IALLUGO & ~(S_ISUID | S_ISVTX | S_IXGRP);
>
>         /* vol->retry default is 0 (i.e. "soft" limited retry not hard retry) */
>         vol->rw = TRUE;
> --
> 1.5.2.1
>
>


-- 
Thanks,

Steve


More information about the linux-cifs-client mailing list