mirror of
https://github.com/samba-team/samba.git
synced 2025-11-06 08:23:50 +03:00
r10810: This adds the hooks required to communicate the current user from the
authenticated session down into LDB. This associates a session info structure with the open LDB, allowing a future ldb_ntacl module to allow/deny operations on that basis. Along the way, I cleaned up a few things, and added new helper functions to assist. In particular the LSA pipe uses simpler queries for some of the setup. In ldap_server, I have removed the 'ldasrv:hacked' module, which hasn't been worked on (other than making it continue to compile) since January, and I think the features of this module are being put into ldb anyway. I have also changed the partitions in ldap_server to be initialised after the connection, with the private pointer used to associate the ldb with the incoming session. Andrew Bartlett
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
aa30c16de0
commit
fd7203789a
@@ -27,6 +27,9 @@ struct ldapsrv_connection {
|
||||
struct auth_session_info *session_info;
|
||||
struct ldapsrv_service *service;
|
||||
struct tls_context *tls;
|
||||
struct ldapsrv_partition *rootDSE;
|
||||
struct ldapsrv_partition *default_partition;
|
||||
struct ldapsrv_partition *partitions;
|
||||
|
||||
/* partially received request */
|
||||
DATA_BLOB partial;
|
||||
@@ -58,6 +61,7 @@ struct ldapsrv_partition;
|
||||
struct ldapsrv_partition_ops {
|
||||
const char *name;
|
||||
NTSTATUS (*Init)(struct ldapsrv_partition *partition, struct ldapsrv_connection *conn);
|
||||
NTSTATUS (*Bind)(struct ldapsrv_partition *partition, struct ldapsrv_connection *conn);
|
||||
NTSTATUS (*Search)(struct ldapsrv_partition *partition, struct ldapsrv_call *call, struct ldap_SearchRequest *r);
|
||||
NTSTATUS (*Modify)(struct ldapsrv_partition *partition, struct ldapsrv_call *call, struct ldap_ModifyRequest *r);
|
||||
NTSTATUS (*Add)(struct ldapsrv_partition *partition, struct ldapsrv_call *call, struct ldap_AddRequest *r);
|
||||
@@ -71,15 +75,12 @@ struct ldapsrv_partition_ops {
|
||||
struct ldapsrv_partition {
|
||||
struct ldapsrv_partition *prev,*next;
|
||||
|
||||
void *private_data;
|
||||
void *private;
|
||||
const struct ldapsrv_partition_ops *ops;
|
||||
|
||||
const char *base_dn;
|
||||
};
|
||||
|
||||
struct ldapsrv_service {
|
||||
struct ldapsrv_partition *rootDSE;
|
||||
struct ldapsrv_partition *default_partition;
|
||||
struct ldapsrv_partition *partitions;
|
||||
struct tls_params *tls_params;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user