mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-30 09:36:41 +00:00
Merge pull request #5265 from cxhong/5260
Add WARNING message if non-root user runs chtab command
This commit is contained in:
commit
000235dcf2
@ -63,6 +63,12 @@ unless ($target) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
my $current_userid = getpwuid($>);
|
||||
if ($current_userid ne "root")
|
||||
{
|
||||
print "WARNING: chtab bypasses xcatd and does not enforce xCAT policy tables. Consider using tabch instead.\n";
|
||||
}
|
||||
|
||||
my %keyhash = ();
|
||||
my @keypairs = split(/,/, $target);
|
||||
if ($keypairs[0] !~ /([^\.\=]+)\.([^\.\=]+)\=(.+)/) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user