new option -y for no warnings
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@707 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -221,6 +221,7 @@ struct clocks_t{
|
||||
extern struct clocks_t clocks;
|
||||
|
||||
extern int log_unauth;
|
||||
extern int no_warn;
|
||||
|
||||
|
||||
#if defined(CRAY2) && defined(UNICOS5)
|
||||
|
@@ -104,3 +104,6 @@ struct clocks_t clocks;
|
||||
|
||||
/* whether to log unauthenticated login attempts */
|
||||
int log_unauth;
|
||||
|
||||
/* do not print warning if connection is not encrypted */
|
||||
int no_warn;
|
||||
|
@@ -1339,7 +1339,7 @@ startslave(char *host, int autologin, char *autoname)
|
||||
"\r\n*** Connection not encrypted! "
|
||||
"Communication may be eavesdropped. ***\r\n";
|
||||
#ifdef ENCRYPTION
|
||||
if (encrypt_output == 0 || decrypt_input == 0)
|
||||
if (!no_warn && (encrypt_output == 0 || decrypt_input == 0))
|
||||
#endif
|
||||
writenet((unsigned char*)tbuf, strlen(tbuf));
|
||||
}
|
||||
@@ -1609,8 +1609,9 @@ void start_login(char *host, int autologin, char *name)
|
||||
#endif
|
||||
#if defined (AUTHENTICATION)
|
||||
if (auth_level < 0 || autologin != AUTH_VALID) {
|
||||
printf("User not authenticated. "
|
||||
"Using plaintext username and password\r\n");
|
||||
if(!no_warn)
|
||||
printf("User not authenticated. "
|
||||
"Using plaintext username and password\r\n");
|
||||
if(log_unauth) {
|
||||
char *u;
|
||||
if(name[0]) u = name;
|
||||
|
@@ -172,7 +172,10 @@ char valid_opts[] = {
|
||||
's',
|
||||
#endif
|
||||
'L', ':',
|
||||
#ifdef AUTHENTICATION
|
||||
'y',
|
||||
'z',
|
||||
#endif
|
||||
'\0'
|
||||
};
|
||||
|
||||
@@ -370,6 +373,9 @@ int main(int argc, char **argv)
|
||||
*/
|
||||
auth_disable_name(optarg);
|
||||
break;
|
||||
case 'y':
|
||||
no_warn = 1;
|
||||
break;
|
||||
case 'z':
|
||||
log_unauth = 1;
|
||||
break;
|
||||
@@ -585,7 +591,7 @@ usage()
|
||||
fprintf(stderr, " [-S tos]");
|
||||
#endif
|
||||
#ifdef AUTHENTICATION
|
||||
fprintf(stderr, " [-X auth-type] [-z]");
|
||||
fprintf(stderr, " [-X auth-type] [-y] [-z]");
|
||||
#endif
|
||||
fprintf(stderr, " [-u utmp_hostname_length] [-U]");
|
||||
fprintf(stderr, " [port]\n");
|
||||
|
Reference in New Issue
Block a user