Fossil SCM
Comment fixes.
Commit
1ff19a468d762ebf5c8123b7bf29081ee4137fd83b87aa756feb9434532c8bad
Parent
d72ab72962fbd17…
1 file changed
+8
-7
M
src/db.c
+8
-7
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -1582,12 +1582,12 @@ | ||
| 1582 | 1582 | int db_have_saved_encryption_key(){ |
| 1583 | 1583 | return db_is_valid_saved_encryption_key(zSavedKey, savedKeySize); |
| 1584 | 1584 | } |
| 1585 | 1585 | |
| 1586 | 1586 | /* |
| 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. | |
| 1589 | 1589 | */ |
| 1590 | 1590 | int db_is_valid_saved_encryption_key(const char *p, size_t n){ |
| 1591 | 1591 | if( p==0 ) return 0; |
| 1592 | 1592 | if( n==0 ) return 0; |
| 1593 | 1593 | if( p[0]==0 ) return 0; |
| @@ -1703,11 +1703,12 @@ | ||
| 1703 | 1703 | ** WEBPAGE: setseekey |
| 1704 | 1704 | ** |
| 1705 | 1705 | ** Sets the sets the saved database encryption key to one that gets passed |
| 1706 | 1706 | ** via the "key" query string parameter. If the saved database encryption |
| 1707 | 1707 | ** 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). | |
| 1709 | 1710 | ** |
| 1710 | 1711 | ** Query parameters: |
| 1711 | 1712 | ** |
| 1712 | 1713 | ** key The string to set as the saved database encryption |
| 1713 | 1714 | ** key. |
| @@ -1737,13 +1738,13 @@ | ||
| 1737 | 1738 | } |
| 1738 | 1739 | |
| 1739 | 1740 | /* |
| 1740 | 1741 | ** WEBPAGE: unsetseekey |
| 1741 | 1742 | ** |
| 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. | |
| 1745 | 1746 | */ |
| 1746 | 1747 | void db_unset_see_key_page(void){ |
| 1747 | 1748 | PID_T processId; |
| 1748 | 1749 | login_check_credentials(); |
| 1749 | 1750 | if( !g.perm.Setup ){ login_needed(0); return; } |
| @@ -1888,11 +1889,11 @@ | ||
| 1888 | 1889 | #endif |
| 1889 | 1890 | } |
| 1890 | 1891 | } |
| 1891 | 1892 | |
| 1892 | 1893 | /* |
| 1893 | -** This function zero the saved database encryption key in the specified | |
| 1894 | +** This function zeros the saved database encryption key in the specified | |
| 1894 | 1895 | ** Fossil parent process. This is only necessary (or functional) on |
| 1895 | 1896 | ** Windows or Linux. |
| 1896 | 1897 | */ |
| 1897 | 1898 | static void db_zero_saved_encryption_key_in_process( |
| 1898 | 1899 | PID_T processId, /* Identifier for Fossil parent process. */ |
| 1899 | 1900 |
| --- 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 |