-/* $OpenBSD: login_passwd.c,v 1.19 2021/01/02 20:32:20 millert Exp $ */
+/* $OpenBSD: login_passwd.c,v 1.20 2021/11/16 21:55:21 deraadt Exp $ */
/*-
* Copyright (c) 1995 Berkeley Software Design, Inc. All rights reserved.
if (wheel != NULL && strcmp(wheel, "yes") != 0) {
fprintf(back, BI_VALUE " errormsg %s\n",
"you are not in group wheel");
- fprintf(back, BI_REJECT "\n");
- exit(1);
+ goto reject;
}
if (mode == 1) {
pass = readpassphrase("Password:", pbuf, sizeof(pbuf),
RPP_ECHO_OFF);
if (pass == NULL)
- fprintf(back, BI_REJECT "\n");
+ goto reject;
}
}
exit(0);
}
}
+reject:
fprintf(back, BI_REJECT "\n");
exit(1);
}