mirror of
				https://github.com/isar/libmdbx.git
				synced 2025-10-31 03:29:01 +08:00 
			
		
		
		
	lmdb: Reject CHANGELESS flags in mdb_env_set_flags().
Reverts part of a2ac10107e2fb845c4a38a339239063ec4407d84. MDB_ROBUST needed to be accepted, but that flag is gone. Change-Id: I2aba1e9e02da716d4509e465767bf8be05895c29
This commit is contained in:
		
				
					committed by
					
						 Leo Yuriev
						Leo Yuriev
					
				
			
			
				
	
			
			
			
						parent
						
							1f58fb66ae
						
					
				
				
					commit
					62181cfe87
				
			
							
								
								
									
										1
									
								
								lmdb.h
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								lmdb.h
									
									
									
									
									
								
							| @@ -747,7 +747,6 @@ void mdb_env_close(MDB_env *env); | |||||||
| 	 * This may be used to set some flags in addition to those from | 	 * This may be used to set some flags in addition to those from | ||||||
| 	 * #mdb_env_open(), or to unset these flags.  If several threads | 	 * #mdb_env_open(), or to unset these flags.  If several threads | ||||||
| 	 * change the flags at the same time, the result is undefined. | 	 * change the flags at the same time, the result is undefined. | ||||||
| 	 * Most flags cannot be changed after #mdb_env_open(). |  | ||||||
| 	 * @param[in] env An environment handle returned by #mdb_env_create() | 	 * @param[in] env An environment handle returned by #mdb_env_create() | ||||||
| 	 * @param[in] flags The flags to change, bitwise OR'ed together | 	 * @param[in] flags The flags to change, bitwise OR'ed together | ||||||
| 	 * @param[in] onoff A non-zero value sets the flags, zero clears them. | 	 * @param[in] onoff A non-zero value sets the flags, zero clears them. | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								mdb.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								mdb.c
									
									
									
									
									
								
							| @@ -9569,7 +9569,7 @@ mdb_env_copy(MDB_env *env, const char *path) | |||||||
| int ESECT | int ESECT | ||||||
| mdb_env_set_flags(MDB_env *env, unsigned int flag, int onoff) | mdb_env_set_flags(MDB_env *env, unsigned int flag, int onoff) | ||||||
| { | { | ||||||
| 	if (flag & (env->me_map ? ~CHANGEABLE : ~(CHANGEABLE|CHANGELESS))) | 	if ((flag & CHANGEABLE) != flag) | ||||||
| 		return EINVAL; | 		return EINVAL; | ||||||
| 	if (onoff) | 	if (onoff) | ||||||
| 		env->me_flags |= flag; | 		env->me_flags |= flag; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user