summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>1999-04-04 06:22:22 +0000
committerTim Potter <tpot@samba.org>1999-04-04 06:22:22 +0000
commitafc00dbd6f1c7281893ea55f4cca0bdb483f0c75 (patch)
tree5b25da349ee477d1a504c2ac533c0987be009df5 /source3/smbd
parent10858bba8e790eeff1d8bfb60733cff65fca70c9 (diff)
downloadsamba-afc00dbd6f1c7281893ea55f4cca0bdb483f0c75.tar.gz
samba-afc00dbd6f1c7281893ea55f4cca0bdb483f0c75.tar.bz2
samba-afc00dbd6f1c7281893ea55f4cca0bdb483f0c75.zip
Call VFS initialisation, share connect and share disconnect functions.
Initialise VFS function pointers with symbols from the 'vfs object' file, use disk pointers otherwise. Added a hook to check for a 'default' VFS share (like the [homes] section). Currently empty - I'm unsure whether this will be useful or not. (This used to be commit 15805164fe77b127372eba1ec51c70758467adee)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/service.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index 4dd3cb4d97..8202294293 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -144,6 +144,11 @@ int find_service(char *service)
}
}
+ /* Check for default vfs service? Unsure whether to implement this */
+ if (iService < 0)
+ {
+ }
+
/* just possibly it's a default service? */
if (iService < 0)
{
@@ -340,7 +345,24 @@ connection_struct *make_connection(char *service,char *user,char *password, int
conn->veto_oplock_list = NULL;
string_set(&conn->dirpath,"");
string_set(&conn->user,user);
-
+
+ /* Initialise VFS function pointers */
+
+ if (*lp_vfsobj(SNUM(conn))) {
+
+ /* Loadable object file */
+
+ if (vfs_init_custom(conn) < 0) {
+ return NULL;
+ }
+
+ } else {
+
+ /* Normal share - initialise with disk access functions */
+
+ vfs_init_default(conn);
+ }
+
#ifdef HAVE_GETGRNAM
if (*lp_force_group(snum)) {
struct group *gptr;
@@ -492,6 +514,14 @@ connection_struct *make_connection(char *service,char *user,char *password, int
dbgtext( "(uid=%d, gid=%d) ", (int)conn->uid, (int)conn->gid );
dbgtext( "(pid %d)\n", (int)getpid() );
}
+
+ /* Invoke make connection hook */
+
+ if (conn->vfs_ops.connect) {
+ if (conn->vfs_ops.connect(conn, service, user) < 0) {
+ return NULL;
+ }
+ }
return(conn);
}
@@ -511,6 +541,10 @@ void close_cnum(connection_struct *conn, uint16 vuid)
remote_machine,client_addr(Client),
lp_servicename(SNUM(conn))));
+ if (conn->vfs_ops.disconnect != NULL) {
+ conn->vfs_ops.disconnect(conn, lp_servicename(SNUM(conn)));
+ }
+
yield_connection(conn,
lp_servicename(SNUM(conn)),
lp_max_connections(SNUM(conn)));