aboutsummaryrefslogtreecommitdiff
path: root/libshouldbeinlibc/idvec-verify.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix password checking with as-needed linkingSamuel Thibault2019-09-011-8/+7
| | | | | | | | | | | | | | | Newer gcc toolchains tend to enable as-needed by default, so runtime detection of libcrypt will fail. We can just explicitly link against libcrypt anyway. * configure.ac: Check for `crypt()' in libcrypt. * config.make.in: Substitute HAVE_LIBCRYPT. * libshouldbeinlibc/idvec-verify.c: Include <crypt.h> only when libcrypt is available. Replace weak reference with explicit call and fallback macro. * utils/x.c: Likewise. * libshouldbeinlibc/Makefile (LDLIBS): Add -lcrypt when libcrypt is available.
* Use our own variant of 'assert' and 'assert_perror'.Justus Winter2017-08-051-2/+2
| | | | | Our variants print stack traces on failures. This will make locating errors much easier.
* Add missing null checks in libshouldbeinlibcJames Clarke2015-10-051-3/+4
| | | | | | | | | | | | The getpwnam_r and similar functions only return non-zero on error, but not finding the given name/UID/GID does not count as an error. When they return 0, the value of the result (*result when looking at the arguments in the man pages) still needs to be checked for null. * libshouldbeinlibc/idvec-rep.c (lookup_uid): Check result for null. (lookup_gid): Likewise. * libshouldbeinlibc/idvec-verify.c (verify_passwd): Likewise. (verify_id): Likewise.
* Address gcc warningsBob Ham2012-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | * exec-reauth.c (exec_reauth): Change type of temp var i to unsigned int to address gcc warning. * idvec-impgids.c (idvec_merge_implied_gids) Change type of temp var i to unsigned int to address gcc warning. * idvec-impgids.c (idvec_merge_implied_gids): Change type of temp var i to unsigned int to address gcc warning. * idvec-rep.c (idvec_rep): Change type of temp var i to unsigned int to address gcc warning. * idvec-verify (idvec_verify): Change type of temp var i to unsigned int to address gcc warning. * idvec.c (idvec_merge_ids, idvec_remove): Change type of temp var i to unsigned int to address gcc warning. * portxlate.c (port_name_xlator_create, port_name_xlator_free): Change type of temp var i to unsigned int to address gcc warning. * timefmt.c (fmt_seconds): Cast width to int in test to modify frac_places to address gcc warning. * (ugids_verify_make_auth): Change type of temp var i to unsigned int to address gcc warning.
* Update copyright years.Thomas Schwinge2008-07-011-1/+2
|
* 2008-03-16 Samuel Thibault <samuel.thibault@ens-lyon.org>Samuel Thibault2008-03-161-1/+1
| | | | | | * idvec-verify.c (verify_id): Compare id to (uid_t) -1 instead of checking that is is positive or nul (which is always true). Reported by Marc-Olivier Mercier <mercier.m@sympatico.ca>.
* I am reverting this change.Marcus Brinkmann2003-08-061-3/+10
|
* 2003-08-06 Jeroen Dekkers <jeroen@dekkers.cx>Marcus Brinkmann2003-08-061-10/+3
| | | | | * idvec-verify.c: Remove #pragma weak crypt. (verify_passwd): Don't check if crypt exist.
* 2003-08-03 Marco Gerards <metgerards@student.han.nl>Marcus Brinkmann2003-08-051-1/+1
| | | | | * idvec-verify.c: Include <crypt.h>. (crypt): Removed prototype.
* 2002-05-08 Roland McGrath <roland@frob.com>Roland McGrath2002-05-081-5/+4
| | | | * idvec-verify.c (verify_passwd): Cast to intptr_t before int.
* 1999-05-23 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-05-241-19/+34
| | | | | | | | | | * idvec-verify.c (SHADOW_PASSWORD_STRING): New macro. (verify_id): Check for shadow password immediately after getpwuid_r call, and replace PW->pw_passwd pointer with SP->sp_pwdp. This is ok since the only use will be later in the function, and we give the lookup buffer function scope. (verify_passwd): Don't call CHECK_SHADOW for main passwd, only when rechecking for wheel-group hack.
* 1999-05-20 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-05-201-8/+29
| | | | | * idvec-verify.c (verify_passwd): Avoid nonreentrant getpwuid. If pw_passwd is "x", use getspnam_r and use its sp_pwdp if it succeeds.
* 1998-12-21 Mark Kettenis <kettenis@phys.uva.nl>Thomas Bushnell1999-04-261-5/+8
| | | | | | | | | | | | | * ugids-verify-auth.c: Include <hurd/password.h> again and remove temporary definitions of password_check_user and password_check_group. 1998-11-29 Mark Kettenis <kettenis@phys.uva.nl> * idvec-verify.c (verify_passwd): Grant access when the password in the passwd DB is empty. (verify_id): Also call verify_fn when the password in the password DB is empty.
* Add braces to silence gcc warnings.Roland McGrath1998-10-201-21/+25
|
* (verify_id):Miles Bader1997-09-291-51/+145
| | | | | | | | | | | | Change type of GETPASS_FN arg. Add GETPASS_HOOK, VERIFY_FN, and VERIFY_HOOK args. Remove WHEEL_UID arg. Use VERIFY_FN & VERIFY_HOOK instead of doing password comparison ourselves. (verify_passwd, get_passwd): New functions. (idvec_verify): Change type of GETPASS_FN arg. Add GETPASS_HOOK, VERIFY_FN, and VERIFY_HOOK args & use them.
* (idvec_verify):Miles Bader1997-05-291-12/+22
| | | | Fix detection of multiple ids.
* Initial checkinMiles Bader1997-05-271-0/+215