diff options
author | Shirish Kalele <kalele@samba.org> | 2000-05-16 01:13:16 +0000 |
---|---|---|
committer | Shirish Kalele <kalele@samba.org> | 2000-05-16 01:13:16 +0000 |
commit | 651946153e41354769839fa6cbcfd36fd320efbe (patch) | |
tree | e0682dd8ef1f369e2a31846715ebc9cd2f17cc6e /source3/smbd | |
parent | 210f11d0e346db3c38d4d4f19cf77773537c9560 (diff) | |
download | samba-651946153e41354769839fa6cbcfd36fd320efbe.tar.gz samba-651946153e41354769839fa6cbcfd36fd320efbe.tar.bz2 samba-651946153e41354769839fa6cbcfd36fd320efbe.zip |
The new msdfs implementation that uses symlinks to point to other
servers. Very intuitive.
Removed the dfs map parsing code and tdb maintenance code (files
msdfs/parse_dfs_map.c & msdfs/msdfs_tdb.c), dfs map loading and unloading
calls (param/loadparm.c smbd/server.c).
Added code to display msdfs format symlinks as directories in a
transact2_findfirst/findnext. (smbd/trans2.c)
Modified msdfs/msdfs.c to use the msdfs symlinks to
create dfs referrals.
Changed msdfs/README to reflect new operability.
(This used to be commit 6803d2574fab9e5931786d5c9aa5dc5867bb5f05)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/dosmode.c | 2 | ||||
-rw-r--r-- | source3/smbd/server.c | 11 | ||||
-rw-r--r-- | source3/smbd/trans2.c | 15 |
3 files changed, 14 insertions, 14 deletions
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index 26fd2aff14..5b077110bb 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -138,7 +138,7 @@ int dos_mode(connection_struct *conn,char *path,SMB_STRUCT_STAT *sbuf) if (S_ISDIR(sbuf->st_mode)) result = aDIR | (result & aRONLY); - + #ifdef S_ISLNK #if LINKS_READ_ONLY if (S_ISLNK(sbuf->st_mode) && S_ISDIR(sbuf->st_mode)) diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 622251b375..a8e7540d28 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -318,14 +318,6 @@ BOOL reload_services(BOOL test) ret = lp_load(servicesf,False,False,True); -#ifdef MS_DFS - /* load the dfs maps of all the services having - a dfs_map parameter - we don't want to do this in lp_load because we want just the smbd - server to load up the dfs maps into msdfs.tdb. not nmbd, swat etc*/ - load_dfsmaps(); -#endif - load_printers(); /* perhaps the config filename is now set */ @@ -455,9 +447,6 @@ void exit_server(char *reason) } locking_end(); -#ifdef MS_DFS - msdfs_end(); -#endif DEBUG(3,("Server exit (%s)\n", (reason ? reason : ""))); exit(0); diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index e0156c083d..18452158c8 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -405,8 +405,19 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, pstrcat(pathreal,dname); if (conn->vfs_ops.stat(dos_to_unix(pathreal,False),&sbuf) != 0) { - DEBUG(5,("get_lanman2_dir_entry:Couldn't stat [%s] (%s)\n",pathreal,strerror(errno))); - continue; + /* Needed to show the msdfs symlinks as directories */ + if(!lp_host_msdfs() || !lp_msdfs_root(SNUM(conn)) + || !is_msdfs_volume(conn, pathreal)) + { + DEBUG(5,("get_lanman2_dir_entry:Couldn't stat [%s] (%s)\n", + pathreal,strerror(errno))); + continue; + } + else + { + DEBUG(5,("get_lanman2_dir_entry: Masquerading msdfs link %s as a directory\n", pathreal)); + sbuf.st_mode = (sbuf.st_mode & 0xFFF) | S_IFDIR; + } } mode = dos_mode(conn,pathreal,&sbuf); |