Bug 118481 - don't extern strlcpy if __USE_MISC defined
Summary: don't extern strlcpy if __USE_MISC defined
Status: RESOLVED CODE_FIX
Alias: None
Product: Tools
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Tools.Other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-19 09:09 UTC by Konstantin A. Lepikhov
Modified: 2020-03-24 21:59 UTC (History)
3 users (show)

See Also:
Kernel Version: 4.12
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Possible fix (1.02 KB, application/octet-stream)
2016-05-19 09:09 UTC, Konstantin A. Lepikhov
Details

Description Konstantin A. Lepikhov 2016-05-19 09:09:46 UTC
Created attachment 216711 [details]
Possible fix

Despite of strlcpy still planned for glibc[1], let's catch this case for extra safety.

Apparently, some distributions have this already[2]. I know that we can't make it right here and right now, but at least we need to fix libcmd somehow to prevent this problem in the future. Maybe make an entry in uapi/linux/libc-compat.h?

1. https://sourceware.org/ml/libc-alpha/2016-01/msg00205.html
2. https://bugzilla.altlinux.org/32108

Attaching possible fix for this, not ideal, but it works for me.
Comment 1 Konstantin A. Lepikhov 2016-05-19 09:13:27 UTC
Another iteration for strlcpy inclusion - https://sourceware.org/ml/libc-alpha/2016-05/msg00369.html
Comment 2 Mikhail Novosyolov 2020-03-14 11:00:14 UTC
Commit 6c4798d3f08b81c2c52936b10e0fa872590c96ae "tools lib: Fix builds when glibc contains strlcpy()" reports to have fix fixed this bug.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6c4798d3f08b81c2c52936b10e0fa872590c96ae

"Resolves: https://bugzilla.kernel.org/show_bug.cgi?id=118481"

Why is this bug still openned?
Comment 3 Konstantin A. Lepikhov 2020-03-24 21:59:56 UTC
(In reply to Mikhail Novosyolov from comment #2)
> Commit 6c4798d3f08b81c2c52936b10e0fa872590c96ae "tools lib: Fix builds when
> glibc contains strlcpy()" reports to have fix fixed this bug.
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/
> ?id=6c4798d3f08b81c2c52936b10e0fa872590c96ae
> 
> "Resolves: https://bugzilla.kernel.org/show_bug.cgi?id=118481"
> 
> Why is this bug still openned?

Because nobody asked to close, right?

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