Bug #27396 | Wrong check for root priveledge | ||
---|---|---|---|
Submitted: | 23 Mar 2007 12:26 | Modified: | 18 Jun 2007 16:33 |
Reporter: | Sveta Smirnova | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Tests | Severity: | S3 (Non-critical) |
Version: | 4.1 bk, 5.0 bk, 5.1 bk | OS: | Windows (Windows, Mac OS X, possible all) |
Assigned to: | Magnus BlÄudd | CPU Architecture: | Any |
Tags: | Contribution |
[23 Mar 2007 12:26]
Sveta Smirnova
[23 Mar 2007 12:30]
Sveta Smirnova
Suggested fix should be read as: my $test_file= "$opt_vardir/test_running_as_root.txt"; mtr_tofile($test_file, "MySQL"); chmod(oct("0000"), $test_file); my $result=""; if (open(FILE,"<",$test_file)) { $result= join('', <FILE>); close FILE; } $ENV{'MYSQL_TEST_ROOT'}= "NO"; if ($result eq "MySQL" && "0000"== sprintf("%04o", stat($test_file)[2] & 07777)) { mtr_warning("running this script as _root_ will cause some " . "tests to be skipped"); $ENV{'MYSQL_TEST_ROOT'}= "YES"; } chmod(oct("0755"), $test_file); unlink($test_file);
[26 Mar 2007 7:00]
Sveta Smirnova
Forgotten bracket: Should be 'if ($result eq "MySQL" && "0000"== sprintf("%04o", (stat($test_file))[2] & 07777))' instead of 'if ($result eq "MySQL" && "0000"== sprintf("%04o", stat($test_file)[2] & 07777))'
[23 May 2007 10:14]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/27196 ChangeSet@1.2614, 2007-05-23 12:13:49+02:00, msvensson@shellback.(none) +1 -0 Bug#27396 Wrong check for root priveledge - Check that filemode was set to 0000
[6 Jun 2007 16:54]
Bugs System
Pushed into 5.1.20-beta
[6 Jun 2007 16:57]
Bugs System
Pushed into 5.0.44
[6 Jun 2007 17:01]
Bugs System
Pushed into 4.1.24
[18 Jun 2007 16:33]
Paul DuBois
Test suite change. No changelog entry needed.