s3:idmap_autorid: fail initialization if the domain is not "*"
authorMichael Adam <obnox@samba.org>
Tue, 7 Jun 2011 13:53:49 +0000 (15:53 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 21 Jun 2011 14:09:04 +0000 (16:09 +0200)
autorid can only be used as a backend for the default idmap configuration.

source3/winbindd/idmap_autorid.c

index 1f4af335106e11d423a62367aaa18210568a7c33..7f93b78b217865eaf6362efd656ff75183ce25c3 100644 (file)
@@ -436,6 +436,13 @@ static NTSTATUS idmap_autorid_initialize(struct idmap_domain *dom)
        NTSTATUS status;
        uint32_t hwm;
 
+       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));
+               return NT_STATUS_INVALID_PARAMETER;
+       }
+
        config = TALLOC_ZERO_P(dom, struct autorid_global_config);
        if (!config) {
                DEBUG(0, ("Out of memory!\n"));