2004-10-10 01:35:33 +00:00
/*
Unix SMB / CIFS implementation .
endpoint server for the drsuapi pipe
Copyright ( C ) Stefan Metzmacher 2004
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
2007-07-10 02:07:03 +00:00
the Free Software Foundation ; either version 3 of the License , or
2004-10-10 01:35:33 +00:00
( 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
2007-07-10 02:07:03 +00:00
along with this program . If not , see < http : //www.gnu.org/licenses/>.
2004-10-10 01:35:33 +00:00
*/
/*
this type allows us to distinguish handle types
*/
enum drsuapi_handle {
DRSUAPI_BIND_HANDLE ,
} ;
/*
state asscoiated with a drsuapi_DsBind * ( ) operation
*/
struct drsuapi_bind_state {
2007-02-23 07:56:29 +00:00
struct ldb_context * sam_ctx ;
2010-08-18 14:27:17 +10:00
struct ldb_context * sam_ctx_system ;
2007-02-23 07:56:29 +00:00
struct GUID remote_bind_guid ;
2016-05-25 11:49:24 +12:00
struct drsuapi_DsBindInfoCtr * remote_info ;
struct drsuapi_DsBindInfoCtr * local_info ;
2009-09-25 15:18:02 -07:00
struct drsuapi_getncchanges_state * getncchanges_state ;
2004-10-10 01:35:33 +00:00
} ;
2009-09-08 11:49:28 +10:00
/* prototypes of internal functions */
2017-03-29 11:24:50 +13:00
WERROR drsuapi_UpdateRefs ( struct imessaging_context * msg_ctx ,
struct tevent_context * event_ctx ,
struct drsuapi_bind_state * b_state , TALLOC_CTX * mem_ctx ,
2009-10-14 20:25:48 +11:00
struct drsuapi_DsReplicaUpdateRefsRequest1 * req ) ;
2009-09-08 11:49:28 +10:00
WERROR dcesrv_drsuapi_DsReplicaUpdateRefs ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct drsuapi_DsReplicaUpdateRefs * r ) ;
2009-09-09 21:00:01 +10:00
WERROR dcesrv_drsuapi_DsGetNCChanges ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct drsuapi_DsGetNCChanges * r ) ;
WERROR dcesrv_drsuapi_DsAddEntry ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct drsuapi_DsAddEntry * r ) ;
2010-01-09 17:11:01 +11:00
WERROR dcesrv_drsuapi_DsWriteAccountSpn ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct drsuapi_DsWriteAccountSpn * r ) ;
2009-09-08 11:49:28 +10:00
char * drs_ObjectIdentifier_to_string ( TALLOC_CTX * mem_ctx ,
struct drsuapi_DsReplicaObjectIdentifier * nc ) ;
2009-09-09 21:00:01 +10:00
int drsuapi_search_with_extended_dn ( struct ldb_context * ldb ,
TALLOC_CTX * mem_ctx ,
struct ldb_result * * _res ,
struct ldb_dn * basedn ,
enum ldb_scope scope ,
const char * const * attrs ,
2009-09-23 15:47:14 -07:00
const char * filter ) ;
2009-09-09 21:00:01 +10:00
2009-09-19 15:08:19 -07:00
WERROR drs_security_level_check ( struct dcesrv_call_state * dce_call ,
2010-08-17 14:12:21 +10:00
const char * call , enum security_user_level minimum_level ,
const struct dom_sid * domain_sid ) ;
s4: Handle DRSUAPI_DS_REPLICA_NEIGHBOUR_SPECIAL_SECRET_PROCESSING in getncchanges
When this flag is specified in the request these attributes are treated as
secret: currentValue, dBCSPwd, initialAuthIncoming, initialAuthOutgoing,
lmPwdHistory, ntPwdHistory, priorValue, supplementalCredentials,
trustAuthIncoming, trustAuthOutgoing, unicodePwd
Their value is changed to NULL and the meta_data.originating_change_time to 0
2009-09-23 16:51:55 -07:00
void drsuapi_process_secret_attribute ( struct drsuapi_DsReplicaAttribute * attr ,
struct drsuapi_DsReplicaMetaData * meta_data ) ;
2010-09-26 21:14:45 -07:00
WERROR drs_security_access_check ( struct ldb_context * sam_ctx ,
TALLOC_CTX * mem_ctx ,
struct security_token * token ,
struct drsuapi_DsReplicaObjectIdentifier * nc ,
const char * ext_right ) ;
2010-09-29 15:46:23 -07:00
WERROR drs_security_access_check_nc_root ( struct ldb_context * sam_ctx ,
TALLOC_CTX * mem_ctx ,
struct security_token * token ,
struct drsuapi_DsReplicaObjectIdentifier * nc ,
const char * ext_right ) ;