mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-13 01:40:26 +00:00
Properly fix updatenode syncfiles (#5013)
* Fix xdcp username on updatenode -F xdcp was not using the username and trusted facility, fix updatenode usage. * Remove security risk of forceroot Any user can specificy 'forceroot'. Remove this and rely upon the other method to properly use the 'trusted' role.
This commit is contained in:
@ -1833,6 +1833,7 @@ sub updatenodesyncfiles
|
||||
{
|
||||
command => ["xdcp"],
|
||||
node => $syncfile_node{$synclist},
|
||||
username => $request->{username},
|
||||
arg => $args,
|
||||
env => $env
|
||||
},
|
||||
|
@ -639,7 +639,6 @@ sub process_servicenodes_xdcp
|
||||
$addreq->{'_xcatdest'} = $::mnname;
|
||||
$addreq->{node} = \@sn;
|
||||
$addreq->{noderange} = \@sn;
|
||||
$addreq->{forceroot}->[0] = 1;
|
||||
|
||||
# check input request for --nodestatus
|
||||
my $args = $req->{arg}; # argument
|
||||
@ -1216,9 +1215,6 @@ sub process_request
|
||||
$ENV{DSH_FROM_USERID} = $request->{username}->[0];
|
||||
}
|
||||
}
|
||||
if ($request->{forceroot}) {
|
||||
$ENV{DSH_FROM_USERID} = 'root';
|
||||
}
|
||||
if ($command eq "xdsh")
|
||||
{
|
||||
xdsh($nodes, $args, $callback, $command, $request->{noderange}->[0]);
|
||||
|
Reference in New Issue
Block a user