X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fuser_ops.h;h=02bcf394babce2299a15790a1cae4eef042ff9a2;hp=697554f13ffa61e1fcaa025965ffdd8b0d64dd3e;hb=03b525bdbd5fa51c1b5a56c5fdecfdb8200cb046;hpb=80a659e06168b4cb0755c8b77cae8fb0d89c0ea6 diff --git a/citadel/user_ops.h b/citadel/user_ops.h index 697554f13..02bcf394b 100644 --- a/citadel/user_ops.h +++ b/citadel/user_ops.h @@ -55,42 +55,8 @@ void start_chkpwd_daemon(void); int rename_user(char *oldname, char *newname); -///#ifndef CTDL_INLINE_USR -////#define CTDL_INLINE_USR static INLINE -///#endif - -///CTDL_INLINE_USR -static INLINE long cutuserkey(char *username) { - long len; - len = strlen(username); - if (len >= USERNAME_SIZE) - { - syslog(LOG_INFO, "Username too long: %s", username); - len = USERNAME_SIZE - 1; - username[len]='\0'; - } - return len; -} - -/* - * makeuserkey() - convert a username into the format used as a database key - * (it's just the username converted into lower case) - */ -///CTDL_INLINE_USR -static INLINE void makeuserkey(char *key, const char *username, long len) { - int i; - - if (len >= USERNAME_SIZE) - { - syslog(LOG_INFO, "Username too long: %s", username); - len = USERNAME_SIZE - 1; - } - for (i=0; i<=len; ++i) { - key[i] = tolower(username[i]); - } -} - - +long cutuserkey(char *username); +void makeuserkey(char *key, const char *username, long len); int internal_create_user(char *username, struct ctdluser *usbuf, uid_t uid); #endif