hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Nauroth (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-10213) setfacl -x should reject attempts to include permissions in the ACL spec.
Date Thu, 16 Jan 2014 18:45:19 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-10213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13873732#comment-13873732
] 

Chris Nauroth commented on HADOOP-10213:
----------------------------------------

No worries.  The patch looks good.  Thanks!

I have one more question for you.  [~sachinjose2007@gmail.com] has provided a WebHDFS patch
on HDFS-5608, and it needs the same logic for parsing an ACL spec from a query parameter.
 I'm thinking that we could refactor your {{AclCommands#SetfaclCommand#parseAclSpec}} method
to a public static method on {{AclEntry}}, so that WebHDFS can reuse the parsing logic instead
of duplicating it.  It would look something like this:

{code}
  /**
   * Parses a string representation of an ACL spec into a list of AclEntry
   * objects.  Example: "user::rwx,user:foo:rw-,group::r--,other::---"
   *
   * @param aclSpec String ACL spec to parse
   * @return List<AclEntry> containing parsed ACL spec
   */
  public static List<AclEntry> parseAclSpec(String aclSpec) {
    ...
  }
{code}

Do you think that makes sense?  If so, would you want to do that refactoring as part of this
patch?

> setfacl -x should reject attempts to include permissions in the ACL spec.
> -------------------------------------------------------------------------
>
>                 Key: HADOOP-10213
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10213
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: tools
>    Affects Versions: HDFS ACLs (HDFS-4685)
>            Reporter: Chris Nauroth
>            Assignee: Vinay
>         Attachments: HADOOP-10213.patch, HADOOP-10213.patch
>
>
> When calling setfacl -x to remove ACL entries, it does not make sense for the entries
in the ACL spec to contain permissions.  The permissions should be unspecified, and the CLI
should return an error if the user attempts to provide permissions.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message