Replace tty variable in chk_timeout
The tty variable is a char pointer equal to dev, it's pointee does not change during the function, nor does the pointer itself change, it's always simply equal to the argument dev, therefore, this pointer is, ... pointless (ba dum tss!)
This commit is contained in:
		
							parent
							
								
									9201509738
								
							
						
					
					
						commit
						be15d1fc76
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		|  | @ -740,7 +740,6 @@ int session; | ||||||
|     char ttymatch = 0; |     char ttymatch = 0; | ||||||
|     char usermatch = 0; |     char usermatch = 0; | ||||||
|     char groupmatch = 0; |     char groupmatch = 0; | ||||||
|     char *tty = dev; |  | ||||||
|     char **p; |     char **p; | ||||||
|     int disc; |     int disc; | ||||||
| 
 | 
 | ||||||
|  | @ -757,13 +756,13 @@ int session; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| #ifdef DEBUG | #ifdef DEBUG | ||||||
|     syslog(LOG_DEBUG, "Checking user %s group %s tty %s.", user, gr->gr_name, tty); |     syslog(LOG_DEBUG, "Checking user %s group %s tty %s.", user, gr->gr_name, dev); | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| /* Check to see if current user matches any entry based on tty/user/group */ | /* Check to see if current user matches any entry based on tty/user/group */ | ||||||
|     while (config[configline]) { |     while (config[configline]) { | ||||||
|         timematch = chktimes(config[configline]->times); |         timematch = chktimes(config[configline]->times); | ||||||
|         ttymatch = chkmatch(tty, config[configline]->ttys); |         ttymatch = chkmatch(dev, config[configline]->ttys); | ||||||
|         usermatch = chkmatch(user, config[configline]->users); |         usermatch = chkmatch(user, config[configline]->users); | ||||||
|         groupmatch = chkmatch(gr->gr_name, config[configline]->groups); |         groupmatch = chkmatch(gr->gr_name, config[configline]->groups); | ||||||
| /* If the primary group doesn't match this entry, check secondaries */ | /* If the primary group doesn't match this entry, check secondaries */ | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Petar Kapris
						Petar Kapris