aboutsummaryrefslogtreecommitdiff
path: root/ChangeLog
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2017-09-04 17:07:16 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2017-09-08 16:33:39 +0200
commitffca890177bbf0980b66bc3a6d4d25c481957348 (patch)
treed8089db57032126b04c27cee659c90e0eea7e995 /ChangeLog
parent5a79f97554af6f2eb0a654f844b3d1f56937064d (diff)
downloadglibc-ffca890177bbf0980b66bc3a6d4d25c481957348.zip
glibc-ffca890177bbf0980b66bc3a6d4d25c481957348.tar.gz
glibc-ffca890177bbf0980b66bc3a6d4d25c481957348.tar.bz2
posix: fix glob bugs with long login names
Current glob implementation allows unlimited user name for home directory construction on GLOB_TILDE case. To accomplish it glob either construct a name on stack if size are small enough (based on current alloca_used) or in heap otherwise. This patch simplifies storage allocation by using the same scratch buffer for both get_rlogin_r and getpwnam_r. This also syncs with gnulib commit 064df0b (glob: fix bugs with long login names). Checked on x86_64-linux-gnu and on a build using build-many-glibcs.py for all major architectures. * posix/glob.c (GET_LOGIN_NAME_MAX): Remove. (glob): Use the same scratch buffer for both getlogin_r and getpwnam_r. Don’t require preallocation of the login name. This simplifies storage allocation, and corrects the handling of long login names.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog7
1 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 39d1235..4c9334e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,13 @@
2017-09-08 Adhemerval Zanella <adhemerval.zanella@linaro.org>
[BZ #1062]
+ * posix/glob.c (GET_LOGIN_NAME_MAX): Remove.
+ (glob): Use the same scratch buffer for both getlogin_r and
+ getpwnam_r. Don’t require preallocation of the login name. This
+ simplifies storage allocation, and corrects the handling of
+ long login names.
+
+ [BZ #1062]
* posix/glob.c (glob): Port recent patches to platforms
lacking getpwnam_r.
(glob): Fix longstanding misuse of errno after getpwnam_r, which