Fossil SCM

Never prompt for the encryption password, regardless of the repository name, unless the USE_SEE compile-time option was specified.

drh 2016-04-22 20:06 trunk
Commit 60026ba3cbb99e4f15ad0335fdfa4f78b3df4da0
1 file changed +2
+2
--- src/db.c
+++ src/db.c
@@ -881,10 +881,11 @@
881881
static void db_encryption_key(
882882
const char *zDbFile, /* Name of the database file */
883883
Blob *pKey /* Put the encryption key here */
884884
){
885885
blob_init(pKey, 0, 0);
886
+#if USE_SEE
886887
if( sqlite3_strglob("*efossil", zDbFile)==0 ){
887888
static char *zSavedKey = 0;
888889
if( zSavedKey ){
889890
blob_set(pKey, zSavedKey);
890891
}else{
@@ -892,10 +893,11 @@
892893
prompt_for_password(zPrompt, pKey, 0);
893894
fossil_free(zPrompt);
894895
zSavedKey = fossil_strdup(blob_str(pKey));
895896
}
896897
}
898
+#endif
897899
}
898900
899901
900902
/*
901903
** Open a database file. Return a pointer to the new database
902904
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button