Commit 6f270600 authored by Mike Hibler's avatar Mike Hibler

Be a little more precise with the access check for '-l'.

Check for READINFO rather than MODIFYINFO.  AnalBoy strikes again.
parent ba1a72bb
......@@ -125,10 +125,15 @@ foreach my $node ( @ARGV ) {
# Figure out who called us. Only root, people with admin status
# in the DB, or members of the right project can do this.
#
if ($UID && !TBAdmin($UID) &&
!TBNodeAccessCheck($UID, TB_NODEACCESS_MODIFYINFO, @nodes)) {
fatal("os_select: You do not have permission to modify ".
"one or more of the nodes.\n");
if ($UID && !TBAdmin($UID)) {
if ($list && !TBNodeAccessCheck($UID, TB_NODEACCESS_READINFO, @nodes)) {
fatal("os_select: You do not have permission to access ".
"one or more of the nodes.\n");
}
if (!$list && !TBNodeAccessCheck($UID, TB_NODEACCESS_MODIFYINFO, @nodes)) {
fatal("os_select: You do not have permission to modify ".
"one or more of the nodes.\n");
}
}
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment