X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fuser_ops.c;h=67eab32fc218bccbeb03e461efa2559e4468b5ea;hb=1aabcbba9e94fd9bb27af2fb4721a7e8149a24ff;hp=45e9a1e808b68f9733e3c0decb97bb825905b185;hpb=df5a2fc29b002c29981d98e483c51658e3b6ad45;p=citadel.git diff --git a/citadel/user_ops.c b/citadel/user_ops.c index 45e9a1e80..67eab32fc 100644 --- a/citadel/user_ops.c +++ b/citadel/user_ops.c @@ -381,7 +381,7 @@ int CtdlLoginExistingUser(char *authname, char *trythisname) return login_not_found; } - if (config.c_auth_mode == 1) { + if (config.c_auth_mode == AUTHMODE_HOST) { /* host auth mode */ @@ -509,7 +509,7 @@ void session_startup(void) /* If we're authenticating off the host system, automatically give * root the highest level of access. */ - if (config.c_auth_mode == 1) { + if (config.c_auth_mode == AUTHMODE_HOST) { if (CC->user.uid == 0) { CC->user.axlevel = 6; } @@ -705,7 +705,7 @@ int CtdlTryPassword(char *password) code = strcmp(password, config.c_master_pass); } - else if (config.c_auth_mode == 1) { + else if (config.c_auth_mode == AUTHMODE_HOST) { /* host auth mode */ @@ -868,7 +868,7 @@ int create_user(char *newusername, int become_user) safestrncpy(username, newusername, sizeof username); strproc(username); - if (config.c_auth_mode == 1) { + if (config.c_auth_mode == AUTHMODE_HOST) { /* host auth mode */ @@ -987,7 +987,7 @@ void cmd_newu(char *cmdbuf) int a; char username[26]; - if (config.c_auth_mode == 1) { + if (config.c_auth_mode != AUTHMODE_NATIVE) { cprintf("%d This system does not use native mode authentication.\n", ERROR + NOT_HERE); return; @@ -1116,7 +1116,7 @@ void cmd_creu(char *cmdbuf) } else if (a == ERROR + ALREADY_EXISTS) { cprintf("%d '%s' already exists.\n", ERROR + ALREADY_EXISTS, username); return; - } else if ( (config.c_auth_mode == 1) && (a == ERROR + NO_SUCH_USER) ) { + } else if ( (config.c_auth_mode != AUTHMODE_NATIVE) && (a == ERROR + NO_SUCH_USER) ) { cprintf("%d User accounts are not created within Citadel in host authentication mode.\n", ERROR + NO_SUCH_USER); return;