This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/2] linux ttyname: return link if appropriate
- From: Serge Hallyn <serge dot hallyn at ubuntu dot com>
- To: libc-alpha at sourceware dot org, Serge Hallyn <serge dot hallyn at ubuntu dot com>
- Date: Mon, 18 Apr 2016 20:23:01 +0000
- Subject: Re: [PATCH 1/2] linux ttyname: return link if appropriate
- Authentication-results: sourceware.org; auth=none
- References: <20160415152929 dot GA7932 at ubuntumail> <5711165D dot 5040902 at redhat dot com> <20160415164652 dot GE8450 at ubuntumail> <57111F9C dot 8030902 at redhat dot com> <20160415174245 dot GA9610 at ubuntumail> <20160415184746 dot GA10830 at ubuntumail> <20160415195938 dot GP6588 at vapier dot lan> <20160418195318 dot GB30476 at ubuntumail> <20160418200222 dot GY5369 at vapier dot lan>
Quoting Mike Frysinger (vapier@gentoo.org):
> On 18 Apr 2016 19:53, Serge Hallyn wrote:
> > + strcpy (ttyname_buf, procname);
> > + return ttyname_buf;
>
> at this point you could just write:
> return strcpy (ttyname_buf, procname);
Yup.
I can send another patch (squashed), but I'm sort of waiting
for Florian's answer about security concerns.