r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
[tprouty/samba.git] / source / include / msdfs.h
index 32aa7ecef257052583acfa089501205679d137ee..f78f76ba27fd68af10a54a69d0eaef10568ea874 100644 (file)
@@ -6,7 +6,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -15,8 +15,7 @@
    GNU General Public License for more details.
    
    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.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
 */
 
 
 /* Maximum number of referrals for each Dfs volume */
 #define MAX_REFERRAL_COUNT   256
+#define MAX_MSDFS_JUNCTIONS 256
 
-struct referral
-{
+typedef struct _client_referral {
+       uint32 proximity;
+       uint32 ttl;
+       pstring dfspath;
+} CLIENT_DFS_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;
+struct dfs_path {
+       fstring hostname;
+       fstring servicename;
        pstring reqpath;
+       BOOL posix_path;
 };
 
-#define RESOLVE_DFSPATH(name, conn, inbuf, outbuf)             \
-{ if ((SVAL(inbuf,smb_flg2) & FLAGS2_DFS_PATHNAMES) &&         \
-      lp_host_msdfs() && lp_msdfs_root(SNUM(conn)) &&          \
-      dfs_redirect(name,conn,False))                           \
-             return ERROR_BOTH(NT_STATUS_PATH_NOT_COVERED,     \
-                              ERRSRV, ERRbadpath);; }          
-
-#define RESOLVE_FINDFIRST_DFSPATH(name, conn, inbuf, outbuf)           \
-{ if ( (SVAL(inbuf,smb_flg2) & FLAGS2_DFS_PATHNAMES) ||                \
-       ((get_remote_arch() == RA_WIN95) && lp_msdfs_root(SNUM(conn))) )        \
-        if (lp_host_msdfs() && dfs_redirect(name,conn,True))           \
-                return ERROR_BOTH(NT_STATUS_PATH_NOT_COVERED,          \
-                                  ERRSRV, ERRbadpath);; }          
-
 #define init_dfsroot(conn, inbuf, outbuf)                      \
 { if (lp_msdfs_root(SNUM(conn)) && lp_host_msdfs()) {          \
         DEBUG(2,("Serving %s as a Dfs root\n",                         \