X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fopenid%2Fserv_openid_rp.c;h=09fd48e9bba59d4ec41c6d7ac33a5a02b8f81870;hb=bdfa2e9b6af7e32b11461433a28dd6551f830888;hp=69479190e132ebb8233e631d56aee08b1b042f59;hpb=39e0649930fc89da0b0b56a0ca80ef021b3154a6;p=citadel.git diff --git a/citadel/modules/openid/serv_openid_rp.c b/citadel/modules/openid/serv_openid_rp.c index 69479190e..09fd48e9b 100644 --- a/citadel/modules/openid/serv_openid_rp.c +++ b/citadel/modules/openid/serv_openid_rp.c @@ -1,7 +1,7 @@ /* * This is an implementation of OpenID 2.0 relying party support in stateless mode. * - * Copyright (c) 2007-2017 by the citadel.org team + * Copyright (c) 2007-2019 by the citadel.org team * * This program is open source software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -394,7 +394,7 @@ int openid_create_user_via_ax(StrBuf *claimed_id, HashList *sreg_keys) } syslog(LOG_DEBUG, "openid: the desired account name is <%s>", nickname); - len = cutuserkey(nickname); + len = cutusername(nickname); if (!CtdlGetUser(&CC->user, nickname)) { syslog(LOG_DEBUG, "openid: <%s> is already taken by another user.", nickname); memset(&CC->user, 0, sizeof(struct ctdluser)); @@ -402,7 +402,7 @@ int openid_create_user_via_ax(StrBuf *claimed_id, HashList *sreg_keys) } /* The desired account name is available. Create the account and log it in! */ - if (create_user(nickname, 1)) return(6); + if (create_user(nickname, CREATE_USER_BECOME_USER, NATIVE_AUTH_UID)) return(6); /* Generate a random password. * The user doesn't care what the password is since he is using OpenID. @@ -839,7 +839,7 @@ void cmd_oids(char *argbuf) { CCC->openid_data = oiddata = malloc(sizeof(ctdl_openid)); if (oiddata == NULL) { - syslog(LOG_ERR, "openid: malloc() failed: %s", strerror(errno)); + syslog(LOG_ERR, "openid: malloc() failed: %m"); cprintf("%d malloc failed\n", ERROR + INTERNAL_ERROR); return; }