view doc/glibc-functions/getpass.texi @ 12280:39be377f1765

getgroups: don't expose GETGROUPS_T to user These days, most systems already declare getgroups with gid_t*. But in the rare case that GETGROUPS_T is still int but gid_t is short, the user should not have to uglify their code; let the replacement hide all the magic. Tested by configuring with ac_cv_type_getgroups=uint64_t on a platform with 32-bit gid_t, and ignoring compiler warnings. However, since we don't replace setgroups, the GETGROUPS_T workaround is still needed there for now. * lib/getgroups.c (rpl_getgroups): Change signature. Copy array an element at a time if GETGROUPS_T is wrong size. * lib/getugroups.h (getugroups): Change signature. * lib/unistd.in.h (getgroups): Likewise. * m4/getgroups.m4 (gl_FUNC_GETGROUPS): Use replacement if signature needs fixing. * m4/getugroups.m4 (gl_GETUGROUPS): No longer need AC_TYPE_GETGROUPS. * modules/group-member (Depends-on): Add getgroups. * lib/group-member.c (group_info, get_group_info): Use gid_t. (group_member): Rely on getgroups replacement. * lib/getugroups.c (getugroups): Use gid_t. * tests/test-getgroups.c (main): Likewise. * NEWS: Mention the signature change. * doc/posix-functions/getgroups.texi (getgroups): Mention the problem with signature. * doc/glibc-functions/setgroups.texi (setgroups): Mention that GETGROUPS_T is still useful for setgroups. Signed-off-by: Eric Blake <ebb9@byu.net>
author Eric Blake <ebb9@byu.net>
date Thu, 12 Nov 2009 10:19:39 -0700
parents 03b96a68253f
children 3bbfc7e37ec2
line wrap: on
line source

@node getpass
@subsection @code{getpass}
@findex getpass

Gnulib module: getpass or getpass-gnu

Portability problems fixed by either Gnulib module @code{getpass} or @code{getpass-gnu}:
@itemize
@item
This function is missing on some platforms:
mingw, BeOS.
@end itemize

Portability problems fixed by Gnulib module @code{getpass-gnu}:
@itemize
@item
The returned password is truncated to PASS_MAX characters on some platforms:
MacOS X 10.5 (128), FreeBSD 6.2 (128), NetBSD 3.0 (128), OpenBSD 4.0 (128), AIX 5.1 (32), HP-UX 11 (8), IRIX 6.5 (32), OSF/1 5.1 (80), Solaris 10 (8, even less than PASS_MAX), Cygwin (128).
The gnulib implementation returns the password untruncated.
@end itemize

Portability problems not fixed by Gnulib:
@itemize
@end itemize