Below is the list of changes that have just been committed into a local
4.1 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 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
mysql-test/mysql-test-run.pl@stripped, 2007-05-23 12:13:37+02:00,
msvensson@shellback.(none) +10 -3
Checking for "running as root" should also read the filemode to see it
was properly set to 0000
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: shellback.(none)
# Root: /home/msvensson/mysql/mysql-4.1-maint
--- 1.172/mysql-test/mysql-test-run.pl 2007-05-23 12:13:54 +02:00
+++ 1.173/mysql-test/mysql-test-run.pl 2007-05-23 12:13:54 +02:00
@@ -2119,16 +2119,23 @@
close FILE;
}
- chmod(oct("0755"), $test_file);
- unlink($test_file);
+ # Some filesystems( for example CIFS) allows reading a file
+ # although mode was set to 0000, but in that case a stat on
+ # the file will not return 0000
+ my $file_mode= (stat($test_file))[2] & 07777;
$ENV{'MYSQL_TEST_ROOT'}= "NO";
- if ($result eq "MySQL")
+ mtr_verbose("result: $result, file_mode: $file_mode");
+ if ($result eq "MySQL" && $file_mode == 0)
{
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);
+
}
| Thread |
|---|
| • bk commit into 4.1 tree (msvensson:1.2614) BUG#27396 | msvensson | 23 May |