From 220c63400a837d5a042614dab18e7d14620af868 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Mon, 18 Aug 2008 00:55:12 +0200 Subject: [PATCH] Fix crash if there is no privset= in an operator{}. --- src/newconf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/newconf.c b/src/newconf.c index b8fcee1..33bd7e0 100644 --- a/src/newconf.c +++ b/src/newconf.c @@ -560,6 +560,10 @@ conf_end_oper(struct TopConf *tc) return 0; } + + if (!yy_oper->privset) + yy_oper->privset = privilegeset_get("default"); + /* now, yy_oper_list contains a stack of oper_conf's with just user * and host in, yy_oper contains the rest of the information which * we need to copy into each element in yy_oper_list @@ -630,9 +634,6 @@ static void conf_set_oper_privset(void *data) { yy_oper->privset = privilegeset_get((char *) data); - - if (!yy_oper->privset) - yy_oper->privset = privilegeset_get("default"); } static void