Bug 118481

Summary: don't extern strlcpy if __USE_MISC defined
Product: Tools Reporter: Konstantin A. Lepikhov (lakostis)
Component: OtherAssignee: Tools.Other (tools_other)
Status: RESOLVED CODE_FIX    
Severity: normal CC: evg, lav, m.novosyolov
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.12 Subsystem:
Regression: No Bisected commit-id:
Attachments: Possible fix

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?