Remove some unnecessary comments
This commit is contained in:
		
							parent
							
								
									be15d1fc76
								
							
						
					
					
						commit
						a0af8075ce
					
				
					 1 changed files with 11 additions and 13 deletions
				
			
		
							
								
								
									
										24
									
								
								timeoutd.c
									
										
									
									
									
								
							
							
						
						
									
										24
									
								
								timeoutd.c
									
										
									
									
									
								
							|  | @ -68,7 +68,7 @@ | ||||||
| #define SESSMAX		3 | #define SESSMAX		3 | ||||||
| #define DAYMAX		4 | #define DAYMAX		4 | ||||||
| #define NOLOGIN		5 | #define NOLOGIN		5 | ||||||
| /*#define XSESSION	6*/ | 
 | ||||||
| #define	IDLEMSG		0 | #define	IDLEMSG		0 | ||||||
| #define	SESSMSG		1 | #define	SESSMSG		1 | ||||||
| #define	DAYMSG		2 | #define	DAYMSG		2 | ||||||
|  | @ -324,7 +324,6 @@ void read_wtmp() | ||||||
|             wtmplist = ut_list_p; |             wtmplist = ut_list_p; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         /* Position the file pointer 2 structures back */ |  | ||||||
|         if (fseek(fp, -2 * sizeof(struct utmp), SEEK_CUR) < 0) |         if (fseek(fp, -2 * sizeof(struct utmp), SEEK_CUR) < 0) | ||||||
|             break; |             break; | ||||||
|     } |     } | ||||||
|  | @ -569,7 +568,7 @@ void read_config() | ||||||
|                config[i]->warntime), i++; |                config[i]->warntime), i++; | ||||||
|     } |     } | ||||||
|     printf("End debug output.\n"); |     printf("End debug output.\n"); | ||||||
| #endif                          /* DEBUG */ | #endif | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| char chktimes(te) | char chktimes(te) | ||||||
|  | @ -905,8 +904,8 @@ void check_idle() | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void bailout(message, status)   /* display error message and exit */ | void bailout(message, status)   /* display error message and exit */ | ||||||
| int status;                     /* exit status */ | int status; | ||||||
| char *message;                  /* pointer to the error message */ | char *message; | ||||||
| { | { | ||||||
|     syslog(LOG_ERR, "Exiting - %s", message); |     syslog(LOG_ERR, "Exiting - %s", message); | ||||||
|     exit(status); |     exit(status); | ||||||
|  | @ -1122,10 +1121,10 @@ char *dev, *host; | ||||||
|         return 1; |         return 1; | ||||||
|     } else |     } else | ||||||
|         return 0; |         return 0; | ||||||
| }                               /* chk_xterm(dev,host) */ | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| void killit_xsession(pid, user, host)   /* returns 1 when host seems to be a xSession. */ | void killit_xsession(pid, user, host) | ||||||
| int pid; | int pid; | ||||||
| char *host, *user; | char *host, *user; | ||||||
| { | { | ||||||
|  | @ -1225,7 +1224,6 @@ char *display; | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|     /*change into the user running x. we need that to connect to X */ |     /*change into the user running x. we need that to connect to X */ | ||||||
|     /*setregid(1000, 1000); We don't need this */ |  | ||||||
| 
 | 
 | ||||||
|     /*save old, to come back */ |     /*save old, to come back */ | ||||||
|     oldeuid = geteuid(); |     oldeuid = geteuid(); | ||||||
|  | @ -1240,7 +1238,7 @@ char *display; | ||||||
|     putenv(homedir); |     putenv(homedir); | ||||||
| 
 | 
 | ||||||
|     /* First, check if there is a xserver.. */ |     /* First, check if there is a xserver.. */ | ||||||
|     if ((dpy = XOpenDisplay(display)) == NULL) {        /* = intended */ |     if ((dpy = XOpenDisplay(display)) == NULL) { | ||||||
|         syslog(LOG_NOTICE, "Could not connect to %s to query idle-time for %s. Ignoring.", display, |         syslog(LOG_NOTICE, "Could not connect to %s to query idle-time for %s. Ignoring.", display, | ||||||
|                user); |                user); | ||||||
|     } else { |     } else { | ||||||
|  | @ -1255,7 +1253,7 @@ char *display; | ||||||
|     setuid(oldeuid); |     setuid(oldeuid); | ||||||
| 
 | 
 | ||||||
|     return retval; |     return retval; | ||||||
| }                               /* get_xidle(user) */ | } | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | @ -1279,7 +1277,7 @@ pid_t ppid; | ||||||
|     proc = opendir("/proc/"); |     proc = opendir("/proc/"); | ||||||
|     if (proc == NULL) { |     if (proc == NULL) { | ||||||
|         printf("error opening directory\n"); |         printf("error opening directory\n"); | ||||||
|         return -1;              /* error */ |         return -1; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     while ((cont = readdir(proc)) != NULL) { |     while ((cont = readdir(proc)) != NULL) { | ||||||
|  | @ -1293,9 +1291,9 @@ pid_t ppid; | ||||||
|                 fgets(akt_pid, 10, proc_file); |                 fgets(akt_pid, 10, proc_file); | ||||||
| 
 | 
 | ||||||
|             if (atoi(akt_pid) == ppid) |             if (atoi(akt_pid) == ppid) | ||||||
|                 return (pid_t) atoi(cont->d_name);      /* return pid of child */ |                 return (pid_t) atoi(cont->d_name); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     return 0;                   /* no child found */ |     return 0;                   /* no child found */ | ||||||
| }                               /* getchild(ppid) */ | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Petar Kapris
						Petar Kapris