Fossil SCM

Comment fixes.

mistachkin 2023-05-18 23:24 enhSee
Commit 1ff19a468d762ebf5c8123b7bf29081ee4137fd83b87aa756feb9434532c8bad
1 file changed +8 -7
+8 -7
--- src/db.c
+++ src/db.c
@@ -1582,12 +1582,12 @@
15821582
int db_have_saved_encryption_key(){
15831583
return db_is_valid_saved_encryption_key(zSavedKey, savedKeySize);
15841584
}
15851585
15861586
/*
1587
-** This function returns non-zero if the specified saved database encryption
1588
-** key is valid.
1587
+** This function returns non-zero if the specified database encryption key
1588
+** is valid.
15891589
*/
15901590
int db_is_valid_saved_encryption_key(const char *p, size_t n){
15911591
if( p==0 ) return 0;
15921592
if( n==0 ) return 0;
15931593
if( p[0]==0 ) return 0;
@@ -1703,11 +1703,12 @@
17031703
** WEBPAGE: setseekey
17041704
**
17051705
** Sets the sets the saved database encryption key to one that gets passed
17061706
** via the "key" query string parameter. If the saved database encryption
17071707
** key has already been set, does nothing. This web page does not produce
1708
-** any output on success or failure.
1708
+** any output on success or failure. No permissions are required and none
1709
+** are checked (partially due to lack of encrypted database access).
17091710
**
17101711
** Query parameters:
17111712
**
17121713
** key The string to set as the saved database encryption
17131714
** key.
@@ -1737,13 +1738,13 @@
17371738
}
17381739
17391740
/*
17401741
** WEBPAGE: unsetseekey
17411742
**
1742
-** Unsets the saved database encryption key to zeros. If the saved database
1743
-** encryption key has already been set, does nothing. This web page does not
1744
-** produce any output on success or failure.
1743
+** Sets the saved database encryption key to zeros in the current and parent
1744
+** Fossil processes. This web page does not produce any output on success
1745
+** or failure. Setup permission is required.
17451746
*/
17461747
void db_unset_see_key_page(void){
17471748
PID_T processId;
17481749
login_check_credentials();
17491750
if( !g.perm.Setup ){ login_needed(0); return; }
@@ -1888,11 +1889,11 @@
18881889
#endif
18891890
}
18901891
}
18911892
18921893
/*
1893
-** This function zero the saved database encryption key in the specified
1894
+** This function zeros the saved database encryption key in the specified
18941895
** Fossil parent process. This is only necessary (or functional) on
18951896
** Windows or Linux.
18961897
*/
18971898
static void db_zero_saved_encryption_key_in_process(
18981899
PID_T processId, /* Identifier for Fossil parent process. */
18991900
--- src/db.c
+++ src/db.c
@@ -1582,12 +1582,12 @@
1582 int db_have_saved_encryption_key(){
1583 return db_is_valid_saved_encryption_key(zSavedKey, savedKeySize);
1584 }
1585
1586 /*
1587 ** This function returns non-zero if the specified saved database encryption
1588 ** key is valid.
1589 */
1590 int db_is_valid_saved_encryption_key(const char *p, size_t n){
1591 if( p==0 ) return 0;
1592 if( n==0 ) return 0;
1593 if( p[0]==0 ) return 0;
@@ -1703,11 +1703,12 @@
1703 ** WEBPAGE: setseekey
1704 **
1705 ** Sets the sets the saved database encryption key to one that gets passed
1706 ** via the "key" query string parameter. If the saved database encryption
1707 ** key has already been set, does nothing. This web page does not produce
1708 ** any output on success or failure.
 
1709 **
1710 ** Query parameters:
1711 **
1712 ** key The string to set as the saved database encryption
1713 ** key.
@@ -1737,13 +1738,13 @@
1737 }
1738
1739 /*
1740 ** WEBPAGE: unsetseekey
1741 **
1742 ** Unsets the saved database encryption key to zeros. If the saved database
1743 ** encryption key has already been set, does nothing. This web page does not
1744 ** produce any output on success or failure.
1745 */
1746 void db_unset_see_key_page(void){
1747 PID_T processId;
1748 login_check_credentials();
1749 if( !g.perm.Setup ){ login_needed(0); return; }
@@ -1888,11 +1889,11 @@
1888 #endif
1889 }
1890 }
1891
1892 /*
1893 ** This function zero the saved database encryption key in the specified
1894 ** Fossil parent process. This is only necessary (or functional) on
1895 ** Windows or Linux.
1896 */
1897 static void db_zero_saved_encryption_key_in_process(
1898 PID_T processId, /* Identifier for Fossil parent process. */
1899
--- src/db.c
+++ src/db.c
@@ -1582,12 +1582,12 @@
1582 int db_have_saved_encryption_key(){
1583 return db_is_valid_saved_encryption_key(zSavedKey, savedKeySize);
1584 }
1585
1586 /*
1587 ** This function returns non-zero if the specified database encryption key
1588 ** is valid.
1589 */
1590 int db_is_valid_saved_encryption_key(const char *p, size_t n){
1591 if( p==0 ) return 0;
1592 if( n==0 ) return 0;
1593 if( p[0]==0 ) return 0;
@@ -1703,11 +1703,12 @@
1703 ** WEBPAGE: setseekey
1704 **
1705 ** Sets the sets the saved database encryption key to one that gets passed
1706 ** via the "key" query string parameter. If the saved database encryption
1707 ** key has already been set, does nothing. This web page does not produce
1708 ** any output on success or failure. No permissions are required and none
1709 ** are checked (partially due to lack of encrypted database access).
1710 **
1711 ** Query parameters:
1712 **
1713 ** key The string to set as the saved database encryption
1714 ** key.
@@ -1737,13 +1738,13 @@
1738 }
1739
1740 /*
1741 ** WEBPAGE: unsetseekey
1742 **
1743 ** Sets the saved database encryption key to zeros in the current and parent
1744 ** Fossil processes. This web page does not produce any output on success
1745 ** or failure. Setup permission is required.
1746 */
1747 void db_unset_see_key_page(void){
1748 PID_T processId;
1749 login_check_credentials();
1750 if( !g.perm.Setup ){ login_needed(0); return; }
@@ -1888,11 +1889,11 @@
1889 #endif
1890 }
1891 }
1892
1893 /*
1894 ** This function zeros the saved database encryption key in the specified
1895 ** Fossil parent process. This is only necessary (or functional) on
1896 ** Windows or Linux.
1897 */
1898 static void db_zero_saved_encryption_key_in_process(
1899 PID_T processId, /* Identifier for Fossil parent process. */
1900

Keyboard Shortcuts

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