diff options
author | Steve Langasek <steve.langasek@ubuntu.com> | 2019-01-03 21:22:21 -0800 |
---|---|---|
committer | Steve Langasek <steve.langasek@ubuntu.com> | 2019-01-03 21:22:45 -0800 |
commit | 795badba7f95e737f979917859cd32c9bd47bcad (patch) | |
tree | 212a6a00baa11e9d0ca7bc27b12420d1dce6f07c /libpam/pam_modutil_getgrnam.c | |
parent | c55c14c5c6762139ec6695d84ea0e2e917da5264 (diff) | |
parent | ba315ae8effdcad591608c99452dad05c4cf20ab (diff) | |
download | pam-795badba7f95e737f979917859cd32c9bd47bcad.tar.gz pam-795badba7f95e737f979917859cd32c9bd47bcad.tar.bz2 pam-795badba7f95e737f979917859cd32c9bd47bcad.zip |
New upstream version 1.1.8
Diffstat (limited to 'libpam/pam_modutil_getgrnam.c')
-rw-r--r-- | libpam/pam_modutil_getgrnam.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libpam/pam_modutil_getgrnam.c b/libpam/pam_modutil_getgrnam.c index 2f11b1e5..cbb1551d 100644 --- a/libpam/pam_modutil_getgrnam.c +++ b/libpam/pam_modutil_getgrnam.c @@ -1,5 +1,5 @@ /* - * $Id: pam_modutil_getgrnam.c,v 1.3 2008/05/14 12:55:02 t8m Exp $ + * $Id$ * * This function provides a thread safer version of getgrnam() for use * with PAM modules that care about this sort of thing. @@ -16,7 +16,7 @@ #include <stdlib.h> static int intlen(int number) -{ +{ int len = 2; while (number != 0) { number /= 10; @@ -62,7 +62,7 @@ pam_modutil_getgrnam(pam_handle_t *pamh, const char *group) int i; data_name = malloc(strlen("_pammodutil_getgrnam") + 1 + - strlen(group) + 1 + intlen(INT_MAX) + 1); + strlen(group) + 1 + intlen(INT_MAX) + 1); if ((pamh != NULL) && (data_name == NULL)) { D(("was unable to register the data item [%s]", pam_strerror(pamh, status))); @@ -103,7 +103,7 @@ pam_modutil_getgrnam(pam_handle_t *pamh, const char *group) /* no sense in repeating the call */ break; } - + length <<= PWD_LENGTH_SHIFT; } while (length < PWD_ABSURD_PWD_LENGTH); @@ -120,7 +120,7 @@ pam_modutil_getgrnam(pam_handle_t *pamh, const char *group) * Sorry, there does not appear to be a reentrant version of * getgrnam(). So, we use the standard libc function. */ - + return getgrnam(group); #endif /* def HAVE_GETGRNAM_R */ |