s3:idmap_autorid: fail initialization if the domain is not "*"
[abartlet/samba.git/.git] / source3 / winbindd / idmap_autorid.c
index 6252c5d946f78a538e7b5a7106cca67bfc16956f..80d8ed1ec2d10c3c9bdd507d6458cea72a2654ff 100644 (file)
@@ -438,6 +438,14 @@ static NTSTATUS idmap_autorid_initialize(struct idmap_domain *dom)
        TALLOC_CTX *frame = talloc_stackframe();
        char *config_option = NULL;
 
+       if (!strequal(dom->name, "*")) {
+               DEBUG(0, ("idmap_autorid_initialize: Error: autorid configured "
+                         "for domain '%s'. But autorid can only be used for "
+                         "the default idmap configuration.\n", dom->name));
+               status = NT_STATUS_INVALID_PARAMETER;
+               goto error;
+       }
+
        config = TALLOC_ZERO_P(frame, struct autorid_global_config);
        if (!config) {
                DEBUG(0, ("Out of memory!\n"));