the fix for bug 3364300 - only allow root to run xcatbypass mode.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12323 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
cb66289972
commit
34ca6ec873
@ -126,6 +126,12 @@ if (ref($request) eq 'HASH') { # the request is an array, not pure XML
|
||||
if (!(defined($request->{username}))) {
|
||||
$request->{username}->[0] = getpwuid($>);
|
||||
}
|
||||
|
||||
# only allow root to run
|
||||
unless ($request->{username}->[0] =~ /root/) {
|
||||
print ("WARNING: Only allow root to run XCATBYPASS mode, your current user ID is $request->{username}->[0].\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
# Load plugins from either specified or default dir
|
||||
require xCAT::Table;
|
||||
|
Loading…
Reference in New Issue
Block a user