Add missing regex include to generated command_list files.
[paraslash.git] / user_list.c
index 840802b33ba811816e3459284cd471644b134bb8..3c0b4f856546a2173c77696f80e0c554a646985c 100644 (file)
@@ -6,6 +6,7 @@
 
 /** \file user_list.c User handling for para_server. */
 
+#include <regex.h>
 #include <sys/types.h>
 #include <dirent.h>
 #include <openssl/rc4.h>
@@ -55,6 +56,11 @@ static void populate_user_list(char *user_list_file)
                                para_strerror(-ret));
                        continue;
                }
+               if (ret < CHALLENGE_SIZE + 2 * CHALLENGE_SIZE + 41) {
+                       PARA_WARNING_LOG("rsa key for %s too small\n", n);
+                       rsa_free(rsa);
+                       continue;
+               }
                u = para_malloc(sizeof(*u));
                u->name = para_strdup(n);
                u->rsa = rsa;