diff options
author | Amar Tumballi <amarts@redhat.com> | 2017-11-07 00:07:12 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2018-01-17 06:00:39 +0000 |
commit | 75b063d76d78b5d1e0e53a1be37dc5ad9200f7b2 (patch) | |
tree | ae9149d96a2f850c2128de0328e13634fec09a5e /rpc/xdr/src | |
parent | e3a191a0d3ea0706f4827ebdb6e5161623f2c5f1 (diff) |
rpc/*: auth-header changes
Introduce another authentication header which can now send more data.
This is useful because this data can be common for all the fops, and
we don't need to change all the signatures.
As part of this, made rpc-clnt.c little more modular to support multiple
authentication structures.
stack.h changes are placeholder for the ctime etc, can be moved later
based on need.
updates #384
Change-Id: I6111c13cfd2ec92e2b4e9295896bf62a8a33b2c7
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'rpc/xdr/src')
-rw-r--r-- | rpc/xdr/src/glusterfs4-xdr.x | 25 | ||||
-rw-r--r-- | rpc/xdr/src/libgfxdr.sym | 1 |
2 files changed, 26 insertions, 0 deletions
diff --git a/rpc/xdr/src/glusterfs4-xdr.x b/rpc/xdr/src/glusterfs4-xdr.x index ef0cfde0802..9e3223b58b5 100644 --- a/rpc/xdr/src/glusterfs4-xdr.x +++ b/rpc/xdr/src/glusterfs4-xdr.x @@ -33,6 +33,31 @@ union gfx_value switch (gf_dict_data_type_t type) { opaque other<>; }; +/* AUTH */ +/* This is used in the rpc header part itself, And not program payload. + Avoid sending large data load here. Allowed maximum is 400 bytes. + Ref: http://tools.ietf.org/html/rfc5531#section-8.2 + this is also handled in xdr-common.h +*/ +struct auth_glusterfs_params_v3 { + int pid; + unsigned int uid; + unsigned int gid; + + /* flags */ + /* Makes sense to use it for each bits */ + /* 0x1 == IS_INTERNAL? */ + /* Another 31 bits are reserved */ + unsigned int flags; + + /* birth time of the frame / call */ + unsigned int ctime_nsec; /* good to have 32bit for this */ + unsigned hyper ctime_sec; + + unsigned int groups<>; + opaque lk_owner<>; +}; + struct gfx_dict_pair { opaque key<>; gfx_value value; diff --git a/rpc/xdr/src/libgfxdr.sym b/rpc/xdr/src/libgfxdr.sym index 83f1efc732a..f6aa300544a 100644 --- a/rpc/xdr/src/libgfxdr.sym +++ b/rpc/xdr/src/libgfxdr.sym @@ -1,5 +1,6 @@ xdr_auth_glusterfs_parms xdr_auth_glusterfs_parms_v2 +xdr_auth_glusterfs_params_v3 xdr_changelog_event_req xdr_changelog_event_rsp xdr_changelog_probe_req |