View | Details | Raw Unified | Return to bug 35196
Collapse All | Expand All

(-)dropbear-2018.76/default_options.h (-2 / +2 lines)
Lines 179-185 Link Here
179
179
180
/* Authentication Types - at least one required.
180
/* Authentication Types - at least one required.
181
   RFC Draft requires pubkey auth, and recommends password */
181
   RFC Draft requires pubkey auth, and recommends password */
182
#define DROPBEAR_SVR_PASSWORD_AUTH 1
182
#define DROPBEAR_SVR_PASSWORD_AUTH 0
183
183
184
/* Note: PAM auth is quite simple and only works for PAM modules which just do
184
/* Note: PAM auth is quite simple and only works for PAM modules which just do
185
 * a simple "Login: " "Password: " (you can edit the strings in svr-authpam.c).
185
 * a simple "Login: " "Password: " (you can edit the strings in svr-authpam.c).
Lines 187-193 Link Here
187
 * but there's an interface via a PAM module. It won't work for more complex
187
 * but there's an interface via a PAM module. It won't work for more complex
188
 * PAM challenge/response.
188
 * PAM challenge/response.
189
 * You can't enable both PASSWORD and PAM. */
189
 * You can't enable both PASSWORD and PAM. */
190
#define DROPBEAR_SVR_PAM_AUTH 0
190
#define DROPBEAR_SVR_PAM_AUTH 1
191
191
192
/* ~/.ssh/authorized_keys authentication */
192
/* ~/.ssh/authorized_keys authentication */
193
#define DROPBEAR_SVR_PUBKEY_AUTH 1
193
#define DROPBEAR_SVR_PUBKEY_AUTH 1
(-)dropbear-2018.76/svr-authpam.c (-2 / +2 lines)
Lines 211-224 Link Here
211
	userData.passwd = password;
211
	userData.passwd = password;
212
212
213
	/* Init pam */
213
	/* Init pam */
214
	if ((rc = pam_start("sshd", NULL, &pamConv, &pamHandlep)) != PAM_SUCCESS) {
214
	if ((rc = pam_start("dropbear", NULL, &pamConv, &pamHandlep)) != PAM_SUCCESS) {
215
		dropbear_log(LOG_WARNING, "pam_start() failed, rc=%d, %s", 
215
		dropbear_log(LOG_WARNING, "pam_start() failed, rc=%d, %s", 
216
				rc, pam_strerror(pamHandlep, rc));
216
				rc, pam_strerror(pamHandlep, rc));
217
		goto cleanup;
217
		goto cleanup;
218
	}
218
	}
219
219
220
	/* just to set it to something */
220
	/* just to set it to something */
221
	if ((rc = pam_set_item(pamHandlep, PAM_TTY, "ssh")) != PAM_SUCCESS) {
221
	if ((rc = pam_set_item(pamHandlep, PAM_TTY, "dropbear")) != PAM_SUCCESS) {
222
		dropbear_log(LOG_WARNING, "pam_set_item() failed, rc=%d, %s",
222
		dropbear_log(LOG_WARNING, "pam_set_item() failed, rc=%d, %s",
223
				rc, pam_strerror(pamHandlep, rc));
223
				rc, pam_strerror(pamHandlep, rc));
224
		goto cleanup;
224
		goto cleanup;

Return to bug 35196