From 7b131d22cafe72be5ed4240833c1c8386d1fb16a Mon Sep 17 00:00:00 2001 From: tytso Date: Tue, 9 Aug 1994 19:13:06 +0000 Subject: [PATCH] Don't try to do a get_user_account_by_login with a username longer than 8 characters. This triggers a moira bug. --- clients/moira/lists.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/clients/moira/lists.c b/clients/moira/lists.c index 7bcc4f54..173c3909 100644 --- a/clients/moira/lists.c +++ b/clients/moira/lists.c @@ -374,7 +374,12 @@ char **argv; return(SUB_ERROR); } - if (do_mr_query("get_user_account_by_login", 1, argv + 1, + /* + * If the listname is less than 8 characters, make sure it doesn't + * collide with a username. + */ + if ((strlen(argv[1]) <= 8) && + do_mr_query("get_user_account_by_login", 1, argv + 1, StoreInfo, (char *) &elem) == 0) { Put_message("A user by that name already exists in the database."); Loop(QueueTop(elem), FreeInfo); -- 2.45.1