1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-17 15:27:36 +00:00

Open score file and do revoke as early as possible

This commit is contained in:
Andrey A. Chernov 1997-09-24 09:21:55 +00:00
parent d6380c6820
commit 26503debf1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=29797

View File

@ -1569,16 +1569,13 @@ initall()
{
int i;
if (dbfd < 0)
return;
srandomdev();
time(&acctstart);
initdeck(deck);
uid = getuid();
if (uid < 0)
uid = 0;
dbfd = open(_PATH_SCORE, 2);
setegid(getgid());
if (dbfd < 0)
return;
i = lseek(dbfd, uid * sizeof(struct betinfo), 0);
if (i < 0) {
close(dbfd);
@ -1678,6 +1675,11 @@ main(argc, argv)
int argc;
char *argv[];
{
dbfd = open(_PATH_SCORE, 2);
/* revoke */
setgid(getgid());
#ifdef MAXLOAD
double vec[3];