Subject Remote Shadows (again...)
Author m_theologos
The problem:

When someone tries to create a shadow on a remote drive the server
refuses to create it.

- Database mirroring (more details on previous threads. Do a search
on the group's webpage at Yahoo! using 'shadow' for full discussions
about this topic. Anyway we can talk again if you want...)


To relax a little bit the constrains imposed by the server in order
to allow us to create a shadow remotely.

I looked a little bit more in detail to the 1.5.3 code base and we
have in parse.cpp


static void define_shadow(void)

shadow->fil_name = PARSE_symbol(tok_quoted);
if (!check_filename(shadow->fil_name, FALSE))
PARSE_error(297, 0, 0); /* msg 297: A node name is not
permitted in a shadow or secondary file name */


If you want, have a look at

static BOOLEAN check_filename( SYM name, USHORT decnet_flag) (located
in parse.cpp)

and, you'll see that it has at the end

return !ISC_check_if_remote(file_name, FALSE);


Following the code, in isc_file.cpp

we have

BOOLEAN DLL_EXPORT ISC_check_if_remote(TEXT * file_name,
BOOLEAN implicit_flag)
* I S C _ c h e c k _ i f _ r e m o t e
* Functional description
* Check to see if a path name resolves to a
* remote file. If implicit_flag is TRUE, then
* analyze the path to see if it resolves to a
* file on a remote machine. Otherwise, simply
* check for an explicit node name.

/* Always check for an explicit TCP node name */

if (ISC_analyze_tcp(temp_name, host_name)) {

return TRUE;


#if defined(WIN_NT)
/* Check for an explicit named pipe node name */

if (ISC_analyze_pclan(temp_name, host_name)) {

return TRUE;

#endif // WIN_NT

return FALSE;

...and if you'll have a look to ISC_analyze_pclan you'll see that it
deals with name pipes, parsing the shares.


Perhaps someone of you will be so kind to change a bit the
define_shadow from parse.cpp making the 'if' looks like:
if not (check_filename(...) and #ifdefined(WIN_NT)
ISC_analyze_pclan(...) #endif) then <throw parse error>?

(I deliberately wrote in pseudo-code leaving the full choice of
coding solution to you)

What do you think? (from architectural POV)

Any side effects?

(Sorry, I don't know the code very well...)

If someone can build an experimental superserver with this change
please send me an eMail with a link (recommended) or with the kit
attached in order to do some crash tests & benchmarks. (I have some
WinXP/Win2003 machines ready for this. Perhaps that we can put it on
V2.0 - I'll write a small documentation for you about this, how
someone can safeguard his data in this way, if this works, of course)


m. th.


How managed Alex (Peshkov) to create shadows on NFS points... (on
Windows not even with mapped drives I cannot trick the engine...)