[英]NFSACL GETACL / SETACL structes
I have a proxy server between the client and server. 我在客户端和服务器之间有一个代理服务器。
I use XDR to read and modify NFS messages between them 我使用XDR读取和修改它们之间的NFS消息
for example if i want to edit the file size for and get attributes reply i use the struct and function 例如,如果我要编辑文件大小并获取属性回复,则使用struct和function
GETATTR3res GETATTR3res
bool_t xdr_GETATTR3res ( XDR *xdrs, GETATTR3res *objp ); bool_t xdr_GETATTR3res(XDR * xdrs,GETATTR3res * objp);
now i want to use the same method to modify replys for 现在我想使用相同的方法来修改回复
RPC: RPC:
Program: NFSACL (100227) 程序:NFSACL(100227)
Program version: 3 程式版本:3
Procedure: GETACL (1) and SETACL (2) 步骤:GETACL(1)和SETACL(2)
i want to edit the (fattr3) attributes field with xdr 我想用xdr编辑(fattr3)属性字段
either a XDR function for NFSACL or even deconstructed XDR function for the fields NFSACL procedures have 要么是针对NFSACL的XDR函数,要么甚至是针对NFSACL程序具有的字段的解构XDR函数
I have found this list of structures that with smaller XDR function can be used to modify the attributes 我发现此具有较小XDR功能的结构列表可用于修改属性
struct GETACL3args {
nfs_fh3 fh;
uint32 mask;
};
typedef struct GETACL3args GETACL3args;
struct GETACL3resok {
post_op_attr attr;
vsecattr_t acl;
};
typedef struct GETACL3resok GETACL3resok;
struct GETACL3resfail {
post_op_attr attr;
};
typedef struct GETACL3resfail GETACL3resfail;
struct GETACL3res {
nfsstat3 status;
union {
GETACL3resok ok;
GETACL3resfail fail;
} res_u;
};
typedef struct GETACL3res GETACL3res;
struct SETACL3args {
nfs_fh3 fh;
vsecattr_t acl;
};
typedef struct SETACL3args SETACL3args;
struct SETACL3resok {
post_op_attr attr;
};
typedef struct SETACL3resok SETACL3resok;
struct SETACL3resfail {
post_op_attr attr;
};
typedef struct SETACL3resfail SETACL3resfail;
struct SETACL3res {
nfsstat3 status;
union {
SETACL3resok ok;
SETACL3resfail fail;
} res_u;
};
typedef struct SETACL3res SETACL3res;
and using xdr_post_op_attr to decode and enconde back 并使用xdr_post_op_attr解码和编码返回
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.