diff options
author | Florian Weimer <fweimer@redhat.com> | 2019-08-15 16:09:43 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2019-08-15 16:09:43 +0200 |
commit | c2adefbafcdd2519ff43eca6891c77cd7b29ab62 (patch) | |
tree | 44ad3044ceb469239af4c1fb1bf3ca0335454f95 /sysdeps/gnu/bits/utmpx.h | |
parent | 0d5b2917530ccaf8ad312dfbb7bce69d569c23ad (diff) | |
download | glibc-c2adefbafcdd2519ff43eca6891c77cd7b29ab62.tar.gz glibc-c2adefbafcdd2519ff43eca6891c77cd7b29ab62.tar.xz glibc-c2adefbafcdd2519ff43eca6891c77cd7b29ab62.zip |
login: Add nonstring attributes to struct utmp, struct utmpx [BZ #24899]
Commit 7532837d7b03b3ca5b9a63d77a5bd81dd23f3d9c ("The -Wstringop-truncation option new in GCC 8 detects common misuses") added __attribute_nonstring__ to bits/utmp.h, but it did not update the parallel bits/utmpx.h header. In struct utmp, the nonstring attribute for ut_id was missing.
Diffstat (limited to 'sysdeps/gnu/bits/utmpx.h')
-rw-r--r-- | sysdeps/gnu/bits/utmpx.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sysdeps/gnu/bits/utmpx.h b/sysdeps/gnu/bits/utmpx.h index 472a7d57d3..2beadbf587 100644 --- a/sysdeps/gnu/bits/utmpx.h +++ b/sysdeps/gnu/bits/utmpx.h @@ -56,10 +56,14 @@ struct utmpx { short int ut_type; /* Type of login. */ __pid_t ut_pid; /* Process ID of login process. */ - char ut_line[__UT_LINESIZE]; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ - char ut_user[__UT_NAMESIZE]; /* Username. */ - char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */ + char ut_line[__UT_LINESIZE] + __attribute_nonstring__; /* Devicename. */ + char ut_id[4] + __attribute_nonstring__; /* Inittab ID. */ + char ut_user[__UT_NAMESIZE] + __attribute_nonstring__; /* Username. */ + char ut_host[__UT_HOSTSIZE] + __attribute_nonstring__; /* Hostname for remote login. */ struct __exit_status ut_exit; /* Exit status of a process marked as DEAD_PROCESS. */ |