You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
*/
#ifndef _MSDFS_H
/* Maximum number of referrals for each Dfs volume */
#define MAX_REFERRAL_COUNT 256
+#define MAX_MSDFS_JUNCTIONS 256
+
+typedef struct _client_referral {
+ uint32 proximity;
+ uint32 ttl;
+ pstring dfspath;
+} CLIENT_DFS_REFERRAL;
-struct referral
-{
+struct referral {
pstring alternate_path; /* contains the path referred */
uint32 proximity;
uint32 ttl; /* how long should client cache referral */
};
-struct junction_map
-{
- pstring service_name;
- pstring volume_name;
- int referral_count;
- struct referral* referral_list;
+struct junction_map {
+ fstring service_name;
+ pstring volume_name;
+ pstring comment;
+ int referral_count;
+ struct referral* referral_list;
};
-struct dfs_path
-{
- pstring hostname;
- pstring servicename;
- pstring volumename;
- pstring restofthepath;
+struct dfs_path {
+ fstring hostname;
+ fstring servicename;
+ pstring reqpath;
+ BOOL posix_path;
};
-#ifdef WITH_MSDFS
-
-#define RESOLVE_DFSPATH(name, conn, inbuf, outbuf) \
-{ if(((SVAL(inbuf,smb_flg2) & FLAGS2_DFS_PATHNAMES)) && \
- dfs_redirect(name,conn)) \
- return(dfs_path_error(inbuf,outbuf)); }
-
-#define RESOLVE_FINDFIRST_DFSPATH(name, conn, inbuf, outbuf) \
-{ if((SVAL(inbuf,smb_flg2) & FLAGS2_DFS_PATHNAMES) || \
- get_remote_arch()==RA_WIN95) \
- if(dfs_findfirst_redirect(directory,conn)) \
- return(dfs_path_error(inbuf,outbuf)); }
-
-#define init_dfsroot(conn, inbuf, outbuf) \
-{ if(lp_msdfs_root(SNUM(conn)) && lp_host_msdfs()) \
- SSVAL(outbuf, smb_vwv2, SMB_SHARE_IN_DFS | SMB_SUPPORT_SEARCH_BITS); \
-}
-
-#else
-/* Stub macros */
-#define RESOLVE_DFSPATH(name, conn, inbuf, outbuf) ;
-#define RESOLVE_FINDFIRST_DFSPATH(name, conn, inbuf, outbuf) ;
-#define init_dfsroot(conn, inbuf, outbuf) ;
-
-#endif
+#define init_dfsroot(conn, inbuf, outbuf) \
+{ if (lp_msdfs_root(SNUM(conn)) && lp_host_msdfs()) { \
+ DEBUG(2,("Serving %s as a Dfs root\n", \
+ lp_servicename(SNUM(conn)) )); \
+ SSVAL(outbuf, smb_vwv2, SMB_SHARE_IN_DFS \
+ | SVAL(outbuf, smb_vwv2)); \
+} }
#endif /* _MSDFS_H */