+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.
+
2006-06-15 Thorsten Kukuk <kukuk@thkukuk.de>
* modules/pam_unix/bigcrypt.h: New.
#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;
/*
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;
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)
{
}
/* 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;
#define PAM_TIME_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;
/*
typedef enum { VAL, OP } expect;
-static boolean
+static int
logic_field(pam_handle_t *pamh, const void *me, const char *x, int rule,
- boolean (*agrees)(pam_handle_t *pamh,
+ int (*agrees)(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;
return left;
}
-static boolean
+static int
is_same(pam_handle_t *pamh UNUSED, const void *A, const char *b,
int len, int rule UNUSED)
{
}
/* take the current date and see if the range "date" passes it */
-static boolean
+static int
check_time(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;
here_and_now = time_now(); /* find current time */
do {
- boolean good=TRUE,intime;
+ int good=TRUE,intime;
/* here we get the service name field */