mirror of
https://github.com/samba-team/samba.git
synced 2025-07-29 15:42:04 +03:00
s4-ldap-server: disallow all modifies on global catalog port
This commit is contained in:
@ -305,6 +305,11 @@ static int ldapsrv_add_with_controls(struct ldapsrv_call *call,
|
|||||||
|
|
||||||
if (ret != LDB_SUCCESS) return ret;
|
if (ret != LDB_SUCCESS) return ret;
|
||||||
|
|
||||||
|
if (call->conn->global_catalog) {
|
||||||
|
return ldb_error(ldb, LDB_ERR_UNWILLING_TO_PERFORM, "modify forbidden on global catalog port");
|
||||||
|
}
|
||||||
|
ldb_request_add_control(req, DSDB_CONTROL_NO_GLOBAL_CATALOG, false, NULL);
|
||||||
|
|
||||||
ret = ldb_transaction_start(ldb);
|
ret = ldb_transaction_start(ldb);
|
||||||
if (ret != LDB_SUCCESS) {
|
if (ret != LDB_SUCCESS) {
|
||||||
return ret;
|
return ret;
|
||||||
@ -358,6 +363,11 @@ static int ldapsrv_mod_with_controls(struct ldapsrv_call *call,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (call->conn->global_catalog) {
|
||||||
|
return ldb_error(ldb, LDB_ERR_UNWILLING_TO_PERFORM, "modify forbidden on global catalog port");
|
||||||
|
}
|
||||||
|
ldb_request_add_control(req, DSDB_CONTROL_NO_GLOBAL_CATALOG, false, NULL);
|
||||||
|
|
||||||
ret = ldb_transaction_start(ldb);
|
ret = ldb_transaction_start(ldb);
|
||||||
if (ret != LDB_SUCCESS) {
|
if (ret != LDB_SUCCESS) {
|
||||||
return ret;
|
return ret;
|
||||||
@ -404,6 +414,11 @@ static int ldapsrv_del_with_controls(struct ldapsrv_call *call,
|
|||||||
|
|
||||||
if (ret != LDB_SUCCESS) return ret;
|
if (ret != LDB_SUCCESS) return ret;
|
||||||
|
|
||||||
|
if (call->conn->global_catalog) {
|
||||||
|
return ldb_error(ldb, LDB_ERR_UNWILLING_TO_PERFORM, "modify forbidden on global catalog port");
|
||||||
|
}
|
||||||
|
ldb_request_add_control(req, DSDB_CONTROL_NO_GLOBAL_CATALOG, false, NULL);
|
||||||
|
|
||||||
ret = ldb_transaction_start(ldb);
|
ret = ldb_transaction_start(ldb);
|
||||||
if (ret != LDB_SUCCESS) {
|
if (ret != LDB_SUCCESS) {
|
||||||
return ret;
|
return ret;
|
||||||
@ -451,6 +466,11 @@ static int ldapsrv_rename_with_controls(struct ldapsrv_call *call,
|
|||||||
|
|
||||||
if (ret != LDB_SUCCESS) return ret;
|
if (ret != LDB_SUCCESS) return ret;
|
||||||
|
|
||||||
|
if (call->conn->global_catalog) {
|
||||||
|
return ldb_error(ldb, LDB_ERR_UNWILLING_TO_PERFORM, "modify forbidden on global catalog port");
|
||||||
|
}
|
||||||
|
ldb_request_add_control(req, DSDB_CONTROL_NO_GLOBAL_CATALOG, false, NULL);
|
||||||
|
|
||||||
ret = ldb_transaction_start(ldb);
|
ret = ldb_transaction_start(ldb);
|
||||||
if (ret != LDB_SUCCESS) {
|
if (ret != LDB_SUCCESS) {
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user