diff options
author | Miles Bader <miles@gnu.org> | 1997-09-29 22:12:44 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1997-09-29 22:12:44 +0000 |
commit | 92646194ca1cbde61979e73c7a87f4bb0c80e27c (patch) | |
tree | 69b471ac6154ef78af91809eb4daac29dd5fd098 | |
parent | bf43c2ef08d4689d8eebe576dda1cfd43a628112 (diff) |
(ugids_verify):
Change type of GETPASS_FN arg.
Add GETPASS_HOOK, VERIFY_FN, and VERIFY_HOOK args.
-rw-r--r-- | libshouldbeinlibc/ugids-verify.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/libshouldbeinlibc/ugids-verify.c b/libshouldbeinlibc/ugids-verify.c index b2400bec..f9d45c63 100644 --- a/libshouldbeinlibc/ugids-verify.c +++ b/libshouldbeinlibc/ugids-verify.c @@ -30,15 +30,22 @@ #include "ugids.h" /* Verify that we have the right to the ids in UGIDS, given that we already - possess those in HAVE_UIDS and HAVE_GIDS, asking for passwords (with - GETPASS, which defaults to the standard libc function getpass) where + possess those in HAVE_UIDS and HAVE_GIDS, asking for passwords where necessary. 0 is returned if access should be allowed, otherwise EINVAL if an incorrect password was entered, or an error relating to - resource failure. */ + resource failure. The GETPASS_FN, GETPASS_HOOK, VERIFY_FN, and + VERIFY_HOOK arguments are as for the idvec_verify function (in <idvec.h>). */ error_t ugids_verify (const struct ugids *ugids, const struct idvec *have_uids, const struct idvec *have_gids, - char *(*getpass_fn)(const char *prompt)) + char *(*getpass_fn) (const char *prompt, + uid_t id, int is_group, + void *pwd_or_grp, void *hook), + void *getpass_hook, + error_t (*verify_fn) (const char *password, + uid_t id, int is_group, + void *pwd_or_grp, void *hook), + void *verify_hook) { error_t err; struct idvec check_uids = IDVEC_INIT; /* User-ids to verify. */ @@ -54,7 +61,7 @@ ugids_verify (const struct ugids *ugids, if (! err) err = idvec_verify (&check_uids, &check_gids, have_uids, have_gids, - getpass_fn); + getpass_fn, getpass_hook, verify_fn, verify_hook); idvec_fini (&check_uids); idvec_fini (&check_gids); |