Re: [Monetdb-developers] [Monetdb-pf-checkins] pathfinder/runtime xrpc_server.mx, , 1.82, 1.83
Hi Stefan, Thanks for cleaning up the code. However, it is referred in MIL, so I think this change will break loading the module. This BAT should be used by xrpc_handle_file_request() for security check. I should add code to do this, so I'd suggest to undo this change. What do you think? Regards, Jennie On Jul 23, 2008, at 12:37 , Stefan Manegold wrote:
Update of /cvsroot/monetdb/pathfinder/runtime In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9875/ pathfinder/runtime
Modified Files: xrpc_server.mx Log Message:
clean-up: removing unused global variable
U xrpc_server.mx Index: xrpc_server.mx =================================================================== RCS file: /cvsroot/monetdb/pathfinder/runtime/xrpc_server.mx,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- xrpc_server.mx 17 Jul 2008 21:28:28 -0000 1.82 +++ xrpc_server.mx 23 Jul 2008 10:37:49 -0000 1.83 @@ -194,7 +194,7 @@ static MT_Sema xrpc_commit_sema; static xrpc_commit_t *xrpc_commit_active = NULL;
-BAT *xrpc_trusted = NULL, *xrpc_admin = NULL, *xrpc_user = NULL; +BAT *xrpc_trusted = NULL, *xrpc_admin = NULL; char *xrpc_hostname = NULL; int xrpc_port = 0;
@@ -889,7 +889,6 @@ @:xrpc_bat(admin,str)@ xrpc_admin = xrpc_bat; @:xrpc_bat(user,str)@ - xrpc_user = xrpc_bat;
CMDmy_hostname(&xrpc_hostname); MT_init_sema(xrpc_commit_sema,0, "XRPC_COMMIT_SEMA");
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Monetdb-pf-checkins mailing list Monetdb-pf-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins
On Wed, Jul 23, 2008 at 02:29:40PM +0200, Ying Zhang wrote:
Hi Stefan,
Thanks for cleaning up the code. However, it is referred in MIL,
how/where is the *C variable* referred in *MIL* ?
so I think this change will break loading the module.
works for me: ======== $ Mserver --dbinit='module(pathfinder);' -------- # MonetDB Server v4.25.0 # based on GDK v1.25.0 # Copyright (c) 1993-2008, CWI. All rights reserved. # Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs; dynamically linked. # Visit http://monetdb.cwi.nl/ for further information. # PF/Tijah module v0.5.0 loaded. http://dbappl.cs.utwente.nl/pftijah # MonetDB/XQuery module v0.25.0 loaded (default back-end is 'algebra') # XRPC administrative console at http://127.0.0.1:50001/admin MonetDB> ======== and: ======== $ ( cd .../pathfinder && Mtest.py -qg tests/XRpc benchmarks/XMark/XRpc ) -------- .................................................................. * (insertNode.test.out.FILTERED) significantly * (insertNode.test.err.FILTERED) significantly !ERROR: Testing FAILED SIGNIFICANTLY ! 1 out of 66 tests produced SIGNIFICANTLY different output First, check the testing results in /net/rig.ins.cwi.nl/export/scratch0/manegold/Monet/Testing/Current/prefix.--enable-strict_--disable-optimize_--disable-debug_--disable-assert/mTests/index.html ! Then, fix the problems by: - fixing sources and test scripts - fixing stable output by hand - approving test output by Mapprove.py (cf. Mapprove.py -?) After that, re-run Mtest. ======== ... both of course tested before checkin! ... ;-)
This BAT should be used by xrpc_handle_file_request() for security check. I should add code to do this, so I'd suggest to undo this change. What do you think?
in the current code, xrpc_user was/is not required as a global variable; hence, I felt free to remove it -- the cleaner the code, the easier the maintenance and the lower the chance for compilation problems, portability problems and bugs. In case, new code does/will eventually need xrpc_user as a global variable, please feel free to add it (again) once you add that code. Stefan
Regards,
Jennie
On Jul 23, 2008, at 12:37 , Stefan Manegold wrote:
Update of /cvsroot/monetdb/pathfinder/runtime In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9875/ pathfinder/runtime
Modified Files: xrpc_server.mx Log Message:
clean-up: removing unused global variable
U xrpc_server.mx Index: xrpc_server.mx =================================================================== RCS file: /cvsroot/monetdb/pathfinder/runtime/xrpc_server.mx,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- xrpc_server.mx 17 Jul 2008 21:28:28 -0000 1.82 +++ xrpc_server.mx 23 Jul 2008 10:37:49 -0000 1.83 @@ -194,7 +194,7 @@ static MT_Sema xrpc_commit_sema; static xrpc_commit_t *xrpc_commit_active = NULL;
-BAT *xrpc_trusted = NULL, *xrpc_admin = NULL, *xrpc_user = NULL; +BAT *xrpc_trusted = NULL, *xrpc_admin = NULL; char *xrpc_hostname = NULL; int xrpc_port = 0;
@@ -889,7 +889,6 @@ @:xrpc_bat(admin,str)@ xrpc_admin = xrpc_bat; @:xrpc_bat(user,str)@ - xrpc_user = xrpc_bat;
CMDmy_hostname(&xrpc_hostname); MT_init_sema(xrpc_commit_sema,0, "XRPC_COMMIT_SEMA");
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Monetdb-pf-checkins mailing list Monetdb-pf-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Monetdb-developers mailing list Monetdb-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-developers
-- | Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4312 |
Hi Stefan, On Jul 23, 2008, at 15:46 , Stefan Manegold wrote:
On Wed, Jul 23, 2008 at 02:29:40PM +0200, Ying Zhang wrote:
Hi Stefan,
Thanks for cleaning up the code. However, it is referred in MIL,
how/where is the *C variable* referred in *MIL* ?
in xrpc_server.mx, line 72: var xrpc_user := bat("xrpc_user").append(split(monet_environment.find("xrpc_user"),";"));
so I think this change will break loading the module.
works for me:
You are right, it indeed works. Now I see. I have removed this variable earlier together with the creation of the BAT xrpc_user, which causes 'append' to fail.
@@ -889,7 +889,6 @@ @:xrpc_bat(admin,str)@ xrpc_admin = xrpc_bat; @:xrpc_bat(user,str)@ ^^^^^^^^^^^^^^^^^^^ I didn't have this line.
- xrpc_user = xrpc_bat;
Thanks again. Jennie
On Wed, Jul 23, 2008 at 04:13:56PM +0200, Ying Zhang wrote:
Hi Stefan,
On Jul 23, 2008, at 15:46 , Stefan Manegold wrote:
On Wed, Jul 23, 2008 at 02:29:40PM +0200, Ying Zhang wrote:
Hi Stefan,
Thanks for cleaning up the code. However, it is referred in MIL,
how/where is the *C variable* referred in *MIL* ?
in xrpc_server.mx, line 72:
var xrpc_user := bat("xrpc_user").append(split(monet_environment.find("xrpc_user"),";")); ^^^^^^^^^^^^^^^^ Here, the BAT is referred / looked up by its *name* --- this is pure *MIL* not related to any (global) *C* variable at all.
so I think this change will break loading the module.
works for me:
You are right, it indeed works. Now I see. I have removed this variable earlier together with the creation of the BAT xrpc_user, which causes 'append' to fail.
???
@@ -889,7 +889,6 @@ @:xrpc_bat(admin,str)@ xrpc_admin = xrpc_bat; @:xrpc_bat(user,str)@ ^^^^^^^^^^^^^^^^^^^ I didn't have this line.
This line creates and (re-)names the BAT that is used in the MIL snipped above and was introduced (in the xrpcdemo branch by ============================================================================= RCS file: /cvsroot/monetdb/pathfinder/runtime/xrpc_server.mx,v Working file: pathfinder/runtime/xrpc_server.mx head: 1.83 branch: locks: strict access list: keyword substitution: kv total revisions: 164; selected revisions: 1 description: ---------------------------- revision 1.68.4.6 date: 2008/06/05 21:17:55; author: boncz; state: Exp; lines: +833 -16 still premature, it starts without errors but xrpc does not work yet (actually I did not test yet) BEWARE: ./de-bootstrap and full rebuild required xrpc_common was put into xrpc_server because more and more of xrpc_server was ending up in xrpc_common. ============================================================================= Stefan
- xrpc_user = xrpc_bat;
Thanks again.
Jennie
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Monetdb-developers mailing list Monetdb-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-developers
-- | Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4312 |
participants (2)
-
Stefan Manegold
-
Ying Zhang