Project

General

Profile

Actions

Bug #5375

closed

utmpd(1M) core dumps when WTMPX_UPDATE_FREQ is zero

Added by Marcel Telka almost 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2014-11-28
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

The utmpd(1M) core dumps when WTMPX_UPDATE_FREQ is zero here (division by zero):

377    for (i = 0; i < (timeout / WTMPX_ufreq); i++) {

The WTMPX_ufreq is set from WTMPX_UPDATE_FREQ here:

220        if ((defp = defread("WTMPX_UPDATE_FREQ=")) != NULL) {
221            WTMPX_ufreq = atol(defp);
222            dprintf(("WTMPX update frequency set to %d\\n",
223                WTMPX_ufreq));
224        }

Steps to reproduce:

echo WTMPX_UPDATE_FREQ=0 >> /etc/default/utmpd
svcadm restart svc:/system/utmp:default
Actions

Also available in: Atom PDF