1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

Restructuring of vfs layer to include a "this" pointer - can be an fsp or

a conn struct depending on the call.
We need this to have a clean NT ACL call interface.
This will break any existing VFS libraries (that's why this is pre-release
code).
Andrew gets credit for this one :-) :-).

In addition - added Herb's WITH_PROFILE changes - Herb - please examine
the changes I've made to the smbd/reply.c code you added. The original
code was very ugly and I have replaced it with a
START_PROFILE(x)/END_PROFILE(x) pair using the preprocessor.
Please check this compiles ok with the --with-profile switch.
Jeremy.
(This used to be commit b07611f815)
This commit is contained in:
Jeremy Allison
2000-10-06 03:21:49 +00:00
parent 56d514235e
commit 636f146abf
22 changed files with 838 additions and 516 deletions

View File

@ -481,46 +481,6 @@ connection_struct *make_connection(char *service,char *user,char *password, int
conn->nt_user_token = create_nt_token(conn->uid, conn->gid, conn->ngroups, conn->groups);
/*
* Now initialize the vfs layer.
*/
conn->vfs_conn = (struct vfs_connection_struct *)
malloc(sizeof(struct vfs_connection_struct));
if (conn->vfs_conn == NULL) {
DEBUG(0, ("No memory to create vfs_connection_struct"));
return NULL;
}
ZERO_STRUCTP(conn->vfs_conn);
/* Copy across relevant data from connection struct */
conn->vfs_conn->printer = conn->printer;
conn->vfs_conn->ipc = conn->ipc;
conn->vfs_conn->read_only = conn->read_only;
conn->vfs_conn->admin_user = conn->admin_user;
pstrcpy(conn->vfs_conn->dirpath, conn->dirpath);
pstrcpy(conn->vfs_conn->connectpath, conn->connectpath);
pstrcpy(conn->vfs_conn->origpath, conn->origpath);
pstrcpy(conn->vfs_conn->service, service);
pstrcpy(conn->vfs_conn->user, conn->user);
conn->vfs_conn->uid = conn->uid;
conn->vfs_conn->gid = conn->gid;
conn->vfs_conn->ngroups = conn->ngroups;
if (conn->vfs_conn->ngroups != 0) {
conn->vfs_conn->groups = (gid_t *)memdup(conn->groups,
conn->ngroups * sizeof(gid_t));
} else {
conn->vfs_conn->groups = NULL;
}
conn->vfs_conn->nt_user_token = dup_nt_token(conn->nt_user_token);
/* Initialise VFS function pointers */
if (*lp_vfsobj(SNUM(conn))) {
@ -646,7 +606,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int
/* Invoke VFS make connection hook */
if (conn->vfs_ops.connect) {
if (conn->vfs_ops.connect(conn->vfs_conn, service, user) < 0)
if (conn->vfs_ops.connect(conn, service, user) < 0)
return NULL;
}
@ -671,7 +631,7 @@ void close_cnum(connection_struct *conn, uint16 vuid)
/* Call VFS disconnect hook */
conn->vfs_ops.disconnect();
conn->vfs_ops.disconnect(conn);
}