2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
|
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
|
-
+
|
if( zIpAddr==0 ){
zIpAddr = cgi_ssh_remote_addr(0);
if( zIpAddr && zIpAddr[0] ){
g.fSshClient |= CGI_SSH_CLIENT;
}
}
if( zChRoot ){
enter_chroot_jail(zChRoot, noJail);
enter_chroot_jail((char*)zChRoot, noJail);
}else{
g.zRepositoryName = enter_chroot_jail(g.zRepositoryName, noJail);
}
if( useSCGI ){
cgi_handle_scgi_request();
}else if( g.fSshClient & CGI_SSH_CLIENT ){
ssh_request_loop(zIpAddr, glob_create(zFileGlob));
|
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
|
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
|
+
|
const char *zPort; /* Value of the --port option */
const char *zBrowser; /* Name of web browser program */
char *zBrowserCmd = 0; /* Command to launch the web browser */
int isUiCmd; /* True if command is "ui", not "server' */
const char *zNotFound; /* The --notfound option or NULL */
int flags = 0; /* Server flags */
#if !defined(_WIN32)
const char *zChRoot; /* Use for chroot instead of repository path */
int noJail; /* Do not enter the chroot jail */
const char *zTimeout = 0; /* Max runtime of any single HTTP request */
#endif
int allowRepoList; /* List repositories on URL "/" */
const char *zAltBase; /* Argument to the --baseurl option */
const char *zFileGlob; /* Static content must match this */
char *zIpAddr = 0; /* Bind to this IP address */
|
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
|
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
|
-
+
|
}
g.cgiOutput = 1;
find_server_repository(2, 0);
if( fossil_strcmp(g.zRepositoryName,"/")==0 ){
allowRepoList = 1;
}else{
if( zChRoot ){
enter_chroot_jail(zChRoot, noJail);
enter_chroot_jail((char*)zChRoot, noJail);
}else{
g.zRepositoryName = enter_chroot_jail(g.zRepositoryName, noJail);
}
}
if( flags & HTTP_SERVER_SCGI ){
cgi_handle_scgi_request();
}else{
|