get rid of a warning by some code restructuring (is this really worth
it?) git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4197 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		@@ -94,8 +94,6 @@ store_ticket(KTEXT cip)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    int kerror;
 | 
					    int kerror;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    time_t kdc_time;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    ptr = (char *) cip->dat;
 | 
					    ptr = (char *) cip->dat;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* extract session key */
 | 
					    /* extract session key */
 | 
				
			||||||
@@ -156,14 +154,18 @@ store_ticket(KTEXT cip)
 | 
				
			|||||||
    
 | 
					    
 | 
				
			||||||
#if 0
 | 
					#if 0
 | 
				
			||||||
    /* check KDC time stamp */
 | 
					    /* check KDC time stamp */
 | 
				
			||||||
    memmove(&kdc_time, ptr, sizeof(kdc_time));
 | 
					    {
 | 
				
			||||||
    if (swap_bytes) swap_u_long(kdc_time);
 | 
						time_t kdc_time;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ptr += 4;
 | 
						memmove(&kdc_time, ptr, sizeof(kdc_time));
 | 
				
			||||||
 | 
						if (swap_bytes) swap_u_long(kdc_time);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (abs((int)(local_time - kdc_time)) > CLOCK_SKEW) {
 | 
						ptr += 4;
 | 
				
			||||||
        return(RD_AP_TIME);		/* XXX should probably be better
 | 
					    
 | 
				
			||||||
 | 
						if (abs((int)(local_time - kdc_time)) > CLOCK_SKEW) {
 | 
				
			||||||
 | 
						    return(RD_AP_TIME);		/* XXX should probably be better
 | 
				
			||||||
					   code */
 | 
										   code */
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -77,8 +77,10 @@ void
 | 
				
			|||||||
logwtmp(char *line, char *name, char *host)
 | 
					logwtmp(char *line, char *name, char *host)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    static int init = 0;
 | 
					    static int init = 0;
 | 
				
			||||||
    static int fd, fdx;
 | 
					    static int fd;
 | 
				
			||||||
    struct timeval tv;
 | 
					#ifdef WTMPX_FILE
 | 
				
			||||||
 | 
					    static int fdx;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
    struct utmp ut;
 | 
					    struct utmp ut;
 | 
				
			||||||
#ifdef WTMPX_FILE
 | 
					#ifdef WTMPX_FILE
 | 
				
			||||||
    struct utmpx utx;
 | 
					    struct utmpx utx;
 | 
				
			||||||
@@ -110,9 +112,13 @@ logwtmp(char *line, char *name, char *host)
 | 
				
			|||||||
    if (utx.ut_syslen > sizeof(utx.ut_host))
 | 
					    if (utx.ut_syslen > sizeof(utx.ut_host))
 | 
				
			||||||
        utx.ut_syslen = sizeof(utx.ut_host);
 | 
					        utx.ut_syslen = sizeof(utx.ut_host);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
    gettimeofday (&tv, 0);
 | 
					    {
 | 
				
			||||||
    utx.ut_tv.tv_sec = tv.tv_sec;
 | 
						struct timeval tv;
 | 
				
			||||||
    utx.ut_tv.tv_usec = tv.tv_usec;
 | 
					
 | 
				
			||||||
 | 
						gettimeofday (&tv, 0);
 | 
				
			||||||
 | 
						utx.ut_tv.tv_sec = tv.tv_sec;
 | 
				
			||||||
 | 
						utx.ut_tv.tv_usec = tv.tv_usec;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if(name[0])
 | 
					    if(name[0])
 | 
				
			||||||
	utx.ut_type = USER_PROCESS;
 | 
						utx.ut_type = USER_PROCESS;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user