summaryrefslogtreecommitdiff
path: root/modules/authldap.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/authldap.c')
-rw-r--r--modules/authldap.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/modules/authldap.c b/modules/authldap.c
index cac70270..d15b8d7d 100644
--- a/modules/authldap.c
+++ b/modules/authldap.c
@@ -420,7 +420,7 @@ static u64_t dm_ldap_get_freeid(const gchar *attribute)
g_list_free(ids);
id=t;
- TRACE(TRACE_DEBUG,"return free id [%llu]\n", id);
+ TRACE(TRACE_DEBUG,"return free id [%" U64_T_FORMAT "]\n", id);
return id;
}
@@ -429,7 +429,7 @@ static char * dm_ldap_user_getdn(u64_t user_idnr)
GString *t = g_string_new("");
char *dn;
- g_string_printf(t, "(%s=%llu)", _ldap_cfg.field_nid, user_idnr);
+ g_string_printf(t, "(%s=%" U64_T_FORMAT ")", _ldap_cfg.field_nid, user_idnr);
TRACE(TRACE_DEBUG, "searching with query [%s]", t->str);
@@ -693,7 +693,7 @@ int auth_user_exists(const char *username, u64_t * user_idnr)
if (id_char != NULL)
g_free(id_char);
- TRACE(TRACE_DEBUG, "returned value is [%llu]", *user_idnr);
+ TRACE(TRACE_DEBUG, "returned value is [%" U64_T_FORMAT "]", *user_idnr);
if (*user_idnr != 0)
return 1;
@@ -710,7 +710,7 @@ char *auth_get_userid(u64_t user_idnr)
char query[AUTH_QUERY_SIZE];
char *fields[] = { _ldap_cfg.field_uid, NULL };
- snprintf(query, AUTH_QUERY_SIZE, "(%s=%llu)", _ldap_cfg.field_nid, user_idnr);
+ snprintf(query, AUTH_QUERY_SIZE, "(%s=%" U64_T_FORMAT ")", _ldap_cfg.field_nid, user_idnr);
returnid = __auth_get_first_match(query, fields);
TRACE(TRACE_DEBUG, "returned value is [%s]", returnid);
@@ -726,15 +726,15 @@ int auth_check_userid(u64_t user_idnr)
char *fields[] = { _ldap_cfg.field_nid, NULL };
int ret;
- snprintf(query, AUTH_QUERY_SIZE, "(%s=%llu)", _ldap_cfg.field_nid, user_idnr);
+ snprintf(query, AUTH_QUERY_SIZE, "(%s=%" U64_T_FORMAT ")", _ldap_cfg.field_nid, user_idnr);
returnid = __auth_get_first_match(query, fields);
if (returnid) {
ret = 0;
- TRACE(TRACE_DEBUG, "found user_idnr [%llu]", user_idnr);
+ TRACE(TRACE_DEBUG, "found user_idnr [%" U64_T_FORMAT "]", user_idnr);
} else {
ret = 1;
- TRACE(TRACE_DEBUG, "didn't find user_idnr [%llu]", user_idnr);
+ TRACE(TRACE_DEBUG, "didn't find user_idnr [%" U64_T_FORMAT "]", user_idnr);
}
g_free(returnid);
@@ -762,14 +762,14 @@ int auth_getclientid(u64_t user_idnr, u64_t * client_idnr)
return -1;
}
- snprintf(query, AUTH_QUERY_SIZE, "(%s=%llu)", _ldap_cfg.field_nid,
+ snprintf(query, AUTH_QUERY_SIZE, "(%s=%" U64_T_FORMAT ")", _ldap_cfg.field_nid,
user_idnr);
cid_char = __auth_get_first_match(query, fields);
*client_idnr = (cid_char) ? strtoull(cid_char, NULL, 0) : 0;
if (cid_char != NULL)
g_free(cid_char);
- TRACE(TRACE_DEBUG, "found client_idnr [%llu]", *client_idnr);
+ TRACE(TRACE_DEBUG, "found client_idnr [%" U64_T_FORMAT "]", *client_idnr);
return 1;
}
@@ -789,7 +789,7 @@ int auth_getmaxmailsize(u64_t user_idnr, u64_t * maxmail_size)
return 0;
}
- snprintf(query, AUTH_QUERY_SIZE, "(%s=%llu)", _ldap_cfg.field_nid,
+ snprintf(query, AUTH_QUERY_SIZE, "(%s=%" U64_T_FORMAT ")", _ldap_cfg.field_nid,
user_idnr);
max_char = __auth_get_first_match(query, fields);
*maxmail_size = (max_char) ? strtoull(max_char, 0, 10) : 0;
@@ -797,7 +797,7 @@ int auth_getmaxmailsize(u64_t user_idnr, u64_t * maxmail_size)
// if max_char is NULL g_free will not fail it simply return
g_free(max_char);
- TRACE(TRACE_DEBUG, "returned value is [%llu]", *maxmail_size);
+ TRACE(TRACE_DEBUG, "returned value is [%" U64_T_FORMAT "]", *maxmail_size);
return 1;
}
@@ -943,7 +943,7 @@ int auth_check_user_ext(const char *address, struct dm_list *userids,
id = strtoull(address, &endptr, 10);
if (*endptr == 0) {
/* numeric deliver-to --> this is a userid */
- TRACE(TRACE_DEBUG, "adding [%llu] to userids", id);
+ TRACE(TRACE_DEBUG, "adding [%" U64_T_FORMAT "] to userids", id);
dm_list_nodeadd(userids, &id, sizeof(id));
} else {
TRACE(TRACE_DEBUG, "adding [%s] to forwards", address);
@@ -1002,9 +1002,9 @@ int auth_adduser(const char *username, const char *password,
u64_t newidnr = dm_ldap_get_freeid(_ldap_cfg.field_nid);
- g_string_printf(nid,"%llu", newidnr);
- g_string_printf(cid,"%llu",clientid);
- g_string_printf(maxm,"%llu",maxmail);
+ g_string_printf(nid,"%" U64_T_FORMAT, newidnr);
+ g_string_printf(cid,"%" U64_T_FORMAT,clientid);
+ g_string_printf(maxm,"%" U64_T_FORMAT,maxmail);
char **obj_values = g_strsplit(_ldap_cfg.user_objectclass,",",0);
char *pw_values[] = { (char *)password, NULL };
@@ -1152,10 +1152,10 @@ static int dm_ldap_user_shadow_rename(u64_t user_idnr, const char *new_name)
oldname = auth_get_userid(user_idnr);
db_user_exists(oldname,&dbidnr);
if (dbidnr) {
- TRACE(TRACE_DEBUG, "call db_user_rename ([%llu],[%s])\n", dbidnr, new_name);
+ TRACE(TRACE_DEBUG, "call db_user_rename ([%" U64_T_FORMAT "],[%s])\n", dbidnr, new_name);
}
if ((! dbidnr) || (db_user_rename(dbidnr, new_name))) {
- TRACE(TRACE_ERROR, "renaming shadow account in db failed for [%llu]->[%s]", user_idnr, new_name);
+ TRACE(TRACE_ERROR, "renaming shadow account in db failed for [%" U64_T_FORMAT "]->[%s]", user_idnr, new_name);
return -1;
}
return 0;
@@ -1225,7 +1225,7 @@ int auth_change_password(u64_t user_idnr, const char *new_pass, const char *enct
int auth_change_clientid(u64_t user_idnr, u64_t newcid)
{
char newcid_str[16];
- snprintf(newcid_str, 16, "%llu", newcid);
+ snprintf(newcid_str, 16, "%" U64_T_FORMAT, newcid);
return dm_ldap_mod_field(user_idnr, _ldap_cfg.field_cid, newcid_str);
}
@@ -1233,7 +1233,7 @@ int auth_change_mailboxsize(u64_t user_idnr, u64_t new_size)
{
int result;
char newsize_str[16];
- snprintf(newsize_str, 16, "%llu", new_size);
+ snprintf(newsize_str, 16, "%" U64_T_FORMAT, new_size);
if ((result = db_change_mailboxsize(user_idnr, new_size)))
return result;
return dm_ldap_mod_field(user_idnr, _ldap_cfg.field_maxmail, newsize_str);
@@ -1368,7 +1368,7 @@ GList * auth_get_user_aliases(u64_t user_idnr)
GList *aliases = NULL;
GList *entlist, *fldlist, *attlist;
- g_string_printf(t,"%s=%llu", _ldap_cfg.field_nid, user_idnr);
+ g_string_printf(t,"%s=%" U64_T_FORMAT, _ldap_cfg.field_nid, user_idnr);
if ((entlist = __auth_get_every_match(t->str, fields))) {
entlist = g_list_first(entlist);
fldlist = g_list_first(entlist->data);