Fossil SCM

Show the parent-project-* CONFIG entries (if they exist) with the "fossil remote config-data" command. When parsing a URL, if the URL comes from the CONFIG table, remember the CONFIG table entry that supplied the password.

drh 2022-12-30 16:32 trunk
Commit 6d0083adce5597e106f50369522311d9576d8cff91ea8a380b8aac634fcbfaf7
3 files changed +8 -4 +39 -13 +1 -1
+8 -4
--- src/sync.c
+++ src/sync.c
@@ -769,19 +769,23 @@
769769
Stmt q;
770770
int n;
771771
n = db_int(13,
772772
"SELECT max(length(name))"
773773
" FROM config"
774
- " WHERE name GLOB 'sync-*:*' OR name GLOB 'last-sync-*'"
774
+ " WHERE name GLOB 'sync-*:*'"
775
+ " OR name GLOB 'last-sync-*'"
776
+ " OR name GLOB 'parent-project-*'"
775777
);
776778
db_prepare(&q,
777779
"SELECT name,"
778
- " CASE WHEN name LIKE '%%sync-pw%%'"
780
+ " CASE WHEN name LIKE '%%sync-pw%%' OR name='parent-project-pw'"
779781
" THEN printf('%%.*c',length(value),'*') ELSE value END"
780782
" FROM config"
781
- " WHERE name GLOB 'sync-*:*' OR name GLOB 'last-sync-*'"
782
- " ORDER BY name LIKE '%%sync-pw%%', name"
783
+ " WHERE name GLOB 'sync-*:*'"
784
+ " OR name GLOB 'last-sync-*'"
785
+ " OR name GLOB 'parent-project-*'"
786
+ " ORDER BY name LIKE '%%sync-pw%%' OR name='parent-project-pw', name"
783787
);
784788
while( db_step(&q)==SQLITE_ROW ){
785789
fossil_print("%-*s %s\n",
786790
n, db_column_text(&q,0),
787791
db_column_text(&q,1)
788792
--- src/sync.c
+++ src/sync.c
@@ -769,19 +769,23 @@
769 Stmt q;
770 int n;
771 n = db_int(13,
772 "SELECT max(length(name))"
773 " FROM config"
774 " WHERE name GLOB 'sync-*:*' OR name GLOB 'last-sync-*'"
 
 
775 );
776 db_prepare(&q,
777 "SELECT name,"
778 " CASE WHEN name LIKE '%%sync-pw%%'"
779 " THEN printf('%%.*c',length(value),'*') ELSE value END"
780 " FROM config"
781 " WHERE name GLOB 'sync-*:*' OR name GLOB 'last-sync-*'"
782 " ORDER BY name LIKE '%%sync-pw%%', name"
 
 
783 );
784 while( db_step(&q)==SQLITE_ROW ){
785 fossil_print("%-*s %s\n",
786 n, db_column_text(&q,0),
787 db_column_text(&q,1)
788
--- src/sync.c
+++ src/sync.c
@@ -769,19 +769,23 @@
769 Stmt q;
770 int n;
771 n = db_int(13,
772 "SELECT max(length(name))"
773 " FROM config"
774 " WHERE name GLOB 'sync-*:*'"
775 " OR name GLOB 'last-sync-*'"
776 " OR name GLOB 'parent-project-*'"
777 );
778 db_prepare(&q,
779 "SELECT name,"
780 " CASE WHEN name LIKE '%%sync-pw%%' OR name='parent-project-pw'"
781 " THEN printf('%%.*c',length(value),'*') ELSE value END"
782 " FROM config"
783 " WHERE name GLOB 'sync-*:*'"
784 " OR name GLOB 'last-sync-*'"
785 " OR name GLOB 'parent-project-*'"
786 " ORDER BY name LIKE '%%sync-pw%%' OR name='parent-project-pw', name"
787 );
788 while( db_step(&q)==SQLITE_ROW ){
789 fossil_print("%-*s %s\n",
790 n, db_column_text(&q,0),
791 db_column_text(&q,1)
792
+39 -13
--- src/url.c
+++ src/url.c
@@ -61,15 +61,16 @@
6161
char *user; /* User id for http: */
6262
char *passwd; /* Password for http: */
6363
char *canonical; /* Canonical representation of the URL */
6464
char *proxyAuth; /* Proxy-Authorizer: string */
6565
char *fossil; /* The fossil query parameter on ssh: */
66
+ char *pwConfig; /* CONFIG table entry that gave us the password */
6667
unsigned flags; /* Boolean flags controlling URL processing */
6768
int useProxy; /* Used to remember that a proxy is in use */
68
- char *proxyUrlPath; /* Remember path when proxy is use */
69
+ int proxyOrigPort; /* Tunneled port number for https through proxy */
70
+ char *proxyUrlPath; /* Remember path when proxy is use */
6971
char *proxyUrlCanonical; /* Remember canonical path when proxy is use */
70
- int proxyOrigPort; /* Tunneled port number for https through proxy */
7172
};
7273
#endif /* INTERFACE */
7374
7475
7576
/*
@@ -87,17 +88,17 @@
8788
** user Userid.
8889
** passwd Password.
8990
** hostname HOST:PORT or just HOST if port is the default.
9091
** canonical The URL in canonical form, omitting the password
9192
**
92
-** If zUrl==0 and URL_USE_CONFIG is set, then parse the URL stored
93
-** in last-sync-url and last-sync-pw of the CONFIG table. Or if
93
+** If URL_USECONFIG is set and zUrl is NULL or "default", then parse the
94
+** URL stored in last-sync-url and last-sync-pw of the CONFIG table. Or if
9495
** URL_USE_PARENT is also set, then use parent-project-url and
9596
** parent-project-pw from the CONFIG table instead of last-sync-url
9697
** and last-sync-pw.
9798
**
98
-** If zUrl is a symbolic name and URL_USE_CONFIG is true, then look up
99
+** If URL_USE_CONFIG is set and zUrl is a symbolic name, then look up
99100
** the URL in sync-url:%Q and sync-pw:%Q elements of the CONFIG table where
100101
** %Q is the symbolic name.
101102
**
102103
** This routine differs from url_parse() in that this routine stores the
103104
** results in pUrlData and does not change the values of global variables.
@@ -109,10 +110,11 @@
109110
UrlData *pUrlData
110111
){
111112
int i, j, c;
112113
char *zFile = 0;
113114
115
+ pUrlData->pwConfig = 0;
114116
if( urlFlags & URL_USE_CONFIG ){
115117
if( zUrl==0 || strcmp(zUrl,"default")==0 ){
116118
const char *zPwConfig = "last-sync-pw";
117119
if( urlFlags & URL_USE_PARENT ){
118120
zUrl = db_get("parent-project-url", 0);
@@ -125,26 +127,28 @@
125127
zUrl = db_get("last-sync-url", 0);
126128
}
127129
if( zUrl==0 ) return;
128130
if( pUrlData->passwd==0 ){
129131
pUrlData->passwd = unobscure(db_get(zPwConfig, 0));
132
+ pUrlData->pwConfig = fossil_strdup(zPwConfig);
130133
}
131134
pUrlData->isAlias = 1;
132135
}else{
133136
char *zKey = sqlite3_mprintf("sync-url:%q", zUrl);
134137
char *zAlt = db_get(zKey, 0);
135
- sqlite3_free(zKey);
136138
if( zAlt ){
139
+ pUrlData->pwConfig = mprintf("sync-pw:%q", zUrl);
137140
pUrlData->passwd = unobscure(
138141
db_text(0, "SELECT value FROM config WHERE name='sync-pw:%q'",zUrl)
139142
);
140143
zUrl = zAlt;
141144
urlFlags |= URL_REMEMBER_PW;
142145
pUrlData->isAlias = 1;
143146
}else{
144147
pUrlData->isAlias = 0;
145148
}
149
+ sqlite3_free(zKey);
146150
}
147151
}else{
148152
if( zUrl==0 ) return;
149153
}
150154
@@ -404,10 +408,11 @@
404408
fossil_free(p->name);
405409
fossil_free(p->path);
406410
fossil_free(p->user);
407411
fossil_free(p->passwd);
408412
fossil_free(p->fossil);
413
+ fossil_free(p->pwConfig);
409414
memset(p, 0, sizeof(*p));
410415
}
411416
412417
/*
413418
** Parse the given URL, which describes a sync server. Populate variables
@@ -425,19 +430,29 @@
425430
** g.url.path Path name for HTTP or HTTPS.
426431
** g.url.user Userid.
427432
** g.url.passwd Password.
428433
** g.url.hostname HOST:PORT or just HOST if port is the default.
429434
** g.url.canonical The URL in canonical form, omitting the password
435
+** g.url.pwConfig Name of CONFIG table entry containing the password
430436
**
431437
** HTTP url format as follows (HTTPS is the same with a different scheme):
432438
**
433439
** http://userid:password@host:port/path
434440
**
435441
** SSH url format is:
436442
**
437443
** ssh://userid@host:port/path?fossil=path/to/fossil.exe
438444
**
445
+** If URL_USE_CONFIG is set then the URL and password might be pulled from
446
+** the CONFIG table rather than from the zUrl parameter. If zUrl is NULL
447
+** or "default" then the URL is given by the "last-sync-url" setting and
448
+** the password comes form the "last-sync-pw" setting. If zUrl is a symbolic
449
+** name, then the URL comes from "sync-url:NAME" and the password from
450
+** "sync-pw:NAME" where NAME is the input zUrl string. Whenever the
451
+** password is taken from the CONFIG table, the g.url.pwConfig field is
452
+** set to the CONFIG.NAME value from which that password is taken. Otherwise,
453
+** g.url.pwConfig is NULL.
439454
*/
440455
void url_parse(const char *zUrl, unsigned int urlFlags){
441456
url_parse_local(zUrl, urlFlags, &g.url);
442457
}
443458
@@ -444,22 +459,28 @@
444459
/*
445460
** COMMAND: test-urlparser
446461
**
447462
** Usage: %fossil test-urlparser URL ?options?
448463
**
449
-** --remember Store results in last-sync-url
450464
** --prompt-pw Prompt for password if missing
465
+** --remember Store results in last-sync-url
466
+** --show-pw Show the CONFIG-derived password in the output
467
+** --use-config Pull URL and password from the CONFIG table
468
+** --use-parent Use the parent project URL
451469
*/
452470
void cmd_test_urlparser(void){
453471
int i;
454472
unsigned fg = 0;
473
+ int showPw = 0;
474
+ db_must_be_within_tree();
455475
url_proxy_options();
456
- if( find_option("remember",0,0) ){
457
- db_must_be_within_tree();
458
- fg |= URL_REMEMBER;
459
- }
460
- if( find_option("prompt-pw",0,0) ) fg |= URL_PROMPT_PW;
476
+ if( find_option("remember",0,0) ) fg |= URL_REMEMBER;
477
+ if( find_option("prompt-pw",0,0) ) fg |= URL_PROMPT_PW;
478
+ if( find_option("use-parent",0,0) ) fg |= URL_USE_PARENT|URL_USE_CONFIG;
479
+ if( find_option("use-config",0,0) ) fg |= URL_USE_CONFIG;
480
+ if( find_option("show-pw",0,0) ) showPw = 1;
481
+ if( (fg & URL_USE_CONFIG)==0 ) showPw = 1;
461482
if( g.argc!=3 && g.argc!=4 ){
462483
usage("URL");
463484
}
464485
url_parse(g.argv[2], fg);
465486
for(i=0; i<2; i++){
@@ -471,11 +492,16 @@
471492
fossil_print("g.url.port = %d\n", g.url.port);
472493
fossil_print("g.url.dfltPort = %d\n", g.url.dfltPort);
473494
fossil_print("g.url.hostname = %s\n", g.url.hostname);
474495
fossil_print("g.url.path = %s\n", g.url.path);
475496
fossil_print("g.url.user = %s\n", g.url.user);
476
- fossil_print("g.url.passwd = %s\n", g.url.passwd);
497
+ if( showPw || g.url.pwConfig==0 ){
498
+ fossil_print("g.url.passwd = %s\n", g.url.passwd);
499
+ }else{
500
+ fossil_print("g.url.passwd = ************\n");
501
+ }
502
+ fossil_print("g.url.pwConfig = %s\n", g.url.pwConfig);
477503
fossil_print("g.url.canonical = %s\n", g.url.canonical);
478504
fossil_print("g.url.fossil = %s\n", g.url.fossil);
479505
fossil_print("g.url.flags = 0x%02x\n", g.url.flags);
480506
fossil_print("url_full(g.url) = %z\n", url_full(&g.url));
481507
if( g.url.isFile || g.url.isSsh ) break;
482508
--- src/url.c
+++ src/url.c
@@ -61,15 +61,16 @@
61 char *user; /* User id for http: */
62 char *passwd; /* Password for http: */
63 char *canonical; /* Canonical representation of the URL */
64 char *proxyAuth; /* Proxy-Authorizer: string */
65 char *fossil; /* The fossil query parameter on ssh: */
 
66 unsigned flags; /* Boolean flags controlling URL processing */
67 int useProxy; /* Used to remember that a proxy is in use */
68 char *proxyUrlPath; /* Remember path when proxy is use */
 
69 char *proxyUrlCanonical; /* Remember canonical path when proxy is use */
70 int proxyOrigPort; /* Tunneled port number for https through proxy */
71 };
72 #endif /* INTERFACE */
73
74
75 /*
@@ -87,17 +88,17 @@
87 ** user Userid.
88 ** passwd Password.
89 ** hostname HOST:PORT or just HOST if port is the default.
90 ** canonical The URL in canonical form, omitting the password
91 **
92 ** If zUrl==0 and URL_USE_CONFIG is set, then parse the URL stored
93 ** in last-sync-url and last-sync-pw of the CONFIG table. Or if
94 ** URL_USE_PARENT is also set, then use parent-project-url and
95 ** parent-project-pw from the CONFIG table instead of last-sync-url
96 ** and last-sync-pw.
97 **
98 ** If zUrl is a symbolic name and URL_USE_CONFIG is true, then look up
99 ** the URL in sync-url:%Q and sync-pw:%Q elements of the CONFIG table where
100 ** %Q is the symbolic name.
101 **
102 ** This routine differs from url_parse() in that this routine stores the
103 ** results in pUrlData and does not change the values of global variables.
@@ -109,10 +110,11 @@
109 UrlData *pUrlData
110 ){
111 int i, j, c;
112 char *zFile = 0;
113
 
114 if( urlFlags & URL_USE_CONFIG ){
115 if( zUrl==0 || strcmp(zUrl,"default")==0 ){
116 const char *zPwConfig = "last-sync-pw";
117 if( urlFlags & URL_USE_PARENT ){
118 zUrl = db_get("parent-project-url", 0);
@@ -125,26 +127,28 @@
125 zUrl = db_get("last-sync-url", 0);
126 }
127 if( zUrl==0 ) return;
128 if( pUrlData->passwd==0 ){
129 pUrlData->passwd = unobscure(db_get(zPwConfig, 0));
 
130 }
131 pUrlData->isAlias = 1;
132 }else{
133 char *zKey = sqlite3_mprintf("sync-url:%q", zUrl);
134 char *zAlt = db_get(zKey, 0);
135 sqlite3_free(zKey);
136 if( zAlt ){
 
137 pUrlData->passwd = unobscure(
138 db_text(0, "SELECT value FROM config WHERE name='sync-pw:%q'",zUrl)
139 );
140 zUrl = zAlt;
141 urlFlags |= URL_REMEMBER_PW;
142 pUrlData->isAlias = 1;
143 }else{
144 pUrlData->isAlias = 0;
145 }
 
146 }
147 }else{
148 if( zUrl==0 ) return;
149 }
150
@@ -404,10 +408,11 @@
404 fossil_free(p->name);
405 fossil_free(p->path);
406 fossil_free(p->user);
407 fossil_free(p->passwd);
408 fossil_free(p->fossil);
 
409 memset(p, 0, sizeof(*p));
410 }
411
412 /*
413 ** Parse the given URL, which describes a sync server. Populate variables
@@ -425,19 +430,29 @@
425 ** g.url.path Path name for HTTP or HTTPS.
426 ** g.url.user Userid.
427 ** g.url.passwd Password.
428 ** g.url.hostname HOST:PORT or just HOST if port is the default.
429 ** g.url.canonical The URL in canonical form, omitting the password
 
430 **
431 ** HTTP url format as follows (HTTPS is the same with a different scheme):
432 **
433 ** http://userid:password@host:port/path
434 **
435 ** SSH url format is:
436 **
437 ** ssh://userid@host:port/path?fossil=path/to/fossil.exe
438 **
 
 
 
 
 
 
 
 
 
439 */
440 void url_parse(const char *zUrl, unsigned int urlFlags){
441 url_parse_local(zUrl, urlFlags, &g.url);
442 }
443
@@ -444,22 +459,28 @@
444 /*
445 ** COMMAND: test-urlparser
446 **
447 ** Usage: %fossil test-urlparser URL ?options?
448 **
449 ** --remember Store results in last-sync-url
450 ** --prompt-pw Prompt for password if missing
 
 
 
 
451 */
452 void cmd_test_urlparser(void){
453 int i;
454 unsigned fg = 0;
 
 
455 url_proxy_options();
456 if( find_option("remember",0,0) ){
457 db_must_be_within_tree();
458 fg |= URL_REMEMBER;
459 }
460 if( find_option("prompt-pw",0,0) ) fg |= URL_PROMPT_PW;
 
461 if( g.argc!=3 && g.argc!=4 ){
462 usage("URL");
463 }
464 url_parse(g.argv[2], fg);
465 for(i=0; i<2; i++){
@@ -471,11 +492,16 @@
471 fossil_print("g.url.port = %d\n", g.url.port);
472 fossil_print("g.url.dfltPort = %d\n", g.url.dfltPort);
473 fossil_print("g.url.hostname = %s\n", g.url.hostname);
474 fossil_print("g.url.path = %s\n", g.url.path);
475 fossil_print("g.url.user = %s\n", g.url.user);
476 fossil_print("g.url.passwd = %s\n", g.url.passwd);
 
 
 
 
 
477 fossil_print("g.url.canonical = %s\n", g.url.canonical);
478 fossil_print("g.url.fossil = %s\n", g.url.fossil);
479 fossil_print("g.url.flags = 0x%02x\n", g.url.flags);
480 fossil_print("url_full(g.url) = %z\n", url_full(&g.url));
481 if( g.url.isFile || g.url.isSsh ) break;
482
--- src/url.c
+++ src/url.c
@@ -61,15 +61,16 @@
61 char *user; /* User id for http: */
62 char *passwd; /* Password for http: */
63 char *canonical; /* Canonical representation of the URL */
64 char *proxyAuth; /* Proxy-Authorizer: string */
65 char *fossil; /* The fossil query parameter on ssh: */
66 char *pwConfig; /* CONFIG table entry that gave us the password */
67 unsigned flags; /* Boolean flags controlling URL processing */
68 int useProxy; /* Used to remember that a proxy is in use */
69 int proxyOrigPort; /* Tunneled port number for https through proxy */
70 char *proxyUrlPath; /* Remember path when proxy is use */
71 char *proxyUrlCanonical; /* Remember canonical path when proxy is use */
 
72 };
73 #endif /* INTERFACE */
74
75
76 /*
@@ -87,17 +88,17 @@
88 ** user Userid.
89 ** passwd Password.
90 ** hostname HOST:PORT or just HOST if port is the default.
91 ** canonical The URL in canonical form, omitting the password
92 **
93 ** If URL_USECONFIG is set and zUrl is NULL or "default", then parse the
94 ** URL stored in last-sync-url and last-sync-pw of the CONFIG table. Or if
95 ** URL_USE_PARENT is also set, then use parent-project-url and
96 ** parent-project-pw from the CONFIG table instead of last-sync-url
97 ** and last-sync-pw.
98 **
99 ** If URL_USE_CONFIG is set and zUrl is a symbolic name, then look up
100 ** the URL in sync-url:%Q and sync-pw:%Q elements of the CONFIG table where
101 ** %Q is the symbolic name.
102 **
103 ** This routine differs from url_parse() in that this routine stores the
104 ** results in pUrlData and does not change the values of global variables.
@@ -109,10 +110,11 @@
110 UrlData *pUrlData
111 ){
112 int i, j, c;
113 char *zFile = 0;
114
115 pUrlData->pwConfig = 0;
116 if( urlFlags & URL_USE_CONFIG ){
117 if( zUrl==0 || strcmp(zUrl,"default")==0 ){
118 const char *zPwConfig = "last-sync-pw";
119 if( urlFlags & URL_USE_PARENT ){
120 zUrl = db_get("parent-project-url", 0);
@@ -125,26 +127,28 @@
127 zUrl = db_get("last-sync-url", 0);
128 }
129 if( zUrl==0 ) return;
130 if( pUrlData->passwd==0 ){
131 pUrlData->passwd = unobscure(db_get(zPwConfig, 0));
132 pUrlData->pwConfig = fossil_strdup(zPwConfig);
133 }
134 pUrlData->isAlias = 1;
135 }else{
136 char *zKey = sqlite3_mprintf("sync-url:%q", zUrl);
137 char *zAlt = db_get(zKey, 0);
 
138 if( zAlt ){
139 pUrlData->pwConfig = mprintf("sync-pw:%q", zUrl);
140 pUrlData->passwd = unobscure(
141 db_text(0, "SELECT value FROM config WHERE name='sync-pw:%q'",zUrl)
142 );
143 zUrl = zAlt;
144 urlFlags |= URL_REMEMBER_PW;
145 pUrlData->isAlias = 1;
146 }else{
147 pUrlData->isAlias = 0;
148 }
149 sqlite3_free(zKey);
150 }
151 }else{
152 if( zUrl==0 ) return;
153 }
154
@@ -404,10 +408,11 @@
408 fossil_free(p->name);
409 fossil_free(p->path);
410 fossil_free(p->user);
411 fossil_free(p->passwd);
412 fossil_free(p->fossil);
413 fossil_free(p->pwConfig);
414 memset(p, 0, sizeof(*p));
415 }
416
417 /*
418 ** Parse the given URL, which describes a sync server. Populate variables
@@ -425,19 +430,29 @@
430 ** g.url.path Path name for HTTP or HTTPS.
431 ** g.url.user Userid.
432 ** g.url.passwd Password.
433 ** g.url.hostname HOST:PORT or just HOST if port is the default.
434 ** g.url.canonical The URL in canonical form, omitting the password
435 ** g.url.pwConfig Name of CONFIG table entry containing the password
436 **
437 ** HTTP url format as follows (HTTPS is the same with a different scheme):
438 **
439 ** http://userid:password@host:port/path
440 **
441 ** SSH url format is:
442 **
443 ** ssh://userid@host:port/path?fossil=path/to/fossil.exe
444 **
445 ** If URL_USE_CONFIG is set then the URL and password might be pulled from
446 ** the CONFIG table rather than from the zUrl parameter. If zUrl is NULL
447 ** or "default" then the URL is given by the "last-sync-url" setting and
448 ** the password comes form the "last-sync-pw" setting. If zUrl is a symbolic
449 ** name, then the URL comes from "sync-url:NAME" and the password from
450 ** "sync-pw:NAME" where NAME is the input zUrl string. Whenever the
451 ** password is taken from the CONFIG table, the g.url.pwConfig field is
452 ** set to the CONFIG.NAME value from which that password is taken. Otherwise,
453 ** g.url.pwConfig is NULL.
454 */
455 void url_parse(const char *zUrl, unsigned int urlFlags){
456 url_parse_local(zUrl, urlFlags, &g.url);
457 }
458
@@ -444,22 +459,28 @@
459 /*
460 ** COMMAND: test-urlparser
461 **
462 ** Usage: %fossil test-urlparser URL ?options?
463 **
 
464 ** --prompt-pw Prompt for password if missing
465 ** --remember Store results in last-sync-url
466 ** --show-pw Show the CONFIG-derived password in the output
467 ** --use-config Pull URL and password from the CONFIG table
468 ** --use-parent Use the parent project URL
469 */
470 void cmd_test_urlparser(void){
471 int i;
472 unsigned fg = 0;
473 int showPw = 0;
474 db_must_be_within_tree();
475 url_proxy_options();
476 if( find_option("remember",0,0) ) fg |= URL_REMEMBER;
477 if( find_option("prompt-pw",0,0) ) fg |= URL_PROMPT_PW;
478 if( find_option("use-parent",0,0) ) fg |= URL_USE_PARENT|URL_USE_CONFIG;
479 if( find_option("use-config",0,0) ) fg |= URL_USE_CONFIG;
480 if( find_option("show-pw",0,0) ) showPw = 1;
481 if( (fg & URL_USE_CONFIG)==0 ) showPw = 1;
482 if( g.argc!=3 && g.argc!=4 ){
483 usage("URL");
484 }
485 url_parse(g.argv[2], fg);
486 for(i=0; i<2; i++){
@@ -471,11 +492,16 @@
492 fossil_print("g.url.port = %d\n", g.url.port);
493 fossil_print("g.url.dfltPort = %d\n", g.url.dfltPort);
494 fossil_print("g.url.hostname = %s\n", g.url.hostname);
495 fossil_print("g.url.path = %s\n", g.url.path);
496 fossil_print("g.url.user = %s\n", g.url.user);
497 if( showPw || g.url.pwConfig==0 ){
498 fossil_print("g.url.passwd = %s\n", g.url.passwd);
499 }else{
500 fossil_print("g.url.passwd = ************\n");
501 }
502 fossil_print("g.url.pwConfig = %s\n", g.url.pwConfig);
503 fossil_print("g.url.canonical = %s\n", g.url.canonical);
504 fossil_print("g.url.fossil = %s\n", g.url.fossil);
505 fossil_print("g.url.flags = 0x%02x\n", g.url.flags);
506 fossil_print("url_full(g.url) = %z\n", url_full(&g.url));
507 if( g.url.isFile || g.url.isSsh ) break;
508
+1 -1
--- src/xfer.c
+++ src/xfer.c
@@ -814,11 +814,11 @@
814814
** Signature generation on the client side is handled by the
815815
** http_exchange() routine.
816816
**
817817
** Return non-zero for a login failure and zero for success.
818818
*/
819
-int check_login(Blob *pLogin, Blob *pNonce, Blob *pSig){
819
+static int check_login(Blob *pLogin, Blob *pNonce, Blob *pSig){
820820
Stmt q;
821821
int rc = -1;
822822
char *zLogin = blob_terminate(pLogin);
823823
defossilize(zLogin);
824824
825825
--- src/xfer.c
+++ src/xfer.c
@@ -814,11 +814,11 @@
814 ** Signature generation on the client side is handled by the
815 ** http_exchange() routine.
816 **
817 ** Return non-zero for a login failure and zero for success.
818 */
819 int check_login(Blob *pLogin, Blob *pNonce, Blob *pSig){
820 Stmt q;
821 int rc = -1;
822 char *zLogin = blob_terminate(pLogin);
823 defossilize(zLogin);
824
825
--- src/xfer.c
+++ src/xfer.c
@@ -814,11 +814,11 @@
814 ** Signature generation on the client side is handled by the
815 ** http_exchange() routine.
816 **
817 ** Return non-zero for a login failure and zero for success.
818 */
819 static int check_login(Blob *pLogin, Blob *pNonce, Blob *pSig){
820 Stmt q;
821 int rc = -1;
822 char *zLogin = blob_terminate(pLogin);
823 defossilize(zLogin);
824
825

Keyboard Shortcuts

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