Fossil SCM
Never prompt for the encryption password, regardless of the repository name, unless the USE_SEE compile-time option was specified.
Commit
60026ba3cbb99e4f15ad0335fdfa4f78b3df4da0
Parent
6c4a0a0ae51c144…
1 file changed
+2
M
src/db.c
+2
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -881,10 +881,11 @@ | ||
| 881 | 881 | static void db_encryption_key( |
| 882 | 882 | const char *zDbFile, /* Name of the database file */ |
| 883 | 883 | Blob *pKey /* Put the encryption key here */ |
| 884 | 884 | ){ |
| 885 | 885 | blob_init(pKey, 0, 0); |
| 886 | +#if USE_SEE | |
| 886 | 887 | if( sqlite3_strglob("*efossil", zDbFile)==0 ){ |
| 887 | 888 | static char *zSavedKey = 0; |
| 888 | 889 | if( zSavedKey ){ |
| 889 | 890 | blob_set(pKey, zSavedKey); |
| 890 | 891 | }else{ |
| @@ -892,10 +893,11 @@ | ||
| 892 | 893 | prompt_for_password(zPrompt, pKey, 0); |
| 893 | 894 | fossil_free(zPrompt); |
| 894 | 895 | zSavedKey = fossil_strdup(blob_str(pKey)); |
| 895 | 896 | } |
| 896 | 897 | } |
| 898 | +#endif | |
| 897 | 899 | } |
| 898 | 900 | |
| 899 | 901 | |
| 900 | 902 | /* |
| 901 | 903 | ** Open a database file. Return a pointer to the new database |
| 902 | 904 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -881,10 +881,11 @@ | |
| 881 | static void db_encryption_key( |
| 882 | const char *zDbFile, /* Name of the database file */ |
| 883 | Blob *pKey /* Put the encryption key here */ |
| 884 | ){ |
| 885 | blob_init(pKey, 0, 0); |
| 886 | if( sqlite3_strglob("*efossil", zDbFile)==0 ){ |
| 887 | static char *zSavedKey = 0; |
| 888 | if( zSavedKey ){ |
| 889 | blob_set(pKey, zSavedKey); |
| 890 | }else{ |
| @@ -892,10 +893,11 @@ | |
| 892 | prompt_for_password(zPrompt, pKey, 0); |
| 893 | fossil_free(zPrompt); |
| 894 | zSavedKey = fossil_strdup(blob_str(pKey)); |
| 895 | } |
| 896 | } |
| 897 | } |
| 898 | |
| 899 | |
| 900 | /* |
| 901 | ** Open a database file. Return a pointer to the new database |
| 902 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -881,10 +881,11 @@ | |
| 881 | static void db_encryption_key( |
| 882 | const char *zDbFile, /* Name of the database file */ |
| 883 | Blob *pKey /* Put the encryption key here */ |
| 884 | ){ |
| 885 | blob_init(pKey, 0, 0); |
| 886 | #if USE_SEE |
| 887 | if( sqlite3_strglob("*efossil", zDbFile)==0 ){ |
| 888 | static char *zSavedKey = 0; |
| 889 | if( zSavedKey ){ |
| 890 | blob_set(pKey, zSavedKey); |
| 891 | }else{ |
| @@ -892,10 +893,11 @@ | |
| 893 | prompt_for_password(zPrompt, pKey, 0); |
| 894 | fossil_free(zPrompt); |
| 895 | zSavedKey = fossil_strdup(blob_str(pKey)); |
| 896 | } |
| 897 | } |
| 898 | #endif |
| 899 | } |
| 900 | |
| 901 | |
| 902 | /* |
| 903 | ** Open a database file. Return a pointer to the new database |
| 904 |