projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
0acbb07
)
Renamed cutuserkey() to cutusername(). Function has nothing to do with keys.
author
Art Cancro
<ajc@citadel.org>
Tue, 30 Jul 2019 13:40:51 +0000
(09:40 -0400)
committer
Art Cancro
<ajc@citadel.org>
Tue, 30 Jul 2019 13:40:51 +0000
(09:40 -0400)
citadel/context.c
patch
|
blob
|
history
citadel/modules/openid/serv_openid_rp.c
patch
|
blob
|
history
citadel/modules/upgrade/serv_upgrade.c
patch
|
blob
|
history
citadel/user_ops.c
patch
|
blob
|
history
citadel/user_ops.h
patch
|
blob
|
history
diff --git
a/citadel/context.c
b/citadel/context.c
index f5efd5c1c5c2781db643f91e5cd27fa024c93267..8b06ab5c811b1d352edd8c30673a2c6fdff45321 100644
(file)
--- a/
citadel/context.c
+++ b/
citadel/context.c
@@
-568,7
+568,7
@@
void CtdlFillSystemContext(CitContext *context, char *name)
context->cs_pid = 0;
strcpy (sysname, "SYS_");
strcat (sysname, name);
context->cs_pid = 0;
strcpy (sysname, "SYS_");
strcat (sysname, name);
- len = cutuser
key
(sysname);
+ len = cutuser
name
(sysname);
memcpy(context->curr_user, sysname, len + 1);
context->client_socket = (-1);
context->state = CON_SYS;
memcpy(context->curr_user, sysname, len + 1);
context->client_socket = (-1);
context->state = CON_SYS;
diff --git
a/citadel/modules/openid/serv_openid_rp.c
b/citadel/modules/openid/serv_openid_rp.c
index 269240bddb31d7013aa7ec688980285cff6e0a0a..09fd48e9bba59d4ec41c6d7ac33a5a02b8f81870 100644
(file)
--- 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.
*
/*
* This is an implementation of OpenID 2.0 relying party support in stateless mode.
*
- * Copyright (c) 2007-201
7
by the citadel.org team
+ * Copyright (c) 2007-201
9
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
*
* 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);
}
syslog(LOG_DEBUG, "openid: the desired account name is <%s>", nickname);
- len = cutuser
key
(nickname);
+ len = cutuser
name
(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));
if (!CtdlGetUser(&CC->user, nickname)) {
syslog(LOG_DEBUG, "openid: <%s> is already taken by another user.", nickname);
memset(&CC->user, 0, sizeof(struct ctdluser));
diff --git
a/citadel/modules/upgrade/serv_upgrade.c
b/citadel/modules/upgrade/serv_upgrade.c
index 35216e126ed97ae73e685dfa04eee36de530c170..4311504a4e94346fddaaa339b8000a00978cd81d 100644
(file)
--- a/
citadel/modules/upgrade/serv_upgrade.c
+++ b/
citadel/modules/upgrade/serv_upgrade.c
@@
-4,7
+4,7
@@
* guesses about what kind of data format changes need to be applied, and
* we apply them transparently.
*
* guesses about what kind of data format changes need to be applied, and
* we apply them transparently.
*
- * Copyright (c) 1987-201
8
by the citadel.org team
+ * Copyright (c) 1987-201
9
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 version 3.
*
* This program is open source software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 3.
@@
-94,7
+94,7
@@
void fix_sys_user_name(void)
{
if (strncmp(usbuf.fullname, "SYS_", 4))
{ /* Delete any user 0 that doesn't start with SYS_ */
{
if (strncmp(usbuf.fullname, "SYS_", 4))
{ /* Delete any user 0 that doesn't start with SYS_ */
- makeuserkey(usernamekey, usbuf.fullname, cutuser
key
(usbuf.fullname));
+ makeuserkey(usernamekey, usbuf.fullname, cutuser
name
(usbuf.fullname));
cdb_delete(CDB_USERS, usernamekey, strlen(usernamekey));
}
else {
cdb_delete(CDB_USERS, usernamekey, strlen(usernamekey));
}
else {
diff --git
a/citadel/user_ops.c
b/citadel/user_ops.c
index 168639ed91da8c3a93e6d84f2668e4c04c63b589..c5eeabd2cbca8bd9fec607d7d10fc542f15af69d 100644
(file)
--- a/
citadel/user_ops.c
+++ b/
citadel/user_ops.c
@@
-34,9
+34,9
@@
int chkpwd_read_pipe[2];
/*
/*
- *
Figure out what this does and make it cleaner
+ *
Trim a string down to the maximum username size and return the new length
*/
*/
-long cutuser
key
(char *username) {
+long cutuser
name
(char *username) {
long len;
len = strlen(username);
if (len >= USERNAME_SIZE)
long len;
len = strlen(username);
if (len >= USERNAME_SIZE)
@@
-75,7
+75,7
@@
int CtdlGetUser(struct ctdluser *usbuf, char *name)
{
char usernamekey[USERNAME_SIZE];
struct cdbdata *cdbus;
{
char usernamekey[USERNAME_SIZE];
struct cdbdata *cdbus;
- long len = cutuser
key
(name);
+ long len = cutuser
name
(name);
if (usbuf != NULL) {
memset(usbuf, 0, sizeof(struct ctdluser));
if (usbuf != NULL) {
memset(usbuf, 0, sizeof(struct ctdluser));
@@
-124,7
+124,7
@@
void CtdlPutUser(struct ctdluser *usbuf)
{
char usernamekey[USERNAME_SIZE];
{
char usernamekey[USERNAME_SIZE];
- makeuserkey(usernamekey, usbuf->fullname, cutuser
key
(usbuf->fullname));
+ makeuserkey(usernamekey, usbuf->fullname, cutuser
name
(usbuf->fullname));
usbuf->version = REV_LEVEL;
cdb_store(CDB_USERS, usernamekey, strlen(usernamekey), usbuf, sizeof(struct ctdluser));
}
usbuf->version = REV_LEVEL;
cdb_store(CDB_USERS, usernamekey, strlen(usernamekey), usbuf, sizeof(struct ctdluser));
}
@@
-160,8
+160,8
@@
int rename_user(char *oldname, char *newname) {
char newnamekey[USERNAME_SIZE];
/* Create the database keys... */
char newnamekey[USERNAME_SIZE];
/* Create the database keys... */
- makeuserkey(oldnamekey, oldname, cutuser
key
(oldname));
- makeuserkey(newnamekey, newname, cutuser
key
(newname));
+ makeuserkey(oldnamekey, oldname, cutuser
name
(oldname));
+ makeuserkey(newnamekey, newname, cutuser
name
(newname));
/* Lock up and get going */
begin_critical_section(S_USERS);
/* Lock up and get going */
begin_critical_section(S_USERS);
@@
-947,7
+947,7
@@
int purge_user(char pname[])
struct ctdluser usbuf;
char usernamekey[USERNAME_SIZE];
struct ctdluser usbuf;
char usernamekey[USERNAME_SIZE];
- makeuserkey(usernamekey, pname, cutuser
key
(pname));
+ makeuserkey(usernamekey, pname, cutuser
name
(pname));
/* If the name is empty we can't find them in the DB any way so just return */
if (IsEmptyStr(pname)) {
/* If the name is empty we can't find them in the DB any way so just return */
if (IsEmptyStr(pname)) {
diff --git
a/citadel/user_ops.h
b/citadel/user_ops.h
index a1904d0cabbb98cd71ce4c97b50303eaa74819fb..040932c1df29d33c5b196ead00d5ab9c900cd784 100644
(file)
--- a/
citadel/user_ops.h
+++ b/
citadel/user_ops.h
@@
-69,7
+69,7
@@
void start_chkpwd_daemon(void);
int rename_user(char *oldname, char *newname);
int rename_user(char *oldname, char *newname);
-long cutuser
key
(char *username);
+long cutuser
name
(char *username);
void makeuserkey(char *key, const char *username, long len);
int internal_create_user(char *username, struct ctdluser *usbuf, uid_t uid);
void makeuserkey(char *key, const char *username, long len);
int internal_create_user(char *username, struct ctdluser *usbuf, uid_t uid);