summaryrefslogtreecommitdiff
path: root/source4/auth/sam.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-10-06 22:16:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:07:54 -0500
commit3642f3b40d755209a843745f160a9d7962a6deca (patch)
tree766c876eff39205b11c86a6cafd1ecd06b4befbc /source4/auth/sam.c
parent0c56f8dac31c51a42dedf2a1da9fd76896855b19 (diff)
downloadsamba-3642f3b40d755209a843745f160a9d7962a6deca.tar.gz
samba-3642f3b40d755209a843745f160a9d7962a6deca.tar.bz2
samba-3642f3b40d755209a843745f160a9d7962a6deca.zip
r25552: Convert to standard bool type.
(This used to be commit b8d6b82f1248d36a0aa91a1c58d06b4f7c66d245)
Diffstat (limited to 'source4/auth/sam.c')
-rw-r--r--source4/auth/sam.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source4/auth/sam.c b/source4/auth/sam.c
index ec019b3fe6..ad8d77ecf8 100644
--- a/source4/auth/sam.c
+++ b/source4/auth/sam.c
@@ -76,7 +76,7 @@ const char *domain_ref_attrs[] = {"nETBIOSName", "nCName",
bitmask.
****************************************************************************/
-static BOOL logon_hours_ok(struct ldb_message *msg, const char *name_for_logs)
+static bool logon_hours_ok(struct ldb_message *msg, const char *name_for_logs)
{
/* In logon hours first bit is Sunday from 12AM to 1AM */
const struct ldb_val *hours;
@@ -88,12 +88,12 @@ static BOOL logon_hours_ok(struct ldb_message *msg, const char *name_for_logs)
hours = ldb_msg_find_ldb_val(msg, "logonHours");
if (!hours) {
DEBUG(5,("logon_hours_ok: No hours restrictions for user %s\n", name_for_logs));
- return True;
+ return true;
}
if (hours->length != 168/8) {
DEBUG(5,("logon_hours_ok: malformed logon hours restrictions for user %s\n", name_for_logs));
- return True;
+ return true;
}
lasttime = time(NULL);
@@ -101,7 +101,7 @@ static BOOL logon_hours_ok(struct ldb_message *msg, const char *name_for_logs)
if (!utctime) {
DEBUG(1, ("logon_hours_ok: failed to get gmtime. Failing logon for user %s\n",
name_for_logs));
- return False;
+ return false;
}
/* find the corresponding byte and bit */
@@ -122,14 +122,14 @@ static BOOL logon_hours_ok(struct ldb_message *msg, const char *name_for_logs)
DEBUG(1, ("logon_hours_ok: Account for user %s not allowed to "
"logon at this time (%s).\n",
name_for_logs, asct ));
- return False;
+ return false;
}
asct = asctime(utctime);
DEBUG(5,("logon_hours_ok: user %s allowed to logon at this time (%s)\n",
name_for_logs, asct ? asct : "UNKNOWN TIME" ));
- return True;
+ return true;
}
/****************************************************************************
@@ -205,7 +205,7 @@ _PUBLIC_ NTSTATUS authsam_account_ok(TALLOC_CTX *mem_ctx,
/* Test workstation. Workstation list is comma separated. */
if (logon_workstation && workstation_list && *workstation_list) {
- BOOL invalid_ws = True;
+ bool invalid_ws = true;
int i;
const char **workstations = str_list_make(mem_ctx, workstation_list, ",");
@@ -214,7 +214,7 @@ _PUBLIC_ NTSTATUS authsam_account_ok(TALLOC_CTX *mem_ctx,
workstations[i], logon_workstation));
if (strequal(workstations[i], logon_workstation)) {
- invalid_ws = False;
+ invalid_ws = false;
break;
}
}
@@ -371,7 +371,7 @@ _PUBLIC_ NTSTATUS authsam_make_server_info(TALLOC_CTX *mem_ctx, struct ldb_conte
server_info->user_session_key = user_sess_key;
server_info->lm_session_key = lm_sess_key;
- server_info->authenticated = True;
+ server_info->authenticated = true;
*_server_info = server_info;