summaryrefslogtreecommitdiff
path: root/source3/lib/afs_settoken.c
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2011-07-15 15:35:18 +0200
committerChristian Ambach <ambi@samba.org>2011-07-21 14:55:06 +0200
commitffef23d40f100ba678bc2af73eb24bc6fc93356e (patch)
treebccfe17dcd0194b8ea00e280a5c8852ed95b1ac1 /source3/lib/afs_settoken.c
parent9779af85d6fe3091448ed77166877e3fcdfc3cfe (diff)
downloadsamba-ffef23d40f100ba678bc2af73eb24bc6fc93356e.tar.gz
samba-ffef23d40f100ba678bc2af73eb24bc6fc93356e.tar.bz2
samba-ffef23d40f100ba678bc2af73eb24bc6fc93356e.zip
s3:lib/afs use stdbool types
Diffstat (limited to 'source3/lib/afs_settoken.c')
-rw-r--r--source3/lib/afs_settoken.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/source3/lib/afs_settoken.c b/source3/lib/afs_settoken.c
index 971c145cde..c83093ff45 100644
--- a/source3/lib/afs_settoken.c
+++ b/source3/lib/afs_settoken.c
@@ -82,24 +82,24 @@ static bool afs_decode_token(const char *string, char **cell,
if ((t = strtok_r(s, "\n", &saveptr)) == NULL) {
DEBUG(10, ("strtok_r failed\n"));
- return False;
+ return false;
}
*cell = SMB_STRDUP(t);
if ((t = strtok_r(NULL, "\n", &saveptr)) == NULL) {
DEBUG(10, ("strtok_r failed\n"));
- return False;
+ return false;
}
if (sscanf(t, "%u", &result_ct.AuthHandle) != 1) {
DEBUG(10, ("sscanf AuthHandle failed\n"));
- return False;
+ return false;
}
if ((t = strtok_r(NULL, "\n", &saveptr)) == NULL) {
DEBUG(10, ("strtok_r failed\n"));
- return False;
+ return false;
}
blob = base64_decode_data_blob(t);
@@ -108,7 +108,7 @@ static bool afs_decode_token(const char *string, char **cell,
(blob.length != sizeof(result_ct.HandShakeKey) )) {
DEBUG(10, ("invalid key: %x/%lu\n", (uint8_t)*blob.data,
(unsigned long) blob.length));
- return False;
+ return false;
}
memcpy(result_ct.HandShakeKey, blob.data, blob.length);
@@ -117,50 +117,50 @@ static bool afs_decode_token(const char *string, char **cell,
if ((t = strtok_r(NULL, "\n", &saveptr)) == NULL) {
DEBUG(10, ("strtok_r failed\n"));
- return False;
+ return false;
}
if (sscanf(t, "%u", &result_ct.ViceId) != 1) {
DEBUG(10, ("sscanf ViceId failed\n"));
- return False;
+ return false;
}
if ((t = strtok_r(NULL, "\n", &saveptr)) == NULL) {
DEBUG(10, ("strtok_r failed\n"));
- return False;
+ return false;
}
if (sscanf(t, "%u", &result_ct.BeginTimestamp) != 1) {
DEBUG(10, ("sscanf BeginTimestamp failed\n"));
- return False;
+ return false;
}
if ((t = strtok_r(NULL, "\n", &saveptr)) == NULL) {
DEBUG(10, ("strtok_r failed\n"));
- return False;
+ return false;
}
if (sscanf(t, "%u", &result_ct.EndTimestamp) != 1) {
DEBUG(10, ("sscanf EndTimestamp failed\n"));
- return False;
+ return false;
}
if ((t = strtok_r(NULL, "\n", &saveptr)) == NULL) {
DEBUG(10, ("strtok_r failed\n"));
- return False;
+ return false;
}
blob = base64_decode_data_blob(t);
if (blob.data == NULL) {
DEBUG(10, ("Could not get ticket\n"));
- return False;
+ return false;
}
*ticket = blob;
*ct = result_ct;
- return True;
+ return true;
}
/*
@@ -206,7 +206,7 @@ static bool afs_settoken(const char *cell,
tmp = strlen(cell);
if (tmp >= MAXKTCREALMLEN) {
DEBUG(1, ("Realm too long\n"));
- return False;
+ return false;
}
strncpy(p, cell, tmp);
@@ -237,7 +237,7 @@ bool afs_settoken_str(const char *token_string)
char *cell;
if (!afs_decode_token(token_string, &cell, &ticket, &ct))
- return False;
+ return false;
if (geteuid() != sec_initial_uid())
ct.ViceId = getuid();
@@ -254,7 +254,7 @@ bool afs_settoken_str(const char *token_string)
bool afs_settoken_str(const char *token_string)
{
- return False;
+ return false;
}
#endif