* distribution for complete copyright information.
*/
-#include <h/mh.h>
-#include <h/utils.h>
+#include "h/mh.h"
+#include "getpass.h"
+#include "ruserpass.h"
+#include "credentials.h"
+#include "error.h"
+#include "h/utils.h"
#include <pwd.h>
static FILE *cfile;
void
ruserpass(const char *host, char **aname, char **apass, int flags)
{
- int t, usedefault = 0;
+ int t;
struct stat stb;
init_credentials_file ();
char tokval[MAX_TOKVAL_SIZE];
tokval[0] = '\0';
+ bool usedefault = false;
while ((t = token(tokval))) {
switch(t) {
case DEFAULT:
- usedefault = 1;
+ usedefault = true;
/* FALLTHRU */
case MACH:
mypass = *aname;
}
- *aname = mh_xstrdup(mypass);
+ *apass = mh_xstrdup(mypass);
}
}