From 7a4498850814ea524f55de0b84d6b0ae0b4834bb 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. Change-Id: I45dbb53d7f80b0b307f88941cb1e061967fcac81 Reviewed-on: http://gerrit.openafs.org/5653 Tested-by: Simon Wilkinson Reviewed-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 0c26cb4680..15af3f4df4 100644 --- a/src/ptserver/ptutils.c +++ b/src/ptserver/ptutils.c @@ -1768,8 +1768,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++) { @@ -1780,11 +1779,6 @@ Initdb(void) break; } } - if (!pr_noAuth) { - code = PRDBBAD; - afs_com_err(whoami, code, - "Can't rebuild database because not running NoAuth"); - } } if (code) {