- Remove an early KSE diagnostic panic. The thread pointer here is always
curthread. - We don't need Giant to do suser() checks now, so don't lock Giant until after the check.
This commit is contained in:
parent
0042d709b8
commit
16e7bc7b90
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=94301
@ -119,14 +119,12 @@ acct(td, uap)
|
||||
struct nameidata nd;
|
||||
int error, flags;
|
||||
|
||||
mtx_lock(&Giant);
|
||||
if (td != curthread)
|
||||
panic("acct"); /* XXXKSE DIAGNOSTIC */
|
||||
/* Make sure that the caller is root. */
|
||||
error = suser(td);
|
||||
if (error)
|
||||
goto done2;
|
||||
return (error);
|
||||
|
||||
mtx_lock(&Giant);
|
||||
/*
|
||||
* If accounting is to be started to a file, open that file for
|
||||
* writing and make sure it's a 'normal'.
|
||||
|
Loading…
Reference in New Issue
Block a user