diff options
author | Thorsten Kukuk <kukuk@thkukuk.de> | 2005-04-29 11:59:56 +0000 |
---|---|---|
committer | Thorsten Kukuk <kukuk@thkukuk.de> | 2005-04-29 11:59:56 +0000 |
commit | dd2fcb2e8c9d714d6c35de631b959695855875a0 (patch) | |
tree | f376ab2ccc6c272f52fce8364dab1eb3174df36c /modules/pam_group | |
parent | b808b3cd81f4beab1985b1ad821e188c44582cbd (diff) | |
download | pam-dd2fcb2e8c9d714d6c35de631b959695855875a0.tar.gz pam-dd2fcb2e8c9d714d6c35de631b959695855875a0.tar.bz2 pam-dd2fcb2e8c9d714d6c35de631b959695855875a0.zip |
Relevant BUGIDs: none
Purpose of commit: bugfix
Commit summary:
---------------
Fix some compiler warnings
Diffstat (limited to 'modules/pam_group')
-rw-r--r-- | modules/pam_group/pam_group.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/modules/pam_group/pam_group.c b/modules/pam_group/pam_group.c index 71120921..548edf3a 100644 --- a/modules/pam_group/pam_group.c +++ b/modules/pam_group/pam_group.c @@ -36,11 +36,11 @@ static const char rcsid[] = #define PAM_GROUP_BUFLEN 1000 #define FIELD_SEPARATOR ';' /* this is new as of .02 */ -#ifdef TRUE -# undef TRUE -#endif -#ifdef FALSE -# undef FALSE +#ifdef TRUE +# undef TRUE +#endif +#ifdef FALSE +# undef FALSE #endif typedef enum { FALSE, TRUE } boolean; @@ -140,7 +140,7 @@ static int read_field(int fd, char **buf, int *from, int *to) fd = -1; /* end of file reached */ } else *to += i; - + /* * contract the buffer. Delete any comments, and replace all * multiple spaces with single commas @@ -630,7 +630,11 @@ static int check_account(pam_handle_t *pamh, const char *service, if (no_grps > 0) { grps = calloc( blk_size(no_grps) , sizeof(gid_t) ); D(("copying current list into grps [%d big]",blk_size(no_grps))); - (void) getgroups(no_grps, grps); + if (getgroups(no_grps, grps) < 0) { + D(("getgroups call failed")); + no_grps = 0; + grps = NULL; + } #ifdef DEBUG { int z; |