Fixed an arbitrary return value in temp permissions init
This commit is contained in:
		@@ -75,6 +75,7 @@ unsigned long long get_process_creation_time(pid_t pid) {
 | 
			
		||||
int init_temp_permissions_table() {
 | 
			
		||||
  pthread_mutex_init(&temp_permissions_table_lock, PTHREAD_MUTEX_DEFAULT);
 | 
			
		||||
  init(&temp_permissions_table);
 | 
			
		||||
  return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -225,7 +226,6 @@ int give_temp_access(const char *filename, struct process_info pi) {
 | 
			
		||||
  push(&new_permission_entry.allowed_files, strdup(filename));
 | 
			
		||||
 | 
			
		||||
  insert(&temp_permissions_table, pi.PID, new_permission_entry);
 | 
			
		||||
  printf("temp_permissions_table size: %ld\n", size(&temp_permissions_table));
 | 
			
		||||
 | 
			
		||||
  pthread_mutex_unlock(&temp_permissions_table_lock);
 | 
			
		||||
  return 0;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user