[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog doc/C/usermanual/usage/gnashrc....
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog doc/C/usermanual/usage/gnashrc.... |
Date: |
Sat, 20 Oct 2007 09:16:06 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/10/20 09:16:06
Modified files:
. : ChangeLog
doc/C/usermanual/usage: gnashrc.xml
libbase : rc.cpp
testsuite/libbase: TCXXRc.cpp gnashrc-local.in gnashrc.in
Log message:
* doc/C/usermanual/usage/gnashrc.xml: document new
localSandboxPath
directive.
* libbase/rc.cpp: support localSandboxPath (set, append)
directive.
* testsuite/libbase/: TCXXRc.cpp, gnashrc-local.in, gnashrc.in:
test localSandboxPath append and set.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4653&r2=1.4654
http://cvs.savannah.gnu.org/viewcvs/gnash/doc/C/usermanual/usage/gnashrc.xml?cvsroot=gnash&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/rc.cpp?cvsroot=gnash&r1=1.42&r2=1.43
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libbase/TCXXRc.cpp?cvsroot=gnash&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libbase/gnashrc-local.in?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libbase/gnashrc.in?cvsroot=gnash&r1=1.10&r2=1.11
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4653
retrieving revision 1.4654
diff -u -b -r1.4653 -r1.4654
--- ChangeLog 20 Oct 2007 07:24:19 -0000 1.4653
+++ ChangeLog 20 Oct 2007 09:16:04 -0000 1.4654
@@ -1,5 +1,13 @@
2007-10-20 Sandro Santilli <address@hidden>
+ * doc/C/usermanual/usage/gnashrc.xml: document new localSandboxPath
+ directive.
+ * libbase/rc.cpp: support localSandboxPath (set, append) directive.
+ * testsuite/libbase/: TCXXRc.cpp, gnashrc-local.in, gnashrc.in:
+ test localSandboxPath append and set.
+
+2007-10-20 Sandro Santilli <address@hidden>
+
* testsuite/MovieTester.cpp: call set_base_url *before*
create_movie*
* libbase/rc.h: add a "local sandboxes" configuration.
Index: doc/C/usermanual/usage/gnashrc.xml
===================================================================
RCS file: /sources/gnash/gnash/doc/C/usermanual/usage/gnashrc.xml,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- doc/C/usermanual/usage/gnashrc.xml 3 Oct 2007 14:15:22 -0000 1.14
+++ doc/C/usermanual/usage/gnashrc.xml 20 Oct 2007 09:16:05 -0000 1.15
@@ -84,6 +84,19 @@
hosts to lists in previously parsed files.</entry>
</row>
<row>
+<entry>localSandboxPath</entry>
+<entry>dirs</entry>
+<entry>This is a list of directories separated by spaces.
+ Only resources from these directories and from the directory
+ portion of base url are allowed to load.
+ Because several files can be parsed in succession, each file can
override
+ or add to lists in other files. Use <emphasis>set</emphasis> to
override
+ all other lists or <emphasis>append</emphasis> to add new sandboxes.
+ Note that there's currently no way to *drop* the directory of base
url
+ from the list of allowed local sandboxes.
+ </entry>
+</row>
+<row>
<entry>delay</entry>
<entry>Number</entry>
<entry>&app; uses a timer-based event mechanism to advance frames
Index: libbase/rc.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/rc.cpp,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- libbase/rc.cpp 8 Oct 2007 12:56:27 -0000 1.42
+++ libbase/rc.cpp 20 Oct 2007 09:16:05 -0000 1.43
@@ -311,6 +311,8 @@
string value;
ifstream in;
+ StringNoCaseEqual noCaseCompare;
+
// log_msg ("Seeing if %s exists", filespec);
if (filespec.size() == 0) {
return false;
@@ -347,6 +349,8 @@
// Get second token
in >> variable;
+ // cout << "Parsing " << variable << endl;
+
// Read in rest of line for parsing.
getline(in, value);
@@ -354,35 +358,40 @@
string::size_type position = value.find_first_not_of(' ');
if(position != string::npos) value.erase(0, position);
- if (action == "set" || action == "append") {
+ if (noCaseCompare(action, "set") || noCaseCompare(action,
"append") ) {
- if (variable == "flashVersionString") {
+ if (noCaseCompare(variable, "flashVersionString")) {
_flashVersionString = value;
continue;
}
- if (variable == "debuglog") {
+ if (noCaseCompare(variable, "debuglog")) {
expandPath (value);
_log = value;
continue;
}
- if (variable == "documentroot") {
+ if (noCaseCompare(variable, "documentroot") ) {
_wwwroot = value;
continue;
}
- if (variable == "blacklist") {
+ if (noCaseCompare(variable, "blacklist") ) {
parseList(_blacklist, action, variable, value);
continue;
}
- if (variable == "whitelist") {
+ if (noCaseCompare(variable, "whitelist")) {
parseList(_whitelist, action, variable, value);
continue;
}
- if (action == "set") {
+ if (noCaseCompare(variable, "localSandboxPath")) {
+ parseList(_localSandboxPath, action, variable, value);
+ continue;
+ }
+
+ if (noCaseCompare(action , "set") ) {
extractSetting(&_splash_screen, "splash_screen", variable,
value);
extractSetting(&_localhost_only, "localhost", variable,
Index: testsuite/libbase/TCXXRc.cpp
===================================================================
RCS file: /sources/gnash/gnash/testsuite/libbase/TCXXRc.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- testsuite/libbase/TCXXRc.cpp 8 Oct 2007 12:56:27 -0000 1.21
+++ testsuite/libbase/TCXXRc.cpp 20 Oct 2007 09:16:05 -0000 1.22
@@ -215,6 +215,20 @@
runtest.fail ("rc.getBlackList() doesn't have elements");
}
+ const std::vector<std::string>& localSandbox = rc.getLocalSandboxPath();
+ if (localSandbox.size() != 1) {
+ runtest.fail ("rc.getLocalSandboxPath() doesn't have 1 element after
set");
+ } else {
+ if ( localSandbox[0] == "/tmp/p1" )
+ {
+ runtest.pass ("set localSandbox");
+ }
+ else
+ {
+ runtest.fail ("rc.getLocalSandboxPath() doesn't have the correct
first element after set");
+ }
+ }
+
// Parse a second file
if (rc.parseFile("gnashrc-local")) {
@@ -239,6 +253,21 @@
} else {
runtest.pass ("rc.getWhiteList(): local override succeeded");
}
+
+ // Test local override of previous local sandbox
+ const std::vector<std::string>& localSandbox =
rc.getLocalSandboxPath();
+ if (localSandbox.empty()) {
+ runtest.fail ("rc.getLocalSandboxPath() doesn't have elements
after append");
+ } else {
+ if ( localSandbox.back() == "/tmp/gnash" )
+ {
+ runtest.pass ("append localSandbox");
+ }
+ else
+ {
+ runtest.fail ("rc.getLocalSandboxPath() doesn't have the
correct last element after append");
+ }
+ }
}
}
Index: testsuite/libbase/gnashrc-local.in
===================================================================
RCS file: /sources/gnash/gnash/testsuite/libbase/gnashrc-local.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- testsuite/libbase/gnashrc-local.in 28 Sep 2007 15:44:03 -0000 1.2
+++ testsuite/libbase/gnashrc-local.in 20 Oct 2007 09:16:06 -0000 1.3
@@ -4,3 +4,5 @@
# Don't access content from these sites
# Test for append to list
append blacklist www.gnashdev.org www.wikipedia.de
+
+append localSandboxPath /tmp/gnash
Index: testsuite/libbase/gnashrc.in
===================================================================
RCS file: /sources/gnash/gnash/testsuite/libbase/gnashrc.in,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- testsuite/libbase/gnashrc.in 3 Oct 2007 14:15:23 -0000 1.10
+++ testsuite/libbase/gnashrc.in 20 Oct 2007 09:16:06 -0000 1.11
@@ -60,3 +60,6 @@
# since these are the only values that can cause problems due to
# the parser looping too many times.
set blacklist www.doubleclick.com www.ebay.com
+
+# Allow access to the /tmp/p1 directory
+set localSandboxPath /tmp/p1