diff options
author | Thorsten Kukuk <kukuk@thkukuk.de> | 2006-06-16 06:35:16 +0000 |
---|---|---|
committer | Thorsten Kukuk <kukuk@thkukuk.de> | 2006-06-16 06:35:16 +0000 |
commit | 08af548ce20b85b0c269672a841016866d8b4267 (patch) | |
tree | 783b4a6308b59452d087436a2d08275f71a71ed9 /modules/pam_group | |
parent | 07140990580262cbdfff9cc2134ae34865c887a2 (diff) | |
download | pam-08af548ce20b85b0c269672a841016866d8b4267.tar.gz pam-08af548ce20b85b0c269672a841016866d8b4267.tar.bz2 pam-08af548ce20b85b0c269672a841016866d8b4267.zip |
Relevant BUGIDs:
Purpose of commit: cleanup
Commit summary:
---------------
2006-06-16 Thorsten Kukuk <kukuk@thkukuk.de>
* modules/pam_time/pam_time.c: Replace type boolean with int.
* modules/pam_group/pam_group.c: Likewise.
Diffstat (limited to 'modules/pam_group')
-rw-r--r-- | modules/pam_group/pam_group.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/modules/pam_group/pam_group.c b/modules/pam_group/pam_group.c index dd0bfcce..1dc329ef 100644 --- a/modules/pam_group/pam_group.c +++ b/modules/pam_group/pam_group.c @@ -25,14 +25,13 @@ #define PAM_GROUP_BUFLEN 1000 #define FIELD_SEPARATOR ';' /* this is new as of .02 */ -#ifdef TRUE -# undef TRUE +#ifndef TRUE +# define TRUE 1 #endif -#ifdef FALSE -# undef FALSE +#ifndef FALSE +# define FALSE 0 #endif -typedef enum { FALSE, TRUE } boolean; typedef enum { AND, OR } operator; /* @@ -260,13 +259,13 @@ static int logic_member(const char *string, int *at) typedef enum { VAL, OP } expect; -static boolean +static int logic_field (const pam_handle_t *pamh, const void *me, const char *x, int rule, - boolean (*agrees)(const pam_handle_t *pamh, const void *, + int (*agrees)(const pam_handle_t *pamh, const void *, const char *, int, int)) { - boolean left=FALSE, right, not=FALSE; + int left=FALSE, right, not=FALSE; operator oper=OR; int at=0, l; expect next=VAL; @@ -314,7 +313,7 @@ logic_field (const pam_handle_t *pamh, const void *me, return left; } -static boolean +static int is_same (const pam_handle_t *pamh UNUSED, const void *A, const char *b, int len, int rule UNUSED) { @@ -371,11 +370,11 @@ static TIME time_now(void) } /* take the current date and see if the range "date" passes it */ -static boolean +static int check_time (const pam_handle_t *pamh, const void *AT, const char *times, int len, int rule) { - boolean not,pass; + int not,pass; int marked_day, time_start, time_end; const TIME *at; int i,j=0; |