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 <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
Simon Wilkinson 2011-10-10 22:09:40 +01:00 committed by Derrick Brashear
parent ca8ba7e7a4
commit 7a44988508

View File

@ -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) {