summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcvs2svn Import User <samba-bugs@samba.org>2002-12-12 23:35:56 +0000
committercvs2svn Import User <samba-bugs@samba.org>2002-12-12 23:35:56 +0000
commit580110a47cf997f50f3442e04c28ce256e0e9c15 (patch)
tree57da552ac8adfe4fe1217bef3e2514be1d4352bb
parent438c460cec58270e8ac847d05281f65e1d41067c (diff)
parentf6c4f25e4319b47ac6c8dbf67a4b1c513148384c (diff)
downloadsamba-580110a47cf997f50f3442e04c28ce256e0e9c15.tar.gz
samba-580110a47cf997f50f3442e04c28ce256e0e9c15.tar.bz2
samba-580110a47cf997f50f3442e04c28ce256e0e9c15.zip
This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit bdb5206b45a3e1360cc1a7e9f87299eeaa3c8d9c)
-rw-r--r--docs/htmldocs/vfstest.1.html487
-rw-r--r--source3/libsmb/namequery_dc.c104
-rw-r--r--source3/python/examples/tdbpack/.cvsignore2
3 files changed, 593 insertions, 0 deletions
diff --git a/docs/htmldocs/vfstest.1.html b/docs/htmldocs/vfstest.1.html
new file mode 100644
index 0000000000..1fd7880805
--- /dev/null
+++ b/docs/htmldocs/vfstest.1.html
@@ -0,0 +1,487 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<HTML
+><HEAD
+><TITLE
+>vfstest</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
+"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><H1
+><A
+NAME="VFSTEST">vfstest</H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN5"
+></A
+><H2
+>Name</H2
+>vfstest&nbsp;--&nbsp;tool for testing samba VFS modules </DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN8"><H2
+>Synopsis</H2
+><P
+><B
+CLASS="COMMAND"
+>vfstest</B
+> [-d debuglevel] [-c command] [-l logfile] [-h]</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN15"
+></A
+><H2
+>DESCRIPTION</H2
+><P
+>This tool is part of the <A
+HREF="samba.7.html"
+TARGET="_top"
+> Samba</A
+> suite.</P
+><P
+><B
+CLASS="COMMAND"
+>vfstest</B
+> is a small command line
+ utility that has the ability to test dso samba VFS modules. It gives the
+ user the ability to call the various VFS functions manually and
+ supports cascaded VFS modules.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN21"
+></A
+><H2
+>OPTIONS</H2
+><P
+></P
+><DIV
+CLASS="VARIABLELIST"
+><DL
+><DT
+>-c|--command=command</DT
+><DD
+><P
+>Execute the specified (colon-separated) commands.
+ See below for the commands that are available.
+ </P
+></DD
+><DT
+>-d|--debug=debuglevel</DT
+><DD
+><P
+><TT
+CLASS="REPLACEABLE"
+><I
+>debuglevel</I
+></TT
+> is an integer
+from 0 to 10. The default value if this parameter is
+not specified is zero.</P
+><P
+>The higher this value, the more detail will be
+logged to the log files about the activities of the
+server. At level 0, only critical errors and serious
+warnings will be logged. Level 1 is a reasonable level for
+day to day running - it generates a small amount of
+information about operations carried out.</P
+><P
+>Levels above 1 will generate considerable
+amounts of log data, and should only be used when
+investigating a problem. Levels above 3 are designed for
+use only by developers and generate HUGE amounts of log
+data, most of which is extremely cryptic.</P
+><P
+>Note that specifying this parameter here will
+override the <A
+HREF="smb.conf.5.html#loglevel"
+TARGET="_top"
+>log
+level</A
+> parameter in the <A
+HREF="smb.conf.5.html"
+TARGET="_top"
+><TT
+CLASS="FILENAME"
+>smb.conf(5)</TT
+></A
+> file.</P
+></DD
+><DT
+>-h|--help</DT
+><DD
+><P
+>Print a summary of command line options.</P
+></DD
+><DT
+>-l|--logfile=logbasename</DT
+><DD
+><P
+>File name for log/debug files. The extension
+ <TT
+CLASS="CONSTANT"
+>'.client'</TT
+> will be appended. The log file is never removed
+ by the client.
+ </P
+></DD
+></DL
+></DIV
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN48"
+></A
+><H2
+>COMMANDS</H2
+><P
+><I
+CLASS="EMPHASIS"
+>VFS COMMANDS</I
+></P
+><P
+></P
+><UL
+><LI
+><P
+><B
+CLASS="COMMAND"
+>load &#60;module.so&#62;</B
+> - Load specified VFS module </P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>populate &#60;char&#62; &#60;size&#62;</B
+> - Populate a data buffer with the specified data
+ </P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>showdata [&#60;offset&#62; &#60;len&#62;]</B
+> - Show data currently in data buffer
+ </P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>connect</B
+> - VFS connect()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>disconnect</B
+> - VFS disconnect()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>disk_free</B
+> - VFS disk_free()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>opendir</B
+> - VFS opendir()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>readdir</B
+> - VFS readdir()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>mkdir</B
+> - VFS mkdir()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>rmdir</B
+> - VFS rmdir()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>closedir</B
+> - VFS closedir()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>open</B
+> - VFS open()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>close</B
+> - VFS close()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>read</B
+> - VFS read()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>write</B
+> - VFS write()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>lseek</B
+> - VFS lseek()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>rename</B
+> - VFS rename()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>fsync</B
+> - VFS fsync()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>stat</B
+> - VFS stat()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>fstat</B
+> - VFS fstat()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>lstat</B
+> - VFS lstat()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>unlink</B
+> - VFS unlink()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>chmod</B
+> - VFS chmod()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>fchmod</B
+> - VFS fchmod()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>chown</B
+> - VFS chown()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>fchown</B
+> - VFS fchown()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>chdir</B
+> - VFS chdir()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>getwd</B
+> - VFS getwd()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>utime</B
+> - VFS utime()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>ftruncate</B
+> - VFS ftruncate()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>lock</B
+> - VFS lock()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>symlink</B
+> - VFS symlink()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>readlink</B
+> - VFS readlink()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>link</B
+> - VFS link()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>mknod</B
+> - VFS mknod()</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>realpath</B
+> - VFS realpath()</P
+></LI
+></UL
+><P
+><I
+CLASS="EMPHASIS"
+>GENERAL COMMANDS</I
+></P
+><P
+></P
+><UL
+><LI
+><P
+><B
+CLASS="COMMAND"
+>conf &#60;smb.conf&#62;</B
+> - Load a different configuration file</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>help [&#60;command&#62;]</B
+> - Get list of commands or info about specified command</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>debuglevel &#60;level&#62;</B
+> - Set debug level</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>freemem</B
+> - Free memory currently in use</P
+></LI
+><LI
+><P
+><B
+CLASS="COMMAND"
+>exit</B
+> - Exit vfstest</P
+></LI
+></UL
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN179"
+></A
+><H2
+>VERSION</H2
+><P
+>This man page is correct for version 3.0 of the Samba
+ suite.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN182"
+></A
+><H2
+>AUTHOR</H2
+><P
+>The original Samba software and related utilities
+ were created by Andrew Tridgell. Samba is now developed
+ by the Samba Team as an Open Source project similar
+ to the way the Linux kernel is developed.</P
+><P
+>The vfstest man page was written by Jelmer Vernooij.</P
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/source3/libsmb/namequery_dc.c b/source3/libsmb/namequery_dc.c
new file mode 100644
index 0000000000..ffc64139e9
--- /dev/null
+++ b/source3/libsmb/namequery_dc.c
@@ -0,0 +1,104 @@
+/*
+ Unix SMB/CIFS implementation.
+
+ Winbind daemon connection manager
+
+ Copyright (C) Tim Potter 2001
+ Copyright (C) Andrew Bartlett 2002
+
+ 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.
+*/
+
+
+#include "includes.h"
+
+
+/*
+ find the DC for a domain using methods appropriate for a RPC domain
+*/
+BOOL rpc_find_dc(const char *domain, fstring srv_name, struct in_addr *ip_out)
+{
+ struct in_addr *ip_list = NULL, dc_ip, exclude_ip;
+ int count, i;
+ BOOL list_ordered;
+ BOOL use_pdc_only;
+
+ zero_ip(&exclude_ip);
+
+ use_pdc_only = must_use_pdc(domain);
+
+ /* Lookup domain controller name */
+
+ if ( use_pdc_only && get_pdc_ip(domain, &dc_ip) ) {
+ DEBUG(10,("rpc_find_dc: Atempting to lookup PDC to avoid sam sync delays\n"));
+
+ if (name_status_find(domain, 0x1c, 0x20, dc_ip, srv_name)) {
+ goto done;
+ }
+ /* Didn't get name, remember not to talk to this DC. */
+ exclude_ip = dc_ip;
+ }
+
+ /* get a list of all domain controllers */
+
+ if (!get_dc_list( domain, &ip_list, &count, &list_ordered) ) {
+ DEBUG(3, ("Could not look up dc's for domain %s\n", domain));
+ return False;
+ }
+
+ /* Remove the entry we've already failed with (should be the PDC). */
+
+ if ( use_pdc_only ) {
+ for (i = 0; i < count; i++) {
+ if (ip_equal( exclude_ip, ip_list[i]))
+ zero_ip(&ip_list[i]);
+ }
+ }
+
+ /* Pick a nice close server, but only if the list was not ordered */
+ if (!list_ordered && (count > 1) ) {
+ qsort(ip_list, count, sizeof(struct in_addr), QSORT_CAST ip_compare);
+ }
+
+ for (i = 0; i < count; i++) {
+ if (is_zero_ip(ip_list[i]))
+ continue;
+
+ if (name_status_find(domain, 0x1c, 0x20, ip_list[i], srv_name)) {
+ dc_ip = ip_list[i];
+ goto done;
+ }
+ }
+
+
+ SAFE_FREE(ip_list);
+
+ return False;
+done:
+ /* We have the netbios name and IP address of a domain controller.
+ Ideally we should sent a SAMLOGON request to determine whether
+ the DC is alive and kicking. If we can catch a dead DC before
+ performing a cli_connect() we can avoid a 30-second timeout. */
+
+ DEBUG(3, ("rpc_find_dc: Returning DC %s (%s) for domain %s\n", srv_name,
+ inet_ntoa(dc_ip), domain));
+
+ *ip_out = dc_ip;
+
+ SAFE_FREE(ip_list);
+
+ return True;
+}
+
diff --git a/source3/python/examples/tdbpack/.cvsignore b/source3/python/examples/tdbpack/.cvsignore
new file mode 100644
index 0000000000..52e4e61140
--- /dev/null
+++ b/source3/python/examples/tdbpack/.cvsignore
@@ -0,0 +1,2 @@
+*.pyc
+*.pyo