diff options
Diffstat (limited to 'source3')
35 files changed, 137 insertions, 2 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index b498b5b4a8..04804ac1f1 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -28,6 +28,8 @@ #define REGISTER 0 #endif +#include "module_dummy.h" + struct cli_state *cli; extern BOOL in_client; static int port = 0; diff --git a/source3/client/smbmount.c b/source3/client/smbmount.c index 1ee7dbc8cb..eeaec64204 100644 --- a/source3/client/smbmount.c +++ b/source3/client/smbmount.c @@ -22,6 +22,8 @@ #include "includes.h" +#include "module_dummy.h" + #include <mntent.h> #include <asm/types.h> #include <linux/smb_fs.h> diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c index 68165792da..eef663ebfd 100644 --- a/source3/client/smbspool.c +++ b/source3/client/smbspool.c @@ -24,6 +24,8 @@ #include "includes.h" +#include "module_dummy.h" + /* * Globals... */ diff --git a/source3/include/module_dummy.h b/source3/include/module_dummy.h new file mode 100644 index 0000000000..dfa0e1535b --- /dev/null +++ b/source3/include/module_dummy.h @@ -0,0 +1,53 @@ +/* + Unix SMB/CIFS implementation. + For faking up smb_register_*() functions + e.g. smb_register_vfs() in nmbd + Copyright (C) Stefan (metze) Metzmacher 2003 + + 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 + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + 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. +*/ + +#ifndef _MODULE_DUMMY_H +#define _MODULE_DUMMY_H + +#ifndef HAVE_SMB_REGISTER_AUTH +NTSTATUS smb_register_auth(int version, const char *name, auth_init_function init) +{ + return NT_STATUS_NOT_IMPLEMENTED; +} +#endif /*HAVE_SMB_REGISTER_AUTH*/ + +#ifndef HAVE_SMB_REGISTER_PASSDB +NTSTATUS smb_register_passdb(int version, const char *name, pdb_init_function init) +{ + return NT_STATUS_NOT_IMPLEMENTED; +} +#endif /*HAVE_SMB_REGISTER_PASSDB*/ + +#ifndef HAVE_RPC_PIPE_REGISTER_COMMANDS +NTSTATUS rpc_pipe_register_commands(int version, const char *clnt, const char *srv, const struct api_struct *cmds, int size) +{ + return NT_STATUS_NOT_IMPLEMENTED; +} +#endif /*HAVE_RPC_PIPE_REGISTER_COMMANDS*/ + +#ifndef HAVE_SMB_REGISTER_VFS +NTSTATUS smb_register_vfs(int version, const char *name, vfs_op_tuple *(*init)(const struct vfs_ops *, struct smb_vfs_handle_struct *)) +{ + return NT_STATUS_NOT_IMPLEMENTED; +} +#endif /*HAVE_SMB_REGISTER_VFS*/ + +#endif /* _MODULE_DUMMY_H */ diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index eec447688f..81ef3b79a5 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/nmbd/nmbd.c @@ -23,6 +23,8 @@ #include "includes.h" +#include "module_dummy.h" + int ClientNMB = -1; int ClientDGRAM = -1; int global_nmb_port = -1; diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c index da2540f5d9..b65af3d940 100644 --- a/source3/nsswitch/winbindd.c +++ b/source3/nsswitch/winbindd.c @@ -24,6 +24,8 @@ #include "winbindd.h" +#include "module_dummy.h" + BOOL opt_nocache = False; BOOL opt_dual_daemon = False; diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index 7b44df193f..dc2b43d204 100644 --- a/source3/passdb/pdb_interface.c +++ b/source3/passdb/pdb_interface.c @@ -436,10 +436,10 @@ static NTSTATUS make_pdb_methods_name(struct pdb_methods **methods, struct pdb_c /* Try to find a module that contains this module */ if (!entry) { DEBUG(2,("No builtin backend found, trying to load plugin\n")); - if(NT_STATUS_IS_OK(smb_probe_module("pdb", module_name)) && !(entry = pdb_find_backend_entry(module_name))) { + if(NT_STATUS_IS_OK(nt_status = smb_probe_module("pdb", module_name)) && !(entry = pdb_find_backend_entry(module_name))) { DEBUG(0,("Plugin is available, but doesn't register passdb backend %s\n", module_name)); SAFE_FREE(module_name); - return NT_STATUS_UNSUCCESSFUL; + return nt_status; } } diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index b01e2d694c..68f8fbae8b 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -23,6 +23,10 @@ #include "includes.h" #include "rpcclient.h" + +#define HAVE_SMB_REGISTER_PASSDB +#include "module_dummy.h" + DOM_SID domain_sid; diff --git a/source3/smbd/server.c b/source3/smbd/server.c index c24fc5134d..11f06daf0d 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -22,6 +22,13 @@ #include "includes.h" +#define HAVE_SMB_REGISTER_AUTH +#define HAVE_SMB_REGISTER_PASSDB +#define HAVE_RPC_PIPE_REGISTER_COMMANDS +#define HAVE_SMB_REGISTER_VFS +#include "module_dummy.h" + + int am_parent = 1; /* the last message the was processed */ diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c index 63b9590dd6..c18d2c100b 100644 --- a/source3/torture/locktest.c +++ b/source3/torture/locktest.c @@ -22,6 +22,8 @@ #include "includes.h" +#include "module_dummy.h" + static fstring password[2]; static fstring username[2]; static int got_user; diff --git a/source3/torture/locktest2.c b/source3/torture/locktest2.c index 97844b5609..596596eb8a 100644 --- a/source3/torture/locktest2.c +++ b/source3/torture/locktest2.c @@ -22,6 +22,8 @@ #include "includes.h" +#include "module_dummy.h" + static fstring password; static fstring username; static int got_pass; diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c index 06dead3f16..a4da1baff2 100644 --- a/source3/torture/masktest.c +++ b/source3/torture/masktest.c @@ -22,6 +22,8 @@ #include "includes.h" +#include "module_dummy.h" + static fstring password; static fstring username; static int got_pass; diff --git a/source3/torture/msgtest.c b/source3/torture/msgtest.c index 8abb0a20d2..091b6337ab 100644 --- a/source3/torture/msgtest.c +++ b/source3/torture/msgtest.c @@ -25,6 +25,8 @@ #include "includes.h" +#include "module_dummy.h" + static int pong_count; /**************************************************************************** diff --git a/source3/torture/nsstest.c b/source3/torture/nsstest.c index a82fa05203..27b77e2a83 100644 --- a/source3/torture/nsstest.c +++ b/source3/torture/nsstest.c @@ -20,6 +20,8 @@ #include "includes.h" +#include "module_dummy.h" + static const char *so_path = "/lib/libnss_winbind.so"; static const char *nss_name = "winbind"; static int nss_errno; diff --git a/source3/torture/rpctorture.c b/source3/torture/rpctorture.c index 086f8d5d33..e88a39a483 100644 --- a/source3/torture/rpctorture.c +++ b/source3/torture/rpctorture.c @@ -20,6 +20,8 @@ #include "includes.h" +#include "module_dummy.h" + #ifndef REGISTER #define REGISTER 0 #endif diff --git a/source3/torture/smbiconv.c b/source3/torture/smbiconv.c index ce21a09025..613082225a 100644 --- a/source3/torture/smbiconv.c +++ b/source3/torture/smbiconv.c @@ -23,6 +23,8 @@ #include "includes.h" +#include "module_dummy.h" + static int process_block (smb_iconv_t cd, char *addr, size_t len, FILE *output) { diff --git a/source3/torture/torture.c b/source3/torture/torture.c index 840b6ad294..d660b6d003 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -22,6 +22,8 @@ #include "includes.h" +#include "module_dummy.h" + static fstring host, workgroup, share, password, username, myname; static int max_protocol = PROTOCOL_NT1; static const char *sockops="TCP_NODELAY"; diff --git a/source3/torture/vfstest.c b/source3/torture/vfstest.c index 3b28a3c496..d6b84126a0 100644 --- a/source3/torture/vfstest.c +++ b/source3/torture/vfstest.c @@ -27,6 +27,12 @@ #include "includes.h" #include "vfstest.h" +#define HAVE_SMB_REGISTER_AUTH +#define HAVE_SMB_REGISTER_PASSDB +#define HAVE_RPC_PIPE_REGISTER_COMMANDS +#define HAVE_SMB_REGISTER_VFS +#include "module_dummy.h" + /* List to hold groups of commands */ static struct cmd_list { struct cmd_list *prev, *next; diff --git a/source3/utils/net.c b/source3/utils/net.c index aa245a920a..b2a86bb020 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -40,6 +40,10 @@ #include "includes.h" #include "../utils/net.h" +#define HAVE_SMB_REGISTER_PASSDB +#include "module_dummy.h" + + /***********************************************************************/ /* Beginning of internationalization section. Translatable constants */ /* should be kept in this area and referenced in the rest of the code. */ diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c index d2c5cbc00e..7083961ccb 100644 --- a/source3/utils/nmblookup.c +++ b/source3/utils/nmblookup.c @@ -24,6 +24,8 @@ #include "includes.h" +#include "module_dummy.h" + extern BOOL AllowDebugChange; static BOOL give_flags = False; diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c index 42490190f3..b30efac4b7 100644 --- a/source3/utils/ntlm_auth.c +++ b/source3/utils/ntlm_auth.c @@ -27,6 +27,8 @@ #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND +#include "module_dummy.h" + #define SQUID_BUFFER_SIZE 2010 enum squid_mode { diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index 13f35e8880..81d0a61287 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -23,6 +23,9 @@ #include "includes.h" +#define HAVE_SMB_REGISTER_PASSDB +#include "module_dummy.h" + #define BIT_BACKEND 0x00000004 #define BIT_VERBOSE 0x00000008 #define BIT_SPSTYLE 0x00000010 diff --git a/source3/utils/profiles.c b/source3/utils/profiles.c index afaa83f638..4a6fa59b53 100644 --- a/source3/utils/profiles.c +++ b/source3/utils/profiles.c @@ -297,6 +297,8 @@ Hope this helps.... (Although it was "fun" for me to uncover this things, #include <unistd.h> #include <sys/mman.h> +#include "module_dummy.h" + typedef unsigned int DWORD; typedef unsigned short WORD; diff --git a/source3/utils/rpccheck.c b/source3/utils/rpccheck.c index ae109f69b6..11a2a9d8ba 100644 --- a/source3/utils/rpccheck.c +++ b/source3/utils/rpccheck.c @@ -20,6 +20,8 @@ #include "includes.h" +#include "module_dummy.h" + main() { char filter[]="0123456789ABCDEF"; diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c index 9d8a657726..35a9b05dcd 100644 --- a/source3/utils/smbcacls.c +++ b/source3/utils/smbcacls.c @@ -24,6 +24,8 @@ #include "includes.h" +#include "module_dummy.h" + static pstring owner_username; static fstring server; static int test_args = False; diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index 06add6af22..0c68bfc329 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -25,6 +25,8 @@ #include "includes.h" +#include "module_dummy.h" + /* Default timeout value when waiting for replies (in seconds) */ #define DEFAULT_TIMEOUT 10 diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c index 9c7379ca2a..9ba243a4a5 100644 --- a/source3/utils/smbcquotas.c +++ b/source3/utils/smbcquotas.c @@ -24,6 +24,8 @@ #include "includes.h" +#include "module_dummy.h" + static pstring server; /* numeric is set when the user wants numeric SIDs and ACEs rather diff --git a/source3/utils/smbfilter.c b/source3/utils/smbfilter.c index 1a0d639f02..fe5208227d 100644 --- a/source3/utils/smbfilter.c +++ b/source3/utils/smbfilter.c @@ -20,6 +20,8 @@ #include "includes.h" +#include "module_dummy.h" + #define SECURITY_MASK 0 #define SECURITY_SET 0 diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c index 577e467fbd..2070adb3e5 100644 --- a/source3/utils/smbpasswd.c +++ b/source3/utils/smbpasswd.c @@ -19,6 +19,9 @@ #include "includes.h" +#define HAVE_SMB_REGISTER_PASSDB +#include "module_dummy.h" + extern BOOL AllowDebugChange; /* diff --git a/source3/utils/smbtree.c b/source3/utils/smbtree.c index cbe1bd448f..bc669b4aa1 100644 --- a/source3/utils/smbtree.c +++ b/source3/utils/smbtree.c @@ -22,6 +22,8 @@ #include "includes.h" +#include "module_dummy.h" + static BOOL use_bcast; /* How low can we go? */ diff --git a/source3/utils/status.c b/source3/utils/status.c index bbaeecdd6b..fab55baabb 100644 --- a/source3/utils/status.c +++ b/source3/utils/status.c @@ -35,6 +35,8 @@ #include "includes.h" +#include "module_dummy.h" + static pstring Ucrit_username = ""; /* added by OH */ static pid_t Ucrit_pid[100]; /* Ugly !!! */ /* added by OH */ static int Ucrit_MaxPid=0; /* added by OH */ diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c index e3d6ce0274..b3e8f8badb 100644 --- a/source3/utils/testparm.c +++ b/source3/utils/testparm.c @@ -34,6 +34,8 @@ #include "includes.h" +#include "module_dummy.h" + extern BOOL AllowDebugChange; /*********************************************** diff --git a/source3/utils/testprns.c b/source3/utils/testprns.c index 7e52b86afb..758e2b41dd 100644 --- a/source3/utils/testprns.c +++ b/source3/utils/testprns.c @@ -32,6 +32,8 @@ #include "includes.h" +#include "module_dummy.h" + int main(int argc, char *argv[]) { const char *pszTemp; diff --git a/source3/web/swat.c b/source3/web/swat.c index 7f9492933a..e93fb2e5e1 100644 --- a/source3/web/swat.c +++ b/source3/web/swat.c @@ -31,6 +31,9 @@ #include "includes.h" #include "../web/swat_proto.h" +#define HAVE_SMB_REGISTER_PASSDB +#include "module_dummy.h" + #define GLOBALS_SNUM -1 static BOOL demo_mode = False; diff --git a/source3/wrepld/server.c b/source3/wrepld/server.c index 504818b8d5..21bc2e4925 100644 --- a/source3/wrepld/server.c +++ b/source3/wrepld/server.c @@ -21,6 +21,8 @@ #include "includes.h" #include "wins_repl.h" +#include "module_dummy.h" + extern pstring user_socket_options; extern WINS_OWNER *global_wins_table; |