[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-test-2700-g71e86f1
Derrell Lipman
derrell.lipman at unwireduniverse.com
Sun Mar 2 21:15:00 GMT 2008
The branch, v3-2-test has been updated
via 71e86f13b0ace3841c6712084728c79db74ff803 (commit)
via f07407a32e178a47c8f9b3e3703aa5a20f0a4f06 (commit)
via 23cb9c49e3724cecaa66655ef64c3111bf14c552 (commit)
via 1fd65359f6cd07539cfe43146ac367a48708a678 (commit)
via dec70fa3c0424c148016cc667a3c159e16d8a944 (commit)
via a8b4b773d4647f28e7b92c5968469721d34eb550 (commit)
via 64b7150d92849a1e1e2416b9dcc12fae8d6bea99 (commit)
via 56429a3d60b2a48963342f6340b3c01469a892c6 (commit)
via d4b4bae8ded824d06ad5ab0e219f71187ee5c771 (commit)
from aa9c0f587718f4d647e87b9662acbedba042b9cb (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 71e86f13b0ace3841c6712084728c79db74ff803
Author: Derrell Lipman <derrell.lipman at unwireduniverse.com>
Date: Sun Mar 2 16:13:25 2008 -0500
fixed missing white space
commit f07407a32e178a47c8f9b3e3703aa5a20f0a4f06
Author: Derrell Lipman <derrell.lipman at unwireduniverse.com>
Date: Sat Mar 1 23:08:19 2008 -0500
Update WHATSNEW for libsmbclient changes
commit 23cb9c49e3724cecaa66655ef64c3111bf14c552
Author: Derrell Lipman <derrell.lipman at unwireduniverse.com>
Date: Sat Mar 1 21:19:52 2008 -0500
Return NULL, not 0, from a function which returns a pointer.
commit 1fd65359f6cd07539cfe43146ac367a48708a678
Author: Derrell Lipman <derrell.lipman at unwireduniverse.com>
Date: Sat Mar 1 21:19:15 2008 -0500
change variable name from f to fn for function pointers
commit dec70fa3c0424c148016cc667a3c159e16d8a944
Author: Derrell Lipman <derrell.lipman at unwireduniverse.com>
Date: Sat Mar 1 20:56:54 2008 -0500
Comment was in wrong place
commit a8b4b773d4647f28e7b92c5968469721d34eb550
Author: Derrell Lipman <derrell.lipman at unwireduniverse.com>
Date: Sat Mar 1 20:55:21 2008 -0500
Mark smbc_option_{get,set} as deprecated
commit 64b7150d92849a1e1e2416b9dcc12fae8d6bea99
Author: Derrell Lipman <derrell.lipman at unwireduniverse.com>
Date: Sat Mar 1 20:44:21 2008 -0500
Additional revamped libsmbclient documentation
- Ensured that all public functions have documentation in libsmbclient.h
- Reformatted for "proper" indentation
- Re-added temporarily-disabled alternate authentication function capability
Derrell
commit 56429a3d60b2a48963342f6340b3c01469a892c6
Author: Derrell Lipman <derrell.lipman at unwireduniverse.com>
Date: Fri Feb 29 13:34:35 2008 -0500
Modified revamp of the libsmbclient interface.
Given the tacit (if that) approval by some people, and clear disapproval by
others for my proposed clean-up and reorganization of libsmbclient, I've come
up with a slightly different approach. This commit changes back to the
original libsmbclient.h SMBCCTX structure which will maintain ABI
compatibility. I retain, here, the setter and getter functions which all new
code should use. Older programs already compiled should continue to work
fine. Older programs being recompiled will encounter compile-time errors
(intentionally!) so that the code can be corrected to use the setter/getter
interfaces.
Although this doesn't clean up the interface in the way I had wanted, the code
reorganization and requirement for new programs to use the setters and getters
allows future progress to be made on libsmbclient without further muddying up
the interface, while retaining the ABI compatibility that was the big issue
causing disapproval. I hope that this compromise is adequate.
Derrell
commit d4b4bae8ded824d06ad5ab0e219f71187ee5c771
Author: Derrell Lipman <derrell.lipman at unwireduniverse.com>
Date: Thu Feb 28 11:23:20 2008 -0500
Initial revamp of the libsmbclient interface.
The libsmbclient interface has suffered from difficulty of improvement and
feature enrichment without causing ABI breakage. Although there were a number
of issues, the primary ones were:
(a) the user of the library would manually manipulate the context structure
members, meaning that nothing in the context structure could change other
than adding stuff at the end;
(b) there were three methods of setting options: setting bits in a flags field
within the context structure, setting explicit options variables within an
options structure in the context structure, and by calling the
smbc_option_set() function;
(c) the authentication callback did not traditionally provide enough
information to the callee which required adding an option for a callback
with a different signature, and now there are requests for even more
information at the callback, requiring yet a third signature and option to
set it (if we implement that feature).
This commit provides a reorganization of the code which fixes (a) and (b).
The context structure is now entirely opaque, and there are setter and getter
functions for manipulating it. This makes maintaining ABI consistency much,
much easier.
Additionally, the options setting/getting has been unified into a single
mechanism using smbc_option_set() and smbc_option_get().
Yet to be completed is a refactoring of the authentication callback (c).
The test programs in examples/libsmbclient have been modified (if necessary;
some applications require no changes at all) for the new API and a few have
been minimally tested.
Derrell
-----------------------------------------------------------------------
Summary of changes:
WHATSNEW.txt | 65 +
examples/libsmbclient/smbwrapper/smbw.c | 10 +-
examples/libsmbclient/testbrowse.c | 13 +-
examples/libsmbclient/testbrowse2.c | 17 +-
source/Makefile.in | 12 +-
source/include/libsmb_internal.h | 544 +++-
source/include/libsmbclient.h | 1020 ++++-
source/libsmb/libsmb_cache.c | 127 +-
source/libsmb/libsmb_compat.c | 379 +-
source/libsmb/libsmb_context.c | 1470 +++++++
source/libsmb/libsmb_dir.c | 1942 +++++++++
source/libsmb/libsmb_file.c | 864 ++++
source/libsmb/libsmb_misc.c | 73 +
source/libsmb/libsmb_path.c | 400 ++
source/libsmb/libsmb_printjob.c | 336 ++
source/libsmb/libsmb_server.c | 685 +++
source/libsmb/libsmb_stat.c | 302 ++
source/libsmb/libsmb_xattr.c | 2301 ++++++++++
source/libsmb/libsmbclient.c | 7233 -------------------------------
19 files changed, 10091 insertions(+), 7702 deletions(-)
create mode 100644 source/libsmb/libsmb_context.c
create mode 100644 source/libsmb/libsmb_dir.c
create mode 100644 source/libsmb/libsmb_file.c
create mode 100644 source/libsmb/libsmb_misc.c
create mode 100644 source/libsmb/libsmb_path.c
create mode 100644 source/libsmb/libsmb_printjob.c
create mode 100644 source/libsmb/libsmb_server.c
create mode 100644 source/libsmb/libsmb_stat.c
create mode 100644 source/libsmb/libsmb_xattr.c
delete mode 100644 source/libsmb/libsmbclient.c
Changeset truncated at 500 lines:
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index ccbf368..e0528f0 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -105,6 +105,68 @@ See examples/scripts/mount/mount.smbfs as an example for a wrapper which
calls mount.cifs instead of smbmount/mount.smbfs.
+Modified API for libsmbclient
+==============================================================================
+
+Maintaining ABI compatibility for libsmbclient has become increasingly
+difficult to accomplish, while also keeping the code organization such that it
+is easily readable. Towards the goal of maintaining ABI compatibility and
+also keeping the code easy to maintain and enhance, the API has changed
+somewhat. In particular, the fields in the SMBCCTX context structure are no
+longer intended to be read/write by the user. The names of the fields have
+changed to encourage any recompilations to use the new interface, but for
+continued ABI compatibility, the fields are in the same locations in the
+context structure as they were previously so any previously-compiled
+applications should continue to work with this new version.
+
+An application that previously accessed the members of the SMBCCTX context
+structure will encounter errors if recompiled. This is intentional to
+encourage implementation of the small changes required for the new interface.
+The number of changes is expected to be quite small for the vast majority of
+applications, and no changes need be made for many applications. The changes
+required for KDE (konqueror) to conform to the new interface, for example, are
+only four lines in only one file.
+
+Instead of the application manually changing or reading values in the context
+structure, there are now setter and getter functions for each configurable
+member in that structure. Similarly, the smbc_option_get() and
+smbc_option_set() functions are deprecated in favor of the setter/getter
+interface. The setters and getters are all documented in libsmbclient.h
+under these comment blocks:
+
+ Getters and setters for CONFIGURATION
+ Getters and setters for OPTIONS
+ Getters and setters for FUNCTIONS
+ Callable functions for files
+ Callable functions for directories
+ Callable functions applicable to both files and directories
+
+Example changes that may be required:
+
+ /* Set the debug level */
+ context->debug = 99;
+changes to:
+ smbc_setDebug(context, 99);
+
+ /* Specify the authentication callback function */
+ context->callbacks.auth_fn = auth_smbc_get_data;
+changes to:
+ smbc_setFunctionAuthData(context, auth_smbc_get_data);
+
+ /* Specify the new-style authentication callback with context parameter */
+ smbc_option_set("auth_function", auth_smbc_get_data_with_ctx);
+changes to:
+ smbc_setFunctionAuthDataWithContext(context, auth_smbc_get_data_with_ctx);
+
+ /* Set kerberos flags */
+ context->flags = (SMB_CTX_FLAG_USE_KERBEROS |
+ SMB_CTX_FLAG_FALLBACK_AFTER_KERBEROS);
+changes to:
+ smbc_setOptionUseKerberos(context, 1);
+ smbc_setOptionFallbackAfterKerberos(context, 1);
+
+
+
######################################################################
Changes
@@ -248,6 +310,9 @@ o Volker Lendecke <vl at samba.org>
* Speed up the smbclient "get" command
* Add the aio_fork module
+o Derrell Lipman <derrell at samba.org>
+ * Modified libsmbclient API for more easily maintaining ABI compatibility
+ while adding new features to libsmbclient.
o Stefan Metzmacher <metze at samba.org>
* Fixes for libreplace.
diff --git a/examples/libsmbclient/smbwrapper/smbw.c b/examples/libsmbclient/smbwrapper/smbw.c
index b88290f..d3439e4 100644
--- a/examples/libsmbclient/smbwrapper/smbw.c
+++ b/examples/libsmbclient/smbwrapper/smbw.c
@@ -174,11 +174,11 @@ static void do_init(StartupType startupType)
exit(1);
}
- smbw_ctx->debug = debug_level;
- smbw_ctx->callbacks.auth_fn = get_auth_data_fn;
- smbw_ctx->options.browse_max_lmb_count = 0;
- smbw_ctx->options.urlencode_readdir_entries = 1;
- smbw_ctx->options.one_share_per_server = 1;
+ smbc_setDebug(smbw_ctx, debug_level);
+ smbc_setFunctionAuthData(smbw_ctx, get_auth_data_fn);
+ smbc_option_set(smbw_ctx, "browse_max_lmb_count", 0);
+ smbc_option_set(smbw_ctx, "urlencode_readdir_entries", 1);
+ smbc_option_set(smbw_ctx, "one_share_per_server", 1);
if (smbc_init_context(smbw_ctx) == NULL) {
fprintf(stderr, "Could not initialize context.\n");
diff --git a/examples/libsmbclient/testbrowse.c b/examples/libsmbclient/testbrowse.c
index 562d2c2..1b0b54f 100644
--- a/examples/libsmbclient/testbrowse.c
+++ b/examples/libsmbclient/testbrowse.c
@@ -108,16 +108,13 @@ main(int argc, char * argv[])
}
/* Set mandatory options (is that a contradiction in terms?) */
- context->debug = debug;
+ smbc_setDebug(context, debug);
if (context_auth) {
- context->callbacks.auth_fn = NULL;
- smbc_option_set(context,
- "auth_function",
- (void *) get_auth_data_with_context_fn);
- smbc_option_set(context, "user_data", "hello world");
+ smbc_setFunctionAuthDataWithContext(context,
+ get_auth_data_with_context_fn);
+ smbc_setOptionUserData(context, "hello world");
} else {
- context->callbacks.auth_fn =
- (no_auth ? no_auth_data_fn : get_auth_data_fn);
+ smbc_setFunctionAuthData(context, get_auth_data_fn);
}
/* If we've been asked to log to stderr instead of stdout, ... */
diff --git a/examples/libsmbclient/testbrowse2.c b/examples/libsmbclient/testbrowse2.c
index 76d98b9..0ac1d72 100644
--- a/examples/libsmbclient/testbrowse2.c
+++ b/examples/libsmbclient/testbrowse2.c
@@ -93,8 +93,8 @@ SMBCCTX* create_smbctx(){
if ((ctx = smbc_new_context()) == NULL) return NULL;
- ctx->debug = debuglevel;
- ctx->callbacks.auth_fn = smbc_auth_fn;
+ smbc_setDebug(ctx, debuglevel);
+ smbc_setFunctionAuthData(ctx, smbc_auth_fn);
if (smbc_init_context(ctx) == NULL){
smbc_free_context(ctx, 1);
@@ -105,7 +105,7 @@ SMBCCTX* create_smbctx(){
}
void delete_smbctx(SMBCCTX* ctx){
- ctx->callbacks.purge_cached_fn(ctx);
+ smbc_getFunctionPurgeCachedServers(ctx)(ctx);
smbc_free_context(ctx, 1);
}
@@ -114,8 +114,9 @@ smbitem* get_smbitem_list(SMBCCTX *ctx, char *smb_path){
struct smbc_dirent *dirent;
smbitem *list = NULL, *item;
- if ((fd = ctx->opendir(ctx, smb_path)) == NULL) return NULL;
- while((dirent = ctx->readdir(ctx, fd)) != NULL){
+ if ((fd = smbc_getFunctionOpendir(ctx)(ctx, smb_path)) == NULL)
+ return NULL;
+ while((dirent = smbc_getFunctionReaddir(ctx)(ctx, fd)) != NULL){
if (strcmp(dirent->name, "") == 0) continue;
if (strcmp(dirent->name, ".") == 0) continue;
if (strcmp(dirent->name, "..") == 0) continue;
@@ -128,7 +129,7 @@ smbitem* get_smbitem_list(SMBCCTX *ctx, char *smb_path){
strcpy(item->name, dirent->name);
list = item;
}
- ctx->close_fn(ctx, fd);
+ smbc_getFunctionClose(ctx)(ctx, fd);
return /* smbitem_list_sort */ (list);
}
@@ -167,7 +168,7 @@ void recurse(SMBCCTX *ctx, char *smb_group, char *smb_path, int maxlen){
delete_smbctx(ctx1);
}else{
recurse(ctx, smb_group, smb_path, maxlen);
- ctx->callbacks.purge_cached_fn(ctx);
+ smbc_getFunctionPurgeCachedServers(ctx)(ctx);
}
break;
case SMBC_FILE_SHARE:
@@ -181,7 +182,7 @@ void recurse(SMBCCTX *ctx, char *smb_group, char *smb_path, int maxlen){
if (list->type != SMBC_FILE){
recurse(ctx, smb_group, smb_path, maxlen);
if (list->type == SMBC_FILE_SHARE)
- ctx->callbacks.purge_cached_fn(ctx);
+ smbc_getFunctionPurgeCachedServers(ctx)(ctx);
}
break;
}
diff --git a/source/Makefile.in b/source/Makefile.in
index 3840498..5f57f67 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -763,8 +763,18 @@ RPCCLIENT_OBJ = $(RPCCLIENT_OBJ1) \
PAM_WINBIND_OBJ = nsswitch/pam_winbind.o $(WBCOMMON_OBJ) \
$(LIBREPLACE_OBJ) @BUILD_INIPARSER@
-LIBSMBCLIENT_OBJ0 = libsmb/libsmbclient.o libsmb/libsmb_compat.o \
+LIBSMBCLIENT_OBJ0 = \
libsmb/libsmb_cache.o \
+ libsmb/libsmb_compat.o \
+ libsmb/libsmb_context.o \
+ libsmb/libsmb_dir.o \
+ libsmb/libsmb_file.o \
+ libsmb/libsmb_misc.o \
+ libsmb/libsmb_path.o \
+ libsmb/libsmb_printjob.o \
+ libsmb/libsmb_server.o \
+ libsmb/libsmb_stat.o \
+ libsmb/libsmb_xattr.o \
$(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
$(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
$(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(RPC_PARSE_OBJ) \
diff --git a/source/include/libsmb_internal.h b/source/include/libsmb_internal.h
index 6c7dc80..e687e24 100644
--- a/source/include/libsmb_internal.h
+++ b/source/include/libsmb_internal.h
@@ -1,12 +1,71 @@
+/*
+ Unix SMB/Netbios implementation.
+ SMB client library implementation
+ Copyright (C) Andrew Tridgell 1998
+ Copyright (C) Richard Sharpe 2000, 2002
+ Copyright (C) John Terpstra 2000
+ Copyright (C) Tom Jansen (Ninja ISD) 2002
+ Copyright (C) Derrell Lipman 2003-2008
+ Copyright (C) Jeremy Allison 2007, 2008
+
+ 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 3 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, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "includes.h"
+
+
#ifndef _LIBSMB_INTERNAL_H_
#define _LIBSMB_INTERNAL_H_
+#include "../include/libsmbclient.h"
+
#define SMBC_MAX_NAME 1023
#define SMBC_FILE_MODE (S_IFREG | 0444)
#define SMBC_DIR_MODE (S_IFDIR | 0555)
+/*
+ * DOS Attribute values (used internally)
+ */
+typedef struct DOS_ATTR_DESC {
+ int mode;
+ SMB_OFF_T size;
+ time_t create_time;
+ time_t access_time;
+ time_t write_time;
+ time_t change_time;
+ SMB_INO_T inode;
+} DOS_ATTR_DESC;
+
+
+/*
+ * Internal flags for extended attributes
+ */
-#include "include/libsmbclient.h"
+/* internal mode values */
+#define SMBC_XATTR_MODE_ADD 1
+#define SMBC_XATTR_MODE_REMOVE 2
+#define SMBC_XATTR_MODE_REMOVE_ALL 3
+#define SMBC_XATTR_MODE_SET 4
+#define SMBC_XATTR_MODE_CHOWN 5
+#define SMBC_XATTR_MODE_CHGRP 6
+
+#define CREATE_ACCESS_READ READ_CONTROL_ACCESS
+
+/*We should test for this in configure ... */
+#ifndef ENOTSUP
+#define ENOTSUP EOPNOTSUPP
+#endif
struct _SMBCSRV {
@@ -46,12 +105,30 @@ struct _SMBCFILE {
};
-struct smbc_internal_data {
+/*
+ * Context structure
+ */
+struct SMBC_internal_data {
- /*
- * Is this handle initialized ?
- */
- bool _initialized;
+ /* True when this handle is initialized */
+ bool initialized;
+
+#if 0 /* Left in libsmbclient.h for backward compatibility */
+ /* Netbios name used for making connections */
+ char * netbios_name;
+
+ /* Workgroup used for making connections */
+ char * workgroup;
+
+ /* Username used for making connections */
+ char * user;
+
+ /* Debug level */
+ int debug;
+
+ /* Connection timeout value */
+ int timeout;
+#endif
/* dirent pointer location
*
@@ -64,22 +141,22 @@ struct smbc_internal_data {
* According to <linux/limits.h>, NAME_MAX is 255. Is it longer
* anyplace else?
*/
- char _dirent[1024];
+ char dirent[1024];
/*
* server connection list
*/
- SMBCSRV * _servers;
+ SMBCSRV * servers;
/*
* open file/dir list
*/
- SMBCFILE * _files;
+ SMBCFILE * files;
/*
* Log to standard error instead of the more typical standard output
*/
- bool _debug_stderr;
+ bool debug_stderr;
/*
* Support "Create Time" in get/set with the *xattr() functions, if
@@ -88,33 +165,470 @@ struct smbc_internal_data {
* CREATE_TIME. Default is FALSE, i.e. to use the old-style shorter
* names and to not support CREATE time, for backward compatibility.
*/
- bool _full_time_names;
+ bool full_time_names;
/*
* The share mode of a file being opened. To match POSIX semantics
* (and maintain backward compatibility), DENY_NONE is the default.
*/
- smbc_share_mode _share_mode;
+ smbc_share_mode share_mode;
/*
* Authentication function which includes the context. This will be
* used if set; otherwise context->callbacks.auth_fn() will be used.
*/
- smbc_get_auth_data_with_context_fn _auth_fn_with_context;
+ smbc_get_auth_data_with_context_fn auth_fn_with_context;
/*
* An opaque (to this library) user data handle which can be set
* and retrieved with smbc_option_set() and smbc_option_get().
*/
- void * _user_data;
+ void * user_data;
/*
* Should we attempt UNIX smb encryption ?
* Set to 0 if we should never attempt, set to 1 if
* encryption requested, set to 2 if encryption required.
*/
- int _smb_encryption_level;
+ smbc_smb_encrypt_level smb_encryption_level;
+
+#if 0 /* Left in libsmbclient.h for backward compatibility */
+ /*
+ * From how many local master browsers should the list of
+ * workgroups be retrieved? It can take up to 12 minutes or
+ * longer after a server becomes a local master browser, for
+ * it to have the entire browse list (the list of
+ * workgroups/domains) from an entire network. Since a client
+ * never knows which local master browser will be found first,
+ * the one which is found first and used to retrieve a browse
+ * list may have an incomplete or empty browse list. By
+ * requesting the browse list from multiple local master
+ * browsers, a more complete list can be generated. For small
+ * networks (few workgroups), it is recommended that this
+ * value be set to 0, causing the browse lists from all found
+ * local master browsers to be retrieved and merged. For
+ * networks with many workgroups, a suitable value for this
+ * variable is probably somewhere around 3. (Default: 3).
+ */
+ int browse_max_lmb_count;
+
+ /*
+ * There is a difference in the desired return strings from
+ * smbc_readdir() depending upon whether the filenames are to
+ * be displayed to the user, or whether they are to be
+ * appended to the path name passed to smbc_opendir() to call
+ * a further smbc_ function (e.g. open the file with
+ * smbc_open()). In the former case, the filename should be
+ * in "human readable" form. In the latter case, the smbc_
+ * functions expect a URL which must be url-encoded. Those
+ * functions decode the URL. If, for example, smbc_readdir()
+ * returned a file name of "abc%20def.txt", passing a path
+ * with this file name attached to smbc_open() would cause
+ * smbc_open to attempt to open the file "abc def.txt" since
+ * the %20 is decoded into a space.
+ *
+ * Set this option to True if the names returned by
+ * smbc_readdir() should be url-encoded such that they can be
+ * passed back to another smbc_ call. Set it to False if the
+ * names returned by smbc_readdir() are to be presented to the
+ * user.
+ *
+ * For backwards compatibility, this option defaults to False.
+ */
+ bool urlencode_readdir_entries;
+
+ /*
+ * Some Windows versions appear to have a limit to the number
+ * of concurrent SESSIONs and/or TREE CONNECTions. In
+ * one-shot programs (i.e. the program runs and then quickly
+ * ends, thereby shutting down all connections), it is
+ * probably reasonable to establish a new connection for each
+ * share. In long-running applications, the limitation can be
+ * avoided by using only a single connection to each server,
+ * and issuing a new TREE CONNECT when the share is accessed.
+ */
+ bool one_share_per_server;
+
+ /* Kerberos-related flags */
+ bool use_kerberos;
+ bool fallback_after_kerberos;
+
+ /* Don't try to do automatic anonymous login */
+ bool no_auto_anonymous_login;
+
+ /* Server-related functions */
+ struct
+ {
+ smbc_get_auth_data_fn get_auth_data_fn;
+ smbc_check_server_fn check_server_fn;
+ smbc_remove_unused_server_fn remove_unused_server_fn;
+ } server;
+
+ /* Cache-related functions */
+ struct
+ {
+ struct smbc_server_cache * server_cache_data;
+ smbc_add_cached_srv_fn add_cached_server_fn;
+ smbc_get_cached_srv_fn get_cached_server_fn;
+ smbc_remove_cached_srv_fn remove_cached_server_fn;
+ smbc_purge_cached_srv_fn purge_cached_server_fn;
+ } cache;
+#endif
+
+ /* POSIX emulation functions */
+ struct
+ {
+#if 0 /* Left in libsmbclient.h for backward compatibility */
+ smbc_open_fn open_fn;
+ smbc_creat_fn creat_fn;
+ smbc_read_fn read_fn;
+ smbc_write_fn write_fn;
+ smbc_unlink_fn unlink_fn;
+ smbc_rename_fn rename_fn;
+ smbc_lseek_fn lseek_fn;
+ smbc_stat_fn stat_fn;
+ smbc_fstat_fn fstat_fn;
+#endif
+ smbc_ftruncate_fn ftruncate_fn;
+#if 0 /* Left in libsmbclient.h for backward compatibility */
+ smbc_close_fn close_fn;
+ smbc_opendir_fn opendir_fn;
+ smbc_closedir_fn closedir_fn;
+ smbc_readdir_fn readdir_fn;
+ smbc_getdents_fn getdents_fn;
+ smbc_mkdir_fn mkdir_fn;
+ smbc_rmdir_fn rmdir_fn;
+ smbc_telldir_fn telldir_fn;
--
Samba Shared Repository
More information about the samba-cvs
mailing list