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); free(dfp->jname);
dfp->jname = DragonFlyBSDProcessList_readJailName(dfpl, kproc->kp_jailid); 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 // if there are reapers in the system, process can get reparented anytime
proc->ppid = kproc->kp_ppid; proc->ppid = kproc->kp_ppid;
}
if (proc->st_uid != kproc->kp_uid) { // some processes change users (eg. to lower privs) if (proc->st_uid != kproc->kp_uid) { // some processes change users (eg. to lower privs)
proc->st_uid = kproc->kp_uid; proc->st_uid = kproc->kp_uid;
proc->user = UsersTable_getRef(super->usersTable, proc->st_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); free(fp->jname);
fp->jname = FreeBSDProcessList_readJailName(kproc); fp->jname = FreeBSDProcessList_readJailName(kproc);
} }
if (proc->ppid != kproc->ki_ppid) {
// if there are reapers in the system, process can get reparented anytime // if there are reapers in the system, process can get reparented anytime
proc->ppid = kproc->ki_ppid; proc->ppid = kproc->ki_ppid;
}
if (proc->st_uid != kproc->ki_uid) { if (proc->st_uid != kproc->ki_uid) {
// some processes change users (eg. to lower privs) // some processes change users (eg. to lower privs)
proc->st_uid = kproc->ki_uid; proc->st_uid = kproc->ki_uid;