Skip to content

Commit

Permalink
nfs4: include ACE flags in toString method
Browse files Browse the repository at this point in the history
Motivation:
The ACE flags are missing in the result of nfsace4#toString method and
introduce a confusion during debugging.

Modification:
include ACE flags in toString method

Result:
consistent output in logs

Acked-by: Paul Millar
Acked-by: Lea Morschel
Target: master
  • Loading branch information
kofemann committed Sep 27, 2021
1 parent 4c7e1fe commit fde8701
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions core/src/main/java/org/dcache/nfs/v4/xdr/nfsace4.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009 - 2012 Deutsches Elektronen-Synchroton,
* Copyright (c) 2009 - 2021 Deutsches Elektronen-Synchroton,
* Member of the Helmholtz Association, (DESY), HAMBURG, GERMANY
*
* This library is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -76,7 +76,23 @@ public String toString() {
}

sb.append(':');
// flag

if ((flag.value.value & nfs4_prot.ACE4_FILE_INHERIT_ACE) == nfs4_prot.ACE4_FILE_INHERIT_ACE) {
sb.append('f');
}

if ((flag.value.value & nfs4_prot.ACE4_DIRECTORY_INHERIT_ACE) == nfs4_prot.ACE4_DIRECTORY_INHERIT_ACE) {
sb.append('d');
}

if ((flag.value.value & nfs4_prot.ACE4_INHERIT_ONLY_ACE) == nfs4_prot.ACE4_INHERIT_ONLY_ACE) {
sb.append('i');
}

if ((flag.value.value & nfs4_prot.ACE4_IDENTIFIER_GROUP) == nfs4_prot.ACE4_IDENTIFIER_GROUP) {
sb.append('g');
}

sb.append(':');
sb.append(who);
sb.append(':');
Expand Down

0 comments on commit fde8701

Please sign in to comment.