Project

General

Profile

Actions

Bug #5375

closed

utmpd(1M) core dumps when WTMPX_UPDATE_FREQ is zero

Added by Marcel Telka over 8 years ago. Updated about 8 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:
External Bug:

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 #1

Updated by Shruti Sampat over 8 years ago

  • Assignee set to Shruti Sampat
Actions #2

Updated by Shruti Sampat about 8 years ago

  • Status changed from New to In Progress
Actions #3

Updated by Electric Monk about 8 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 0d435d6202242b0a06dc4bc41a1117591a9405f8

commit  0d435d6202242b0a06dc4bc41a1117591a9405f8
Author: Shruti Sampat <shrutisampat@gmail.com>
Date:   2015-01-13T18:15:35.000Z

    5375 utmpd(1M) core dumps when WTMPX_UPDATE_FREQ is zero
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Marcel Telka <marcel@telka.sk>
    Approved by: Dan McDonald <danmcd@omniti.com>

Actions

Also available in: Atom PDF