X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/ffdd694f6050652d492606e5adbcb5f491050ace..3bcb5ef8fc34c3c453ebd968eb80577dc60e71de:/sbr/ruserpass.c diff --git a/sbr/ruserpass.c b/sbr/ruserpass.c index de0f951b..610f32a5 100644 --- a/sbr/ruserpass.c +++ b/sbr/ruserpass.c @@ -59,7 +59,7 @@ static int token(char *); void -ruserpass(char *host, char **aname, char **apass) +ruserpass(const char *host, char **aname, char **apass, int flags) { int t, usedefault = 0; struct stat stb; @@ -133,7 +133,7 @@ ruserpass(char *host, char **aname, char **apass) } } - if (!*aname) { + if (!*aname && ! (flags & RUSERPASS_NO_PROMPT_USER)) { char tmp[80]; char *myname; @@ -156,7 +156,7 @@ ruserpass(char *host, char **aname, char **apass) *aname = mh_xstrdup(myname); } - if (!*apass) { + if (!*apass && ! (flags & RUSERPASS_NO_PROMPT_PASSWORD)) { char prompt[256]; char *mypass;