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>
Mon, 20 Jun 2011 11:46:27 +0000 (13:46 +0200)
autorid can only be used as a backend for the default idmap configuration.

source3/winbindd/idmap_autorid.c

index e9048d8484930539ac02a29fbc7494c0752d2966..f4ab754654355f473640df66dcf5acc3a1a6f3fe 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(dom, struct autorid_global_config);
        if (!config) {
                DEBUG(0, ("Out of memory!\n"));