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