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:
Assar Westerlund
1996-09-02 19:12:33 +00:00
parent a159babd9a
commit 1e35a8c714
4 changed files with 15 additions and 4 deletions

View File

@@ -221,6 +221,7 @@ struct clocks_t{
extern struct clocks_t clocks; extern struct clocks_t clocks;
extern int log_unauth; extern int log_unauth;
extern int no_warn;
#if defined(CRAY2) && defined(UNICOS5) #if defined(CRAY2) && defined(UNICOS5)

View File

@@ -104,3 +104,6 @@ struct clocks_t clocks;
/* whether to log unauthenticated login attempts */ /* whether to log unauthenticated login attempts */
int log_unauth; int log_unauth;
/* do not print warning if connection is not encrypted */
int no_warn;

View File

@@ -1339,7 +1339,7 @@ startslave(char *host, int autologin, char *autoname)
"\r\n*** Connection not encrypted! " "\r\n*** Connection not encrypted! "
"Communication may be eavesdropped. ***\r\n"; "Communication may be eavesdropped. ***\r\n";
#ifdef ENCRYPTION #ifdef ENCRYPTION
if (encrypt_output == 0 || decrypt_input == 0) if (!no_warn && (encrypt_output == 0 || decrypt_input == 0))
#endif #endif
writenet((unsigned char*)tbuf, strlen(tbuf)); writenet((unsigned char*)tbuf, strlen(tbuf));
} }
@@ -1609,6 +1609,7 @@ void start_login(char *host, int autologin, char *name)
#endif #endif
#if defined (AUTHENTICATION) #if defined (AUTHENTICATION)
if (auth_level < 0 || autologin != AUTH_VALID) { if (auth_level < 0 || autologin != AUTH_VALID) {
if(!no_warn)
printf("User not authenticated. " printf("User not authenticated. "
"Using plaintext username and password\r\n"); "Using plaintext username and password\r\n");
if(log_unauth) { if(log_unauth) {

View File

@@ -172,7 +172,10 @@ char valid_opts[] = {
's', 's',
#endif #endif
'L', ':', 'L', ':',
#ifdef AUTHENTICATION
'y',
'z', 'z',
#endif
'\0' '\0'
}; };
@@ -370,6 +373,9 @@ int main(int argc, char **argv)
*/ */
auth_disable_name(optarg); auth_disable_name(optarg);
break; break;
case 'y':
no_warn = 1;
break;
case 'z': case 'z':
log_unauth = 1; log_unauth = 1;
break; break;
@@ -585,7 +591,7 @@ usage()
fprintf(stderr, " [-S tos]"); fprintf(stderr, " [-S tos]");
#endif #endif
#ifdef AUTHENTICATION #ifdef AUTHENTICATION
fprintf(stderr, " [-X auth-type] [-z]"); fprintf(stderr, " [-X auth-type] [-y] [-z]");
#endif #endif
fprintf(stderr, " [-u utmp_hostname_length] [-U]"); fprintf(stderr, " [-u utmp_hostname_length] [-U]");
fprintf(stderr, " [port]\n"); fprintf(stderr, " [port]\n");