From 9472bcb33ddbab25d7925c74a164376dc34a9661 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Mon, 10 Oct 2011 22:09:40 +0100 Subject: [PATCH] ptserver: Don't check for noauth before rebuilding The ptserver database building scripts would check to see if the server was running from a bosserver with the noauth flag set before performing a database rebuild. This means that you can't start ptserver normally, and then configure the database using pts -localauth, which is the preferred method for configuring new cells. Remove the check for noauth. This is slightly risky, as it means that a corrupt database could be completely erased upon restart. However, we already check that the dbheader (65k) is entirely blank - which will protect us against any single page corruption errors. Reviewed-on: http://gerrit.openafs.org/5653 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 7a4498850814ea524f55de0b84d6b0ae0b4834bb) Change-Id: I95acbc980537d08a5a06541a75ec5af1ca5bbdd1 Reviewed-on: http://gerrit.openafs.org/5702 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/ptserver/ptutils.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/ptserver/ptutils.c b/src/ptserver/ptutils.c index 5b0895bb3..d2548dbc9 100644 --- a/src/ptserver/ptutils.c +++ b/src/ptserver/ptutils.c @@ -1775,8 +1775,7 @@ Initdb(void) } if (build) { - /* Only rebuild database if the db was deleted (the header is zero) and we - * are running noAuth. */ + /* Only rebuild database if the db was deleted (the header is zero) */ char *bp = (char *)&cheader; int i; for (i = 0; i < sizeof(cheader); i++) { @@ -1787,11 +1786,6 @@ Initdb(void) break; } } - if (!pr_noAuth) { - code = PRDBBAD; - afs_com_err(whoami, code, - "Can't rebuild database because not running NoAuth"); - } } if (code) { -- 2.39.5