5f7b84
commit c2adefbafcdd2519ff43eca6891c77cd7b29ab62
5f7b84
Author: Florian Weimer <fweimer@redhat.com>
5f7b84
Date:   Thu Aug 15 16:09:43 2019 +0200
5f7b84
5f7b84
    login: Add nonstring attributes to struct utmp, struct utmpx [BZ #24899]
5f7b84
    
5f7b84
    Commit 7532837d7b03b3ca5b9a63d77a5bd81dd23f3d9c ("The
5f7b84
    -Wstringop-truncation option new in GCC 8 detects common misuses")
5f7b84
    added __attribute_nonstring__ to bits/utmp.h, but it did not update
5f7b84
    the parallel bits/utmpx.h header.  In struct utmp, the nonstring
5f7b84
    attribute for ut_id was missing.
5f7b84
5f7b84
diff --git a/bits/utmp.h b/bits/utmp.h
5f7b84
index 3c02dd4f3fe4e99b..854b342164b785e0 100644
5f7b84
--- a/bits/utmp.h
5f7b84
+++ b/bits/utmp.h
5f7b84
@@ -61,7 +61,8 @@ struct utmp
5f7b84
   pid_t ut_pid;			/* Process ID of login process.  */
5f7b84
   char ut_line[UT_LINESIZE]
5f7b84
     __attribute_nonstring__;	/* Devicename.  */
5f7b84
-  char ut_id[4];		/* Inittab ID.  */
5f7b84
+  char ut_id[4]
5f7b84
+    __attribute_nonstring__;	/* Inittab ID.  */
5f7b84
   char ut_user[UT_NAMESIZE]
5f7b84
     __attribute_nonstring__;	/* Username.  */
5f7b84
   char ut_host[UT_HOSTSIZE]
5f7b84
diff --git a/sysdeps/gnu/bits/utmpx.h b/sysdeps/gnu/bits/utmpx.h
5f7b84
index 2a77efc607ae2ac0..71c743ebfcd41194 100644
5f7b84
--- a/sysdeps/gnu/bits/utmpx.h
5f7b84
+++ b/sysdeps/gnu/bits/utmpx.h
5f7b84
@@ -56,10 +56,14 @@ struct utmpx
5f7b84
 {
5f7b84
   short int ut_type;		/* Type of login.  */
5f7b84
   __pid_t ut_pid;		/* Process ID of login process.  */
5f7b84
-  char ut_line[__UT_LINESIZE];	/* Devicename.  */
5f7b84
-  char ut_id[4];		/* Inittab ID. */
5f7b84
-  char ut_user[__UT_NAMESIZE];	/* Username.  */
5f7b84
-  char ut_host[__UT_HOSTSIZE];	/* Hostname for remote login.  */
5f7b84
+  char ut_line[__UT_LINESIZE]
5f7b84
+    __attribute_nonstring__;	/* Devicename.  */
5f7b84
+  char ut_id[4]
5f7b84
+    __attribute_nonstring__;	/* Inittab ID.  */
5f7b84
+  char ut_user[__UT_NAMESIZE]
5f7b84
+    __attribute_nonstring__;	/* Username.  */
5f7b84
+  char ut_host[__UT_HOSTSIZE]
5f7b84
+    __attribute_nonstring__;	/* Hostname for remote login.  */
5f7b84
   struct __exit_status ut_exit;	/* Exit status of a process marked
5f7b84
 				   as DEAD_PROCESS.  */
5f7b84
 
5f7b84
diff --git a/sysdeps/unix/sysv/linux/s390/bits/utmp.h b/sysdeps/unix/sysv/linux/s390/bits/utmp.h
5f7b84
index b3fa362f478ae6fe..82e8d17e2e8cc031 100644
5f7b84
--- a/sysdeps/unix/sysv/linux/s390/bits/utmp.h
5f7b84
+++ b/sysdeps/unix/sysv/linux/s390/bits/utmp.h
5f7b84
@@ -61,7 +61,8 @@ struct utmp
5f7b84
   pid_t ut_pid;			/* Process ID of login process.  */
5f7b84
   char ut_line[UT_LINESIZE]
5f7b84
      __attribute_nonstring__;	/* Devicename.  */
5f7b84
-  char ut_id[4];		/* Inittab ID.  */
5f7b84
+  char ut_id[4]
5f7b84
+    __attribute_nonstring__;	/* Inittab ID.  */
5f7b84
   char ut_user[UT_NAMESIZE]
5f7b84
      __attribute_nonstring__;	/* Username.  */
5f7b84
   char ut_host[UT_HOSTSIZE]
5f7b84
diff --git a/sysdeps/unix/sysv/linux/s390/bits/utmpx.h b/sysdeps/unix/sysv/linux/s390/bits/utmpx.h
5f7b84
index 3d3036c3b91e6f57..3818ed3aa4df1e65 100644
5f7b84
--- a/sysdeps/unix/sysv/linux/s390/bits/utmpx.h
5f7b84
+++ b/sysdeps/unix/sysv/linux/s390/bits/utmpx.h
5f7b84
@@ -56,10 +56,14 @@ struct utmpx
5f7b84
 {
5f7b84
   short int ut_type;		/* Type of login.  */
5f7b84
   __pid_t ut_pid;		/* Process ID of login process.  */
5f7b84
-  char ut_line[__UT_LINESIZE];	/* Devicename.  */
5f7b84
-  char ut_id[4];		/* Inittab ID. */
5f7b84
-  char ut_user[__UT_NAMESIZE];	/* Username.  */
5f7b84
-  char ut_host[__UT_HOSTSIZE];	/* Hostname for remote login.  */
5f7b84
+  char ut_line[__UT_LINESIZE]
5f7b84
+    __attribute_nonstring__;	/* Devicename.  */
5f7b84
+  char ut_id[4]
5f7b84
+    __attribute_nonstring__;	/* Inittab ID.  */
5f7b84
+  char ut_user[__UT_NAMESIZE]
5f7b84
+    __attribute_nonstring__;	/* Username.  */
5f7b84
+  char ut_host[__UT_HOSTSIZE]
5f7b84
+    __attribute_nonstring__;	/* Hostname for remote login.  */
5f7b84
   struct __exit_status ut_exit;	/* Exit status of a process marked
5f7b84
 				   as DEAD_PROCESS.  */
5f7b84