Fossil SCM
Reimplement the default test-http behavior while retaining the ability to use http to take advantage of Fossil capabilities with SSH URLs.
Commit
7c9347f9c70db96454a70963950012d9ca707955
Parent
308f52a63acf8e1…
6 files changed
+5
+3
+2
-1
+5
-1
+2
+8
-1
+5
| --- src/clone.c | ||
| +++ src/clone.c | ||
| @@ -96,10 +96,11 @@ | ||
| 96 | 96 | ** --private Also clone private branches |
| 97 | 97 | ** --ssl-identity=filename Use the SSL identity if requested by the server |
| 98 | 98 | ** --ssh-fossil|-f /fossil Use this path as remote fossil command |
| 99 | 99 | ** --ssh-command|-c 'command' Use this SSH command |
| 100 | 100 | ** --ssh-fossil-user|-l user Fossil user to use for SSH if different. |
| 101 | +** --ssh-use-http|-h Enable http instead of test-http | |
| 101 | 102 | ** |
| 102 | 103 | ** See also: init |
| 103 | 104 | */ |
| 104 | 105 | void clone_cmd(void){ |
| 105 | 106 | char *zPassword; |
| @@ -200,10 +201,11 @@ | ||
| 200 | 201 | } |
| 201 | 202 | zFossilUser = find_option("ssh-fossil-user","l",1); |
| 202 | 203 | if( zFossilUser && zFossilUser[0] ){ |
| 203 | 204 | g.zFossilUser = mprintf("%s", zFossilUser); |
| 204 | 205 | } |
| 206 | + g.fSshUseHttp = find_option("ssh-use-http","h",0)!=0; | |
| 205 | 207 | } |
| 206 | 208 | |
| 207 | 209 | /* |
| 208 | 210 | ** Set SSH options discovered in global variables (set from command line |
| 209 | 211 | ** options). |
| @@ -216,6 +218,9 @@ | ||
| 216 | 218 | db_set("ssh-command", g.zSshCmd, 0); |
| 217 | 219 | } |
| 218 | 220 | if( g.zFossilUser && g.zFossilUser[0] ){ |
| 219 | 221 | db_set("ssh-fossil-user", g.zFossilUser, 0); |
| 220 | 222 | } |
| 223 | + if( g.fSshUseHttp ){ | |
| 224 | + db_set_int("ssh-use-http", 1, 0); | |
| 225 | + } | |
| 221 | 226 | } |
| 222 | 227 |
| --- src/clone.c | |
| +++ src/clone.c | |
| @@ -96,10 +96,11 @@ | |
| 96 | ** --private Also clone private branches |
| 97 | ** --ssl-identity=filename Use the SSL identity if requested by the server |
| 98 | ** --ssh-fossil|-f /fossil Use this path as remote fossil command |
| 99 | ** --ssh-command|-c 'command' Use this SSH command |
| 100 | ** --ssh-fossil-user|-l user Fossil user to use for SSH if different. |
| 101 | ** |
| 102 | ** See also: init |
| 103 | */ |
| 104 | void clone_cmd(void){ |
| 105 | char *zPassword; |
| @@ -200,10 +201,11 @@ | |
| 200 | } |
| 201 | zFossilUser = find_option("ssh-fossil-user","l",1); |
| 202 | if( zFossilUser && zFossilUser[0] ){ |
| 203 | g.zFossilUser = mprintf("%s", zFossilUser); |
| 204 | } |
| 205 | } |
| 206 | |
| 207 | /* |
| 208 | ** Set SSH options discovered in global variables (set from command line |
| 209 | ** options). |
| @@ -216,6 +218,9 @@ | |
| 216 | db_set("ssh-command", g.zSshCmd, 0); |
| 217 | } |
| 218 | if( g.zFossilUser && g.zFossilUser[0] ){ |
| 219 | db_set("ssh-fossil-user", g.zFossilUser, 0); |
| 220 | } |
| 221 | } |
| 222 |
| --- src/clone.c | |
| +++ src/clone.c | |
| @@ -96,10 +96,11 @@ | |
| 96 | ** --private Also clone private branches |
| 97 | ** --ssl-identity=filename Use the SSL identity if requested by the server |
| 98 | ** --ssh-fossil|-f /fossil Use this path as remote fossil command |
| 99 | ** --ssh-command|-c 'command' Use this SSH command |
| 100 | ** --ssh-fossil-user|-l user Fossil user to use for SSH if different. |
| 101 | ** --ssh-use-http|-h Enable http instead of test-http |
| 102 | ** |
| 103 | ** See also: init |
| 104 | */ |
| 105 | void clone_cmd(void){ |
| 106 | char *zPassword; |
| @@ -200,10 +201,11 @@ | |
| 201 | } |
| 202 | zFossilUser = find_option("ssh-fossil-user","l",1); |
| 203 | if( zFossilUser && zFossilUser[0] ){ |
| 204 | g.zFossilUser = mprintf("%s", zFossilUser); |
| 205 | } |
| 206 | g.fSshUseHttp = find_option("ssh-use-http","h",0)!=0; |
| 207 | } |
| 208 | |
| 209 | /* |
| 210 | ** Set SSH options discovered in global variables (set from command line |
| 211 | ** options). |
| @@ -216,6 +218,9 @@ | |
| 218 | db_set("ssh-command", g.zSshCmd, 0); |
| 219 | } |
| 220 | if( g.zFossilUser && g.zFossilUser[0] ){ |
| 221 | db_set("ssh-fossil-user", g.zFossilUser, 0); |
| 222 | } |
| 223 | if( g.fSshUseHttp ){ |
| 224 | db_set_int("ssh-use-http", 1, 0); |
| 225 | } |
| 226 | } |
| 227 |
M
src/db.c
+3
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -2136,10 +2136,11 @@ | ||
| 2136 | 2136 | { "repo-cksum", 0, 0, 0, "on" }, |
| 2137 | 2137 | { "self-register", 0, 0, 0, "off" }, |
| 2138 | 2138 | { "ssh-command", 0, 40, 0, "" }, |
| 2139 | 2139 | { "ssh-fossil", 0, 40, 0, "" }, |
| 2140 | 2140 | { "ssh-fossil-user", 0, 40, 0, "" }, |
| 2141 | + { "ssh-use-http", 0, 40, 0, "off" }, | |
| 2141 | 2142 | { "ssl-ca-location",0, 40, 0, "" }, |
| 2142 | 2143 | { "ssl-identity", 0, 40, 0, "" }, |
| 2143 | 2144 | #ifdef FOSSIL_ENABLE_TCL |
| 2144 | 2145 | { "tcl", 0, 0, 0, "off" }, |
| 2145 | 2146 | { "tcl-setup", 0, 40, 0, "" }, |
| @@ -2310,10 +2311,12 @@ | ||
| 2310 | 2311 | ** the "ssh://" protocol. |
| 2311 | 2312 | ** |
| 2312 | 2313 | ** ssh-fossil Remote fossil command to run with the "ssh://" protocol. |
| 2313 | 2314 | ** |
| 2314 | 2315 | ** ssh-fossil-user Fossil user to use instead of the URL user. |
| 2316 | +** | |
| 2317 | +** ssh-use-http Use http instead of test-http. Default: off. | |
| 2315 | 2318 | ** |
| 2316 | 2319 | ** ssl-ca-location The full pathname to a file containing PEM encoded |
| 2317 | 2320 | ** CA root certificates, or a directory of certificates |
| 2318 | 2321 | ** with filenames formed from the certificate hashes as |
| 2319 | 2322 | ** required by OpenSSL. |
| 2320 | 2323 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -2136,10 +2136,11 @@ | |
| 2136 | { "repo-cksum", 0, 0, 0, "on" }, |
| 2137 | { "self-register", 0, 0, 0, "off" }, |
| 2138 | { "ssh-command", 0, 40, 0, "" }, |
| 2139 | { "ssh-fossil", 0, 40, 0, "" }, |
| 2140 | { "ssh-fossil-user", 0, 40, 0, "" }, |
| 2141 | { "ssl-ca-location",0, 40, 0, "" }, |
| 2142 | { "ssl-identity", 0, 40, 0, "" }, |
| 2143 | #ifdef FOSSIL_ENABLE_TCL |
| 2144 | { "tcl", 0, 0, 0, "off" }, |
| 2145 | { "tcl-setup", 0, 40, 0, "" }, |
| @@ -2310,10 +2311,12 @@ | |
| 2310 | ** the "ssh://" protocol. |
| 2311 | ** |
| 2312 | ** ssh-fossil Remote fossil command to run with the "ssh://" protocol. |
| 2313 | ** |
| 2314 | ** ssh-fossil-user Fossil user to use instead of the URL user. |
| 2315 | ** |
| 2316 | ** ssl-ca-location The full pathname to a file containing PEM encoded |
| 2317 | ** CA root certificates, or a directory of certificates |
| 2318 | ** with filenames formed from the certificate hashes as |
| 2319 | ** required by OpenSSL. |
| 2320 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -2136,10 +2136,11 @@ | |
| 2136 | { "repo-cksum", 0, 0, 0, "on" }, |
| 2137 | { "self-register", 0, 0, 0, "off" }, |
| 2138 | { "ssh-command", 0, 40, 0, "" }, |
| 2139 | { "ssh-fossil", 0, 40, 0, "" }, |
| 2140 | { "ssh-fossil-user", 0, 40, 0, "" }, |
| 2141 | { "ssh-use-http", 0, 40, 0, "off" }, |
| 2142 | { "ssl-ca-location",0, 40, 0, "" }, |
| 2143 | { "ssl-identity", 0, 40, 0, "" }, |
| 2144 | #ifdef FOSSIL_ENABLE_TCL |
| 2145 | { "tcl", 0, 0, 0, "off" }, |
| 2146 | { "tcl-setup", 0, 40, 0, "" }, |
| @@ -2310,10 +2311,12 @@ | |
| 2311 | ** the "ssh://" protocol. |
| 2312 | ** |
| 2313 | ** ssh-fossil Remote fossil command to run with the "ssh://" protocol. |
| 2314 | ** |
| 2315 | ** ssh-fossil-user Fossil user to use instead of the URL user. |
| 2316 | ** |
| 2317 | ** ssh-use-http Use http instead of test-http. Default: off. |
| 2318 | ** |
| 2319 | ** ssl-ca-location The full pathname to a file containing PEM encoded |
| 2320 | ** CA root certificates, or a directory of certificates |
| 2321 | ** with filenames formed from the certificate hashes as |
| 2322 | ** required by OpenSSL. |
| 2323 |
+2
-1
| --- src/http.c | ||
| +++ src/http.c | ||
| @@ -40,11 +40,12 @@ | ||
| 40 | 40 | Blob pw; /* The nonce with user password appended */ |
| 41 | 41 | Blob sig; /* The signature field */ |
| 42 | 42 | |
| 43 | 43 | zLogin = url_or_fossil_user(); |
| 44 | 44 | blob_zero(pLogin); |
| 45 | - if( zLogin==0 || fossil_strcmp(g.urlUser, "anonymous")==0 ){ | |
| 45 | + if( zLogin==0 || fossil_strcmp(g.urlUser, "anonymous")==0 || | |
| 46 | + url_ssh_use_http()==0 ){ | |
| 46 | 47 | return; /* If no login card for users "nobody" and "anonymous" */ |
| 47 | 48 | } |
| 48 | 49 | blob_zero(&nonce); |
| 49 | 50 | blob_zero(&pw); |
| 50 | 51 | sha1sum_blob(pPayload, &nonce); |
| 51 | 52 |
| --- src/http.c | |
| +++ src/http.c | |
| @@ -40,11 +40,12 @@ | |
| 40 | Blob pw; /* The nonce with user password appended */ |
| 41 | Blob sig; /* The signature field */ |
| 42 | |
| 43 | zLogin = url_or_fossil_user(); |
| 44 | blob_zero(pLogin); |
| 45 | if( zLogin==0 || fossil_strcmp(g.urlUser, "anonymous")==0 ){ |
| 46 | return; /* If no login card for users "nobody" and "anonymous" */ |
| 47 | } |
| 48 | blob_zero(&nonce); |
| 49 | blob_zero(&pw); |
| 50 | sha1sum_blob(pPayload, &nonce); |
| 51 |
| --- src/http.c | |
| +++ src/http.c | |
| @@ -40,11 +40,12 @@ | |
| 40 | Blob pw; /* The nonce with user password appended */ |
| 41 | Blob sig; /* The signature field */ |
| 42 | |
| 43 | zLogin = url_or_fossil_user(); |
| 44 | blob_zero(pLogin); |
| 45 | if( zLogin==0 || fossil_strcmp(g.urlUser, "anonymous")==0 || |
| 46 | url_ssh_use_http()==0 ){ |
| 47 | return; /* If no login card for users "nobody" and "anonymous" */ |
| 48 | } |
| 49 | blob_zero(&nonce); |
| 50 | blob_zero(&pw); |
| 51 | sha1sum_blob(pPayload, &nonce); |
| 52 |
+5
-1
| --- src/http_transport.c | ||
| +++ src/http_transport.c | ||
| @@ -136,11 +136,15 @@ | ||
| 136 | 136 | n = blob_size(&zCmd); |
| 137 | 137 | blob_append(&zCmd, " ", 1); |
| 138 | 138 | shell_escape(&zCmd, zHost); |
| 139 | 139 | blob_append(&zCmd, " ", 1); |
| 140 | 140 | shell_escape(&zCmd, mprintf("%s", zSshFossilCmd)); |
| 141 | - blob_append(&zCmd, " http", 5); | |
| 141 | + if( db_get_boolean("ssh-use-http", 0) ){ | |
| 142 | + blob_append(&zCmd, " http", 5); | |
| 143 | + }else{ | |
| 144 | + blob_append(&zCmd, " test-http", 10); | |
| 145 | + } | |
| 142 | 146 | if( g.urlPath && g.urlPath[0] ){ |
| 143 | 147 | blob_append(&zCmd, " ", 1); |
| 144 | 148 | shell_escape(&zCmd, mprintf("%s", g.urlPath)); |
| 145 | 149 | } |
| 146 | 150 | if( fPrintSshCmd ){ |
| 147 | 151 |
| --- src/http_transport.c | |
| +++ src/http_transport.c | |
| @@ -136,11 +136,15 @@ | |
| 136 | n = blob_size(&zCmd); |
| 137 | blob_append(&zCmd, " ", 1); |
| 138 | shell_escape(&zCmd, zHost); |
| 139 | blob_append(&zCmd, " ", 1); |
| 140 | shell_escape(&zCmd, mprintf("%s", zSshFossilCmd)); |
| 141 | blob_append(&zCmd, " http", 5); |
| 142 | if( g.urlPath && g.urlPath[0] ){ |
| 143 | blob_append(&zCmd, " ", 1); |
| 144 | shell_escape(&zCmd, mprintf("%s", g.urlPath)); |
| 145 | } |
| 146 | if( fPrintSshCmd ){ |
| 147 |
| --- src/http_transport.c | |
| +++ src/http_transport.c | |
| @@ -136,11 +136,15 @@ | |
| 136 | n = blob_size(&zCmd); |
| 137 | blob_append(&zCmd, " ", 1); |
| 138 | shell_escape(&zCmd, zHost); |
| 139 | blob_append(&zCmd, " ", 1); |
| 140 | shell_escape(&zCmd, mprintf("%s", zSshFossilCmd)); |
| 141 | if( db_get_boolean("ssh-use-http", 0) ){ |
| 142 | blob_append(&zCmd, " http", 5); |
| 143 | }else{ |
| 144 | blob_append(&zCmd, " test-http", 10); |
| 145 | } |
| 146 | if( g.urlPath && g.urlPath[0] ){ |
| 147 | blob_append(&zCmd, " ", 1); |
| 148 | shell_escape(&zCmd, mprintf("%s", g.urlPath)); |
| 149 | } |
| 150 | if( fPrintSshCmd ){ |
| 151 |
+2
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -134,10 +134,11 @@ | ||
| 134 | 134 | int fSqlPrint; /* True if -sqlprint flag is present */ |
| 135 | 135 | int fQuiet; /* True if -quiet flag is present */ |
| 136 | 136 | int fHttpTrace; /* Trace outbound HTTP requests */ |
| 137 | 137 | int fSystemTrace; /* Trace calls to fossil_system(), --systemtrace */ |
| 138 | 138 | int fSshTrace; /* Trace the SSH setup traffic */ |
| 139 | + int fSshUseHttp; /* Use http or test-http mode for SSH */ | |
| 139 | 140 | char *zSshFossilCmd; /* Path to remoe fossil command for SSH */ |
| 140 | 141 | char *zSshCmd; /* SSH command string */ |
| 141 | 142 | char *zFossilUser; /* Fossil user if different from URL user */ |
| 142 | 143 | int fNoSync; /* Do not do an autosync ever. --nosync */ |
| 143 | 144 | char *zPath; /* Name of webpage being served */ |
| @@ -581,10 +582,11 @@ | ||
| 581 | 582 | g.fQuiet = find_option("quiet", 0, 0)!=0; |
| 582 | 583 | g.fSqlTrace = find_option("sqltrace", 0, 0)!=0; |
| 583 | 584 | g.fSqlStats = find_option("sqlstats", 0, 0)!=0; |
| 584 | 585 | g.fSystemTrace = find_option("systemtrace", 0, 0)!=0; |
| 585 | 586 | g.fSshTrace = find_option("sshtrace", 0, 0)!=0; |
| 587 | + g.fSshUseHttp = 0; | |
| 586 | 588 | g.zSshFossilCmd = 0; |
| 587 | 589 | g.zSshCmd = 0; |
| 588 | 590 | g.zFossilUser = 0; |
| 589 | 591 | if( g.fSqlTrace ) g.fSqlStats = 1; |
| 590 | 592 | g.fSqlPrint = find_option("sqlprint", 0, 0)!=0; |
| 591 | 593 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -134,10 +134,11 @@ | |
| 134 | int fSqlPrint; /* True if -sqlprint flag is present */ |
| 135 | int fQuiet; /* True if -quiet flag is present */ |
| 136 | int fHttpTrace; /* Trace outbound HTTP requests */ |
| 137 | int fSystemTrace; /* Trace calls to fossil_system(), --systemtrace */ |
| 138 | int fSshTrace; /* Trace the SSH setup traffic */ |
| 139 | char *zSshFossilCmd; /* Path to remoe fossil command for SSH */ |
| 140 | char *zSshCmd; /* SSH command string */ |
| 141 | char *zFossilUser; /* Fossil user if different from URL user */ |
| 142 | int fNoSync; /* Do not do an autosync ever. --nosync */ |
| 143 | char *zPath; /* Name of webpage being served */ |
| @@ -581,10 +582,11 @@ | |
| 581 | g.fQuiet = find_option("quiet", 0, 0)!=0; |
| 582 | g.fSqlTrace = find_option("sqltrace", 0, 0)!=0; |
| 583 | g.fSqlStats = find_option("sqlstats", 0, 0)!=0; |
| 584 | g.fSystemTrace = find_option("systemtrace", 0, 0)!=0; |
| 585 | g.fSshTrace = find_option("sshtrace", 0, 0)!=0; |
| 586 | g.zSshFossilCmd = 0; |
| 587 | g.zSshCmd = 0; |
| 588 | g.zFossilUser = 0; |
| 589 | if( g.fSqlTrace ) g.fSqlStats = 1; |
| 590 | g.fSqlPrint = find_option("sqlprint", 0, 0)!=0; |
| 591 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -134,10 +134,11 @@ | |
| 134 | int fSqlPrint; /* True if -sqlprint flag is present */ |
| 135 | int fQuiet; /* True if -quiet flag is present */ |
| 136 | int fHttpTrace; /* Trace outbound HTTP requests */ |
| 137 | int fSystemTrace; /* Trace calls to fossil_system(), --systemtrace */ |
| 138 | int fSshTrace; /* Trace the SSH setup traffic */ |
| 139 | int fSshUseHttp; /* Use http or test-http mode for SSH */ |
| 140 | char *zSshFossilCmd; /* Path to remoe fossil command for SSH */ |
| 141 | char *zSshCmd; /* SSH command string */ |
| 142 | char *zFossilUser; /* Fossil user if different from URL user */ |
| 143 | int fNoSync; /* Do not do an autosync ever. --nosync */ |
| 144 | char *zPath; /* Name of webpage being served */ |
| @@ -581,10 +582,11 @@ | |
| 582 | g.fQuiet = find_option("quiet", 0, 0)!=0; |
| 583 | g.fSqlTrace = find_option("sqltrace", 0, 0)!=0; |
| 584 | g.fSqlStats = find_option("sqlstats", 0, 0)!=0; |
| 585 | g.fSystemTrace = find_option("systemtrace", 0, 0)!=0; |
| 586 | g.fSshTrace = find_option("sshtrace", 0, 0)!=0; |
| 587 | g.fSshUseHttp = 0; |
| 588 | g.zSshFossilCmd = 0; |
| 589 | g.zSshCmd = 0; |
| 590 | g.zFossilUser = 0; |
| 591 | if( g.fSqlTrace ) g.fSqlStats = 1; |
| 592 | g.fSqlPrint = find_option("sqlprint", 0, 0)!=0; |
| 593 |
+8
-1
| --- src/url.c | ||
| +++ src/url.c | ||
| @@ -412,11 +412,11 @@ | ||
| 412 | 412 | /* |
| 413 | 413 | ** Prompt the user for the password for g.urlUser. Store the result |
| 414 | 414 | ** in g.urlPasswd. |
| 415 | 415 | */ |
| 416 | 416 | void url_prompt_for_password(void){ |
| 417 | - if( g.urlIsFile ) return; | |
| 417 | + if( g.urlIsFile || url_ssh_use_http()==0 ) return; | |
| 418 | 418 | if( isatty(fileno(stdin)) |
| 419 | 419 | && (g.urlFlags & URL_PROMPT_PW)!=0 |
| 420 | 420 | && (g.urlFlags & URL_PROMPTED)==0 |
| 421 | 421 | ){ |
| 422 | 422 | g.urlFlags |= URL_PROMPTED; |
| @@ -434,10 +434,17 @@ | ||
| 434 | 434 | }else{ |
| 435 | 435 | fossil_fatal("missing or incorrect password for user \"%s\"", |
| 436 | 436 | url_or_fossil_user() ); |
| 437 | 437 | } |
| 438 | 438 | } |
| 439 | + | |
| 440 | +/* | |
| 441 | +** Return true if http mode is in use for "ssh://" URL. | |
| 442 | +*/ | |
| 443 | +int url_ssh_use_http(void){ | |
| 444 | + return g.urlIsSsh && ( db_get_boolean("ssh-use-http", 0) || g.fSshUseHttp ); | |
| 445 | +} | |
| 439 | 446 | |
| 440 | 447 | /* |
| 441 | 448 | ** Remember the URL if requested. |
| 442 | 449 | */ |
| 443 | 450 | void url_remember(void){ |
| 444 | 451 |
| --- src/url.c | |
| +++ src/url.c | |
| @@ -412,11 +412,11 @@ | |
| 412 | /* |
| 413 | ** Prompt the user for the password for g.urlUser. Store the result |
| 414 | ** in g.urlPasswd. |
| 415 | */ |
| 416 | void url_prompt_for_password(void){ |
| 417 | if( g.urlIsFile ) return; |
| 418 | if( isatty(fileno(stdin)) |
| 419 | && (g.urlFlags & URL_PROMPT_PW)!=0 |
| 420 | && (g.urlFlags & URL_PROMPTED)==0 |
| 421 | ){ |
| 422 | g.urlFlags |= URL_PROMPTED; |
| @@ -434,10 +434,17 @@ | |
| 434 | }else{ |
| 435 | fossil_fatal("missing or incorrect password for user \"%s\"", |
| 436 | url_or_fossil_user() ); |
| 437 | } |
| 438 | } |
| 439 | |
| 440 | /* |
| 441 | ** Remember the URL if requested. |
| 442 | */ |
| 443 | void url_remember(void){ |
| 444 |
| --- src/url.c | |
| +++ src/url.c | |
| @@ -412,11 +412,11 @@ | |
| 412 | /* |
| 413 | ** Prompt the user for the password for g.urlUser. Store the result |
| 414 | ** in g.urlPasswd. |
| 415 | */ |
| 416 | void url_prompt_for_password(void){ |
| 417 | if( g.urlIsFile || url_ssh_use_http()==0 ) return; |
| 418 | if( isatty(fileno(stdin)) |
| 419 | && (g.urlFlags & URL_PROMPT_PW)!=0 |
| 420 | && (g.urlFlags & URL_PROMPTED)==0 |
| 421 | ){ |
| 422 | g.urlFlags |= URL_PROMPTED; |
| @@ -434,10 +434,17 @@ | |
| 434 | }else{ |
| 435 | fossil_fatal("missing or incorrect password for user \"%s\"", |
| 436 | url_or_fossil_user() ); |
| 437 | } |
| 438 | } |
| 439 | |
| 440 | /* |
| 441 | ** Return true if http mode is in use for "ssh://" URL. |
| 442 | */ |
| 443 | int url_ssh_use_http(void){ |
| 444 | return g.urlIsSsh && ( db_get_boolean("ssh-use-http", 0) || g.fSshUseHttp ); |
| 445 | } |
| 446 | |
| 447 | /* |
| 448 | ** Remember the URL if requested. |
| 449 | */ |
| 450 | void url_remember(void){ |
| 451 |