Fix grantpt basename namespace bug
Commit Message
Commit cf06a4e3 removed test-xfail-POSIX2008/unistd.h/linknamespace, but
left one basename namespace issue in grantpt. However this issue is not
visible with the default configuration buy only when configure is passed
the --enable-pt_chown option.
---
ChangeLog | 5 +++++
sysdeps/unix/grantpt.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
Comments
On 12/04/2015 02:54 PM, Aurelien Jarno wrote:
> Commit cf06a4e3 removed test-xfail-POSIX2008/unistd.h/linknamespace, but
> left one basename namespace issue in grantpt. However this issue is not
> visible with the default configuration buy only when configure is passed
> the --enable-pt_chown option.
Let's remove that option instead. Do you want to send a patch?
Florian
On 2015-12-04 15:18, Florian Weimer wrote:
> On 12/04/2015 02:54 PM, Aurelien Jarno wrote:
> > Commit cf06a4e3 removed test-xfail-POSIX2008/unistd.h/linknamespace, but
> > left one basename namespace issue in grantpt. However this issue is not
> > visible with the default configuration buy only when configure is passed
> > the --enable-pt_chown option.
>
> Let's remove that option instead. Do you want to send a patch?
It will break GNU/Hurd.
On 12/04/2015 03:43 PM, Aurelien Jarno wrote:
> On 2015-12-04 15:18, Florian Weimer wrote:
>> On 12/04/2015 02:54 PM, Aurelien Jarno wrote:
>>> Commit cf06a4e3 removed test-xfail-POSIX2008/unistd.h/linknamespace, but
>>> left one basename namespace issue in grantpt. However this issue is not
>>> visible with the default configuration buy only when configure is passed
>>> the --enable-pt_chown option.
>>
>> Let's remove that option instead. Do you want to send a patch?
>
> It will break GNU/Hurd.
Okay, in this case the original patch is fine.
Florian
@@ -1,3 +1,8 @@
+2015-12-04 Aurelien Jarno <aurelien@aurel32.net>
+
+ * sysdeps/unix/grantpt.c (grantpt): Call__basename instead of
+ basename.
+
2015-12-03 Chris Metcalf <cmetcalf@ezchip.com>
* sysdeps/arm/math_private.h (LDBL_CLASSIFY_COMPAT): New symbol.
@@ -195,7 +195,7 @@ grantpt (int fd)
CLOSE_ALL_FDS ();
# endif
- execle (_PATH_PT_CHOWN, basename (_PATH_PT_CHOWN), NULL, NULL);
+ execle (_PATH_PT_CHOWN, __basename (_PATH_PT_CHOWN), NULL, NULL);
_exit (FAIL_EXEC);
}
else