diff options
| -rw-r--r-- | xlators/features/access-control/src/access-control.c | 18 | 
1 files changed, 17 insertions, 1 deletions
diff --git a/xlators/features/access-control/src/access-control.c b/xlators/features/access-control/src/access-control.c index 761226668..34422f9ca 100644 --- a/xlators/features/access-control/src/access-control.c +++ b/xlators/features/access-control/src/access-control.c @@ -1833,7 +1833,23 @@ struct xlator_fops fops = {  int  init (xlator_t *this)  { -        return 0; +        int ret = -1; + +	if (!this->children || this->children->next) { +		gf_log (this->name, GF_LOG_ERROR, +			"FATAL: access-control not configured with " +                        "exactly one  child"); +                goto out; +	} + +	if (!this->parents) { +		gf_log (this->name, GF_LOG_WARNING, +			"dangling volume. check volfile "); +	} + +        ret = 0; +out: +        return ret;  }  void  | 
