No need to check for change when no action is required

This commit is contained in:
Benny Baumann 2020-11-22 00:55:42 +01:00 committed by Christian Göttsche
parent 98943d595e
commit 3cb96f1a36
2 changed files with 4 additions and 7 deletions

View File

@ -429,9 +429,8 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
free(dfp->jname);
dfp->jname = DragonFlyBSDProcessList_readJailName(dfpl, kproc->kp_jailid);
}
if (proc->ppid != kproc->kp_ppid) { // if there are reapers in the system, process can get reparented anytime
proc->ppid = kproc->kp_ppid;
}
// if there are reapers in the system, process can get reparented anytime
proc->ppid = kproc->kp_ppid;
if (proc->st_uid != kproc->kp_uid) { // some processes change users (eg. to lower privs)
proc->st_uid = kproc->kp_uid;
proc->user = UsersTable_getRef(super->usersTable, proc->st_uid);

View File

@ -527,10 +527,8 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
free(fp->jname);
fp->jname = FreeBSDProcessList_readJailName(kproc);
}
if (proc->ppid != kproc->ki_ppid) {
// if there are reapers in the system, process can get reparented anytime
proc->ppid = kproc->ki_ppid;
}
// if there are reapers in the system, process can get reparented anytime
proc->ppid = kproc->ki_ppid;
if (proc->st_uid != kproc->ki_uid) {
// some processes change users (eg. to lower privs)
proc->st_uid = kproc->ki_uid;