Removed file logging
This commit is contained in:
		@@ -37,13 +37,9 @@ struct dialogue_response {
 | 
				
			|||||||
  char *filename;
 | 
					  char *filename;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
FILE *access_log;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
int init_ui_socket(const char *perm_permissions_db_filename) {
 | 
					int init_ui_socket(const char *perm_permissions_db_filename) {
 | 
				
			||||||
  FILE *fp = NULL;
 | 
					  FILE *fp = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  access_log = fopen("/etc/icfs-log", "a+");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  if (init_temp_permissions_table()) {
 | 
					  if (init_temp_permissions_table()) {
 | 
				
			||||||
    fprintf(stderr,
 | 
					    fprintf(stderr,
 | 
				
			||||||
            "[ICFS] Could not initialize temporary permissions table.\n");
 | 
					            "[ICFS] Could not initialize temporary permissions table.\n");
 | 
				
			||||||
@@ -68,7 +64,6 @@ int init_ui_socket(const char *perm_permissions_db_filename) {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void destroy_ui_socket(void) {
 | 
					void destroy_ui_socket(void) {
 | 
				
			||||||
  fclose(access_log);
 | 
					 | 
				
			||||||
  destroy_temp_permissions_table();
 | 
					  destroy_temp_permissions_table();
 | 
				
			||||||
  destroy_perm_permissions_table();
 | 
					  destroy_perm_permissions_table();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -148,7 +143,6 @@ struct dialogue_response ask_access(const char *filename,
 | 
				
			|||||||
  // assert(0 == strcmp(response.filename, first(&dialogue_output)));
 | 
					  // assert(0 == strcmp(response.filename, first(&dialogue_output)));
 | 
				
			||||||
  cleanup(&dialogue_output);
 | 
					  cleanup(&dialogue_output);
 | 
				
			||||||
  time_t now = time(0);
 | 
					  time_t now = time(0);
 | 
				
			||||||
  fprintf(access_log, "[ICFS] wrote to access log: %ld\n", now);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (dialogue_exit_code == (DIALOGUE_YES | DIALOGUE_PERM)) {
 | 
					  if (dialogue_exit_code == (DIALOGUE_YES | DIALOGUE_PERM)) {
 | 
				
			||||||
    response.decision = ALLOW;
 | 
					    response.decision = ALLOW;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user