Skip to content

Commit

Permalink
[#7][#10][#24] Added support for NFSv4 ACLs.
Browse files Browse the repository at this point in the history
  • Loading branch information
korydraughn committed Sep 6, 2019
1 parent 557fb8b commit d1159b4
Show file tree
Hide file tree
Showing 4 changed files with 771 additions and 363 deletions.
2 changes: 1 addition & 1 deletion irods-vfs-impl/config/exports
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/ *(rw,sec=sys,no_root_squash)
/ *(rw,sec=sys,acl,no_root_squash)
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public String uidToPrincipal(int _id)
return String.valueOf(_id);
}

public int getUidForUser(String _name)
public int getUidByUserName(String _name)
{
if (_name == null || _name.isEmpty())
{
Expand Down Expand Up @@ -161,6 +161,42 @@ public int getGidForUser(String _name)
return p.gid;
}

public int getGidByGroupName(String _name)
{
if (_name == null || _name.isEmpty())
{
log_.error("getGidForGroup - Name argument is null. Returning gid {}", NOBODY_GID);
return NOBODY_GID;
}

__group g = libc_.getgrnam(_name);

if (g == null)
{
log_.debug("getGidForGroup - Group not found. Returning group name {}", NOBODY_GID);
return NOBODY_GID;
}

log_.debug("getGidForGroup - Group found! Returning group name {}", g.gid);

return g.gid;
}

public String getGroupName(int _gid)
{
log_.debug("getGroupName - _gid = {}", _gid);

__group g = libc_.getgrgid(_gid);

if (g == null)
{
log_.debug("getGroupName - Group not found. Returning null");
return null;
}

return g.name;
}

public IRODSUser resolveUser(int _uid) throws IOException
{
log_.debug("resolveUser - _userID = {}", _uid);
Expand Down

0 comments on commit d1159b4

Please sign in to comment.