bugfix: qssb_enable_policy: pointer to stack-local variable
这个提交包含在:
		
							
								
								
									
										4
									
								
								qssb.h
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								qssb.h
									
									
									
									
									
								
							| @@ -482,11 +482,11 @@ int qssb_enable_policy(struct qssb_policy *policy) | |||||||
|  |  | ||||||
| 	if(policy->chroot_target_path == NULL) | 	if(policy->chroot_target_path == NULL) | ||||||
| 	{ | 	{ | ||||||
| 		char target_dir[PATH_MAX]; | 		char *target_dir = calloc(1, PATH_MAX * sizeof(char)); | ||||||
| 		char random_str[17]; | 		char random_str[17]; | ||||||
| 		if(random_string(random_str, sizeof(random_str)) == 16) | 		if(random_string(random_str, sizeof(random_str)) == 16) | ||||||
| 		{ | 		{ | ||||||
| 			int res = snprintf(target_dir, sizeof(target_dir), "%s/.sandbox_%" PRIdMAX "_%s", QSSB_TEMP_DIR, (intmax_t)getpid(), random_str); | 			int res = snprintf(target_dir, PATH_MAX, "%s/.sandbox_%" PRIdMAX "_%s", QSSB_TEMP_DIR, (intmax_t)getpid(), random_str); | ||||||
| 			if(res < 0) | 			if(res < 0) | ||||||
| 			{ | 			{ | ||||||
| 				QSSB_LOG_ERROR("qssb: qssb_enable_policy: error during path concatination\n"); | 				QSSB_LOG_ERROR("qssb: qssb_enable_policy: error during path concatination\n"); | ||||||
|   | |||||||
		在新工单中引用
	
	屏蔽一个用户