Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
nfs4j
Commits
2a8b2a7c
Commit
2a8b2a7c
authored
Dec 21, 2011
by
Tigran Mkrtchyan
☕
Browse files
nfsv41 client: generate better verifier for exchange id
parent
52c55a33
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/org/dcache/chimera/nfs/v4/client/ExchangeIDStub.java
View file @
2a8b2a7c
...
...
@@ -18,10 +18,13 @@
package
org.dcache.chimera.nfs.v4.client
;
import
java.util.Random
;
import
org.dcache.chimera.nfs.v4.xdr.*
;
import
org.dcache.utils.Bytes
;
public
class
ExchangeIDStub
{
private
static
final
Random
RANDOM
=
new
Random
(
0
);
public
static
nfs_argop4
normal
(
String
nii_domain
,
String
nii_name
,
String
co_ownerid
,
int
flags
,
int
how
)
{
...
...
@@ -46,11 +49,7 @@ public class ExchangeIDStub {
op
.
opexchange_id
.
eia_clientowner
.
co_verifier
=
new
verifier4
();
op
.
opexchange_id
.
eia_clientowner
.
co_verifier
.
value
=
new
byte
[
nfs4_prot
.
NFS4_VERIFIER_SIZE
];
byte
[]
locVerifier
=
Long
.
toHexString
(
releaseDate
.
seconds
.
value
).
getBytes
();
int
len
=
locVerifier
.
length
>
nfs4_prot
.
NFS4_VERIFIER_SIZE
?
nfs4_prot
.
NFS4_VERIFIER_SIZE
:
locVerifier
.
length
;
System
.
arraycopy
(
locVerifier
,
0
,
op
.
opexchange_id
.
eia_clientowner
.
co_verifier
.
value
,
0
,
len
);
Bytes
.
putLong
(
op
.
opexchange_id
.
eia_clientowner
.
co_verifier
.
value
,
0
,
RANDOM
.
nextLong
());
op
.
opexchange_id
.
eia_flags
=
new
uint32_t
(
flags
);
op
.
opexchange_id
.
eia_state_protect
=
new
state_protect4_a
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment