From 39d7983a470cc3470dd7126de35697d965817cb6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 12 Sep 2001 03:08:51 +0000 Subject: - enable MSDFS by default, there seems no reason not to have it enabled by default in Samba 3.x - got rid of some unused parameters in Makefile.in - declare DEBUGLEVEL in debug.h rather than in each file (This used to be commit b8651acb9c0d7248a6a2e82c33b1e43633fd83fd) --- source3/Makefile.in | 6 ------ source3/configure.in | 18 ------------------ source3/include/debug.h | 1 + source3/include/msdfs.h | 10 ---------- source3/msdfs/msdfs.c | 15 --------------- source3/rpc_parse/parse_dfs.c | 8 ++++---- source3/rpc_server/srv_dfs.c | 7 ------- source3/rpc_server/srv_dfs_nt.c | 5 ----- source3/rpc_server/srv_pipe.c | 2 -- source3/rpc_server/srv_srvsvc_nt.c | 3 --- source3/smbd/negprot.c | 4 +--- source3/smbd/nttrans.c | 2 -- 12 files changed, 6 insertions(+), 75 deletions(-) (limited to 'source3') diff --git a/source3/Makefile.in b/source3/Makefile.in index 0b63adf11d..3de7aeeac0 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -62,12 +62,6 @@ LOCKDIR = @lockdir@ # libsmbclient support here BLDSHARED = @BLDSHARED@ -# The directory where code page definition files go -CODEPAGEDIR = $(LIBDIR)/codepages - -# The current codepage definition list. -CODEPAGELIST= 437 737 775 850 852 861 932 866 949 950 936 1251 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R 857 ISO8859-9 ISO8859-13 ISO8859-15 - PASSWD_FLAGS = -DPASSWD_PROGRAM=\"$(PASSWD_PROGRAM)\" -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" -DPRIVATE_DIR=\"$(PRIVATE_DIR)\" FLAGS1 = $(CFLAGS) -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I$(srcdir)/smbwrapper $(CPPFLAGS) -DLOGFILEBASE=\"$(LOGFILEBASE)\" FLAGS2 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" diff --git a/source3/configure.in b/source3/configure.in index 82a00f311e..a30ee5a25e 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -1920,24 +1920,6 @@ AC_ARG_WITH(utmp, AC_MSG_RESULT(no) ) -################################################# -# check for MS Dfs support - -AC_MSG_CHECKING(whether to support Microsoft Dfs) -AC_ARG_WITH(msdfs, -[ --with-msdfs Include MS Dfs support (default=no)], -[ case "$withval" in - yes) - AC_MSG_RESULT(yes) - AC_DEFINE(WITH_MSDFS) - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) - ################################################# # set private directory location AC_ARG_WITH(privatedir, diff --git a/source3/include/debug.h b/source3/include/debug.h index cad802d8ca..b726859a0b 100644 --- a/source3/include/debug.h +++ b/source3/include/debug.h @@ -41,6 +41,7 @@ int Debug1( char *, ... ) PRINTF_ATTRIBUTE(1,2); BOOL dbgtext( char *, ... ) PRINTF_ATTRIBUTE(1,2); extern XFILE *dbf; +extern int DEBUGLEVEL; /* If we have these macros, we can add additional info to the header. */ #ifdef HAVE_FILE_MACRO diff --git a/source3/include/msdfs.h b/source3/include/msdfs.h index 0748577b0b..df2ea5a6e4 100644 --- a/source3/include/msdfs.h +++ b/source3/include/msdfs.h @@ -59,8 +59,6 @@ struct dfs_path pstring restofthepath; }; -#ifdef WITH_MSDFS - #define RESOLVE_DFSPATH(name, conn, inbuf, outbuf) \ { if(((SVAL(inbuf,smb_flg2) & FLAGS2_DFS_PATHNAMES)) && \ dfs_redirect(name,conn)) \ @@ -77,12 +75,4 @@ struct dfs_path 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 - #endif /* _MSDFS_H */ diff --git a/source3/msdfs/msdfs.c b/source3/msdfs/msdfs.c index da5a20f909..b2098005c0 100644 --- a/source3/msdfs/msdfs.c +++ b/source3/msdfs/msdfs.c @@ -24,8 +24,6 @@ extern int DEBUGLEVEL; extern pstring global_myname; -#ifdef WITH_MSDFS - /********************************************************************** Create a tcon relative path from a dfs_path structure **********************************************************************/ @@ -743,16 +741,3 @@ int enum_msdfs_links(struct junction_map* jn) } -#else -/* Stub functions if WITH_MSDFS not defined */ - int setup_dfs_referral(char* pathname, int max_referral_level, char** ppdata) -{ - return -1; -} - - BOOL is_msdfs_link(connection_struct* conn, char* path) -{ - return False; -} - -#endif diff --git a/source3/rpc_parse/parse_dfs.c b/source3/rpc_parse/parse_dfs.c index 6e30c66ac1..2fe72da5a1 100644 --- a/source3/rpc_parse/parse_dfs.c +++ b/source3/rpc_parse/parse_dfs.c @@ -139,7 +139,7 @@ BOOL dfs_io_r_dfs_remove(char *desc, DFS_R_DFS_REMOVE *r_d, prs_struct *ps, int prs_debug(ps, depth, desc, "dfs_io_r_dfs_remove"); depth++; - if(!prs_ntstatus("status", ps, depth, &r_d->status)) + if(!prs_werror("status", ps, depth, &r_d->status)) return False; return True; @@ -225,7 +225,7 @@ BOOL dfs_io_r_dfs_add(char *desc, DFS_R_DFS_ADD *r_d, prs_struct *ps, int depth) prs_debug(ps, depth, desc, "dfs_io_r_dfs_add"); depth++; - if(!prs_ntstatus("status", ps, depth, &r_d->status)) + if(!prs_werror("status", ps, depth, &r_d->status)) return False; return True; @@ -300,7 +300,7 @@ BOOL dfs_io_r_dfs_get_info(char* desc, DFS_R_DFS_GET_INFO* r_i, prs_struct* ps, if(!dfs_io_dfs_info_ctr("", &r_i->ctr, 1, r_i->level, ps, depth)) return False; - if(!prs_ntstatus("status", ps, depth, &r_i->status)) + if(!prs_werror("status", ps, depth, &r_i->status)) return False; return True; } @@ -501,7 +501,7 @@ BOOL dfs_io_r_dfs_enum(char *desc, DFS_R_DFS_ENUM *q_d, prs_struct *ps, int dept if(!smb_io_enum_hnd("resume_hnd", &q_d->reshnd, ps, depth)) return False; - if(!prs_ntstatus("status", ps, depth, &q_d->status)) + if(!prs_werror("status", ps, depth, &q_d->status)) return False; return True; } diff --git a/source3/rpc_server/srv_dfs.c b/source3/rpc_server/srv_dfs.c index fe797e84f6..e2a78782f3 100644 --- a/source3/rpc_server/srv_dfs.c +++ b/source3/rpc_server/srv_dfs.c @@ -32,8 +32,6 @@ extern int DEBUGLEVEL; extern pstring global_myname; -#ifdef WITH_MSDFS - /********************************************************************** api_dfs_exist **********************************************************************/ @@ -179,8 +177,3 @@ BOOL api_netdfs_rpc(pipes_struct *p) return api_rpcTNP(p, "api_netdfs_rpc", api_netdfs_cmds); } -#else - - void dfs_dummy(void) {;} /* So some compilers don't complain. */ - -#endif diff --git a/source3/rpc_server/srv_dfs_nt.c b/source3/rpc_server/srv_dfs_nt.c index ce8d353274..58e678f0c4 100644 --- a/source3/rpc_server/srv_dfs_nt.c +++ b/source3/rpc_server/srv_dfs_nt.c @@ -30,8 +30,6 @@ extern int DEBUGLEVEL; extern pstring global_myname; -#ifdef WITH_MSDFS - #define MAX_MSDFS_JUNCTIONS 256 /* This function does not return a WERROR or NTSTATUS code but rather 1 if @@ -368,6 +366,3 @@ WERROR _dfs_get_info(pipes_struct *p, DFS_Q_DFS_GET_INFO *q_u, return r_u->status; } -#else - void dfs_dummy1(void) {;} /* So some compilers don't complain. */ -#endif diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c index 60250c903f..3570969efc 100644 --- a/source3/rpc_server/srv_pipe.c +++ b/source3/rpc_server/srv_pipe.c @@ -493,9 +493,7 @@ static struct api_cmd api_fd_commands[] = { "NETLOGON", "lsass", api_netlog_rpc }, { "winreg", "winreg", api_reg_rpc }, { "spoolss", "spoolss", api_spoolss_rpc }, -#ifdef WITH_MSDFS { "netdfs", "netdfs" , api_netdfs_rpc }, -#endif { NULL, NULL, NULL } }; diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c index a0ae9050e2..0db06754f4 100644 --- a/source3/rpc_server/srv_srvsvc_nt.c +++ b/source3/rpc_server/srv_srvsvc_nt.c @@ -409,11 +409,8 @@ static void init_srv_share_info_1005(SRV_SHARE_INFO_1005* sh1005, int snum) { sh1005->dfs_root_flag = 0; -#ifdef WITH_MSDFS if(lp_host_msdfs() && lp_msdfs_root(snum)) sh1005->dfs_root_flag = 3; -#endif - } /******************************************************************* diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index 6eda7e39db..9ebb0b7350 100644 --- a/source3/smbd/negprot.c +++ b/source3/smbd/negprot.c @@ -214,10 +214,8 @@ static int reply_nt1(char *outbuf) capabilities |= CAP_UNICODE; } -#ifdef WITH_MSDFS - if(lp_host_msdfs()) + if (lp_host_msdfs()) capabilities |= CAP_DFS; -#endif if (lp_security() >= SEC_USER) secword |= 1; if (doencrypt) secword |= 2; diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index aee5aa7798..ca1efd0221 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -41,9 +41,7 @@ static char *known_nt_pipes[] = { "\\lsarpc", "\\winreg", "\\spoolss", -#ifdef WITH_MSDFS "\\netdfs", -#endif NULL }; -- cgit