diff options
author | Matthieu Patou <mat@matws.net> | 2012-09-27 18:38:29 -0700 |
---|---|---|
committer | Matthieu Patou <mat@matws.net> | 2012-10-07 21:51:03 -0700 |
commit | 193b15efeaf6cfe89770558cddb2110f7cbd54fe (patch) | |
tree | f230be3dcf7e49a2bb57454eded9903c386a8985 | |
parent | dc002a394b0e41254c061176f480b56a0ac4097d (diff) | |
download | samba-193b15efeaf6cfe89770558cddb2110f7cbd54fe.tar.gz samba-193b15efeaf6cfe89770558cddb2110f7cbd54fe.tar.bz2 samba-193b15efeaf6cfe89770558cddb2110f7cbd54fe.zip |
s4-repl: make dreplsrv_partition_find_for_nc return BAD_NC only
-rw-r--r-- | source4/dsdb/repl/drepl_partitions.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/dsdb/repl/drepl_partitions.c b/source4/dsdb/repl/drepl_partitions.c index 5949f42d06..2a16a4502f 100644 --- a/source4/dsdb/repl/drepl_partitions.c +++ b/source4/dsdb/repl/drepl_partitions.c @@ -413,6 +413,11 @@ static WERROR dreplsrv_partition_add_source_dsa(struct dreplsrv_service *s, return WERR_OK; } +/** + * Find a partition when given a NC + * If the NC can't be found it will return BAD_NC + * Initial checks for invalid parameters have to be done beforehand + */ WERROR dreplsrv_partition_find_for_nc(struct dreplsrv_service *s, struct GUID *nc_guid, struct dom_sid *nc_sid, @@ -429,8 +434,8 @@ WERROR dreplsrv_partition_find_for_nc(struct dreplsrv_service *s, valid_sid = nc_sid && !dom_sid_equal(&null_sid, nc_sid); valid_guid = nc_guid && !GUID_all_zero(nc_guid); - if (!valid_sid && !valid_guid && !nc_dn_str) { - return WERR_DS_DRA_INVALID_PARAMETER; + if (!valid_sid && !valid_guid && (!nc_dn_str)) { + return WERR_DS_DRA_BAD_NC; } for (p = s->partitions; p; p = p->next) { |