| ︙ | | |
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
#define UUID_SIZE 40
/*
** Maximum number of auxiliary parameters on reports
*/
#define MX_AUX 5
/*
** Holds flags for fossil user permissions.
*/
struct FossilUserPerms {
char Setup; /* s: use Setup screens on web interface */
char Admin; /* a: administrative permission */
char Delete; /* d: delete wiki or tickets */
char Password; /* p: change password */
char Query; /* q: create new reports */
char Write; /* i: xfer inbound. checkin */
char Read; /* o: xfer outbound. checkout */
char History; /* h: access historical information. */
char Clone; /* g: clone */
char RdWiki; /* j: view wiki via web */
char NewWiki; /* f: create new wiki via web */
char ApndWiki; /* m: append to wiki via web */
char WrWiki; /* k: edit wiki via web */
char RdTkt; /* r: view tickets via web */
char NewTkt; /* n: create new tickets */
char ApndTkt; /* c: append to tickets via the web */
char WrTkt; /* w: make changes to tickets via web */
char Attach; /* b: add attachments */
char TktFmt; /* t: create new ticket report formats */
char RdAddr; /* e: read email addresses or other private data */
char Zip; /* z: download zipped artifact via /zip URL */
char Private; /* x: can send and receive private content */
};
/*
** All global variables are in this structure.
*/
struct Global {
int argc; char **argv; /* Command-line arguments to the program */
int isConst; /* True if the output is unchanging */
sqlite3 *db; /* The connection to the databases */
|
| ︙ | | |
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
|
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|
/* Information used to populate the RCVFROM table */
int rcvid; /* The rcvid. 0 if not yet defined. */
char *zIpAddr; /* The remote IP address */
char *zNonce; /* The nonce used for login */
/* permissions used by the server */
int okSetup; /* s: use Setup screens on web interface */
struct FossilUserPerms perm;
int okAdmin; /* a: administrative permission */
int okDelete; /* d: delete wiki or tickets */
int okPassword; /* p: change password */
int okQuery; /* q: create new reports */
int okWrite; /* i: xfer inbound. checkin */
int okRead; /* o: xfer outbound. checkout */
int okHistory; /* h: access historical information. */
int okClone; /* g: clone */
int okRdWiki; /* j: view wiki via web */
int okNewWiki; /* f: create new wiki via web */
int okApndWiki; /* m: append to wiki via web */
int okWrWiki; /* k: edit wiki via web */
int okRdTkt; /* r: view tickets via web */
int okNewTkt; /* n: create new tickets */
int okApndTkt; /* c: append to tickets via the web */
int okWrTkt; /* w: make changes to tickets via web */
int okAttach; /* b: add attachments */
int okTktFmt; /* t: create new ticket report formats */
int okRdAddr; /* e: read email addresses or other private data */
int okZip; /* z: download zipped artifact via /zip URL */
int okPrivate; /* x: can send and receive private content */
/* For defense against Cross-site Request Forgery attacks */
char zCsrfToken[12]; /* Value of the anti-CSRF token */
int okCsrf; /* Anti-CSRF token is present and valid */
FILE *fDebug; /* Write debug information here, if the file exists */
int thTrace; /* True to enable TH1 debugging output */
|
| ︙ | | |
644
645
646
647
648
649
650
651
652
653
654
655
656
657
|
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
for(i=nCmd=0; i<count(aCommand); i++){
if( strncmp(aCommand[i].zName,"test",4)!=0 ) continue;
aCmd[nCmd++] = aCommand[i].zName;
}
multi_column_list(aCmd, nCmd);
}
/*
** COMMAND: test-list-webpage
**
** List all web pages
*/
void cmd_test_webpage_list(void){
int i, nCmd;
const char *aCmd[count(aWebpage)];
for(i=nCmd=0; i<count(aWebpage); i++){
aCmd[nCmd++] = aWebpage[i].zName;
}
multi_column_list(aCmd, nCmd);
}
/*
** COMMAND: version
**
** Usage: %fossil version
**
** Print the source code version number for the fossil executable.
|
| ︙ | | |
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
|
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
|
-
+
|
if( zAltRepo[0]!='/' ){
zAltRepo = mprintf("%s/../%s", g.zRepositoryName, zAltRepo);
file_simplify_name(zAltRepo, -1);
}
db_close(1);
db_open_repository(zAltRepo);
login_as_user(zUser);
g.okPassword = 0;
g.perm.Password = 0;
zPath += i;
nHost = g.zTop - g.zBaseURL;
g.zBaseURL = mprintf("%z/%s", g.zBaseURL, g.zPath);
g.zTop = g.zBaseURL + nHost;
continue;
}
}else{
|
| ︙ | | |