]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
Fix crash if there is no privset= in an operator{}.
authorJilles Tjoelker <redacted>
Sun, 17 Aug 2008 22:55:12 +0000 (00:55 +0200)
committerJilles Tjoelker <redacted>
Sun, 17 Aug 2008 22:55:12 +0000 (00:55 +0200)
src/newconf.c

index b8fcee13b1ca02f92366ec716a6595de617b4b8e..33bd7e023a84730083ee775d43c1bd7a23c1e571 100644 (file)
@@ -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