RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1741516 - glibc: Add nonstring attributes to <utmp.h>, <utmpx.h>
Summary: glibc: Add nonstring attributes to <utmp.h>, <utmpx.h>
Keywords:
Status: CLOSED DUPLICATE of bug 1749439
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: glibc
Version: 8.1
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: 8.2
Assignee: glibc team
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks: 1741515
TreeView+ depends on / blocked
 
Reported: 2019-08-15 11:04 UTC by Florian Weimer
Modified: 2023-07-18 14:30 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1741515
Environment:
Last Closed: 2019-11-07 16:23:28 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Florian Weimer 2019-08-15 11:04:36 UTC
+++ This bug was initially created as a clone of Bug #1741515 +++

This file should compile without warnings using -O2 -Wall, using GCC 9 (or later):

#include <string.h>
#include <utmp.h>
#include <utmpx.h>

void
write_utmp (struct utmp *p, const char *data)
{
  strncpy (p->ut_line, data, sizeof (p->ut_line));
  strncpy (p->ut_id, data, sizeof (p->ut_id));
  strncpy (p->ut_user, data, sizeof (p->ut_user));
  strncpy (p->ut_host, data, sizeof (p->ut_host));
}

void
write_utmpx (struct utmpx *p, const char *data)
{
  strncpy (p->ut_line, data, sizeof (p->ut_line));
  strncpy (p->ut_id, data, sizeof (p->ut_id));
  strncpy (p->ut_user, data, sizeof (p->ut_user));
  strncpy (p->ut_host, data, sizeof (p->ut_host));
}

Since the suppression of warnings in system headers is not effective here, I think we should backport the upstream fixes to support GCC Toolset 9 and later.

Comment 1 Florian Weimer 2019-11-07 16:23:28 UTC
The fix for this issue will naturally be part of bug 1749439.

*** This bug has been marked as a duplicate of bug 1749439 ***


Note You need to log in before you can comment on or make changes to this bug.