FreeBSD/crypto/openssh/auth.c
/*
 * Check whether root logins are disallowed.
 */
Check whether root logins are disallowed.
Check whether root logins are disallowed .
int
auth_root_allowed(const char *method)
{
	switch (options.permit_root_login) {
	case PERMIT_YES:
		return 1;
	case PERMIT_NO_PASSWD:
		if (strcmp(method, "publickey") == 0 ||
		    strcmp(method, "hostbased") == 0 ||
		    strcmp(method, "gssapi-with-mic") == 0)
			return 1;
		break;
	case PERMIT_FORCED_ONLY:
		if (forced_command) {
			logit("Root login accepted for forced command.");
			return 1;
		}
		break;
	}
	logit("ROOT LOGIN REFUSED FROM %.200s", get_remote_ipaddr());
	return 0;
}
int auth_root_allowed ( const char * method ) { switch ( options . permit_root_login ) { case PERMIT_YES : return 1 ; case PERMIT_NO_PASSWD : if ( strcmp ( method , " " ) == 0 || strcmp ( method , " " ) == 0 || strcmp ( method , " " ) == 0 ) return 1 ; break ; case PERMIT_FORCED_ONLY : if ( forced_command ) { logit ( " " ) ; return 1 ; } break ; } logit ( " " , get_remote_ipaddr ( ) ) ; return 0 ; }
Check whether root logins are disallowed.
Check whether root logins are disallowed .