I have known than this value can be configured. But when I use the default value -2, the uid and the gid will be 4294967294. As following:



------------------ 原始邮件 ------------------
发件人: "Daniel Gryniewicz"<dang@redhat.com>;
发送时间: 2019年4月2日(星期二) 晚上8:12
收件人: "devel"<devel@lists.nfs-ganesha.org>;
主题: [NFS-Ganesha-Devel] Re: A problem about All_squash

On linux, uid_t is a 32-bit unsigned integer, so this is the correct
value when you use -2.  If you want a specific UID, you need to
configure it in Anonymous_uid (or Anonymous_gid for the GID)

Daniel

On 4/1/19 11:48 PM, 891873395@qq.com wrote:
> Hi:
>     I found a question when we use permission "All_squash". We touched a file, and found that the UID and GID of this file is 4294967294. We did not set anonymous UID and GID. But the UID of nfsnobody is 65534 not 4294967294. 65535 is the  16-bit complement of -2 and 4294967294 is the 32-bit complement. So this is a problem of overflow. We shoud set the defalt value to be 0xFFFE. As the Following:
>          diff --git a/src/include/nfs_exports.h b/src/include/nfs_exports.h
>          index abec9d2..d45a939 100644
>          --- a/src/include/nfs_exports.h
>          +++ b/src/include/nfs_exports.h
>          @@ -54,8 +54,8 @@
>            * Export List structure
>            */
>           #define EXPORT_KEY_SIZE 8
>          -#define ANON_UID -2
>          -#define ANON_GID -2
>          +#define ANON_UID 0xFFFE
>          +#define ANON_GID 0xFFFE
>         
>           #define EXPORT_LINESIZE 1024
>           #define INPUT_SIZE 1024
> _______________________________________________
> Devel mailing list -- devel@lists.nfs-ganesha.org
> To unsubscribe send an email to devel-leave@lists.nfs-ganesha.org
>
_______________________________________________
Devel mailing list -- devel@lists.nfs-ganesha.org
To unsubscribe send an email to devel-leave@lists.nfs-ganesha.org