MSDfs and substitutions/default service..
Shirish Kalele
kalele at veritas.com
Thu May 9 11:43:02 GMT 2002
There was a superfluous string_sub in the previous patch. Try this one
instead when you get a chance..
Thanks,
Shirish
--- msdfs.c.orig Thu May 9 11:38:48 2002
+++ msdfs.c Thu May 9 11:38:29 2002
@@ -84,9 +84,11 @@
static BOOL create_conn_struct( connection_struct *conn, int snum)
{
+
ZERO_STRUCTP(conn);
conn->service = snum;
conn->connectpath = lp_pathname(snum);
+ pstring_sub(conn->connectpath, "%S", lp_servicename(snum));
if (!smbd_vfs_init(conn)) {
DEBUG(0,("create_conn_struct: smbd_vfs_init failed.\n"));
@@ -366,8 +368,10 @@
/* Verify the share is a dfs root */
snum = lp_servicenumber(jn->service_name);
- if(snum < 0)
- return False;
+ if(snum < 0) {
+ if ((snum = find_service(jn->service_name)) < 0)
+ return False;
+ }
if (!create_conn_struct(conn, snum))
return False;
On Thu, 9 May 2002, Kevin Wheatley wrote:
>Shirish Kalele wrote:
>>
>> Yes, the reason the substitutions don't work is that dfs referrals are done
>> over IPC$ where %S doesn't resolve to the service name you want.
>> This is also the reason why any default services won't be found when a dfs
>> referral is done unless we specifically add the service.
>>
>> Try out this patch and let me know. It'll also go into the next release..
>
>Thanks for that I'm off home for the day but I'll give it a go in the
>morning. This will afford me a very elegant solution, mirroring out
>NFS based system for the Unix clients, with only the path separators
>being different ...
>
>e.g. on Unix we have /vdisk/path/to/my/element ->
>/hosts/machine/path/to/my/element
>
>which means we can move things around on the servers, but there is a
>global name for it that stays constant.
>
>With my VFS module/config I turn those links into
>\\vdisk\path\to\my\element which is an MSDfs referal (via the /hosts
>-> msdfs: conversion) to \\machine\path\to\element
>
>and everybody still has the one place to go looking for things.
>Different elements on different machines.
>
>Thanks once again for the help,
>
>Kevin
>
>--
>| Kevin Wheatley | These are the opinions of nobody |
>| Special Services (Projects) | and are not shared by my employers |
>| Cinesite Digital Studios | |
>
More information about the samba-technical
mailing list